diff options
author | Rajkumar Manoharan <rmanoharan@atheros.com> | 2011-05-14 06:13:28 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-05-16 20:25:29 +0200 |
commit | c29acf201007a6d73223f864f52406eb5ba19933 (patch) | |
tree | f64976bf10ade80e6ceb39f917f6741b575ee301 /net/mac80211/scan.c | |
parent | mac80211: verify IBSS in interface combinations (diff) | |
download | linux-c29acf201007a6d73223f864f52406eb5ba19933.tar.xz linux-c29acf201007a6d73223f864f52406eb5ba19933.zip |
mac80211: abort scan_work immediately when the device goes down
As long as no delay is required b/w channel change, scan work
is proceeding without scheduling a new work. In such case, we
can not abort scan work when the card was unplugged. This patch
completes the scanning immediately whenever the device goes down.
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/scan.c')
-rw-r--r-- | net/mac80211/scan.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index d20046b5d8f4..27af6723cb5e 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c @@ -719,6 +719,11 @@ void ieee80211_scan_work(struct work_struct *work) * without scheduling a new work */ do { + if (!ieee80211_sdata_running(sdata)) { + aborted = true; + goto out_complete; + } + switch (local->next_scan_state) { case SCAN_DECISION: /* if no more bands/channels left, complete scan */ |