mwifiex: support 11ac for 8897
cover mwifiex: support 11ac for 8897
This series adds 11ac feature for 8897.
Yogesh Ashok Powar (2):
mwifiex: coding style cleanup in bss parameter update
mwifiex: add 802.11AC support
drivers/net/wireless/mwifiex/11ac.c | 261 ++++++++++++++++++++++++++++ drivers/net/wireless/mwifiex/11ac.h | 26 +++ drivers/net/wireless/mwifiex/11n.c | 7 +- drivers/net/wireless/mwifiex/11n.h | 4 +- drivers/net/wireless/mwifiex/Makefile | 1 + drivers/net/wireless/mwifiex/cfg80211.c | 177 ++++++++++++++++--- drivers/net/wireless/mwifiex/cfp.c | 159 +++++++++++++++++- drivers/net/wireless/mwifiex/cmdevt.c | 19 ++ drivers/net/wireless/mwifiex/fw.h | 127 +++++++++++++- drivers/net/wireless/mwifiex/ioctl.h | 4 + drivers/net/wireless/mwifiex/join.c | 8 + drivers/net/wireless/mwifiex/main.h | 23 +++- drivers/net/wireless/mwifiex/scan.c | 63 ++++++- drivers/net/wireless/mwifiex/sta_cmd.c | 2 +- drivers/net/wireless/mwifiex/sta_cmdresp.c | 1 + drivers/net/wireless/mwifiex/sta_ioctl.c | 5 +- 16 files changed, 835 insertions(+), 52 deletions(-) create mode 100644 drivers/net/wireless/mwifiex/11ac.c create mode 100644 drivers/net/wireless/mwifiex/11ac.h
PATCH 1/2 mwifiex: coding style cleanup in bss parameter update
From: Yogesh Ashok Powar <[email protected]>
They all can make one line.
--- drivers/net/wireless/mwifiex/scan.c | 15 +++++---------- 1 files changed, 5 insertions(+), 10 deletions(-)
drivers/net/wireless/mwifiex/scan.c +5 -10
@@ -1485,20 +1485,15 @@ static int mwifiex_update_curr_bss_params(struct mwifiex_private *priv, priv->curr_bss_params.bss_descriptor.bcn_wapi_ie =NULL ; priv->curr_bss_params.bss_descriptor.wapi_offset =0 ; priv->curr_bss_params.bss_descriptor.bcn_ht_cap =NULL ; - priv->curr_bss_params.bss_descriptor.ht_cap_offset = -0 ; + priv->curr_bss_params.bss_descriptor.ht_cap_offset =0 ; priv->curr_bss_params.bss_descriptor.bcn_ht_oper =NULL ; - priv->curr_bss_params.bss_descriptor.ht_info_offset = -0 ; - priv->curr_bss_params.bss_descriptor.bcn_bss_co_2040 = -NULL ; - priv->curr_bss_params.bss_descriptor. - bss_co_2040_offset =0 ; + priv->curr_bss_params.bss_descriptor.ht_info_offset =0 ; + priv->curr_bss_params.bss_descriptor.bcn_bss_co_2040 =NULL ; + priv->curr_bss_params.bss_descriptor.bss_co_2040_offset =0 ; priv->curr_bss_params.bss_descriptor.bcn_ext_cap =NULL ; priv->curr_bss_params.bss_descriptor.ext_cap_offset =0 ; priv->curr_bss_params.bss_descriptor.beacon_buf =NULL ; - priv->curr_bss_params.bss_descriptor.beacon_buf_size = -0 ; + priv->curr_bss_params.bss_descriptor.beacon_buf_size =0 ;/* Make a copy of current BSSID descriptor */ memcpy(&priv->curr_bss_params.bss_descriptor, bss_desc,
Signature · 1 line
1.7.0.2
Re: [PATCH 1/2] mwifiex: coding style cleanup in bss parameter update
Quoted 2 lines · Bing Zhao
From: Yogesh Ashok Powar <[email protected]>
They all can make one line.
[]
drivers/net/wireless/mwifiex/scan.c
Quoted 1 line
drivers/net/wireless/mwifiex/scan.c +0
-0
[]
drivers/net/wireless/mwifiex/scan.c static int mwifiex_update_curr_bss_params(struct mwifiex_private *priv, · line 1488
Quoted 7 lines
drivers/net/wireless/mwifiex/scan.c +1
-2@@ -1485,20 +1485,15 @@ static int mwifiex_update_curr_bss_params(struct mwifiex_private *priv, priv->curr_bss_params.bss_descriptor.bcn_wapi_ie =NULL ; priv->curr_bss_params.bss_descriptor.wapi_offset =0 ; priv->curr_bss_params.bss_descriptor.bcn_ht_cap =NULL ; - priv->curr_bss_params.bss_descriptor.ht_cap_offset = -0 ; + priv->curr_bss_params.bss_descriptor.ht_cap_offset =0 ;
Another way to do this to reduce the visual noise it to create a temporary
struct mwifiex_bssdescriptor *t = &priv->curr_bss_params.bss_descriptor; and use s/priv->curr_bss_params.bss_descriptor./t->/
RE: [PATCH 1/2] mwifiex: coding style cleanup in bss parameter update
Hi Joe,
Thanks for your comment.
Quoted 16 lines · Bing Zhao
Quoted 2 lines
From: Yogesh Ashok Powar <[email protected]>
They all can make one line.[]
drivers/net/wireless/mwifiex/scan.c
Quoted 1 line
drivers/net/wireless/mwifiex/scan.c +0
-0[]
drivers/net/wireless/mwifiex/scan.c static int mwifiex_update_curr_bss_params(struct mwifiex_private *priv, · line 1488
Quoted 7 lines
drivers/net/wireless/mwifiex/scan.c +1
-2@@ -1485,20 +1485,15 @@ static int mwifiex_update_curr_bss_params(struct mwifiex_private *priv, priv->curr_bss_params.bss_descriptor.bcn_wapi_ie =NULL ; priv->curr_bss_params.bss_descriptor.wapi_offset =0 ; priv->curr_bss_params.bss_descriptor.bcn_ht_cap =NULL ; - priv->curr_bss_params.bss_descriptor.ht_cap_offset = -0 ; + priv->curr_bss_params.bss_descriptor.ht_cap_offset =0 ;Another way to do this to reduce the visual noise it to create a temporary
Quoted 3 lines
struct mwifiex_bssdescriptor *t = &priv->curr_bss_params.bss_descriptor; and use s/priv->curr_bss_params.bss_descriptor./t->/
This does look better.
As the patch is in wireless-next now I can make the change later.
Thanks,
Bing
PATCH 2/2 mwifiex: add 802.11AC support
In reply to Bing ZhaoFrom: Yogesh Ashok Powar <[email protected]>
For STA mode, collect VHT realated IEs from the Beacons or Probe Responses and append similar VHT related IEs to association requests.
For AP mode, get VHT related capability information and share it with cfg80211 at the time of wiphy register. This information is further used by cfg80211 and hostapd to start an AP with 802.11AC support.
Currently only 8897 supports 802.11AC.
--- drivers/net/wireless/mwifiex/11ac.c | 261 ++++++++++++++++++++++++++++ drivers/net/wireless/mwifiex/11ac.h | 26 +++ drivers/net/wireless/mwifiex/11n.c | 7 +- drivers/net/wireless/mwifiex/11n.h | 4 +- drivers/net/wireless/mwifiex/Makefile | 1 + drivers/net/wireless/mwifiex/cfg80211.c | 177 ++++++++++++++++--- drivers/net/wireless/mwifiex/cfp.c | 159 +++++++++++++++++- drivers/net/wireless/mwifiex/cmdevt.c | 19 ++ drivers/net/wireless/mwifiex/fw.h | 127 +++++++++++++- drivers/net/wireless/mwifiex/ioctl.h | 4 + drivers/net/wireless/mwifiex/join.c | 8 + drivers/net/wireless/mwifiex/main.h | 23 +++- drivers/net/wireless/mwifiex/scan.c | 48 +++++ drivers/net/wireless/mwifiex/sta_cmd.c | 2 +- drivers/net/wireless/mwifiex/sta_cmdresp.c | 1 + drivers/net/wireless/mwifiex/sta_ioctl.c | 5 +- 16 files changed, 830 insertions(+), 42 deletions(-) create mode 100644 drivers/net/wireless/mwifiex/11ac.c create mode 100644 drivers/net/wireless/mwifiex/11ac.h
drivers/net/wireless/mwifiex/11ac.c new file +261 -0
@@ -0,0 +1,261 @@ +/* +* Marvell Wireless LAN device driver: 802.11ac +* +* Copyright (C) 2013, Marvell International Ltd. +* +* This software file (the "File") is distributed by Marvell International +* Ltd. under the terms of the GNU General Public License Version 2, June 1991 +* (the "License"). You may use, redistribute and/or modify this File in +* accordance with the terms and conditions of the License, a copy of which +* is available by writing to the Free Software Foundation, Inc., +* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the +* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. +* +* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE +* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE +* ARE EXPRESSLY DISCLAIMED. The License provides additional details about +* this warranty disclaimer. +*/ + +#include "decl.h" +#include "ioctl.h" +#include "fw.h" +#include "main.h" +#include "11ac.h" + +/* This function converts the 2-bit MCS map to the highest long GI +* VHT data rate. +*/ +static u16 +mwifiex_convert_mcsmap_to_maxrate (struct mwifiex_private *priv, +u8 bands,u16 mcs_map) +{ +u8 i, nss, max_mcs; +u16 max_rate =0 ; +u32 usr_vht_cap_info =0 ; +struct mwifiex_adapter *adapter = priv->adapter; +/* tables of the MCS map to the highest data rate (in Mbps) +* supported for long GI +*/ +u16 max_rate_lgi_80MHZ[8 ][3 ] = { + {0x124 ,0x15F ,0x186 },/* NSS = 1 */ + {0x249 ,0x2BE ,0x30C },/* NSS = 2 */ + {0x36D ,0x41D ,0x492 },/* NSS = 3 */ + {0x492 ,0x57C ,0x618 },/* NSS = 4 */ + {0x5B6 ,0x6DB ,0x79E },/* NSS = 5 */ + {0x6DB ,0x83A ,0x0 },/* NSS = 6 */ + {0x7FF ,0x999 ,0xAAA },/* NSS = 7 */ + {0x924 ,0xAF8 ,0xC30 }/* NSS = 8 */ + }; +u16 max_rate_lgi_160MHZ[8 ][3 ] = { + {0x249 ,0x2BE ,0x30C },/* NSS = 1 */ + {0x492 ,0x57C ,0x618 },/* NSS = 2 */ + {0x6DB ,0x83A ,0x0 },/* NSS = 3 */ + {0x924 ,0xAF8 ,0xC30 },/* NSS = 4 */ + {0xB6D ,0xDB6 ,0xF3C },/* NSS = 5 */ + {0xDB6 ,0x1074 ,0x1248 },/* NSS = 6 */ + {0xFFF ,0x1332 ,0x1554 },/* NSS = 7 */ + {0x1248 ,0x15F0 ,0x1860 }/* NSS = 8 */ + }; + +if (bands &BAND_AAC ) + usr_vht_cap_info = adapter->usr_dot_11ac_dev_cap_a; +else + usr_vht_cap_info = adapter->usr_dot_11ac_dev_cap_bg; + +/* find the max NSS supported */ + nss =0 ; +for (i =0 ; i <8 ; i++) { + max_mcs = (mcs_map >> (2 * i)) &0x3 ; +if (max_mcs <3 ) + nss = i; + } + max_mcs = (mcs_map >> (2 * nss)) &0x3 ; + +/* if max_mcs is 3, nss must be 0 (SS = 1). Thus, max mcs is MCS 9 */ +if (max_mcs >=3 ) + max_mcs =2 ; + +if (GET_VHTCAP_CHWDSET (usr_vht_cap_info)) { +/* support 160 MHz */ + max_rate = max_rate_lgi_160MHZ[nss][max_mcs]; +if (!max_rate) +/* MCS9 is not supported in NSS6 */ + max_rate = max_rate_lgi_160MHZ[nss][max_mcs -1 ]; + }else { + max_rate = max_rate_lgi_80MHZ[nss][max_mcs]; +if (!max_rate) +/* MCS9 is not supported in NSS3 */ + max_rate = max_rate_lgi_80MHZ[nss][max_mcs -1 ]; + } + +return max_rate; +} + +static void +mwifiex_fill_vht_cap_info (struct mwifiex_private *priv, +struct mwifiex_ie_types_vhtcap *vht_cap,u8 bands) +{ +struct mwifiex_adapter *adapter = priv->adapter; + +if (bands &BAND_A ) + vht_cap->vht_cap.vht_cap_info = +cpu_to_le32 (adapter->usr_dot_11ac_dev_cap_a); +else + vht_cap->vht_cap.vht_cap_info = +cpu_to_le32 (adapter->usr_dot_11ac_dev_cap_bg); +} + +static void +mwifiex_fill_vht_cap_tlv (struct mwifiex_private *priv, +struct mwifiex_ie_types_vhtcap *vht_cap,u8 bands) +{ +struct mwifiex_adapter *adapter = priv->adapter; +u16 mcs_map_user, mcs_map_resp, mcs_map_result; +u16 mcs_user, mcs_resp, nss, tmp; + +/* Fill VHT cap info */ +mwifiex_fill_vht_cap_info (priv, vht_cap, bands); + +/* rx MCS Set: find the minimum of the user rx mcs and ap rx mcs */ + mcs_map_user =GET_DEVRXMCSMAP (adapter->usr_dot_11ac_mcs_support); + mcs_map_resp =le16_to_cpu (vht_cap->vht_cap.supp_mcs.rx_mcs_map); + mcs_map_result =0 ; + +for (nss =1 ; nss <=8 ; nss++) { + mcs_user =GET_VHTNSSMCS (mcs_map_user, nss); + mcs_resp =GET_VHTNSSMCS (mcs_map_resp, nss); + +if ((mcs_user ==NO_NSS_SUPPORT ) || + (mcs_resp ==NO_NSS_SUPPORT )) +SET_VHTNSSMCS (mcs_map_result, nss,NO_NSS_SUPPORT ); +else +SET_VHTNSSMCS (mcs_map_result, nss, +min (mcs_user, mcs_resp)); + } + + vht_cap->vht_cap.supp_mcs.rx_mcs_map =cpu_to_le16 (mcs_map_result); + + tmp =mwifiex_convert_mcsmap_to_maxrate (priv, bands, mcs_map_result); + vht_cap->vht_cap.supp_mcs.rx_highest =cpu_to_le16 (tmp); + +/* tx MCS Set: find the minimum of the user tx mcs and ap tx mcs */ + mcs_map_user =GET_DEVTXMCSMAP (adapter->usr_dot_11ac_mcs_support); + mcs_map_resp =le16_to_cpu (vht_cap->vht_cap.supp_mcs.tx_mcs_map); + mcs_map_result =0 ; + +for (nss =1 ; nss <=8 ; nss++) { + mcs_user =GET_VHTNSSMCS (mcs_map_user, nss); + mcs_resp =GET_VHTNSSMCS (mcs_map_resp, nss); +if ((mcs_user ==NO_NSS_SUPPORT ) || + (mcs_resp ==NO_NSS_SUPPORT )) +SET_VHTNSSMCS (mcs_map_result, nss,NO_NSS_SUPPORT ); +else +SET_VHTNSSMCS (mcs_map_result, nss, +min (mcs_user, mcs_resp)); + } + + vht_cap->vht_cap.supp_mcs.tx_mcs_map =cpu_to_le16 (mcs_map_result); + + tmp =mwifiex_convert_mcsmap_to_maxrate (priv, bands, mcs_map_result); + vht_cap->vht_cap.supp_mcs.tx_highest =cpu_to_le16 (tmp); + +return ; +} + +int mwifiex_cmd_append_11ac_tlv (struct mwifiex_private *priv, +struct mwifiex_bssdescriptor *bss_desc, +u8 **buffer) +{ +struct mwifiex_ie_types_vhtcap *vht_cap; +struct mwifiex_ie_types_oper_mode_ntf *oper_ntf; +struct ieee_types_oper_mode_ntf *ieee_oper_ntf; +struct mwifiex_ie_types_vht_oper *vht_op; +struct mwifiex_adapter *adapter = priv->adapter; +u8 supp_chwd_set; +u32 usr_vht_cap_info; +int ret_len =0 ; + +if (bss_desc->bss_band &BAND_A ) + usr_vht_cap_info = adapter->usr_dot_11ac_dev_cap_a; +else + usr_vht_cap_info = adapter->usr_dot_11ac_dev_cap_bg; + +/* VHT Capabilities IE */ +if (bss_desc->bcn_vht_cap) { + vht_cap = (struct mwifiex_ie_types_vhtcap *)*buffer; +memset (vht_cap,0 ,sizeof (*vht_cap)); + vht_cap->header.type =cpu_to_le16 (WLAN_EID_VHT_CAPABILITY ); + vht_cap->header.len = +cpu_to_le16 (sizeof (struct ieee80211_vht_cap )); +memcpy ((u8 *)vht_cap +sizeof (struct mwifiex_ie_types_header ), + (u8 *)bss_desc->bcn_vht_cap + +sizeof (struct ieee_types_header ), +le16_to_cpu (vht_cap->header.len)); + +mwifiex_fill_vht_cap_tlv (priv, vht_cap, bss_desc->bss_band); + *buffer +=sizeof (*vht_cap); + ret_len +=sizeof (*vht_cap); + } + +/* VHT Operation IE */ +if (bss_desc->bcn_vht_oper) { +if (priv->bss_mode == HostCmd_BSS_MODE_IBSS) { + vht_op = (struct mwifiex_ie_types_vht_oper *)*buffer; +memset (vht_op,0 ,sizeof (*vht_op)); + vht_op->header.type = +cpu_to_le16 (WLAN_EID_VHT_OPERATION ); + vht_op->header.len =cpu_to_le16 (sizeof (*vht_op) - +sizeof (struct mwifiex_ie_types_header )); +memcpy ((u8 *)vht_op + +sizeof (struct mwifiex_ie_types_header ), + (u8 *)bss_desc->bcn_vht_oper + +sizeof (struct ieee_types_header ), +le16_to_cpu (vht_op->header.len)); + +/* negotiate the channel width and central freq +* and keep the central freq as the peer suggests +*/ + supp_chwd_set =GET_VHTCAP_CHWDSET (usr_vht_cap_info); + +switch (supp_chwd_set) { +case 0 : + vht_op->chan_width = +min_t (u8,IEEE80211_VHT_CHANWIDTH_80MHZ , + bss_desc->bcn_vht_oper->chan_width); +break ; +case 1 : + vht_op->chan_width = +min_t (u8,IEEE80211_VHT_CHANWIDTH_160MHZ , + bss_desc->bcn_vht_oper->chan_width); +break ; +case 2 : + vht_op->chan_width = +min_t (u8,IEEE80211_VHT_CHANWIDTH_80P80MHZ , + bss_desc->bcn_vht_oper->chan_width); +break ; +default : + vht_op->chan_width = +IEEE80211_VHT_CHANWIDTH_USE_HT ; +break ; + } + + *buffer +=sizeof (*vht_op); + ret_len +=sizeof (*vht_op); + } + } + +/* Operating Mode Notification IE */ +if (bss_desc->oper_mode) { + ieee_oper_ntf = bss_desc->oper_mode; + oper_ntf = (void *)*buffer; +memset (oper_ntf,0 ,sizeof (*oper_ntf)); + oper_ntf->header.type =cpu_to_le16 (WLAN_EID_OPMODE_NOTIF ); + oper_ntf->header.len =cpu_to_le16 (sizeof (u8)); + oper_ntf->oper_mode = ieee_oper_ntf->oper_mode; + *buffer +=sizeof (*oper_ntf); + ret_len +=sizeof (*oper_ntf); + } + +return ret_len; +}
drivers/net/wireless/mwifiex/11ac.h new file +26 -0
@@ -0,0 +1,26 @@ +/* +* Marvell Wireless LAN device driver: 802.11ac +* +* Copyright (C) 2013, Marvell International Ltd. +* +* This software file (the "File") is distributed by Marvell International +* Ltd. under the terms of the GNU General Public License Version 2, June 1991 +* (the "License"). You may use, redistribute and/or modify this File in +* accordance with the terms and conditions of the License, a copy of which +* is available by writing to the Free Software Foundation, Inc., +* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the +* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. +* +* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE +* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE +* ARE EXPRESSLY DISCLAIMED. The License provides additional details about +* this warranty disclaimer. +*/ + +#ifndef _MWIFIEX_11AC_H_ +#define _MWIFIEX_11AC_H_ + +int mwifiex_cmd_append_11ac_tlv (struct mwifiex_private *priv, +struct mwifiex_bssdescriptor *bss_desc, +u8 **buffer); +#endif /* _MWIFIEX_11AC_H_ */
drivers/net/wireless/mwifiex/11n.c +6 -1
@@ -250,7 +250,8 @@ int mwifiex_cmd_amsdu_aggr_ctrl(struct host_cmd_ds_command *cmd,* - Setting HT Tx capability and HT Tx information fields * - Ensuring correct endian-ness */ -int mwifiex_cmd_11n_cfg (struct host_cmd_ds_command *cmd,u16 cmd_action, +int mwifiex_cmd_11n_cfg (struct mwifiex_private *priv, +struct host_cmd_ds_command *cmd,u16 cmd_action,struct mwifiex_ds_11n_tx_cfg *txcfg) {struct host_cmd_ds_11n_cfg *htcfg = &cmd->params.htcfg;
@@ -260,6 +261,10 @@ int mwifiex_cmd_11n_cfg(struct host_cmd_ds_command *cmd, u16 cmd_action, htcfg->action =cpu_to_le16 (cmd_action); htcfg->ht_tx_cap =cpu_to_le16 (txcfg->tx_htcap); htcfg->ht_tx_info =cpu_to_le16 (txcfg->tx_htinfo); + +if (priv->adapter->is_hw_11ac_capable) + htcfg->misc_config =cpu_to_le16 (txcfg->misc_config); +return 0 ; }
drivers/net/wireless/mwifiex/11n.h +2 -2
@@ -28,9 +28,9 @@ int mwifiex_ret_11n_delba(struct mwifiex_private *priv, struct host_cmd_ds_command *resp);int mwifiex_ret_11n_addba_req (struct mwifiex_private *priv,struct host_cmd_ds_command *resp); -int mwifiex_cmd_11n_cfg (struct host_cmd_ds_command *cmd,u16 cmd_action, +int mwifiex_cmd_11n_cfg (struct mwifiex_private *priv, +struct host_cmd_ds_command *cmd,u16 cmd_action,struct mwifiex_ds_11n_tx_cfg *txcfg); -int mwifiex_cmd_append_11n_tlv (struct mwifiex_private *priv,struct mwifiex_bssdescriptor *bss_desc,u8 **buffer);
drivers/net/wireless/mwifiex/Makefile +1 -0
@@ -23,6 +23,7 @@ mwifiex-y += util.o mwifiex-y += txrx.o mwifiex-y += wmm.o mwifiex-y += 11n.o +mwifiex-y += 11ac.o mwifiex-y += 11n_aggr.o mwifiex-y += 11n_rxreorder.o mwifiex-y += scan.o
drivers/net/wireless/mwifiex/cfg80211.c +153 -24
216 lines not on this page · raw message
drivers/net/wireless/mwifiex/cfp.c +157 -2
208 lines not on this page · raw message
drivers/net/wireless/mwifiex/cmdevt.c +19 -0
@@ -24,6 +24,7 @@#include "main.h" #include "wmm.h" #include "11n.h" +#include "11ac.h" /* * This function initializes a command node.
@@ -1470,6 +1471,24 @@ int mwifiex_ret_get_hw_spec(struct mwifiex_private *priv, adapter->fw_release_number =le32_to_cpu (hw_spec->fw_release_number); adapter->number_of_antenna =le16_to_cpu (hw_spec->number_of_antenna); +if (le32_to_cpu (hw_spec->dot_11ac_dev_cap)) { + adapter->is_hw_11ac_capable = true; + +/* Copy 11AC cap */ + adapter->hw_dot_11ac_dev_cap = +le32_to_cpu (hw_spec->dot_11ac_dev_cap); + adapter->usr_dot_11ac_dev_cap_bg = adapter->hw_dot_11ac_dev_cap; + adapter->usr_dot_11ac_dev_cap_a = adapter->hw_dot_11ac_dev_cap; + +/* Copy 11AC mcs */ + adapter->hw_dot_11ac_mcs_support = +le32_to_cpu (hw_spec->dot_11ac_mcs_support); + adapter->usr_dot_11ac_mcs_support = + adapter->hw_dot_11ac_mcs_support; + }else { + adapter->is_hw_11ac_capable = false; + } +dev_dbg (adapter->dev,"info: GET_HW_SPEC: fw_release_number- %#x\n" , adapter->fw_release_number); dev_dbg(adapter->dev, "info: GET_HW_SPEC: permanent addr: %pM\n",
drivers/net/wireless/mwifiex/fw.h +119 -8
183 lines not on this page · raw message
drivers/net/wireless/mwifiex/ioctl.h +4 -0
@@ -60,6 +60,8 @@ enum {BAND_A =4 ,BAND_GN =8 ,BAND_AN =16 , +BAND_GAC =32 , + BAND_AAC = 64, };#define MWIFIEX_WPA_PASSHPHRASE_LEN 64
@@ -103,6 +105,7 @@ struct mwifiex_uap_bss_param {struct wpa_param wpa_cfg;struct wep_key wep_cfg[NUM_WEP_KEYS ];struct ieee80211_ht_cap ht_cap; +struct ieee80211_vht_cap vht_cap;u8 rates[MWIFIEX_SUPPORTED_RATES ];u32 sta_ao_timer;u32 ps_sta_ao_timer;
@@ -272,6 +275,7 @@ struct mwifiex_ds_pm_cfg {struct mwifiex_ds_11n_tx_cfg {u16 tx_htcap;u16 tx_htinfo; +u16 misc_config;/* Needed for 802.11AC cards only */ };struct mwifiex_ds_11n_amsdu_aggr_ctrl {
drivers/net/wireless/mwifiex/join.c +8 -0
@@ -24,6 +24,7 @@#include "main.h" #include "wmm.h" #include "11n.h" +#include "11ac.h" #define CAPINFO_MASK (~(BIT(15) | BIT(14) | BIT(12) | BIT(11) | BIT(9)))
@@ -512,6 +513,12 @@ int mwifiex_cmd_802_11_associate(struct mwifiex_private *priv, priv->adapter->config_bands & BAND_AN))mwifiex_cmd_append_11n_tlv (priv, bss_desc, &pos); +if (ISSUPP_11ACENABLED (priv->adapter->fw_cap_info) && + !bss_desc->disable_11n && !bss_desc->disable_11ac && + (priv->adapter->config_bands &BAND_GAC || + priv->adapter->config_bands &BAND_AAC )) +mwifiex_cmd_append_11ac_tlv (priv, bss_desc, &pos); +/* Append vendor specific IE TLV */ mwifiex_cmd_append_vsie_tlv (priv,MWIFIEX_VSIE_MASK_ASSOC , &pos);
@@ -1421,6 +1428,7 @@ mwifiex_band_to_radio_type(u8 band)case BAND_A :case BAND_AN :case BAND_A |BAND_AN : +case BAND_A |BAND_AN |BAND_AAC :return HostCmd_SCAN_RADIO_TYPE_A;case BAND_B :case BAND_G :
drivers/net/wireless/mwifiex/main.h +21 -2
@@ -295,6 +295,13 @@ struct mwifiex_bssdescriptor {u16 bss_co_2040_offset;u8 *bcn_ext_cap;u16 ext_cap_offset; +struct ieee80211_vht_cap *bcn_vht_cap; +u16 vht_cap_offset; +struct ieee80211_vht_operation *bcn_vht_oper; +u16 vht_info_offset; +struct ieee_types_oper_mode_ntf *oper_mode; +u16 oper_mode_offset; +u8 disable_11ac;struct ieee_types_vendor_specific *bcn_wpa_ie;u16 wpa_offset;struct ieee_types_generic *bcn_rsn_ie;
@@ -499,6 +506,7 @@ struct mwifiex_private {u16 rsn_idx;struct timer_list scan_delay_timer;u8 ap_11n_enabled; +u8 ap_11ac_enabled;u32 mgmt_frame_mask;struct mwifiex_roc_cfg roc_cfg; };
@@ -722,6 +730,15 @@ struct mwifiex_adapter {u16 max_mgmt_ie_index;u8 scan_delay_cnt;u8 empty_tx_q_cnt; + +/* 11AC */ +u32 is_hw_11ac_capable; +u32 hw_dot_11ac_dev_cap; +u32 hw_dot_11ac_mcs_support; +u32 usr_dot_11ac_dev_cap_bg; +u32 usr_dot_11ac_dev_cap_a; +u32 usr_dot_11ac_mcs_support; +atomic_t is_tx_received;atomic_t pending_bridged_pkts; };
@@ -864,8 +881,10 @@ int mwifiex_ret_802_11_ad_hoc(struct mwifiex_private *priv,int mwifiex_cmd_802_11_bg_scan_query (struct host_cmd_ds_command *cmd);struct mwifiex_chan_freq_power *mwifiex_get_cfp (struct mwifiex_private *priv,u8 band,u16 channel,u32 freq); -u32 mwifiex_index_to_data_rate (struct mwifiex_private *priv,u8 index, -u8 ht_info); +u32 mwifiex_index_to_data_rate (struct mwifiex_private *priv, +u8 index,u8 ht_info); +u32 mwifiex_index_to_acs_data_rate (struct mwifiex_private *priv, +u8 index,u8 ht_info);u32 mwifiex_find_freq_from_band_chan (u8 ,u8 );int mwifiex_cmd_append_vsie_tlv (struct mwifiex_private *priv,u16 vsie_mask,u8 **buffer);
drivers/net/wireless/mwifiex/scan.c +48 -0
78 lines not on this page · raw message
drivers/net/wireless/mwifiex/sta_cmd.c +1 -1
@@ -1230,7 +1230,7 @@ int mwifiex_sta_prepare_cmd(struct mwifiex_private *priv, uint16_t cmd_no, data_buf);break ;case HostCmd_CMD_11N_CFG: - ret =mwifiex_cmd_11n_cfg (cmd_ptr, cmd_action, data_buf); + ret =mwifiex_cmd_11n_cfg (priv, cmd_ptr, cmd_action, data_buf);break ;case HostCmd_CMD_WMM_GET_STATUS: dev_dbg(priv->adapter->dev,
drivers/net/wireless/mwifiex/sta_cmdresp.c +1 -0
@@ -24,6 +24,7 @@#include "main.h" #include "wmm.h" #include "11n.h" +#include "11ac.h" /*
drivers/net/wireless/mwifiex/sta_ioctl.c +3 -2
@@ -283,9 +283,10 @@ int mwifiex_bss_start(struct mwifiex_private *priv, struct cfg80211_bss *bss,if (mwifiex_band_to_radio_type ((u8 ) bss_desc->bss_band) == HostCmd_SCAN_RADIO_TYPE_BG) - config_bands =BAND_B |BAND_G |BAND_GN ; + config_bands =BAND_B |BAND_G |BAND_GN | +BAND_GAC ;else - config_bands =BAND_A |BAND_AN ; + config_bands =BAND_A |BAND_AN |BAND_AAC ;if (!((config_bands | adapter->fw_bands) & ~adapter->fw_bands))
Signature · 1 line
1.7.0.2