]> xenbits.xensource.com Git - people/aperard/linux-chromebook.git/commitdiff
UPSTREAM: mwifiex: use correct htcapinfo for HT20 ibss network
authorAmitkumar Karwar <akarwar@marvell.com>
Thu, 3 Jan 2013 00:56:00 +0000 (16:56 -0800)
committerChromeBot <chrome-bot@google.com>
Fri, 11 Jan 2013 21:47:32 +0000 (13:47 -0800)
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>
BUG=None
TEST=Reboot, associate to HT20 network

Change-Id: I1e144840a4258f4d5ecf8bf32f30ce78646753e6
Reviewed-on: https://gerrit.chromium.org/gerrit/40553
Reviewed-by: Bing Zhao <bzhao@marvell.com>
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Queue: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
drivers/net/wireless/mwifiex/11n.c
drivers/net/wireless/mwifiex/join.c

index cbd5bcb4635b681acd8cebca5dde74221ec69626..5099f97106ef19a2b53a397dc8bfb87ce5a250a7 100644 (file)
@@ -53,7 +53,9 @@ mwifiex_fill_cap_info(struct mwifiex_private *priv, u8 radio_type,
               sizeof(sband->ht_cap.mcs));
 
        if (priv->bss_mode == NL80211_IFTYPE_STATION ||
-           sband->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40)
+           (sband->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40 &&
+            (priv->adapter->sec_chan_offset !=
+                                       IEEE80211_HT_PARAM_CHA_SEC_NONE)))
                /* Set MCS32 for infra mode or ad-hoc mode with 40MHz support */
                SETHT_MCS32(ht_cap->ht_cap.mcs.rx_mask);
 
index a3c925043746bb110fec9cdae8b6bbc40b31d092..c214f76adf837f1f8f0f19c648fe1ee7bed716df 100644 (file)
@@ -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);