Skip to content

Commit

Permalink
wireless: fix regulatory HT40 allowed check
Browse files Browse the repository at this point in the history
commit 1a91931 "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>
  • Loading branch information
Felix Fietkau authored and Johannes Berg committed Jan 11, 2013
1 parent 75e6934 commit 55b183a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion net/wireless/reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1123,7 +1123,9 @@ static bool is_ht40_allowed(struct ieee80211_channel *chan)
if (chan->flags & IEEE80211_CHAN_DISABLED)
return false;
/* This would happen when regulatory rules disallow HT40 completely */
return !(chan->flags & IEEE80211_CHAN_NO_HT40);
if ((chan->flags & IEEE80211_CHAN_NO_HT40) == IEEE80211_CHAN_NO_HT40)
return false;
return true;
}

static void reg_process_ht_flags_channel(struct wiphy *wiphy,
Expand Down

0 comments on commit 55b183a

Please sign in to comment.