aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/iface.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-08-21 08:44:45 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-08-28 14:40:34 -0400
commitea77f12f2cc0f31168f2e0259e65a22202ac4dc2 (patch)
tree8ac1288e1680ae2b6093b4fdca978a4ea86f7e21 /net/mac80211/iface.c
parent3d54d25515838543e56889aa7e48f40d00719368 (diff)
mac80211: remove tasklet enable/disable
Due to the way the tasklets work in mac80211 there's no need to ever disable them. However, we need to clear the pending packets when taking down the last interface because otherwise the tx_pending_tasklet might be queued if the driver mucks with the queues (which it shouldn't). I've had a situation occasionally with ar9170 in which ksoftirq was using 100% CPU time because a disabled tasklet was scheduled, and I think that was due to ar9170 receiving a packet while the tasklet was disabled. That's strange and it really should not do that for other reasons, but there's no need to waste that much CPU time over it, it should just warn instead. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/iface.c')
-rw-r--r--net/mac80211/iface.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 5940e69fa33..d134bd79972 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -277,11 +277,6 @@ static int ieee80211_open(struct net_device *dev)
277 } 277 }
278 } 278 }
279 279
280 if (local->open_count == 0) {
281 tasklet_enable(&local->tx_pending_tasklet);
282 tasklet_enable(&local->tasklet);
283 }
284
285 /* 280 /*
286 * set_multicast_list will be invoked by the networking core 281 * set_multicast_list will be invoked by the networking core
287 * which will check whether any increments here were done in 282 * which will check whether any increments here were done in
@@ -552,11 +547,9 @@ static int ieee80211_stop(struct net_device *dev)
552 ieee80211_recalc_ps(local, -1); 547 ieee80211_recalc_ps(local, -1);
553 548
554 if (local->open_count == 0) { 549 if (local->open_count == 0) {
550 ieee80211_clear_tx_pending(local);
555 ieee80211_stop_device(local); 551 ieee80211_stop_device(local);
556 552
557 tasklet_disable(&local->tx_pending_tasklet);
558 tasklet_disable(&local->tasklet);
559
560 /* no reconfiguring after stop! */ 553 /* no reconfiguring after stop! */
561 hw_reconf_flags = 0; 554 hw_reconf_flags = 0;
562 } 555 }