aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/iface.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-07-13 07:23:39 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-24 15:05:13 -0400
commit0e2b6286805c419d28a4c1e19e3a121af7449b20 (patch)
treedef761584adbf70629938db1590a112e9f7ba6d9 /net/mac80211/iface.c
parentec96cfd8215af1cda016837efb266409164e3a30 (diff)
mac80211: cancel the connection monitor timers/work
In "mac80211: monitor the connection" I forgot to add code to cancel the new timers & work when the interface is brought down, which isn't a problem if you just bring it down, but _is_ a problem when you destroy the interface. Correct this lapse. 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.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 4839a2d97a3b..090aa5a47182 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -449,16 +449,18 @@ static int ieee80211_stop(struct net_device *dev)
449 case NL80211_IFTYPE_STATION: 449 case NL80211_IFTYPE_STATION:
450 del_timer_sync(&sdata->u.mgd.chswitch_timer); 450 del_timer_sync(&sdata->u.mgd.chswitch_timer);
451 del_timer_sync(&sdata->u.mgd.timer); 451 del_timer_sync(&sdata->u.mgd.timer);
452 del_timer_sync(&sdata->u.mgd.conn_mon_timer);
453 del_timer_sync(&sdata->u.mgd.bcn_mon_timer);
452 /* 454 /*
453 * If the timer fired while we waited for it, it will have 455 * If any of the timers fired while we waited for it, it will
454 * requeued the work. Now the work will be running again 456 * have queued its work. Now the work will be running again
455 * but will not rearm the timer again because it checks 457 * but will not rearm the timer again because it checks
456 * whether the interface is running, which, at this point, 458 * whether the interface is running, which, at this point,
457 * it no longer is. 459 * it no longer is.
458 */ 460 */
459 cancel_work_sync(&sdata->u.mgd.work); 461 cancel_work_sync(&sdata->u.mgd.work);
460 cancel_work_sync(&sdata->u.mgd.chswitch_work); 462 cancel_work_sync(&sdata->u.mgd.chswitch_work);
461 463 cancel_work_sync(&sdata->u.mgd.monitor_work);
462 cancel_work_sync(&sdata->u.mgd.beacon_loss_work); 464 cancel_work_sync(&sdata->u.mgd.beacon_loss_work);
463 465
464 /* 466 /*