aboutsummaryrefslogtreecommitdiff
path: root/net/ieee80211/softmac/ieee80211softmac_wx.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2007-10-03 18:14:23 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 16:52:22 -0700
commit501d857ec93e797d4872d6b9b265b7472b455ddf (patch)
treef4bbdd316145573af7234960599e45592b73f8fe /net/ieee80211/softmac/ieee80211softmac_wx.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_wx.c')
-rw-r--r--net/ieee80211/softmac/ieee80211softmac_wx.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ieee80211/softmac/ieee80211softmac_wx.c b/net/ieee80211/softmac/ieee80211softmac_wx.c
index 8e8ad08a411..ac36767b56e 100644
--- a/net/ieee80211/softmac/ieee80211softmac_wx.c
+++ b/net/ieee80211/softmac/ieee80211softmac_wx.c
@@ -91,7 +91,7 @@ check_assoc_again:
/* We must unlock to avoid deadlocks with the assoc workqueue
* on the associnfo.mutex */
mutex_unlock(&sm->associnfo.mutex);
- flush_scheduled_work();
+ flush_workqueue(sm->wq);
/* Avoid race! Check assoc status again. Maybe someone started an
* association while we flushed. */
goto check_assoc_again;
@@ -114,7 +114,7 @@ check_assoc_again:
sm->associnfo.associating = 1;
/* queue lower level code to do work (if necessary) */
- schedule_delayed_work(&sm->associnfo.work, 0);
+ queue_delayed_work(sm->wq, &sm->associnfo.work, 0);
mutex_unlock(&sm->associnfo.mutex);
@@ -349,7 +349,7 @@ ieee80211softmac_wx_set_wap(struct net_device *net_dev,
/* force reassociation */
mac->associnfo.bssvalid = 0;
if (mac->associnfo.associated)
- schedule_delayed_work(&mac->associnfo.work, 0);
+ queue_delayed_work(mac->wq, &mac->associnfo.work, 0);
} else if (is_zero_ether_addr(data->ap_addr.sa_data)) {
/* the bssid we have is no longer fixed */
mac->associnfo.bssfixed = 0;
@@ -366,7 +366,7 @@ ieee80211softmac_wx_set_wap(struct net_device *net_dev,
/* tell the other code that this bssid should be used no matter what */
mac->associnfo.bssfixed = 1;
/* queue associate if new bssid or (old one again and not associated) */
- schedule_delayed_work(&mac->associnfo.work, 0);
+ queue_delayed_work(mac->wq, &mac->associnfo.work, 0);
}
out: