OSDN Git Service

WiFi HAL API changes for WiFi packet filtering
authorPaul Jensen <pauljensen@google.com>
Tue, 29 Dec 2015 17:07:15 +0000 (12:07 -0500)
committerPaul Jensen <pauljensen@google.com>
Thu, 21 Jan 2016 12:54:17 +0000 (12:54 +0000)
Change-Id: I9b41755ac5baf2ec5f9d764d9f6c1c7b8551140a

include/hardware_legacy/wifi_hal.h

index c78d0f3..e8bd39d 100644 (file)
@@ -338,6 +338,22 @@ typedef struct {
     wifi_error (*wifi_nan_get_version)(wifi_handle handle,
         NanVersion* version);
 
+    /**
+     * Returns the chipset's hardware filtering capabilities:
+     * @param version pointer to version of the packet filter interpreter
+     *                supported, filled in upon return. 0 indicates no support.
+     * @param max_len pointer to maximum size of the filter bytecode, filled in
+     *                upon return.
+     */
+    wifi_error (*wifi_get_packet_filter_capabilities)(wifi_interface_handle handle,
+                                                      u32 *version, u32 *max_len);
+    /**
+     * Programs the packet filter.
+     * @param program pointer to the program byte-code.
+     * @param len length of the program byte-code.
+     */
+    wifi_error (*wifi_set_packet_filter)(wifi_interface_handle handle,
+                                         const u8 *program, u32 len);
 } wifi_hal_fn;
 wifi_error init_wifi_vendor_hal_func_table(wifi_hal_fn *fn);
 #ifdef __cplusplus