Commit d35f1035 authored by Amitkumar Karwar's avatar Amitkumar Karwar Committed by John W. Linville

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: default avatarAmitkumar Karwar <akarwar@marvell.com>
Signed-off-by: default avatarBing Zhao <bzhao@marvell.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent fc40ca92
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment