aboutsummaryrefslogtreecommitdiffstats
path: root/net/ieee80211/softmac/ieee80211softmac_auth.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2007-10-03 21:14:23 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:52:22 -0400
commit501d857ec93e797d4872d6b9b265b7472b455ddf (patch)
treef4bbdd316145573af7234960599e45592b73f8fe /net/ieee80211/softmac/ieee80211softmac_auth.c
parent05155c83d13b983ac2c5691575fd471543df31fe (diff)
[IEEE80211]: Fix softmac lockdep reports.
It seems I was actually able to hit this deadlock, on my quad G5 softmac locks up more often than not. This fixes it by using an own workqueue that can safely be flushed under RTNL. Not sure if the patch is correct with the workqueue naming. And don't think with the patch it doesn't continually lock up. It still does, just doesn't invoke lockdep warnings all the time. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ieee80211/softmac/ieee80211softmac_auth.c')
-rw-r--r--net/ieee80211/softmac/ieee80211softmac_auth.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ieee80211/softmac/ieee80211softmac_auth.c b/net/ieee80211/softmac/ieee80211softmac_auth.c
index 855fa0fe641..a53a751d070 100644
--- a/net/ieee80211/softmac/ieee80211softmac_auth.c
+++ b/net/ieee80211/softmac/ieee80211softmac_auth.c
@@ -62,7 +62,7 @@ ieee80211softmac_auth_req(struct ieee80211softmac_device *mac,
62 62
63 /* add to list */ 63 /* add to list */
64 list_add_tail(&auth->list, &mac->auth_queue); 64 list_add_tail(&auth->list, &mac->auth_queue);
65 schedule_delayed_work(&auth->work, 0); 65 queue_delayed_work(mac->wq, &auth->work, 0);
66 spin_unlock_irqrestore(&mac->lock, flags); 66 spin_unlock_irqrestore(&mac->lock, flags);
67 67
68 return 0; 68 return 0;
@@ -97,7 +97,7 @@ ieee80211softmac_auth_queue(struct work_struct *work)
97 } 97 }
98 net->authenticated = 0; 98 net->authenticated = 0;
99 /* add a timeout call so we eventually give up waiting for an auth reply */ 99 /* add a timeout call so we eventually give up waiting for an auth reply */
100 schedule_delayed_work(&auth->work, IEEE80211SOFTMAC_AUTH_TIMEOUT); 100 queue_delayed_work(mac->wq, &auth->work, IEEE80211SOFTMAC_AUTH_TIMEOUT);
101 auth->retry--; 101 auth->retry--;
102 spin_unlock_irqrestore(&mac->lock, flags); 102 spin_unlock_irqrestore(&mac->lock, flags);
103 if (ieee80211softmac_send_mgt_frame(mac, auth->net, IEEE80211_STYPE_AUTH, auth->state)) 103 if (ieee80211softmac_send_mgt_frame(mac, auth->net, IEEE80211_STYPE_AUTH, auth->state))
@@ -242,7 +242,7 @@ ieee80211softmac_auth_resp(struct net_device *dev, struct ieee80211_auth *auth)
242 * request. */ 242 * request. */
243 cancel_delayed_work(&aq->work); 243 cancel_delayed_work(&aq->work);
244 INIT_DELAYED_WORK(&aq->work, &ieee80211softmac_auth_challenge_response); 244 INIT_DELAYED_WORK(&aq->work, &ieee80211softmac_auth_challenge_response);
245 schedule_delayed_work(&aq->work, 0); 245 queue_delayed_work(mac->wq, &aq->work, 0);
246 spin_unlock_irqrestore(&mac->lock, flags); 246 spin_unlock_irqrestore(&mac->lock, flags);
247 return 0; 247 return 0;
248 case IEEE80211SOFTMAC_AUTH_SHARED_PASS: 248 case IEEE80211SOFTMAC_AUTH_SHARED_PASS:
@@ -408,6 +408,6 @@ ieee80211softmac_deauth_resp(struct net_device *dev, struct ieee80211_deauth *de
408 ieee80211softmac_deauth_from_net(mac, net); 408 ieee80211softmac_deauth_from_net(mac, net);
409 409
410 /* let's try to re-associate */ 410 /* let's try to re-associate */
411 schedule_delayed_work(&mac->associnfo.work, 0); 411 queue_delayed_work(mac->wq, &mac->associnfo.work, 0);
412 return 0; 412 return 0;
413} 413}