aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/work.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2010-01-06 09:30:58 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-01-12 13:51:28 -0500
commit81ac3462d346ee7aaf037a35156b0a7a354e98cf (patch)
tree8ad3bd87fc62db3b5a0bd69c5b4a2fc8613414b9 /net/mac80211/work.c
parent34a6eddbabd704b3c7dae9362234552267573be2 (diff)
mac80211: fix a few work bugs
Kalle and Lennert reported problems with the new work code, and at least Kalle's problem I was able to trace to a missing jiffies initialisation. I also ran into a problem where occasionally I couldn't connect, which seems fixed with kicking the work items after scanning. Finally, also add some sanity checking code to verify that we're not adding work items while an interface is down -- that case could lead to something similar to what Lennert was seeing. There still seems to be a race condition that we're trying to figure out separately. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Tested-by: Lennert Buytenhek <buytenh@marvell.com> Tested-by: Kalle Valo <kalle.valo@iki.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/work.c')
-rw-r--r--net/mac80211/work.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/mac80211/work.c b/net/mac80211/work.c
index 5ba75990c9fd..7c5d95b1bc04 100644
--- a/net/mac80211/work.c
+++ b/net/mac80211/work.c
@@ -818,6 +818,7 @@ static void ieee80211_work_work(struct work_struct *work)
818 wk->chan == local->tmp_channel && 818 wk->chan == local->tmp_channel &&
819 wk->chan_type == local->tmp_channel_type) { 819 wk->chan_type == local->tmp_channel_type) {
820 wk->started = true; 820 wk->started = true;
821 wk->timeout = jiffies;
821 } 822 }
822 823
823 if (!wk->started && !local->tmp_channel) { 824 if (!wk->started && !local->tmp_channel) {
@@ -935,6 +936,9 @@ void ieee80211_add_work(struct ieee80211_work *wk)
935 if (WARN_ON(!wk->done)) 936 if (WARN_ON(!wk->done))
936 return; 937 return;
937 938
939 if (WARN_ON(!ieee80211_sdata_running(wk->sdata)))
940 return;
941
938 wk->started = false; 942 wk->started = false;
939 943
940 local = wk->sdata->local; 944 local = wk->sdata->local;