mac80211: tear down all agg queues when restart/reconfig hw
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
@@ -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
Johannes Berg
maintainerQuoted 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.
Signed-off-by Wey-Yi Guy <[email protected]>---
v2: addrcu_read_lock()--- net/mac80211/util.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)net/mac80211/util.c +0
-0@@ -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
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.
Signed-off-by Wey-Yi Guy <[email protected]>---
v2: addrcu_read_lock()--- net/mac80211/util.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)net/mac80211/util.c +0
-0@@ -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