linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: don't tear down aggregation on suspend in case of wowlan->any
@ 2015-09-21 12:50 Luca Coelho
  2015-09-23  9:17 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Luca Coelho @ 2015-09-21 12:50 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, Eliad Peller, Luca Coelho

From: Eliad Peller <eliadx.peller@intel.com>

in case of "any" wowlan trigger, there is no reason to tear down
aggregations, as we want the device to continue working normally.

Similarly, there's no reason to tear down aggregations on resume,
as they should have been torn down on suspend if needed.

However, since the reconfiguration flow is shared with HW restart,
tear down aggregations on reconfiguration only when we are not resuming.

To keep things working after non-wowlan suspend, keep clearing the
WLAN_STA_BLOCK_BA flag.

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 net/mac80211/pm.c   | 3 ++-
 net/mac80211/util.c | 5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c
index b676b9f..ad88ad4 100644
--- a/net/mac80211/pm.c
+++ b/net/mac80211/pm.c
@@ -23,7 +23,8 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
 
 	ieee80211_del_virtual_monitor(local);
 
-	if (ieee80211_hw_check(hw, AMPDU_AGGREGATION)) {
+	if (ieee80211_hw_check(hw, AMPDU_AGGREGATION) &&
+	    !(wowlan && wowlan->any)) {
 		mutex_lock(&local->sta_mtx);
 		list_for_each_entry(sta, &local->sta_list, list) {
 			set_sta_flag(sta, WLAN_STA_BLOCK_BA);
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 005fc8e..70b5451 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -2017,8 +2017,9 @@ int ieee80211_reconfig(struct ieee80211_local *local)
 		mutex_lock(&local->sta_mtx);
 
 		list_for_each_entry(sta, &local->sta_list, list) {
-			ieee80211_sta_tear_down_BA_sessions(
-					sta, AGG_STOP_LOCAL_REQUEST);
+			if (!local->resuming)
+				ieee80211_sta_tear_down_BA_sessions(
+						sta, AGG_STOP_LOCAL_REQUEST);
 			clear_sta_flag(sta, WLAN_STA_BLOCK_BA);
 		}
 
-- 
2.5.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mac80211: don't tear down aggregation on suspend in case of wowlan->any
  2015-09-21 12:50 [PATCH] mac80211: don't tear down aggregation on suspend in case of wowlan->any Luca Coelho
@ 2015-09-23  9:17 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2015-09-23  9:17 UTC (permalink / raw)
  To: Luca Coelho; +Cc: linux-wireless, Eliad Peller, Luca Coelho

On Mon, 2015-09-21 at 15:50 +0300, Luca Coelho wrote:
> From: Eliad Peller <eliadx.peller@intel.com>
> 
> in case of "any" wowlan trigger, there is no reason to tear down
> aggregations, as we want the device to continue working normally.
> 
> Similarly, there's no reason to tear down aggregations on resume,
> as they should have been torn down on suspend if needed.
> 
> However, since the reconfiguration flow is shared with HW restart,
> tear down aggregations on reconfiguration only when we are not 
> resuming.
> 
> To keep things working after non-wowlan suspend, keep clearing the
> WLAN_STA_BLOCK_BA flag.
> 
Applied.

johannes

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-09-23  9:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-21 12:50 [PATCH] mac80211: don't tear down aggregation on suspend in case of wowlan->any Luca Coelho
2015-09-23  9:17 ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).