Skip to contentSkip to conversation

mac80211: stop connection monitor on dissassoc

RFC/RFT Stanislaw Gruszka 3 participants 5 messages Jun 12, 2012 mac80211

lore
Share & tools
lore
#0 lore raw

Looks like is possible to do not kick of deferred scan when connection monitoring is pending and on the same time we disconnect.

David, I can not recreate this problem locally, does below patch fix the problem on your tests.

Thanks
Stanislaw

---
 net/mac80211/mlme.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
net/mac80211/mlme.c +2 -0
index d7134c1..1e20748 100644
@@ -1425,6 +1425,8 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
 	del_timer_sync(&sdata->u.mgd.bcn_mon_timer);
 	del_timer_sync(&sdata->u.mgd.timer);
 	del_timer_sync(&sdata->u.mgd.chswitch_timer);
+
+	ieee80211_stop_poll(sdata);
 }
 
 void ieee80211_sta_rx_notify(struct ieee80211_sub_if_data *sdata,
Signature · 1 line
1.7.1
#1 lore raw

Hi Stanislav.
This problem is not easy to reproduce.
Attached my patch I just sent to Johannes, it seems to work here.
It basically the same change as yours, but I also removed stop_poll from ieee80211_sta_connection_lost().

Thanks,
David

Quoted 1 line

From af52e5f1f6b7c5d89fdc1866f554a495717a61ad Mon Sep 17 00:00:00 2001

From: David Spinadel <[email protected]>
Date: Tue, 12 Jun 2012 09:59:45 +0300
Subject: [PATCH] mac80211: stop polling in disassocition

Change-Id If16d1a2316259ced4f6647efba422203e9400179
---
 net/mac80211/mlme.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
net/mac80211/mlme.c +2 -2
index 0f45d02..9aefcc3 100644
@@ -1329,6 +1329,8 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
 	u32 changed = 0;
 	u8 bssid[ETH_ALEN];
 
+	ieee80211_stop_poll(sdata);
+
 	ASSERT_MGD_MTX(ifmgd);
 
 	if (WARN_ON_ONCE(tx && !frame_buf))
@@ -2592,8 +2594,6 @@ static void ieee80211_sta_connection_lost(struct ieee80211_sub_if_data *sdata,
 	struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
 	u8 frame_buf[DEAUTH_DISASSOC_LEN];
 
-	ieee80211_stop_poll(sdata);
-
 	ieee80211_set_disassoc(sdata, IEEE80211_STYPE_DEAUTH, reason,
 			       false, frame_buf);
 	mutex_unlock(&ifmgd->mtx);
Signature · 1 line
1.7.1

-----Original Message-----
From: Stanislaw Gruszka [mailto:[email protected]]
Sent: Tuesday, June 12, 2012 12:59
To: [email protected]; Spinadel, David
Cc: Johannes Berg
Subject: [RFC/RFT] mac80211: stop connection monitor on dissassoc

Looks like is possible to do not kick of deferred scan when connection monitoring is pending and on the same time we disconnect.

David, I can not recreate this problem locally, does below patch fix the problem on your tests.

Thanks
Stanislaw

---
 net/mac80211/mlme.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
net/mac80211/mlme.c +2 -0
@@ -1425,6 +1425,8 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
 	del_timer_sync(&sdata->u.mgd.bcn_mon_timer);
 	del_timer_sync(&sdata->u.mgd.timer);
 	del_timer_sync(&sdata->u.mgd.chswitch_timer);
+
+	ieee80211_stop_poll(sdata);
 }
 
 void ieee80211_sta_rx_notify(struct ieee80211_sub_if_data *sdata,

--
1.7.1

---------------------------------------------------------------------
A member of the Intel Corporation group of companies

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.

From af52e5f1f6b7c5d89fdc1866f554a495717a61ad Mon Sep 17 00:00:00 2001
From: David Spinadel <[email protected]>
Date: Tue, 12 Jun 2012 09:59:45 +0300
Subject: [PATCH] mac80211: stop polling in disassocition

Change-Id If16d1a2316259ced4f6647efba422203e9400179
---
 net/mac80211/mlme.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
net/mac80211/mlme.c +2 -2
index 0f45d02..9aefcc3 100644
@@ -1329,6 +1329,8 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
 	u32 changed = 0;
 	u8 bssid[ETH_ALEN];
 
+	ieee80211_stop_poll(sdata);
+
 	ASSERT_MGD_MTX(ifmgd);
 
 	if (WARN_ON_ONCE(tx && !frame_buf))
@@ -2592,8 +2594,6 @@ static void ieee80211_sta_connection_lost(struct ieee80211_sub_if_data *sdata,
 	struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
 	u8 frame_buf[DEAUTH_DISASSOC_LEN];
 
-	ieee80211_stop_poll(sdata);
-
 	ieee80211_set_disassoc(sdata, IEEE80211_STYPE_DEAUTH, reason,
 			       false, frame_buf);
 	mutex_unlock(&ifmgd->mtx);
Signature · 1 line
1.7.1
#2 lore raw

Hi.

Quoted 3 lines · David

This problem is not easy to reproduce.
Attached my patch I just sent to Johannes, it seems to work here.
It basically the same change as yours, but I also removed stop_poll from ieee80211_sta_connection_lost().

Make sense. Johannes plese process with David patch.

Thanks
Stanislaw

maintainer
#3 lore raw
Quoted 8 lines · Stanislaw Gruszka

Hi.

Quoted 3 lines · David

This problem is not easy to reproduce.
Attached my patch I just sent to Johannes, it seems to work here.
It basically the same change as yours, but I also removed stop_poll from ieee80211_sta_connection_lost().

Make sense. Johannes plese process with David patch.

Ok, will do. David, can you please submit it internally, I'll take it from there.

johannes

#4 lore raw

T2ssIG9uZSBtaW51dGUuDQoNCkRhdmlkDQoNCg0KLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0N CkZyb206IEpvaGFubmVzIEJlcmcgW21haWx0bzpqb2hhbm5lc0BzaXBzb2x1dGlvbnMubmV0XSAN ClNlbnQ6IFR1ZXNkYXksIEp1bmUgMTIsIDIwMTIgMTQ6MDINClRvOiBTdGFuaXNsYXcgR3J1c3pr YQ0KQ2M6IFNwaW5hZGVsLCBEYXZpZDsgbGludXgtd2lyZWxlc3NAdmdlci5rZXJuZWwub3JnDQpT dWJqZWN0OiBSZTogW1JGQy9SRlRdIG1hYzgwMjExOiBzdG9wIGNvbm5lY3Rpb24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