diff options
author | Stephen Hemminger <shemminger@osdl.org> | 2006-05-08 19:01:20 -0400 |
---|---|---|
committer | Stephen Hemminger <shemminger@osdl.org> | 2006-05-08 19:01:20 -0400 |
commit | 23aee82e75c1ced9492cbff6090b8e213d95945e (patch) | |
tree | 2d8f0f7fc59a65bffc852c7dc167ee6b196c07a7 /net/ieee80211/softmac/ieee80211softmac_auth.c | |
parent | 8ec93459655a3618dedec6360bb28d63f0010ef6 (diff) | |
parent | 178e0cc5ff249965c6cfbd78b1af6a5e614d837c (diff) |
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_auth.c')
-rw-r--r-- | net/ieee80211/softmac/ieee80211softmac_auth.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/net/ieee80211/softmac/ieee80211softmac_auth.c b/net/ieee80211/softmac/ieee80211softmac_auth.c index 9a0eac6c61eb..06e332624665 100644 --- a/net/ieee80211/softmac/ieee80211softmac_auth.c +++ b/net/ieee80211/softmac/ieee80211softmac_auth.c | |||
@@ -86,6 +86,11 @@ ieee80211softmac_auth_queue(void *data) | |||
86 | 86 | ||
87 | /* Lock and set flags */ | 87 | /* Lock and set flags */ |
88 | spin_lock_irqsave(&mac->lock, flags); | 88 | spin_lock_irqsave(&mac->lock, flags); |
89 | if (unlikely(!mac->running)) { | ||
90 | /* Prevent reschedule on workqueue flush */ | ||
91 | spin_unlock_irqrestore(&mac->lock, flags); | ||
92 | return; | ||
93 | } | ||
89 | net->authenticated = 0; | 94 | net->authenticated = 0; |
90 | net->authenticating = 1; | 95 | net->authenticating = 1; |
91 | /* add a timeout call so we eventually give up waiting for an auth reply */ | 96 | /* add a timeout call so we eventually give up waiting for an auth reply */ |
@@ -124,6 +129,9 @@ ieee80211softmac_auth_resp(struct net_device *dev, struct ieee80211_auth *auth) | |||
124 | unsigned long flags; | 129 | unsigned long flags; |
125 | u8 * data; | 130 | u8 * data; |
126 | 131 | ||
132 | if (unlikely(!mac->running)) | ||
133 | return -ENODEV; | ||
134 | |||
127 | /* Find correct auth queue item */ | 135 | /* Find correct auth queue item */ |
128 | spin_lock_irqsave(&mac->lock, flags); | 136 | spin_lock_irqsave(&mac->lock, flags); |
129 | list_for_each(list_ptr, &mac->auth_queue) { | 137 | list_for_each(list_ptr, &mac->auth_queue) { |
@@ -298,8 +306,6 @@ ieee80211softmac_deauth_from_net(struct ieee80211softmac_device *mac, | |||
298 | 306 | ||
299 | /* can't transmit data right now... */ | 307 | /* can't transmit data right now... */ |
300 | netif_carrier_off(mac->dev); | 308 | netif_carrier_off(mac->dev); |
301 | /* let's try to re-associate */ | ||
302 | schedule_work(&mac->associnfo.work); | ||
303 | spin_unlock_irqrestore(&mac->lock, flags); | 309 | spin_unlock_irqrestore(&mac->lock, flags); |
304 | } | 310 | } |
305 | 311 | ||
@@ -338,6 +344,9 @@ ieee80211softmac_deauth_resp(struct net_device *dev, struct ieee80211_deauth *de | |||
338 | struct ieee80211softmac_network *net = NULL; | 344 | struct ieee80211softmac_network *net = NULL; |
339 | struct ieee80211softmac_device *mac = ieee80211_priv(dev); | 345 | struct ieee80211softmac_device *mac = ieee80211_priv(dev); |
340 | 346 | ||
347 | if (unlikely(!mac->running)) | ||
348 | return -ENODEV; | ||
349 | |||
341 | if (!deauth) { | 350 | if (!deauth) { |
342 | dprintk("deauth without deauth packet. eek!\n"); | 351 | dprintk("deauth without deauth packet. eek!\n"); |
343 | return 0; | 352 | return 0; |
@@ -360,5 +369,8 @@ ieee80211softmac_deauth_resp(struct net_device *dev, struct ieee80211_deauth *de | |||
360 | } | 369 | } |
361 | 370 | ||
362 | ieee80211softmac_deauth_from_net(mac, net); | 371 | ieee80211softmac_deauth_from_net(mac, net); |
372 | |||
373 | /* let's try to re-associate */ | ||
374 | schedule_work(&mac->associnfo.work); | ||
363 | return 0; | 375 | return 0; |
364 | } | 376 | } |