mac80211: check operating channel in scan

The optimisation of scanning only on the current
channel should check the operating channel. Also
modify it to compare channel pointer rather than
the frequency.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Johannes Berg 2012-07-26 14:38:32 +02:00
parent 4797c7ba93
commit 9b86487043
1 changed files with 4 additions and 5 deletions

View File

@ -479,11 +479,10 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata,
if (local->ops->hw_scan) { if (local->ops->hw_scan) {
__set_bit(SCAN_HW_SCANNING, &local->scanning); __set_bit(SCAN_HW_SCANNING, &local->scanning);
} else if ((req->n_channels == 1) && } else if ((req->n_channels == 1) &&
(req->channels[0]->center_freq == (req->channels[0] == local->oper_channel)) {
local->hw.conf.channel->center_freq)) { /*
* If we are scanning only on the operating channel
/* If we are scanning only on the current channel, then * then we do not need to stop normal activities
* we do not need to stop normal activities
*/ */
unsigned long next_delay; unsigned long next_delay;