summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/mwifiex/join.c
diff options
context:
space:
mode:
authorAmitkumar Karwar <akarwar@marvell.com>2013-01-02 16:56:00 -0800
committerJohn W. Linville <linville@tuxdriver.com>2013-01-07 15:16:59 -0500
commitd35f1035b53e92167a8231e15121dd10f4aa8edd (patch)
treef786fc530a2e067267dddd8a49f070e67da21c77 /drivers/net/wireless/mwifiex/join.c
parentfc40ca92344a4e4a45bf916cf067e92085b881ea (diff)
downloadlwn-d35f1035b53e92167a8231e15121dd10f4aa8edd.tar.gz
lwn-d35f1035b53e92167a8231e15121dd10f4aa8edd.zip
mwifiex: use correct htcapinfo for HT20 ibss network
It is observed that same htcapinfo ie is included in beacon for HT20, HT40+ and HT40- ibss networks. This patch makes sure that we will not advertise 40Mhz flags while creating/joining ibss network in HT20 mode. 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/join.c')
-rw-r--r--drivers/net/wireless/mwifiex/join.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/join.c b/drivers/net/wireless/mwifiex/join.c
index 88664ae667ba..3c7cabeddf76 100644
--- a/drivers/net/wireless/mwifiex/join.c
+++ b/drivers/net/wireless/mwifiex/join.c
@@ -969,6 +969,16 @@ mwifiex_cmd_802_11_ad_hoc_start(struct mwifiex_private *priv,
priv->adapter->config_bands);
mwifiex_fill_cap_info(priv, radio_type, ht_cap);
+ if (adapter->sec_chan_offset ==
+ IEEE80211_HT_PARAM_CHA_SEC_NONE) {
+ u16 tmp_ht_cap;
+
+ tmp_ht_cap = le16_to_cpu(ht_cap->ht_cap.cap_info);
+ tmp_ht_cap &= ~IEEE80211_HT_CAP_SUP_WIDTH_20_40;
+ tmp_ht_cap &= ~IEEE80211_HT_CAP_SGI_40;
+ ht_cap->ht_cap.cap_info = cpu_to_le16(tmp_ht_cap);
+ }
+
pos += sizeof(struct mwifiex_ie_types_htcap);
cmd_append_size += sizeof(struct mwifiex_ie_types_htcap);