diff mbox

[RFC,1/2] mac80211: Stop timer before deleting data structures.

Message ID 1371515281-26879-1-git-send-email-greearb@candelatech.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Ben Greear June 18, 2013, 12:28 a.m. UTC
From: Ben Greear <greearb@candelatech.com>

Not sure this matters, but it seems cleaner.

Signed-off-by: Ben Greear <greearb@candelatech.com>
---
 net/mac80211/mlme.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Johannes Berg June 18, 2013, 12:14 p.m. UTC | #1
On Mon, 2013-06-17 at 17:28 -0700, greearb@candelatech.com wrote:
> From: Ben Greear <greearb@candelatech.com>
> 
> Not sure this matters, but it seems cleaner.

It really doesn't make a difference at all since it's all locked and the
timer just fires off the work struct.

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 732eda0..ebfa416 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -4379,11 +4379,11 @@  void ieee80211_mgd_stop(struct ieee80211_sub_if_data *sdata)
 	cancel_work_sync(&ifmgd->chswitch_work);
 
 	mutex_lock(&ifmgd->mtx);
+	del_timer_sync(&ifmgd->timer);
 	if (ifmgd->assoc_data)
 		ieee80211_destroy_assoc_data(sdata, false, true);
 	if (ifmgd->auth_data)
 		ieee80211_destroy_auth_data(sdata, false);
-	del_timer_sync(&ifmgd->timer);
 	mutex_unlock(&ifmgd->mtx);
 }