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.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index 127bd54e0e38..c99ef8d04d3d 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -302,17 +302,9 @@ void ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted)
302 /* we only have to protect scan_req and hw/sw scan */ 302 /* we only have to protect scan_req and hw/sw scan */
303 mutex_unlock(&local->scan_mtx); 303 mutex_unlock(&local->scan_mtx);
304 304
305 if (was_hw_scan) {
306 /*
307 * Somebody might have requested channel change during scan
308 * that we won't have acted upon, try now. ieee80211_hw_config
309 * will set the flag based on actual changes.
310 */
311 ieee80211_hw_config(local, 0);
312 goto done;
313 }
314
315 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL); 305 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL);
306 if (was_hw_scan)
307 goto done;
316 308
317 netif_tx_lock_bh(local->mdev); 309 netif_tx_lock_bh(local->mdev);
318 netif_addr_lock(local->mdev); 310 netif_addr_lock(local->mdev);
@@ -351,6 +343,7 @@ void ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted)
351 mutex_unlock(&local->iflist_mtx); 343 mutex_unlock(&local->iflist_mtx);
352 344
353 done: 345 done:
346 ieee80211_recalc_idle(local);
354 ieee80211_mlme_notify_scan_completed(local); 347 ieee80211_mlme_notify_scan_completed(local);
355 ieee80211_ibss_notify_scan_completed(local); 348 ieee80211_ibss_notify_scan_completed(local);
356 ieee80211_mesh_notify_scan_completed(local); 349 ieee80211_mesh_notify_scan_completed(local);
@@ -471,6 +464,8 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata,
471 * dependency, so that the scan completed calls 464 * dependency, so that the scan completed calls
472 * have more locking freedom. 465 * have more locking freedom.
473 */ 466 */
467
468 ieee80211_recalc_idle(local);
474 mutex_unlock(&local->scan_mtx); 469 mutex_unlock(&local->scan_mtx);
475 470
476 if (local->ops->hw_scan) 471 if (local->ops->hw_scan)
@@ -487,6 +482,8 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata,
487 } else 482 } else
488 local->sw_scanning = false; 483 local->sw_scanning = false;
489 484
485 ieee80211_recalc_idle(local);
486
490 local->scan_req = NULL; 487 local->scan_req = NULL;
491 local->scan_sdata = NULL; 488 local->scan_sdata = NULL;
492 } 489 }