aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-04-16 22:10:42 +0200
committerJohn W. Linville <linville@tuxdriver.com>2012-04-17 14:17:04 -0400
commit6741e7f048dacc92e37c5d724ff5c64e45f6c2c9 (patch)
tree23e0385e77d8b773a19c4a23677f34945a6da1e2 /net/mac80211
parentMAINTAINERS: Add maintainer for iwlwifi (diff)
downloadlinux-dev-6741e7f048dacc92e37c5d724ff5c64e45f6c2c9.tar.xz
linux-dev-6741e7f048dacc92e37c5d724ff5c64e45f6c2c9.zip
mac80211: fix logic error in ibss channel type check
The broken check leads to rate control attempting to use HT40 while the driver is configured for HT20. This leads to interesting hardware issues. HT40 can only be used if the channel type is either HT40- or HT40+ and if the channel type of the cell matches the local type. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Cc: stable@vger.kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/ibss.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index 33fd8d9f714e..cef7c29214a8 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -457,8 +457,8 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata,
* fall back to HT20 if we don't use or use
* the other extension channel
*/
- if ((channel_type == NL80211_CHAN_HT40MINUS ||
- channel_type == NL80211_CHAN_HT40PLUS) &&
+ if (!(channel_type == NL80211_CHAN_HT40MINUS ||
+ channel_type == NL80211_CHAN_HT40PLUS) ||
channel_type != sdata->u.ibss.channel_type)
sta_ht_cap_new.cap &=
~IEEE80211_HT_CAP_SUP_WIDTH_20_40;