Explorar o código

fw-api: CL 2779193 - update fw common interface files

WMI changes for active APF and hw data filtering requirement

Change-Id: Id11a62e40c59d3dfa4ffeb5c7460ce804925ab17
CRs-Fixed: 1107600
qcabuildsw %!s(int64=8) %!d(string=hai) anos
pai
achega
5fcdbc3388
Modificáronse 3 ficheiros con 50 adicións e 2 borrados
  1. 12 0
      fw/wmi_tlv_defs.h
  2. 37 1
      fw/wmi_unified.h
  3. 1 1
      fw/wmi_version.h

+ 12 - 0
fw/wmi_tlv_defs.h

@@ -791,6 +791,8 @@ typedef enum {
     WMITLV_TAG_STRUC_wmi_roam_per_config_fixed_param,
     WMITLV_TAG_STRUC_wmi_vdev_add_mac_addr_to_rx_filter_cmd_fixed_param,
     WMITLV_TAG_STRUC_wmi_vdev_add_mac_addr_to_rx_filter_status_event_fixed_param,
+    WMITLV_TAG_STRUC_wmi_bpf_set_vdev_active_mode_cmd_fixed_param,
+    WMITLV_TAG_STRUC_wmi_hw_data_filter_cmd_fixed_param,
 } WMITLV_TAG_ID;
 
 /*
@@ -1109,6 +1111,8 @@ typedef enum {
     OP(WMI_REQUEST_RADIO_CHAN_STATS_CMDID) \
     OP(WMI_ROAM_PER_CONFIG_CMDID) \
     OP(WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_CMDID) \
+    OP(WMI_BPF_SET_VDEV_ACTIVE_MODE_CMDID) \
+    OP(WMI_HW_DATA_FILTER_CMDID) \
     /* add new CMD_LIST elements above this line */
 
 
@@ -2971,6 +2975,10 @@ WMITLV_CREATE_PARAM_STRUC(WMI_BPF_SET_VDEV_INSTRUCTIONS_CMDID);
     WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_bpf_del_vdev_instructions_cmd_fixed_param, wmi_bpf_del_vdev_instructions_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
 WMITLV_CREATE_PARAM_STRUC(WMI_BPF_DEL_VDEV_INSTRUCTIONS_CMDID);
 
+#define WMITLV_TABLE_WMI_BPF_SET_VDEV_ACTIVE_MODE_CMDID(id,op,buf,len) \
+    WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_bpf_set_vdev_active_mode_cmd_fixed_param, wmi_bpf_set_vdev_active_mode_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+WMITLV_CREATE_PARAM_STRUC(WMI_BPF_SET_VDEV_ACTIVE_MODE_CMDID);
+
 /* Enable/Disable Smart Antenna */
 #define WMITLV_TABLE_WMI_PDEV_SMART_ANT_ENABLE_CMDID(id,op,buf,len) \
     WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_pdev_smart_ant_enable_cmd_fixed_param, wmi_pdev_smart_ant_enable_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) \
@@ -3179,6 +3187,10 @@ WMITLV_CREATE_PARAM_STRUC(WMI_REQUEST_RADIO_CHAN_STATS_CMDID);
     WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_add_mac_addr_to_rx_filter_cmd_fixed_param, wmi_vdev_add_mac_addr_to_rx_filter_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
 WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_CMDID);
 
+#define WMITLV_TABLE_WMI_HW_DATA_FILTER_CMDID(id,op,buf,len) \
+    WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_hw_data_filter_cmd_fixed_param, wmi_hw_data_filter_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+WMITLV_CREATE_PARAM_STRUC(WMI_HW_DATA_FILTER_CMDID);
+
 
 /************************** TLV definitions of WMI events *******************************/
 

+ 37 - 1
fw/wmi_unified.h

@@ -239,6 +239,7 @@ typedef enum {
     WMI_GRP_PROTOTYPE,      /* 0x38 */
     WMI_GRP_MONITOR,        /* 0x39 */
     WMI_GRP_REGULATORY,     /* 0x3a */
+    WMI_GRP_HW_DATA_FILTER, /* 0x3b */
 } WMI_GRP_ID;
 
 #define WMI_CMD_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
@@ -995,6 +996,7 @@ typedef enum {
     WMI_BPF_GET_VDEV_STATS_CMDID,
     WMI_BPF_SET_VDEV_INSTRUCTIONS_CMDID,
     WMI_BPF_DEL_VDEV_INSTRUCTIONS_CMDID,
+    WMI_BPF_SET_VDEV_ACTIVE_MODE_CMDID,
 
     /** WMI commands related to monitor mode. */
     WMI_MNT_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MONITOR),
@@ -1014,6 +1016,10 @@ typedef enum {
     WMI_NDP_INITIATOR_REQ_CMDID,
     WMI_NDP_RESPONDER_REQ_CMDID,
     WMI_NDP_END_REQ_CMDID,
+
+    /** WMI commands related to HW data filtering **/
+    WMI_HW_DATA_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_HW_DATA_FILTER),
+
 } WMI_CMD_ID;
 
 typedef enum {
@@ -15957,6 +15963,12 @@ typedef struct {
  */
 } wmi_scpc_event_fixed_param;
 
+typedef enum {
+    FW_ACTIVE_BPF_MODE_DISABLE =         (1 << 1),
+    FW_ACTIVE_BPF_MODE_FORCE_ENABLE =    (1 << 2),
+    FW_ACTIVE_BPF_MODE_ADAPTIVE_ENABLE = (1 << 3),
+} FW_ACTIVE_BPF_MODE;
+
 /* bpf interface structure */
 typedef struct wmi_bpf_get_capability_cmd_s {
     A_UINT32 tlv_header;
@@ -15968,6 +15980,8 @@ typedef struct wmi_bpf_capability_info_evt_s {
     A_UINT32 bpf_version; /* fw's implement version */
     A_UINT32 max_bpf_filters; /* max filters that fw supports */
     A_UINT32 max_bytes_for_bpf_inst; /* the maximum bytes that can be used as bpf instructions */
+    A_UINT32 fw_active_bpf_support_mcbc_modes; /* multicast/broadcast - refer to FW_ACTIVE_BPF_MODE, it can be 'or' of them */
+    A_UINT32 fw_active_bpf_support_uc_modes; /* unicast - refer to FW_ACTIVE_BPF_MODE, it can be 'or' of them */
 } wmi_bpf_capability_info_evt_fixed_param;
 
 /* bit 0 of flags: report counters */
@@ -16008,6 +16022,13 @@ typedef struct wmi_bpf_del_vdev_instructions_cmd_s {
     A_UINT32 filter_id;  /* BPF_FILTER_ID_ALL means delete all */
 } wmi_bpf_del_vdev_instructions_cmd_fixed_param;
 
+typedef struct wmi_bpf_set_vdev_active_mode_cmd_s {
+    A_UINT32 tlv_header;
+    A_UINT32 vdev_id;
+    A_UINT32 mcbc_mode; /* refer to FW_ACTIVE_BPF_MODE */
+    A_UINT32 uc_mode; /* refer to FW_ACTIVE_BPF_MODE */
+} wmi_bpf_set_vdev_active_mode_cmd_fixed_param;
+
 #define AES_BLOCK_LEN           16  /* in bytes */
 #define FIPS_KEY_LENGTH_128     16  /* in bytes */
 #define FIPS_KEY_LENGTH_256     32  /* in bytes */
@@ -16989,7 +17010,7 @@ static INLINE A_UINT8 *wmi_id_to_name(A_UINT32 wmi_command)
         /* Scan specific commands */
 
         /* start scan request to FW  */
-         WMI_RETURN_STRING(WMI_START_SCAN_CMDID);
+        WMI_RETURN_STRING(WMI_START_SCAN_CMDID);
         /* stop scan request to FW  */
         WMI_RETURN_STRING(WMI_STOP_SCAN_CMDID);
         /* full list of channels as defined by the regulatory
@@ -17567,6 +17588,8 @@ static INLINE A_UINT8 *wmi_id_to_name(A_UINT32 wmi_command)
         WMI_RETURN_STRING(WMI_REQUEST_RADIO_CHAN_STATS_CMDID);
         WMI_RETURN_STRING(WMI_ROAM_PER_CONFIG_CMDID);
         WMI_RETURN_STRING(WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_CMDID);
+        WMI_RETURN_STRING(WMI_BPF_SET_VDEV_ACTIVE_MODE_CMDID);
+        WMI_RETURN_STRING(WMI_HW_DATA_FILTER_CMDID);
     }
 
     return "Invalid WMI cmd";
@@ -17751,6 +17774,19 @@ typedef struct {
     A_UINT32 status; /* status is 1 if success and 0 if failed */
 } wmi_vdev_add_mac_addr_to_rx_filter_status_event_fixed_param;
 
+/* Definition of HW data filtering */
+typedef enum {
+    WMI_HW_DATA_FILTER_DROP_NON_ARP_BC = 0x01,
+    WMI_HW_DATA_FILTER_DROP_NON_ICMPV6_MC = 0x02,
+} WMI_HW_DATA_FILTER_BITMAP_TYPE;
+
+typedef struct {
+    A_UINT32 tlv_header;
+    A_UINT32 vdev_id;
+    A_UINT32 enable;  /* 1 . enable, 0- disable */
+    A_UINT32 hw_filter_bitmap; /* see WMI_HW_DATA_FILTER_BITMAP_TYPE */
+} wmi_hw_data_filter_cmd_fixed_param;
+
 
 /* ADD NEW DEFS HERE */
 

+ 1 - 1
fw/wmi_version.h

@@ -36,7 +36,7 @@
 #define __WMI_VER_MINOR_    0
 /** WMI revision number has to be incremented when there is a
  *  change that may or may not break compatibility. */
-#define __WMI_REVISION_ 332
+#define __WMI_REVISION_ 333
 
 /** The Version Namespace should not be normally changed. Only
  *  host and firmware of the same WMI namespace will work