Skip to contentSkip to conversation

mac80211: wake queues if ieee80211_suspend failed

PATCH/RFC Vitaly Wool 3 participants 4 messages Apr 23, 2012 – May 3, 2012 mac80211

lore
Share & tools
lore
#0 lore raw

Hi,

Sometimes I'm seeing that after a rejected suspend which was rejected by the driver's suspend routine, the device can not associate to any AP any more. Investigation shows that it's due to the fact that the queues are left stopped with the reason IEEE80211_QUEUE_STOP_REASON_SUSPEND.

With that known, it looks like we need to wake queues on an unsuccessful suspend attempt explicitly.

---
 net/mac80211/pm.c           |    2 ++
 1 file changed, 2 insertions(+), 0 deletions(-)
net/mac80211/pm.c +2 -0
index 844cefb..fd57913 100644
@@ -96,6 +96,8 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
 		int err = drv_suspend(local, wowlan);
 		if (err) {
 			local->quiescing = false;
+			ieee80211_wake_queues_by_reason(hw,
+					IEEE80211_QUEUE_STOP_REASON_SUSPEND);
 			return err;
 		}
 		list_for_each_entry(sdata,&local->interfaces, list) {
Signature · 4 lines
1.7.5.4

-- 
Vitaly Wool<[email protected]>
#1 lore raw

hi Vitaly,

Quoted 26 lines · Vitaly Wool

Sometimes I'm seeing that after a rejected suspend which was rejected by the driver's suspend routine, the device can not associate to any AP any more. Investigation shows that it's due to the fact that the queues are left stopped with the reason IEEE80211_QUEUE_STOP_REASON_SUSPEND.

With that known, it looks like we need to wake queues on an unsuccessful suspend attempt explicitly.

---
 net/mac80211/pm.c           |    2 ++

 1 file changed, 2 insertions(+), 0 deletions(-)
net/mac80211/pm.c +2 -0
index 844cefb..fd57913 100644
@@ -96,6 +96,8 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct
 cfg80211_wowlan *wowlan)
                int err = drv_suspend(local, wowlan);
                if (err) {
                        local->quiescing = false;
+                       ieee80211_wake_queues_by_reason(hw,
+
 IEEE80211_QUEUE_STOP_REASON_SUSPEND);
                        return err;
Quoted 1 line

               }

it seems right.
looks like there's a similar issue with WLAN_STA_BLOCK_BA being set for all the stations and not cleared on error.

Eliad.

#2 lore raw

Hi Eliad,

Quoted 26 lines · Eliad Peller

hi Vitaly,

Quoted 23 lines · Vitaly Wool

Sometimes I'm seeing that after a rejected suspend which was rejected by the driver's suspend routine, the device can not associate to any AP any more. Investigation shows that it's due to the fact that the queues are left stopped with the reason IEEE80211_QUEUE_STOP_REASON_SUSPEND.

With that known, it looks like we need to wake queues on an unsuccessful suspend attempt explicitly.

---
 net/mac80211/pm.c           |    2 ++

 1 file changed, 2 insertions(+), 0 deletions(-)
net/mac80211/pm.c +1 -0
index 844cefb..fd57913 100644
@@ -96,6 +96,8 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct
 cfg80211_wowlan *wowlan)
                int err = drv_suspend(local, wowlan);
                if (err) {
                        local->quiescing = false;
+                       ieee80211_wake_queues_by_reason(hw,
Quoted 8 lines
Quoted 4 lines
net/mac80211/pm.c +1 -0
+
 IEEE80211_QUEUE_STOP_REASON_SUSPEND);
                        return err;

               }

it seems right.
looks like there's a similar issue with WLAN_STA_BLOCK_BA being set for all the stations and not cleared on error..

thanks for the feedback. Johannes, any objections/additions? Should I resubmit the patch?

Thanks,
Vitaly

maintainer
#3 lore raw
Quoted 38 lines · Vitaly Wool

Hi Eliad,

Quoted 26 lines · Eliad Peller

hi Vitaly,

Quoted 23 lines · Vitaly Wool

Sometimes I'm seeing that after a rejected suspend which was rejected by the driver's suspend routine, the device can not associate to any AP any more. Investigation shows that it's due to the fact that the queues are left stopped with the reason IEEE80211_QUEUE_STOP_REASON_SUSPEND.

With that known, it looks like we need to wake queues on an unsuccessful suspend attempt explicitly.

---
 net/mac80211/pm.c           |    2 ++
 1 file changed, 2 insertions(+), 0 deletions(-)
net/mac80211/pm.c +1 -0
index 844cefb..fd57913 100644
@@ -96,6 +96,8 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct
 cfg80211_wowlan *wowlan)
               int err = drv_suspend(local, wowlan);
               if (err) {
                       local->quiescing = false;
+                       ieee80211_wake_queues_by_reason(hw,
Quoted 8 lines
Quoted 4 lines
net/mac80211/pm.c +1 -0
+
 IEEE80211_QUEUE_STOP_REASON_SUSPEND);
                       return err;
               }

it seems right.
looks like there's a similar issue with WLAN_STA_BLOCK_BA being set for all the stations and not cleared on error..

Quoted 2 lines

thanks for the feedback. Johannes, any objections/additions? Should I resubmit the patch?

No, no objections -- as for resubmitting I don't know, I've been on vacation (and really still am until Monday)

johannes