From: Johannes Berg <johannes@sipsolutions.net>
To: John Linville <linville@tuxdriver.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>
Subject: [PATCH] mac80211: cancel the connection monitor timers/work
Date: Mon, 13 Jul 2009 13:23:39 +0200 [thread overview]
Message-ID: <1247484220.4166.2.camel@johannes.local> (raw)
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>
---
Fixes http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=2044
net/mac80211/iface.c | 8 +++++---
net/mac80211/mlme.c | 3 +++
2 files changed, 8 insertions(+), 3 deletions(-)
--- wireless-testing.orig/net/mac80211/iface.c 2009-07-13 13:02:51.000000000 +0200
+++ wireless-testing/net/mac80211/iface.c 2009-07-13 13:02:53.000000000 +0200
@@ -451,16 +451,18 @@ static int ieee80211_stop(struct net_dev
case NL80211_IFTYPE_STATION:
del_timer_sync(&sdata->u.mgd.chswitch_timer);
del_timer_sync(&sdata->u.mgd.timer);
+ del_timer_sync(&sdata->u.mgd.conn_mon_timer);
+ del_timer_sync(&sdata->u.mgd.bcn_mon_timer);
/*
- * If the timer fired while we waited for it, it will have
- * requeued the work. Now the work will be running again
+ * If any of the timers fired while we waited for it, it will
+ * have queued its work. Now the work will be running again
* but will not rearm the timer again because it checks
* whether the interface is running, which, at this point,
* it no longer is.
*/
cancel_work_sync(&sdata->u.mgd.work);
cancel_work_sync(&sdata->u.mgd.chswitch_work);
-
+ cancel_work_sync(&sdata->u.mgd.monitor_work);
cancel_work_sync(&sdata->u.mgd.beacon_loss_work);
/*
--- wireless-testing.orig/net/mac80211/mlme.c 2009-07-13 13:02:51.000000000 +0200
+++ wireless-testing/net/mac80211/mlme.c 2009-07-13 13:02:53.000000000 +0200
@@ -1163,6 +1163,9 @@ static void ieee80211_mgd_probe_ap(struc
const u8 *ssid;
bool already = false;
+ if (!netif_running(sdata->dev))
+ return;
+
mutex_lock(&ifmgd->mtx);
if (!ifmgd->associated)
reply other threads:[~2009-07-13 11:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1247484220.4166.2.camel@johannes.local \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox