Skip to content

Commit

Permalink
mac80211: check operating channel in scan
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Berg committed Aug 20, 2012
1 parent 4797c7b commit 9b86487
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions net/mac80211/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -479,11 +479,10 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata,
if (local->ops->hw_scan) {
__set_bit(SCAN_HW_SCANNING, &local->scanning);
} else if ((req->n_channels == 1) &&
(req->channels[0]->center_freq ==
local->hw.conf.channel->center_freq)) {

/* If we are scanning only on the current channel, then
* we do not need to stop normal activities
(req->channels[0] == local->oper_channel)) {
/*
* If we are scanning only on the operating channel
* then we do not need to stop normal activities
*/
unsigned long next_delay;

Expand Down

0 comments on commit 9b86487

Please sign in to comment.