aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00dev.c
diff options
context:
space:
mode:
authorIvo van Doorn <IvDoorn@gmail.com>2011-01-30 07:24:05 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-01-31 15:06:25 -0500
commit0439f5367c8d8bb2ebaca8d7329f51f3148b2fb2 (patch)
treedee1b60792da49cd903266ec8daf90516c604c49 /drivers/net/wireless/rt2x00/rt2x00dev.c
parente1f4e808bb7a884d6563553c2c94cbdd901a16c7 (diff)
rt2x00: Move TX/RX work into dedicated workqueue
The TX/RX work structures must be able to run independently of other workqueues. This is because mac80211 might use the flush() callback function from various context, which depends on the TX/RX work to complete while the main thread is blocked (until the the TX queues are empty). This should reduce the number of 'Queue %d failed to flush' warnings. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00dev.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00dev.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index e7162852ec34..9de9dbe94399 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -997,8 +997,15 @@ int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev)
997 BIT(NL80211_IFTYPE_WDS); 997 BIT(NL80211_IFTYPE_WDS);
998 998
999 /* 999 /*
1000 * Initialize configuration work. 1000 * Initialize work.
1001 */ 1001 */
1002 rt2x00dev->workqueue =
1003 alloc_ordered_workqueue(wiphy_name(rt2x00dev->hw->wiphy), 0);
1004 if (!rt2x00dev->workqueue) {
1005 retval = -ENOMEM;
1006 goto exit;
1007 }
1008
1002 INIT_WORK(&rt2x00dev->intf_work, rt2x00lib_intf_scheduled); 1009 INIT_WORK(&rt2x00dev->intf_work, rt2x00lib_intf_scheduled);
1003 1010
1004 /* 1011 /*
@@ -1057,6 +1064,7 @@ void rt2x00lib_remove_dev(struct rt2x00_dev *rt2x00dev)
1057 cancel_work_sync(&rt2x00dev->intf_work); 1064 cancel_work_sync(&rt2x00dev->intf_work);
1058 cancel_work_sync(&rt2x00dev->rxdone_work); 1065 cancel_work_sync(&rt2x00dev->rxdone_work);
1059 cancel_work_sync(&rt2x00dev->txdone_work); 1066 cancel_work_sync(&rt2x00dev->txdone_work);
1067 destroy_workqueue(rt2x00dev->workqueue);
1060 1068
1061 /* 1069 /*
1062 * Free the tx status fifo. 1070 * Free the tx status fifo.