mac80211: check operating channel in scan

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Sat Sep 29 10:59:45 EDT 2012


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=9b8648704358e42f9865cd6de7cedb5ac0db67e7
Commit:     9b8648704358e42f9865cd6de7cedb5ac0db67e7
Parent:     4797c7ba93e4049cdda18045c01bbe563aafff69
Author:     Johannes Berg <johannes.berg at intel.com>
AuthorDate: Thu Jul 26 14:38:32 2012 +0200
Committer:  Johannes Berg <johannes.berg at intel.com>
CommitDate: Mon Aug 20 14:13:43 2012 +0200

    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 at intel.com>
---
 net/mac80211/scan.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index bcaee5d..4b75dde 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -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;
 



More information about the linux-mtd-cvs mailing list