aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/mac80211/scan.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index 80e017df5f31..523db930dabb 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -791,7 +791,8 @@ int ieee80211_request_internal_scan(struct ieee80211_sub_if_data *sdata,
791 */ 791 */
792void ieee80211_scan_cancel(struct ieee80211_local *local) 792void ieee80211_scan_cancel(struct ieee80211_local *local)
793{ 793{
794 bool abortscan, finish; 794 bool abortscan;
795 bool finish = false;
795 796
796 /* 797 /*
797 * We are only canceling software scan, or deferred scan that was not 798 * We are only canceling software scan, or deferred scan that was not
@@ -818,7 +819,7 @@ void ieee80211_scan_cancel(struct ieee80211_local *local)
818 if (abortscan) { 819 if (abortscan) {
819 /* The scan is canceled, but stop work from being pending */ 820 /* The scan is canceled, but stop work from being pending */
820 cancel_delayed_work_sync(&local->scan_work); 821 cancel_delayed_work_sync(&local->scan_work);
821 if (finish)
822 __ieee80211_scan_completed_finish(&local->hw, false);
823 } 822 }
823 if (finish)
824 __ieee80211_scan_completed_finish(&local->hw, false);
824} 825}