aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/scan.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/scan.c')
-rw-r--r--net/mac80211/scan.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index 0989b1c062e3..7372d7abb8c0 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -448,12 +448,17 @@ void ieee80211_scan_completed(struct ieee80211_hw *hw)
448 448
449 if (local->hw_scanning) { 449 if (local->hw_scanning) {
450 local->hw_scanning = false; 450 local->hw_scanning = false;
451 ieee80211_hw_config(local); 451 /*
452 * Somebody might have requested channel change during scan
453 * that we won't have acted upon, try now. ieee80211_hw_config
454 * will set the flag based on actual changes.
455 */
456 ieee80211_hw_config(local, 0);
452 goto done; 457 goto done;
453 } 458 }
454 459
455 local->sw_scanning = false; 460 local->sw_scanning = false;
456 ieee80211_hw_config(local); 461 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL);
457 462
458 netif_tx_lock_bh(local->mdev); 463 netif_tx_lock_bh(local->mdev);
459 netif_addr_lock(local->mdev); 464 netif_addr_lock(local->mdev);
@@ -540,7 +545,8 @@ void ieee80211_scan_work(struct work_struct *work)
540 545
541 if (!skip) { 546 if (!skip) {
542 local->scan_channel = chan; 547 local->scan_channel = chan;
543 if (ieee80211_hw_config(local)) 548 if (ieee80211_hw_config(local,
549 IEEE80211_CONF_CHANGE_CHANNEL))
544 skip = 1; 550 skip = 1;
545 } 551 }
546 552