diff options
author | Ganapathi Bhat <gbhat@marvell.com> | 2018-03-09 13:15:24 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2018-03-13 12:53:45 -0400 |
commit | 53a7094204b7f2b9016648b5c4b5ece8e810a461 (patch) | |
tree | 054739a6f47c645b5c22a406eb5e2ae578dcc62b | |
parent | eaab43e505d01ed19f63e08e52252cbc1c69b9b9 (diff) |
Revert "mwifiex: fix incorrect ht capability problem"
This reverts commit bcc920e8f08336cbbdcdba7c4449c27137e6b4b9.
Drivers gets hardware info and updates ht_cap field of
wiphy->bands during initialization. Once updated during init,
ht_cap must not be modified as it reflects the capability
supported by hardwawre. Above patch tries to modify the ht_cap
field and this results in wrongly advertising capabilities during
association.
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Ganapathi Bhat <gbhat@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-rw-r--r-- | drivers/net/wireless/marvell/mwifiex/sta_ioctl.c | 44 |
1 files changed, 1 insertions, 43 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c b/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c index a6077ab3efc3..ed66f12d3301 100644 --- a/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c +++ b/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c | |||
@@ -146,7 +146,6 @@ int mwifiex_fill_new_bss_desc(struct mwifiex_private *priv, | |||
146 | size_t beacon_ie_len; | 146 | size_t beacon_ie_len; |
147 | struct mwifiex_bss_priv *bss_priv = (void *)bss->priv; | 147 | struct mwifiex_bss_priv *bss_priv = (void *)bss->priv; |
148 | const struct cfg80211_bss_ies *ies; | 148 | const struct cfg80211_bss_ies *ies; |
149 | int ret; | ||
150 | 149 | ||
151 | rcu_read_lock(); | 150 | rcu_read_lock(); |
152 | ies = rcu_dereference(bss->ies); | 151 | ies = rcu_dereference(bss->ies); |
@@ -190,48 +189,7 @@ int mwifiex_fill_new_bss_desc(struct mwifiex_private *priv, | |||
190 | if (bss_desc->cap_info_bitmap & WLAN_CAPABILITY_SPECTRUM_MGMT) | 189 | if (bss_desc->cap_info_bitmap & WLAN_CAPABILITY_SPECTRUM_MGMT) |
191 | bss_desc->sensed_11h = true; | 190 | bss_desc->sensed_11h = true; |
192 | 191 | ||
193 | ret = mwifiex_update_bss_desc_with_ie(priv->adapter, bss_desc); | 192 | return mwifiex_update_bss_desc_with_ie(priv->adapter, bss_desc); |
194 | if (ret) | ||
195 | return ret; | ||
196 | |||
197 | /* Update HT40 capability based on current channel information */ | ||
198 | if (bss_desc->bcn_ht_oper && bss_desc->bcn_ht_cap) { | ||
199 | u8 ht_param = bss_desc->bcn_ht_oper->ht_param; | ||
200 | u8 radio = mwifiex_band_to_radio_type(bss_desc->bss_band); | ||
201 | struct ieee80211_supported_band *sband = | ||
202 | priv->wdev.wiphy->bands[radio]; | ||
203 | int freq = ieee80211_channel_to_frequency(bss_desc->channel, | ||
204 | radio); | ||
205 | struct ieee80211_channel *chan = | ||
206 | ieee80211_get_channel(priv->adapter->wiphy, freq); | ||
207 | |||
208 | switch (ht_param & IEEE80211_HT_PARAM_CHA_SEC_OFFSET) { | ||
209 | case IEEE80211_HT_PARAM_CHA_SEC_ABOVE: | ||
210 | if (chan->flags & IEEE80211_CHAN_NO_HT40PLUS) { | ||
211 | sband->ht_cap.cap &= | ||
212 | ~IEEE80211_HT_CAP_SUP_WIDTH_20_40; | ||
213 | sband->ht_cap.cap &= ~IEEE80211_HT_CAP_SGI_40; | ||
214 | } else { | ||
215 | sband->ht_cap.cap |= | ||
216 | IEEE80211_HT_CAP_SUP_WIDTH_20_40 | | ||
217 | IEEE80211_HT_CAP_SGI_40; | ||
218 | } | ||
219 | break; | ||
220 | case IEEE80211_HT_PARAM_CHA_SEC_BELOW: | ||
221 | if (chan->flags & IEEE80211_CHAN_NO_HT40MINUS) { | ||
222 | sband->ht_cap.cap &= | ||
223 | ~IEEE80211_HT_CAP_SUP_WIDTH_20_40; | ||
224 | sband->ht_cap.cap &= ~IEEE80211_HT_CAP_SGI_40; | ||
225 | } else { | ||
226 | sband->ht_cap.cap |= | ||
227 | IEEE80211_HT_CAP_SUP_WIDTH_20_40 | | ||
228 | IEEE80211_HT_CAP_SGI_40; | ||
229 | } | ||
230 | break; | ||
231 | } | ||
232 | } | ||
233 | |||
234 | return 0; | ||
235 | } | 193 | } |
236 | 194 | ||
237 | void mwifiex_dnld_txpwr_table(struct mwifiex_private *priv) | 195 | void mwifiex_dnld_txpwr_table(struct mwifiex_private *priv) |