diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-01-11 08:22:58 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-01-11 08:32:20 -0500 |
commit | 55b183ad8635589ea731a31653de79a2626491c4 (patch) | |
tree | f822db644128003a34f46d09ef05cae9a55a39ea | |
parent | 75e6934a9e996ee7cfe7a488b7f7cc2baa86717a (diff) |
wireless: fix regulatory HT40 allowed check
commit 1a9193185f462a51815fe48491f8a6fb6b942551 "regulatory: code cleanup"
changed is_ht40_allowed without considering that IEEE80211_CHAN_NO_HT40 is
not just one flag, but two.
This is causing HT40- to be blocked completely.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r-- | net/wireless/reg.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 8c114e8a9135..6ea626b30a2a 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
@@ -1123,7 +1123,9 @@ static bool is_ht40_allowed(struct ieee80211_channel *chan) | |||
1123 | if (chan->flags & IEEE80211_CHAN_DISABLED) | 1123 | if (chan->flags & IEEE80211_CHAN_DISABLED) |
1124 | return false; | 1124 | return false; |
1125 | /* This would happen when regulatory rules disallow HT40 completely */ | 1125 | /* This would happen when regulatory rules disallow HT40 completely */ |
1126 | return !(chan->flags & IEEE80211_CHAN_NO_HT40); | 1126 | if ((chan->flags & IEEE80211_CHAN_NO_HT40) == IEEE80211_CHAN_NO_HT40) |
1127 | return false; | ||
1128 | return true; | ||
1127 | } | 1129 | } |
1128 | 1130 | ||
1129 | static void reg_process_ht_flags_channel(struct wiphy *wiphy, | 1131 | static void reg_process_ht_flags_channel(struct wiphy *wiphy, |