diff options
author | Ilan Peer <ilan.peer@intel.com> | 2016-03-08 06:35:31 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2016-04-05 05:26:33 -0400 |
commit | 4b559ec0bfc3a9f41a127cea6964f38b2b4bb323 (patch) | |
tree | e298062ed49034741465787a9fda31ba2de3edd3 /net/mac80211 | |
parent | facde7f332f91353c7a6d34c9cff6b329cc0c3ab (diff) |
mac80211: Fix BW upgrade for TDLS peers
It is possible that the station is connected to an AP
with bandwidth of 80+80MHz or 160MHz. In such cases
there is no need to perform an upgrade as the maximal
supported bandwidth is 80MHz.
In addition, when upgrading and setting center_freq1
and bandwidth to 80MHz also set center_freq2 to 0.
Fixes: 0fabfaafec3a ("mac80211: upgrade BW of TDLS peers when possible"
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/tdls.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac80211/tdls.c b/net/mac80211/tdls.c index eed1152efb42..a29ea813b7d5 100644 --- a/net/mac80211/tdls.c +++ b/net/mac80211/tdls.c | |||
@@ -314,7 +314,7 @@ ieee80211_tdls_chandef_vht_upgrade(struct ieee80211_sub_if_data *sdata, | |||
314 | if (max_width > NL80211_CHAN_WIDTH_80) | 314 | if (max_width > NL80211_CHAN_WIDTH_80) |
315 | max_width = NL80211_CHAN_WIDTH_80; | 315 | max_width = NL80211_CHAN_WIDTH_80; |
316 | 316 | ||
317 | if (uc.width == max_width) | 317 | if (uc.width >= max_width) |
318 | return; | 318 | return; |
319 | /* | 319 | /* |
320 | * Channel usage constrains in the IEEE802.11ac-2013 specification only | 320 | * Channel usage constrains in the IEEE802.11ac-2013 specification only |
@@ -325,6 +325,7 @@ ieee80211_tdls_chandef_vht_upgrade(struct ieee80211_sub_if_data *sdata, | |||
325 | for (i = 0; i < ARRAY_SIZE(centers_80mhz); i++) | 325 | for (i = 0; i < ARRAY_SIZE(centers_80mhz); i++) |
326 | if (abs(uc.chan->center_freq - centers_80mhz[i]) <= 30) { | 326 | if (abs(uc.chan->center_freq - centers_80mhz[i]) <= 30) { |
327 | uc.center_freq1 = centers_80mhz[i]; | 327 | uc.center_freq1 = centers_80mhz[i]; |
328 | uc.center_freq2 = 0; | ||
328 | uc.width = NL80211_CHAN_WIDTH_80; | 329 | uc.width = NL80211_CHAN_WIDTH_80; |
329 | break; | 330 | break; |
330 | } | 331 | } |