]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Extend APF interface for read/write and enable/disable ops
authorVamsi Krishna <vamsi_krishna@codeaurora.org>
Fri, 12 Jan 2018 07:12:58 +0000 (12:42 +0530)
committerJouni Malinen <j@w1.fi>
Wed, 14 Feb 2018 22:26:06 +0000 (00:26 +0200)
Enhance QCA vendor specific APF interface to support write/read program
and/or data and to enable/disable APF feature.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
src/common/qca-vendor.h

index 283d952edbd785fe4ceae3674f1df7dcd9c5c3a5..ea9080870407085321462896ae9fe2232b005305 100644 (file)
@@ -4869,11 +4869,33 @@ enum qca_wlan_vendor_attr_nd_offload {
 };
 
 /**
- * enum packet_filter_sub_cmd - Packet filter sub command
+ * enum packet_filter_sub_cmd - Packet filter sub commands
  */
 enum packet_filter_sub_cmd {
+       /**
+        * Write packet filter program and/or data. The driver/firmware should
+        * disable APF before writing into local buffer and re-enable APF after
+        * writing is done.
+        */
        QCA_WLAN_SET_PACKET_FILTER = 1,
+       /* Get packet filter feature capabilities from driver */
        QCA_WLAN_GET_PACKET_FILTER = 2,
+       /**
+        * Write packet filter program and/or data. User space will send the
+        * %QCA_WLAN_DISABLE_PACKET_FILTER command before issuing this command
+        * and will send the %QCA_WLAN_ENABLE_PACKET_FILTER afterwards. The key
+        * difference from that %QCA_WLAN_SET_PACKET_FILTER is the control over
+        * enable/disable is given to user space with this command. Also,
+        * user space sends the length of program portion in the buffer within
+        * %QCA_WLAN_VENDOR_ATTR_PACKET_FILTER_PROG_LENGTH.
+        */
+       QCA_WLAN_WRITE_PACKET_FILTER = 3,
+       /* Read packet filter program and/or data */
+       QCA_WLAN_READ_PACKET_FILTER = 4,
+       /* Enable APF feature */
+       QCA_WLAN_ENABLE_PACKET_FILTER = 5,
+       /* Disable APF feature */
+       QCA_WLAN_DISABLE_PACKET_FILTER = 6,
 };
 
 /**
@@ -4888,12 +4910,20 @@ enum qca_wlan_vendor_attr_packet_filter {
        QCA_WLAN_VENDOR_ATTR_PACKET_FILTER_VERSION,
        /* Unsigned 32-bit value indicating the packet filter id */
        QCA_WLAN_VENDOR_ATTR_PACKET_FILTER_ID,
-       /* Unsigned 32-bit value indicating the packet filter size */
+       /**
+        * Unsigned 32-bit value indicating the packet filter size including
+        * program + data.
+        */
        QCA_WLAN_VENDOR_ATTR_PACKET_FILTER_SIZE,
        /* Unsigned 32-bit value indicating the packet filter current offset */
        QCA_WLAN_VENDOR_ATTR_PACKET_FILTER_CURRENT_OFFSET,
-       /* Unsigned 32-bit value indicating length of BPF instructions */
+       /* Program and/or data in bytes */
        QCA_WLAN_VENDOR_ATTR_PACKET_FILTER_PROGRAM,
+       /* Unsigned 32-bit value of the length of the program section in packet
+        * filter buffer.
+        */
+       QCA_WLAN_VENDOR_ATTR_PACKET_FILTER_PROG_LENGTH = 7,
+
        /* keep last */
        QCA_WLAN_VENDOR_ATTR_PACKET_FILTER_AFTER_LAST,
        QCA_WLAN_VENDOR_ATTR_PACKET_FILTER_MAX =