summaryrefslogtreecommitdiff
path: root/net/ieee80211/softmac/ieee80211softmac_scan.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2006-05-09 03:01:20 +0400
committerStephen Hemminger <shemminger@osdl.org>2006-05-09 03:01:20 +0400
commit23aee82e75c1ced9492cbff6090b8e213d95945e (patch)
tree2d8f0f7fc59a65bffc852c7dc167ee6b196c07a7 /net/ieee80211/softmac/ieee80211softmac_scan.c
parent8ec93459655a3618dedec6360bb28d63f0010ef6 (diff)
parent178e0cc5ff249965c6cfbd78b1af6a5e614d837c (diff)
downloadlinux-23aee82e75c1ced9492cbff6090b8e213d95945e.tar.xz
Merge branch 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Diffstat (limited to 'net/ieee80211/softmac/ieee80211softmac_scan.c')
-rw-r--r--net/ieee80211/softmac/ieee80211softmac_scan.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/ieee80211/softmac/ieee80211softmac_scan.c b/net/ieee80211/softmac/ieee80211softmac_scan.c
index 2b9e7edfa3ce..d31cf77498c4 100644
--- a/net/ieee80211/softmac/ieee80211softmac_scan.c
+++ b/net/ieee80211/softmac/ieee80211softmac_scan.c
@@ -115,7 +115,15 @@ void ieee80211softmac_scan(void *d)
// TODO: is this if correct, or should we do this only if scanning from assoc request?
if (sm->associnfo.req_essid.len)
ieee80211softmac_send_mgt_frame(sm, &sm->associnfo.req_essid, IEEE80211_STYPE_PROBE_REQ, 0);
+
+ spin_lock_irqsave(&sm->lock, flags);
+ if (unlikely(!sm->running)) {
+ /* Prevent reschedule on workqueue flush */
+ spin_unlock_irqrestore(&sm->lock, flags);
+ break;
+ }
schedule_delayed_work(&si->softmac_scan, IEEE80211SOFTMAC_PROBE_DELAY);
+ spin_unlock_irqrestore(&sm->lock, flags);
return;
} else {
dprintk(PFX "Not probing Channel %d (not allowed here)\n", si->channels[current_channel_idx].channel);