summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSandeep Puligilla <spuligil@qca.qualcomm.com>2015-08-17 12:11:46 -0700
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2015-08-19 13:59:14 +0530
commitbeaf1edce2630f7785a0dc7eccd02419d2a04dfe (patch)
treea38db617c8b501d1477422bc9447df48ee7eb0e4
parentabe86a498e9c2cff40eaecc294dfe0e028e2be31 (diff)
qcacld-2.0: CL 1360810 - update fw common interface files
Packet filter configure and enable commands Change-Id: I7ab7d4a98a25d0c4746f4524488449128701c310 CRs-Fixed: 865207
-rw-r--r--CORE/SERVICES/COMMON/wmi_tlv_defs.h17
-rw-r--r--CORE/SERVICES/COMMON/wmi_unified.h84
-rw-r--r--CORE/SERVICES/COMMON/wmi_version.h2
-rw-r--r--CORE/SERVICES/WMI/wmi_unified.c2
4 files changed, 102 insertions, 3 deletions
diff --git a/CORE/SERVICES/COMMON/wmi_tlv_defs.h b/CORE/SERVICES/COMMON/wmi_tlv_defs.h
index e626c80e4257..0df020f12f7a 100644
--- a/CORE/SERVICES/COMMON/wmi_tlv_defs.h
+++ b/CORE/SERVICES/COMMON/wmi_tlv_defs.h
@@ -580,6 +580,8 @@ typedef enum {
WMITLV_TAG_STRUC_wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param,
WMITLV_TAG_STRUC_wmi_diag_event_log_config_fixed_param,
WMITLV_TAG_STRUC_wmi_diag_event_log_supported_event_fixed_params,
+ WMITLV_TAG_STRUC_wmi_packet_filter_config_fixed_param,
+ WMITLV_TAG_STRUC_wmi_packet_filter_enable_fixed_param,
} WMITLV_TAG_ID;
/*
@@ -803,8 +805,9 @@ typedef enum {
OP(WMI_SOC_SET_HW_MODE_CMDID) \
OP(WMI_SOC_SET_DUAL_MAC_CONFIG_CMDID) \
OP(WMI_WOW_ENABLE_ICMPV6_NA_FLT_CMDID) \
- OP(WMI_DIAG_EVENT_LOG_CONFIG_CMDID)
-
+ OP(WMI_DIAG_EVENT_LOG_CONFIG_CMDID) \
+ OP(WMI_PACKET_FILTER_CONFIG_CMDID) \
+ OP(WMI_PACKET_FILTER_ENABLE_CMDID)
/*
* IMPORTANT: Please add _ALL_ WMI Events Here.
* Otherwise, these WMI TLV Functions will be process them.
@@ -2851,6 +2854,16 @@ WMITLV_CREATE_PARAM_STRUC(WMI_SOC_HW_MODE_TRANSITION_EVENTID);
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_response_event_fixed_param, wmi_soc_set_dual_mac_config_response_event_fixed_param, fixed_param, WMITLV_SIZE_FIX)
WMITLV_CREATE_PARAM_STRUC(WMI_SOC_SET_DUAL_MAC_CONFIG_RESP_EVENTID);
+/* Packet Filter configure command*/
+#define WMITLV_TABLE_WMI_PACKET_FILTER_CONFIG_CMDID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_packet_filter_config_fixed_param, WMI_PACKET_FILTER_CONFIG_CMD_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+WMITLV_CREATE_PARAM_STRUC(WMI_PACKET_FILTER_CONFIG_CMDID);
+
+/* Packet Filter enable command*/
+#define WMITLV_TABLE_WMI_PACKET_FILTER_ENABLE_CMDID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_packet_filter_enable_fixed_param, WMI_PACKET_FILTER_ENABLE_CMD_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+WMITLV_CREATE_PARAM_STRUC(WMI_PACKET_FILTER_ENABLE_CMDID);
+
#ifdef __cplusplus
}
#endif
diff --git a/CORE/SERVICES/COMMON/wmi_unified.h b/CORE/SERVICES/COMMON/wmi_unified.h
index 92c46858b471..a686ddad2e8e 100644
--- a/CORE/SERVICES/COMMON/wmi_unified.h
+++ b/CORE/SERVICES/COMMON/wmi_unified.h
@@ -229,6 +229,7 @@ typedef enum {
WMI_GRP_SAP_OFL,
WMI_GRP_OCB,
WMI_GRP_SOC,
+ WMI_GRP_PKT_FILTER,
} WMI_GRP_ID;
#define WMI_CMD_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
@@ -802,6 +803,11 @@ typedef enum {
WMI_SOC_SET_PCL_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SOC),
WMI_SOC_SET_HW_MODE_CMDID,
WMI_SOC_SET_DUAL_MAC_CONFIG_CMDID,
+
+ /* packet filter commands */
+ WMI_PACKET_FILTER_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PKT_FILTER),
+ WMI_PACKET_FILTER_ENABLE_CMDID,
+
} WMI_CMD_ID;
typedef enum {
@@ -11180,6 +11186,84 @@ typedef struct {
} wmi_soc_set_dual_mac_config_response_event_fixed_param;
+#define WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD 2
+#define WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER 10
+
+typedef enum {
+ PACKET_FILTER_TYPE_INVALID = 0,
+ PACKET_FILTER_TYPE_FILTER_PKT,
+ PACKET_FILTER_TYPE_RESERVE_PKT, // not used
+ PACKET_FILTER_TYPE_MAX_ENUM_SIZE
+} WMI_PACKET_FILTER_FILTER_TYPE;
+
+typedef enum {
+ PACKET_FILTER_PROTO_TYPE_INVALID = 0,
+
+ /* L2 header */
+ PACKET_FILTER_PROTO_TYPE_MAC,
+ PACKET_FILTER_PROTO_TYPE_SNAP,
+
+ /* L3 header (EtherType) */
+ PACKET_FILTER_PROTO_TYPE_IPV4,
+ PACKET_FILTER_PROTO_TYPE_IPV6,
+
+ /* L4 header (IP protocol) */
+ PACKET_FILTER_PROTO_TYPE_UDP,
+ PACKET_FILTER_PROTO_TYPE_TCP,
+ PACKET_FILTER_PROTO_TYPE_ICMPV6,
+
+ PACKET_FILTER_PROTO_TYPE_MAX
+} WMI_PACKET_FILTER_PROTO_TYPE;
+
+typedef enum {
+ PACKET_FILTER_CMP_TYPE_INVALID = 0,
+ PACKET_FILTER_CMP_TYPE_EQUAL,
+ PACKET_FILTER_CMP_TYPE_MASK_EQUAL,
+ PACKET_FILTER_CMP_TYPE_NOT_EQUAL,
+ PACKET_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
+ PACKET_FILTER_CMP_TYPE_ADDRTYPE,
+ PACKET_FILTER_CMP_TYPE_MAX
+} WMI_PACKET_FILTER_CMP_TYPE;
+
+typedef enum {
+ PACKET_FILTER_SET_INACTIVE = 0,
+ PACKET_FILTER_SET_ACTIVE
+} WMI_PACKET_FILTER_ACTION;
+
+typedef enum {
+ PACKET_FILTER_SET_DISABLE = 0,
+ PACKET_FILTER_SET_ENABLE
+} WMI_PACKET_FILTER_RUNTIME_ENABLE;
+
+typedef struct {
+ A_UINT32 proto_type;
+ A_UINT32 cmp_type;
+ A_UINT32 data_length; /* Length of the data to compare (units = bytes) */
+ A_UINT32 data_offset; /* from start of the respective frame header (
+units = bytes) */
+ A_UINT32 compareData[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD]; /* Data to compare, little-endian order */
+ A_UINT32 dataMask[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD]; /* Mask to be applied on rcvd packet data before compare, little-endian order */
+} WMI_PACKET_FILTER_PARAMS_TYPE;
+
+typedef struct {
+ A_UINT32 tlv_header;
+ A_UINT32 vdev_id;
+ A_UINT32 filter_id;
+ A_UINT32 filter_action; /* WMI_PACKET_FILTER_ACTION */
+ A_UINT32 filter_type;
+ A_UINT32 num_params; /* how many entries in paramsData are valid */
+ A_UINT32 coalesce_time; // not currently used - fill with 0x0
+ WMI_PACKET_FILTER_PARAMS_TYPE paramsData[
+WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER];
+} WMI_PACKET_FILTER_CONFIG_CMD_fixed_param;
+
+/* enable / disable all filters within the specified vdev */
+typedef struct {
+ A_UINT32 tlv_header;
+ A_UINT32 vdev_id;
+ A_UINT32 enable; /* WMI_PACKET_FILTER_RUNTIME_ENABLE */
+} WMI_PACKET_FILTER_ENABLE_CMD_fixed_param;
+
/* ADD NEW DEFS HERE */
/*****************************************************************************
diff --git a/CORE/SERVICES/COMMON/wmi_version.h b/CORE/SERVICES/COMMON/wmi_version.h
index 40e051196498..a5f0df7d6442 100644
--- a/CORE/SERVICES/COMMON/wmi_version.h
+++ b/CORE/SERVICES/COMMON/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_ 139
+#define __WMI_REVISION_ 140
/** The Version Namespace should not be normally changed. Only
* host and firmware of the same WMI namespace will work
diff --git a/CORE/SERVICES/WMI/wmi_unified.c b/CORE/SERVICES/WMI/wmi_unified.c
index 0c56f7a717a0..dcdb910c10dd 100644
--- a/CORE/SERVICES/WMI/wmi_unified.c
+++ b/CORE/SERVICES/WMI/wmi_unified.c
@@ -638,6 +638,8 @@ static u_int8_t* get_wmi_cmd_string(WMI_CMD_ID wmi_command)
CASE_RETURN_STRING(WMI_SOC_SET_DUAL_MAC_CONFIG_CMDID);
CASE_RETURN_STRING(WMI_WOW_ENABLE_ICMPV6_NA_FLT_CMDID);
CASE_RETURN_STRING(WMI_DIAG_EVENT_LOG_CONFIG_CMDID);
+ CASE_RETURN_STRING(WMI_PACKET_FILTER_CONFIG_CMDID);
+ CASE_RETURN_STRING(WMI_PACKET_FILTER_ENABLE_CMDID);
}
return "Invalid WMI cmd";
}