Skip to contentSkip to conversation

mac80211: Don't restart sta-timer if not associated.

PATCH Superseded [email protected] 1 participant 2 messages Mar 14, 2013 mac80211

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mac80211: Don't restart sta-timer if not associated.

From: Ben Greear <[email protected]>

I found another crash when deleting lots of virtual stations in a congested environment. I think the problem is that the ieee80211_mlme_notify_scan_completed could call ieee80211_restart_sta_timer for a non-associated interface that was about to be deleted.

With the following patch I am unable to reproduce the crash.

---
:100644 100644 81e0619... a1cc8c4... M net/mac80211/mlme.c

 net/mac80211/mlme.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
net/mac80211/mlme.c +3 -0
index 81e0619..a1cc8c4 100644
@@ -2931,6 +2931,9 @@ static void ieee80211_restart_sta_timer(struct ieee80211_sub_if_data *sdata)
 	u32 flags;
 
 	if (sdata->vif.type == NL80211_IFTYPE_STATION) {
+		if (unlikely(!sdata->u.mgd.associated))
+			return;
+
 		__ieee80211_stop_poll(sdata);
 
 		/* let's probe the connection once */
Signature · 1 line
1.7.3.4
author
#1 lore raw
Quoted 10 lines · On 03/14/2013 03:17 PM, [email protected] wrote:

From: Ben Greear <[email protected]>

I found another crash when deleting lots of virtual stations in a congested environment. I think the problem is that the ieee80211_mlme_notify_scan_completed could call ieee80211_restart_sta_timer for a non-associated interface that was about to be deleted.

With the following patch I am unable to reproduce the crash.

Nevermind..this seems to break association...will work on this some more.

Ben

Quoted 22 lines

---
:100644 100644 81e0619... a1cc8c4... M net/mac80211/mlme.c

  net/mac80211/mlme.c |    3 +++
  1 files changed, 3 insertions(+), 0 deletions(-)
net/mac80211/mlme.c +3 -0
index 81e0619..a1cc8c4 100644
@@ -2931,6 +2931,9 @@ static void ieee80211_restart_sta_timer(struct ieee80211_sub_if_data *sdata)
  	u32 flags;
 
  	if (sdata->vif.type == NL80211_IFTYPE_STATION) {
+		if (unlikely(!sdata->u.mgd.associated))
+			return;
+
  		__ieee80211_stop_poll(sdata);
 
  		/* let's probe the connection once */
Signature · 2 lines
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com