aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex
diff options
context:
space:
mode:
authorAmitkumar Karwar <akarwar@marvell.com>2011-07-08 23:40:30 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-07-11 15:02:10 -0400
commitcd27bc3c3efb95ee20e5b627c483eb9513cd0350 (patch)
treebbae8a66acb5957d36514c320dc71237ffba82fc /drivers/net/wireless/mwifiex
parent5c3d29fc0d083e674c09407f1bc78e9dbf4ae8a5 (diff)
mwifiex: 11n specific configuration for transmit
Currently device is not able to transmit in 40MHz in spite of enabling 40MHz support in HTCapInfo IE in assoc req, because 11n specific FW capabilities for transmission are not initialized. This patch adds code to initilize these capabilities. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: Kiran Divekar <dkiran@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')
-rw-r--r--drivers/net/wireless/mwifiex/fw.h11
-rw-r--r--drivers/net/wireless/mwifiex/sta_cmd.c10
2 files changed, 20 insertions, 1 deletions
diff --git a/drivers/net/wireless/mwifiex/fw.h b/drivers/net/wireless/mwifiex/fw.h
index afdd145dff0b..4fee0993b186 100644
--- a/drivers/net/wireless/mwifiex/fw.h
+++ b/drivers/net/wireless/mwifiex/fw.h
@@ -157,6 +157,17 @@ enum MWIFIEX_802_11_WEP_STATUS {
157#define ISSUPP_RXSTBC(Dot11nDevCap) (Dot11nDevCap & BIT(26)) 157#define ISSUPP_RXSTBC(Dot11nDevCap) (Dot11nDevCap & BIT(26))
158#define ISSUPP_GREENFIELD(Dot11nDevCap) (Dot11nDevCap & BIT(29)) 158#define ISSUPP_GREENFIELD(Dot11nDevCap) (Dot11nDevCap & BIT(29))
159 159
160/* httxcfg bitmap
161 * 0 reserved
162 * 1 20/40 Mhz enable(1)/disable(0)
163 * 2-3 reserved
164 * 4 green field enable(1)/disable(0)
165 * 5 short GI in 20 Mhz enable(1)/disable(0)
166 * 6 short GI in 40 Mhz enable(1)/disable(0)
167 * 7-15 reserved
168 */
169#define MWIFIEX_FW_DEF_HTTXCFG (BIT(1) | BIT(4) | BIT(5) | BIT(6))
170
160#define GET_RXMCSSUPP(DevMCSSupported) (DevMCSSupported & 0x0f) 171#define GET_RXMCSSUPP(DevMCSSupported) (DevMCSSupported & 0x0f)
161#define SETHT_MCS32(x) (x[4] |= 1) 172#define SETHT_MCS32(x) (x[4] |= 1)
162 173
diff --git a/drivers/net/wireless/mwifiex/sta_cmd.c b/drivers/net/wireless/mwifiex/sta_cmd.c
index 49b9c1309f7a..c54ee287b878 100644
--- a/drivers/net/wireless/mwifiex/sta_cmd.c
+++ b/drivers/net/wireless/mwifiex/sta_cmd.c
@@ -1113,6 +1113,7 @@ int mwifiex_sta_init_cmd(struct mwifiex_private *priv, u8 first_sta)
1113 struct mwifiex_ds_11n_amsdu_aggr_ctrl amsdu_aggr_ctrl; 1113 struct mwifiex_ds_11n_amsdu_aggr_ctrl amsdu_aggr_ctrl;
1114 struct mwifiex_ds_auto_ds auto_ds; 1114 struct mwifiex_ds_auto_ds auto_ds;
1115 enum state_11d_t state_11d; 1115 enum state_11d_t state_11d;
1116 struct mwifiex_ds_11n_tx_cfg tx_cfg;
1116 1117
1117 if (first_sta) { 1118 if (first_sta) {
1118 1119
@@ -1198,8 +1199,15 @@ int mwifiex_sta_init_cmd(struct mwifiex_private *priv, u8 first_sta)
1198 if (ret) 1199 if (ret)
1199 dev_err(priv->adapter->dev, "11D: failed to enable 11D\n"); 1200 dev_err(priv->adapter->dev, "11D: failed to enable 11D\n");
1200 1201
1202 /* Send cmd to FW to configure 11n specific configuration
1203 * (Short GI, Channel BW, Green field support etc.) for transmit
1204 */
1205 tx_cfg.tx_htcap = MWIFIEX_FW_DEF_HTTXCFG;
1206 ret = mwifiex_send_cmd_async(priv, HostCmd_CMD_11N_CFG,
1207 HostCmd_ACT_GEN_SET, 0, &tx_cfg);
1208
1201 /* set last_init_cmd */ 1209 /* set last_init_cmd */
1202 priv->adapter->last_init_cmd = HostCmd_CMD_802_11_SNMP_MIB; 1210 priv->adapter->last_init_cmd = HostCmd_CMD_11N_CFG;
1203 ret = -EINPROGRESS; 1211 ret = -EINPROGRESS;
1204 1212
1205 return ret; 1213 return ret;