diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-03-11 21:45:51 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-03-14 14:46:58 -0400 |
commit | 9db372fdd5de9e0464c77a9d3db2a3b356db8668 (patch) | |
tree | 25b417873775cf02d9f1d05cf70d70d5b3897986 /net | |
parent | efff395e97fffd55c60c77c09a18deba8d84e2c0 (diff) |
mac80211: fix channel type recalculation with HT and non-HT interfaces
When running an AP interface along with the cooked monitor interface created
by hostapd, adding an interface and deleting it again triggers a channel type
recalculation during which the (non-HT) monitor interface takes precedence
over the HT AP interface, thus causing the channel type to be set to non-HT.
Fix this by ensuring that a more wide channel type will not be overwritten
by a less wide channel type.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/chan.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c index 5b24740fc0b0..889c3e93e0f4 100644 --- a/net/mac80211/chan.c +++ b/net/mac80211/chan.c @@ -77,6 +77,9 @@ bool ieee80211_set_channel_type(struct ieee80211_local *local, switch (tmp->vif.bss_conf.channel_type) { case NL80211_CHAN_NO_HT: case NL80211_CHAN_HT20: + if (superchan > tmp->vif.bss_conf.channel_type) + break; + superchan = tmp->vif.bss_conf.channel_type; break; case NL80211_CHAN_HT40PLUS: |