]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
mac80211: prevent tuning during scanning
authorMohamed Abbas <mohamed.abbas@intel.com>
Thu, 20 Mar 2008 15:14:29 +0000 (08:14 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 25 Mar 2008 20:41:57 +0000 (16:41 -0400)
Postpone calling ieee80211_hw_config if hardware scanning is active.
This is similar to solution for software scanning where channel setting
is delayed until scan complete.

Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/ieee80211_ioctl.c
net/mac80211/ieee80211_sta.c

index 8e8e5a19d8937c0e1c621f878db67c7db58f18b9..5af23d31872692ee9961a5667646aa1260c9c510 100644 (file)
@@ -287,7 +287,7 @@ int ieee80211_set_freq(struct ieee80211_local *local, int freqMHz)
        if (chan && !(chan->flags & IEEE80211_CHAN_DISABLED)) {
                local->oper_channel = chan;
 
-               if (local->sta_sw_scanning)
+               if (local->sta_sw_scanning || local->sta_hw_scanning)
                        ret = 0;
                else
                        ret = ieee80211_hw_config(local);
index fc73ca4abc08d22ef42b6a2270ffd54c03005a21..bf130b6255abce53ad2ea9db4780c3876bb9c232 100644 (file)
@@ -3615,6 +3615,9 @@ void ieee80211_scan_completed(struct ieee80211_hw *hw)
 
        if (local->sta_hw_scanning) {
                local->sta_hw_scanning = 0;
+               if (ieee80211_hw_config(local))
+                       printk(KERN_DEBUG "%s: failed to restore operational "
+                              "channel after scan\n", dev->name);
                /* Restart STA timer for HW scan case */
                rcu_read_lock();
                list_for_each_entry_rcu(sdata, &local->interfaces, list)