aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/main.c
diff options
context:
space:
mode:
authorBen Greear <greearb@candelatech.com>2011-02-07 13:44:35 -0800
committerJohn W. Linville <linville@tuxdriver.com>2011-02-09 16:09:46 -0500
commit4f2e9d91f84ce39698517203974ffc2bcc32a21d (patch)
tree32a0b7b1856f4249ad7c2bdb39a757821fd90fff /net/mac80211/main.c
parentmac80211: Properly set work-item channel-type. (diff)
downloadlinux-dev-4f2e9d91f84ce39698517203974ffc2bcc32a21d.tar.xz
linux-dev-4f2e9d91f84ce39698517203974ffc2bcc32a21d.zip
mac80211: Allow scanning on existing channel-type.
Previous code set the channel type to NO_HT, but it appears that NO_HT packets can be sent on any channel type, so we do not need to change the channel type as long as the channel is correct. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r--net/mac80211/main.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index c155c0b69426..86562ce99221 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -112,7 +112,13 @@ bool ieee80211_cfg_on_oper_channel(struct ieee80211_local *local)
/* This logic needs to match logic in ieee80211_hw_config */
if (local->scan_channel) {
chan = local->scan_channel;
- channel_type = NL80211_CHAN_NO_HT;
+ /* If scanning on oper channel, use whatever channel-type
+ * is currently in use.
+ */
+ if (chan == local->oper_channel)
+ channel_type = local->_oper_channel_type;
+ else
+ channel_type = NL80211_CHAN_NO_HT;
} else if (local->tmp_channel) {
chan = scan_chan = local->tmp_channel;
channel_type = local->tmp_channel_type;
@@ -151,7 +157,13 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed)
offchannel_flag = local->hw.conf.flags & IEEE80211_CONF_OFFCHANNEL;
if (scan_chan) {
chan = scan_chan;
- channel_type = NL80211_CHAN_NO_HT;
+ /* If scanning on oper channel, use whatever channel-type
+ * is currently in use.
+ */
+ if (chan == local->oper_channel)
+ channel_type = local->_oper_channel_type;
+ else
+ channel_type = NL80211_CHAN_NO_HT;
} else if (local->tmp_channel) {
chan = scan_chan = local->tmp_channel;
channel_type = local->tmp_channel_type;