diff options
author | Avinash Patil <patila@marvell.com> | 2012-08-03 21:06:05 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-08-06 15:12:51 -0400 |
commit | c82589131840767443f32f6d235a825cbef7b914 (patch) | |
tree | 95ecf971650c8b8b2583c41aaddee9d5d16d369c /drivers/net | |
parent | bdd37bed619b2445b2a04f398a7fe34b1e416172 (diff) |
mwifiex: update 11n status as per start_ap IE
If HT IE is present in beacon_data of start_ap cfg80211 handler,
enable 11n flag in AP. Disable 11n flag when stop_ap handler is
called.
Signed-off-by: Avinash Patil <patila@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')
-rw-r--r-- | drivers/net/wireless/mwifiex/cfg80211.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/init.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/main.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/uap_cmd.c | 1 |
4 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c index fe42137384da..1f80f7e13ba8 100644 --- a/drivers/net/wireless/mwifiex/cfg80211.c +++ b/drivers/net/wireless/mwifiex/cfg80211.c | |||
@@ -906,6 +906,8 @@ static int mwifiex_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *dev) | |||
906 | if (mwifiex_del_mgmt_ies(priv)) | 906 | if (mwifiex_del_mgmt_ies(priv)) |
907 | wiphy_err(wiphy, "Failed to delete mgmt IEs!\n"); | 907 | wiphy_err(wiphy, "Failed to delete mgmt IEs!\n"); |
908 | 908 | ||
909 | priv->ap_11n_enabled = 0; | ||
910 | |||
909 | if (mwifiex_send_cmd_sync(priv, HostCmd_CMD_UAP_BSS_STOP, | 911 | if (mwifiex_send_cmd_sync(priv, HostCmd_CMD_UAP_BSS_STOP, |
910 | HostCmd_ACT_GEN_SET, 0, NULL)) { | 912 | HostCmd_ACT_GEN_SET, 0, NULL)) { |
911 | wiphy_err(wiphy, "Failed to stop the BSS\n"); | 913 | wiphy_err(wiphy, "Failed to stop the BSS\n"); |
diff --git a/drivers/net/wireless/mwifiex/init.c b/drivers/net/wireless/mwifiex/init.c index 81fc8ed0e976..118a29f6e240 100644 --- a/drivers/net/wireless/mwifiex/init.c +++ b/drivers/net/wireless/mwifiex/init.c | |||
@@ -208,6 +208,7 @@ static int mwifiex_init_priv(struct mwifiex_private *priv) | |||
208 | priv->curr_bcn_size = 0; | 208 | priv->curr_bcn_size = 0; |
209 | priv->wps_ie = NULL; | 209 | priv->wps_ie = NULL; |
210 | priv->wps_ie_len = 0; | 210 | priv->wps_ie_len = 0; |
211 | priv->ap_11n_enabled = 0; | ||
211 | 212 | ||
212 | priv->scan_block = false; | 213 | priv->scan_block = false; |
213 | 214 | ||
diff --git a/drivers/net/wireless/mwifiex/main.h b/drivers/net/wireless/mwifiex/main.h index 16f046a556b5..5eeb17c3db00 100644 --- a/drivers/net/wireless/mwifiex/main.h +++ b/drivers/net/wireless/mwifiex/main.h | |||
@@ -487,6 +487,7 @@ struct mwifiex_private { | |||
487 | u16 assocresp_idx; | 487 | u16 assocresp_idx; |
488 | u16 rsn_idx; | 488 | u16 rsn_idx; |
489 | struct timer_list scan_delay_timer; | 489 | struct timer_list scan_delay_timer; |
490 | u8 ap_11n_enabled; | ||
490 | }; | 491 | }; |
491 | 492 | ||
492 | enum mwifiex_ba_status { | 493 | enum mwifiex_ba_status { |
diff --git a/drivers/net/wireless/mwifiex/uap_cmd.c b/drivers/net/wireless/mwifiex/uap_cmd.c index f40e93fe894a..c10aac04be6a 100644 --- a/drivers/net/wireless/mwifiex/uap_cmd.c +++ b/drivers/net/wireless/mwifiex/uap_cmd.c | |||
@@ -167,6 +167,7 @@ mwifiex_set_ht_params(struct mwifiex_private *priv, | |||
167 | if (ht_ie) { | 167 | if (ht_ie) { |
168 | memcpy(&bss_cfg->ht_cap, ht_ie + 2, | 168 | memcpy(&bss_cfg->ht_cap, ht_ie + 2, |
169 | sizeof(struct ieee80211_ht_cap)); | 169 | sizeof(struct ieee80211_ht_cap)); |
170 | priv->ap_11n_enabled = 1; | ||
170 | } else { | 171 | } else { |
171 | memset(&bss_cfg->ht_cap , 0, sizeof(struct ieee80211_ht_cap)); | 172 | memset(&bss_cfg->ht_cap , 0, sizeof(struct ieee80211_ht_cap)); |
172 | bss_cfg->ht_cap.cap_info = cpu_to_le16(MWIFIEX_DEF_HT_CAP); | 173 | bss_cfg->ht_cap.cap_info = cpu_to_le16(MWIFIEX_DEF_HT_CAP); |