diff options
author | Ben Greear <greearb@candelatech.com> | 2011-02-07 16:44:35 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-02-09 16:09:46 -0500 |
commit | 4f2e9d91f84ce39698517203974ffc2bcc32a21d (patch) | |
tree | 32a0b7b1856f4249ad7c2bdb39a757821fd90fff /net/mac80211 | |
parent | 4d51e149a6231ea9cc210795cbc358a7c9a8e016 (diff) |
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')
-rw-r--r-- | net/mac80211/main.c | 16 | ||||
-rw-r--r-- | net/mac80211/scan.c | 6 |
2 files changed, 16 insertions, 6 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) | |||
112 | /* This logic needs to match logic in ieee80211_hw_config */ | 112 | /* This logic needs to match logic in ieee80211_hw_config */ |
113 | if (local->scan_channel) { | 113 | if (local->scan_channel) { |
114 | chan = local->scan_channel; | 114 | chan = local->scan_channel; |
115 | channel_type = NL80211_CHAN_NO_HT; | 115 | /* If scanning on oper channel, use whatever channel-type |
116 | * is currently in use. | ||
117 | */ | ||
118 | if (chan == local->oper_channel) | ||
119 | channel_type = local->_oper_channel_type; | ||
120 | else | ||
121 | channel_type = NL80211_CHAN_NO_HT; | ||
116 | } else if (local->tmp_channel) { | 122 | } else if (local->tmp_channel) { |
117 | chan = scan_chan = local->tmp_channel; | 123 | chan = scan_chan = local->tmp_channel; |
118 | channel_type = local->tmp_channel_type; | 124 | channel_type = local->tmp_channel_type; |
@@ -151,7 +157,13 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed) | |||
151 | offchannel_flag = local->hw.conf.flags & IEEE80211_CONF_OFFCHANNEL; | 157 | offchannel_flag = local->hw.conf.flags & IEEE80211_CONF_OFFCHANNEL; |
152 | if (scan_chan) { | 158 | if (scan_chan) { |
153 | chan = scan_chan; | 159 | chan = scan_chan; |
154 | channel_type = NL80211_CHAN_NO_HT; | 160 | /* If scanning on oper channel, use whatever channel-type |
161 | * is currently in use. | ||
162 | */ | ||
163 | if (chan == local->oper_channel) | ||
164 | channel_type = local->_oper_channel_type; | ||
165 | else | ||
166 | channel_type = NL80211_CHAN_NO_HT; | ||
155 | } else if (local->tmp_channel) { | 167 | } else if (local->tmp_channel) { |
156 | chan = scan_chan = local->tmp_channel; | 168 | chan = scan_chan = local->tmp_channel; |
157 | channel_type = local->tmp_channel_type; | 169 | channel_type = local->tmp_channel_type; |
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index 0ea6adae3e06..0e70d7a160b4 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c | |||
@@ -517,8 +517,7 @@ static void ieee80211_scan_state_decision(struct ieee80211_local *local, | |||
517 | 517 | ||
518 | if (ieee80211_cfg_on_oper_channel(local)) { | 518 | if (ieee80211_cfg_on_oper_channel(local)) { |
519 | /* We're currently on operating channel. */ | 519 | /* We're currently on operating channel. */ |
520 | if ((next_chan == local->oper_channel) && | 520 | if (next_chan == local->oper_channel) |
521 | (local->_oper_channel_type == NL80211_CHAN_NO_HT)) | ||
522 | /* We don't need to move off of operating channel. */ | 521 | /* We don't need to move off of operating channel. */ |
523 | local->next_scan_state = SCAN_SET_CHANNEL; | 522 | local->next_scan_state = SCAN_SET_CHANNEL; |
524 | else | 523 | else |
@@ -620,8 +619,7 @@ static void ieee80211_scan_state_set_channel(struct ieee80211_local *local, | |||
620 | local->scan_channel = chan; | 619 | local->scan_channel = chan; |
621 | 620 | ||
622 | /* Only call hw-config if we really need to change channels. */ | 621 | /* Only call hw-config if we really need to change channels. */ |
623 | if ((chan != local->hw.conf.channel) || | 622 | if (chan != local->hw.conf.channel) |
624 | (local->hw.conf.channel_type != NL80211_CHAN_NO_HT)) | ||
625 | if (ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL)) | 623 | if (ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL)) |
626 | skip = 1; | 624 | skip = 1; |
627 | 625 | ||