diff options
author | David S. Miller <davem@davemloft.net> | 2013-10-23 16:28:39 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-10-23 16:49:34 -0400 |
commit | c3fa32b9764dc45dcf8a2231b1c110abc4a63e0b (patch) | |
tree | 6cf2896a77b65bec64284681e1c3851eb3263e09 /net/mac80211/scan.c | |
parent | 34d92d5315b64a3e5292b7e9511c1bb617227fb6 (diff) | |
parent | 320437af954cbe66478f1f5e8b34cb5a8d072191 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
drivers/net/usb/qmi_wwan.c
include/net/dst.h
Trivial merge conflicts, both were overlapping changes.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac80211/scan.c')
-rw-r--r-- | net/mac80211/scan.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index ecb57b0bf74a..5ad66a83ef7f 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c | |||
@@ -238,6 +238,9 @@ static bool ieee80211_prep_hw_scan(struct ieee80211_local *local) | |||
238 | enum ieee80211_band band; | 238 | enum ieee80211_band band; |
239 | int i, ielen, n_chans; | 239 | int i, ielen, n_chans; |
240 | 240 | ||
241 | if (test_bit(SCAN_HW_CANCELLED, &local->scanning)) | ||
242 | return false; | ||
243 | |||
241 | do { | 244 | do { |
242 | if (local->hw_scan_band == IEEE80211_NUM_BANDS) | 245 | if (local->hw_scan_band == IEEE80211_NUM_BANDS) |
243 | return false; | 246 | return false; |
@@ -939,7 +942,23 @@ void ieee80211_scan_cancel(struct ieee80211_local *local) | |||
939 | if (!local->scan_req) | 942 | if (!local->scan_req) |
940 | goto out; | 943 | goto out; |
941 | 944 | ||
945 | /* | ||
946 | * We have a scan running and the driver already reported completion, | ||
947 | * but the worker hasn't run yet or is stuck on the mutex - mark it as | ||
948 | * cancelled. | ||
949 | */ | ||
950 | if (test_bit(SCAN_HW_SCANNING, &local->scanning) && | ||
951 | test_bit(SCAN_COMPLETED, &local->scanning)) { | ||
952 | set_bit(SCAN_HW_CANCELLED, &local->scanning); | ||
953 | goto out; | ||
954 | } | ||
955 | |||
942 | if (test_bit(SCAN_HW_SCANNING, &local->scanning)) { | 956 | if (test_bit(SCAN_HW_SCANNING, &local->scanning)) { |
957 | /* | ||
958 | * Make sure that __ieee80211_scan_completed doesn't trigger a | ||
959 | * scan on another band. | ||
960 | */ | ||
961 | set_bit(SCAN_HW_CANCELLED, &local->scanning); | ||
943 | if (local->ops->cancel_hw_scan) | 962 | if (local->ops->cancel_hw_scan) |
944 | drv_cancel_hw_scan(local, | 963 | drv_cancel_hw_scan(local, |
945 | rcu_dereference_protected(local->scan_sdata, | 964 | rcu_dereference_protected(local->scan_sdata, |