aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00.h
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2008-06-25 21:27:00 +0200
committerJohn W. Linville <linville@tuxdriver.com>2008-06-27 14:49:52 -0400
commit980dfcb93232907034a2c92d62d3a7d6ac7bef44 (patch)
treefbb8ed96c1ed2164ad507f57cb551bf2584da3a7 /drivers/net/wireless/rt2x00/rt2x00.h
parentMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6 (diff)
downloadlinux-dev-980dfcb93232907034a2c92d62d3a7d6ac7bef44.tar.xz
linux-dev-980dfcb93232907034a2c92d62d3a7d6ac7bef44.zip
rt2x00: Fix lock dependency errror
This fixes a circular locking dependency in the workqueue handling. The interface work task uses the mac80211 function ieee80211_iterate_active_interfaces() which grabs the RTNL lock. However when the interface is brough down, this happens under the RTNL lock as well, this causes problems because mac80211 will flush the workqueue during the ifdown event. This causes mac80211 to wait until the driver has completed all work which can't finish because it is waiting on the RTNL lock. This is fixed by moving rt2x00 workqueue tasks on a different workqueue, this workqueue can be flushed when the ieee80211_hw structure is removed by the driver (when the driver is unloaded) which does not happen under the RTNL lock. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00.h')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
index 611d98320593..b4bf1e09cf9a 100644
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -821,6 +821,7 @@ struct rt2x00_dev {
/*
* Scheduled work.
*/
+ struct workqueue_struct *workqueue;
struct work_struct intf_work;
struct work_struct filter_work;