diff options
author | Amitkumar Karwar <akarwar@marvell.com> | 2013-08-05 21:52:00 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-08-09 15:57:51 -0400 |
commit | 562fc5b30f228d4a8c1dad90c82897a5440d7a0b (patch) | |
tree | 663df0f0777f30e83ba56cbce05ee25be3c5c28a /drivers/net/wireless/mwifiex/fw.h | |
parent | afd84de47309cbdf96ea80d073233834f28393a5 (diff) |
mwifiex: add packet coalesce support
Coalesce filters are configured in firmware based on settings
received from cfg80211.
Packet type which is required by firmware is determined based on
provided patterns in a rule:
Unicast: if pattern '01' with offset 0 is found
Multicast: if pattern '33:33' or '01:00:5e' with offset 0 is found
Broadcast: if pattern 'ff:ff:ff:ff' with offset 0 is found
Some example coalesce configuration files:
1) Coalesce Rx data packets from 192.168.0.88
mac address of our device is 00:50:43:21:53:7A
Source IP address offset comes out as 52 after following
calculations:
32 bytes of HW 802.11 header + 8 bytes LLC +
12 bytes in IPV4 header till source IP address
Destination mac is at offset 6 in HW header.
delay=100
condition=1
patterns=01,6+00:50:43:22,10+53:7A,52+c0:a8:00:58
2) Coalesce all broadcast and multicast packets(Multiple packet
types are not allowed in a single rule. Hence created separate
rules)
delay=400
condition=1
patterns=33:33
delay=400
condition=1
patterns=ff:ff:ff:ff
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/fw.h')
-rw-r--r-- | drivers/net/wireless/mwifiex/fw.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/fw.h b/drivers/net/wireless/mwifiex/fw.h index 12c6223ebb8c..c9ad1c0d338d 100644 --- a/drivers/net/wireless/mwifiex/fw.h +++ b/drivers/net/wireless/mwifiex/fw.h | |||
@@ -153,6 +153,7 @@ enum MWIFIEX_802_11_PRIVACY_FILTER { | |||
153 | #define TLV_TYPE_UAP_PS_AO_TIMER (PROPRIETARY_TLV_BASE_ID + 123) | 153 | #define TLV_TYPE_UAP_PS_AO_TIMER (PROPRIETARY_TLV_BASE_ID + 123) |
154 | #define TLV_TYPE_PWK_CIPHER (PROPRIETARY_TLV_BASE_ID + 145) | 154 | #define TLV_TYPE_PWK_CIPHER (PROPRIETARY_TLV_BASE_ID + 145) |
155 | #define TLV_TYPE_GWK_CIPHER (PROPRIETARY_TLV_BASE_ID + 146) | 155 | #define TLV_TYPE_GWK_CIPHER (PROPRIETARY_TLV_BASE_ID + 146) |
156 | #define TLV_TYPE_COALESCE_RULE (PROPRIETARY_TLV_BASE_ID + 154) | ||
156 | 157 | ||
157 | #define MWIFIEX_TX_DATA_BUF_SIZE_2K 2048 | 158 | #define MWIFIEX_TX_DATA_BUF_SIZE_2K 2048 |
158 | 159 | ||
@@ -294,6 +295,7 @@ enum MWIFIEX_802_11_PRIVACY_FILTER { | |||
294 | #define HostCmd_CMD_CAU_REG_ACCESS 0x00ed | 295 | #define HostCmd_CMD_CAU_REG_ACCESS 0x00ed |
295 | #define HostCmd_CMD_SET_BSS_MODE 0x00f7 | 296 | #define HostCmd_CMD_SET_BSS_MODE 0x00f7 |
296 | #define HostCmd_CMD_PCIE_DESC_DETAILS 0x00fa | 297 | #define HostCmd_CMD_PCIE_DESC_DETAILS 0x00fa |
298 | #define HostCmd_CMD_COALESCE_CFG 0x010a | ||
297 | #define HostCmd_CMD_MGMT_FRAME_REG 0x010c | 299 | #define HostCmd_CMD_MGMT_FRAME_REG 0x010c |
298 | #define HostCmd_CMD_REMAIN_ON_CHAN 0x010d | 300 | #define HostCmd_CMD_REMAIN_ON_CHAN 0x010d |
299 | #define HostCmd_CMD_11AC_CFG 0x0112 | 301 | #define HostCmd_CMD_11AC_CFG 0x0112 |
@@ -1596,6 +1598,27 @@ struct host_cmd_ds_802_11_cfg_data { | |||
1596 | __le16 data_len; | 1598 | __le16 data_len; |
1597 | } __packed; | 1599 | } __packed; |
1598 | 1600 | ||
1601 | struct coalesce_filt_field_param { | ||
1602 | u8 operation; | ||
1603 | u8 operand_len; | ||
1604 | __le16 offset; | ||
1605 | u8 operand_byte_stream[4]; | ||
1606 | }; | ||
1607 | |||
1608 | struct coalesce_receive_filt_rule { | ||
1609 | struct mwifiex_ie_types_header header; | ||
1610 | u8 num_of_fields; | ||
1611 | u8 pkt_type; | ||
1612 | __le16 max_coalescing_delay; | ||
1613 | struct coalesce_filt_field_param params[0]; | ||
1614 | } __packed; | ||
1615 | |||
1616 | struct host_cmd_ds_coalesce_cfg { | ||
1617 | __le16 action; | ||
1618 | __le16 num_of_rules; | ||
1619 | struct coalesce_receive_filt_rule rule[0]; | ||
1620 | } __packed; | ||
1621 | |||
1599 | struct host_cmd_ds_command { | 1622 | struct host_cmd_ds_command { |
1600 | __le16 command; | 1623 | __le16 command; |
1601 | __le16 size; | 1624 | __le16 size; |
@@ -1656,6 +1679,7 @@ struct host_cmd_ds_command { | |||
1656 | struct host_cmd_ds_sta_deauth sta_deauth; | 1679 | struct host_cmd_ds_sta_deauth sta_deauth; |
1657 | struct host_cmd_11ac_vht_cfg vht_cfg; | 1680 | struct host_cmd_11ac_vht_cfg vht_cfg; |
1658 | struct host_cmd_ds_802_11_cfg_data cfg_data; | 1681 | struct host_cmd_ds_802_11_cfg_data cfg_data; |
1682 | struct host_cmd_ds_coalesce_cfg coalesce_cfg; | ||
1659 | } params; | 1683 | } params; |
1660 | } __packed; | 1684 | } __packed; |
1661 | 1685 | ||