Skip to contentSkip to conversation

mac80211: tear down all agg queues when restart/reconfig hw

PATCH Superseded [email protected] 2 participants 3 messages Feb 3, 2010 mac80211

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 mac80211: tear down all agg queues when restart/reconfig hw

From: Wey-Yi Guy <[email protected]>

When there is a need to restart/reconfig hw, tear down all the aggregation queues and let the mac80211 and driver get in-sync and have the opportunity to re-establish the aggregation queues.

---
v2: add rcu_read_lock()

---
 net/mac80211/util.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
net/mac80211/util.c +10 -0
index ca170b4..27e8833 100644
@@ -1188,6 +1188,16 @@ int ieee80211_reconfig(struct ieee80211_local *local)
 	ieee80211_wake_queues_by_reason(hw,
 			IEEE80211_QUEUE_STOP_REASON_SUSPEND);
 
+	rcu_read_lock();
+
+	if (hw->flags & IEEE80211_HW_AMPDU_AGGREGATION) {
+		list_for_each_entry_rcu(sta, &local->sta_list, list) {
+			ieee80211_sta_tear_down_BA_sessions(sta);
+		}
+	}
+
+	rcu_read_unlock();
+
 	/*
 	 * If this is for hw restart things are still running.
 	 * We may want to change that later, however.
Signature · 1 line
1.5.6.3
maintainer
#1 lore raw
Quoted 21 lines · On Tue, 2010-02-02 at 17:17 -0800, [email protected] wrote:

From: Wey-Yi Guy <[email protected]>

When there is a need to restart/reconfig hw, tear down all the aggregation queues and let the mac80211 and driver get in-sync and have the opportunity to re-establish the aggregation queues.

---
v2: add rcu_read_lock()

---
 net/mac80211/util.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
net/mac80211/util.c +0 -0
index ca170b4..27e8833 100644
@@ -1188,6 +1188,16 @@ int ieee80211_reconfig(struct ieee80211_local *local)
 	ieee80211_wake_queues_by_reason(hw,
 			IEEE80211_QUEUE_STOP_REASON_SUSPEND);
 

net/mac80211/util.c int ieee80211_reconfig(struct ieee80211_local *local) · line 1200

Quoted 10 lines
net/mac80211/util.c +10 -0
+	rcu_read_lock();
+
+	if (hw->flags & IEEE80211_HW_AMPDU_AGGREGATION) {
+		list_for_each_entry_rcu(sta, &local->sta_list, list) {
+			ieee80211_sta_tear_down_BA_sessions(sta);
+		}
+	}
+
+	rcu_read_unlock();
+

I wonder if that shouldn't be _before_ waking up the queues again, since otherwise we'd enqueue all the frames that might have come in while reconfiguring as aggregation frames still?

johannes

#2 lore raw
Quoted 22 lines · Johannes Berg
Quoted 21 lines · On Tue, 2010-02-02 at 17:17 -0800, [email protected] wrote:

From: Wey-Yi Guy <[email protected]>

When there is a need to restart/reconfig hw, tear down all the aggregation queues and let the mac80211 and driver get in-sync and have the opportunity to re-establish the aggregation queues.

---
v2: add rcu_read_lock()

---
 net/mac80211/util.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
net/mac80211/util.c +0 -0
index ca170b4..27e8833 100644
@@ -1188,6 +1188,16 @@ int ieee80211_reconfig(struct ieee80211_local *local)
 	ieee80211_wake_queues_by_reason(hw,
 			IEEE80211_QUEUE_STOP_REASON_SUSPEND);
 
Quoted 15 lines

net/mac80211/util.c int ieee80211_reconfig(struct ieee80211_local *local) · line 1200

Quoted 10 lines
net/mac80211/util.c +10 -0
+	rcu_read_lock();
+
+	if (hw->flags & IEEE80211_HW_AMPDU_AGGREGATION) {
+		list_for_each_entry_rcu(sta, &local->sta_list, list) {
+			ieee80211_sta_tear_down_BA_sessions(sta);
+		}
+	}
+
+	rcu_read_unlock();
+

I wonder if that shouldn't be _before_ waking up the queues again, since otherwise we'd enqueue all the frames that might have come in while reconfiguring as aggregation frames still?

not sure, the current place works for my test