Skip to content

Commit 3b08cf6

Browse files
pof2linvjw
authored andcommitted
mac80211: Clear wowlan flag when drv_suspend returns failure
drv_resume can get called without a prior call to drv_suspend. Consider the following steps: 1. Suspend is started but driver's drv_suspend returns error. 2. Suspend is aborted. local->wowlan flag is left set. 3. Interface is removed. 4. Suspend again. This time open_count is 0 so drv_suspend is not called and local->wowlan not cleared. 5. On resume ieee80211_reconfig will call drv_resume since local->wowlan is set. Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
1 parent 8c06e8c commit 3b08cf6

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎net/mac80211/pm.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
7777
int err = drv_suspend(local, wowlan);
7878
if (err < 0) {
7979
local->quiescing = false;
80+
local->wowlan = false;
8081
return err;
8182
} else if (err > 0) {
8283
WARN_ON(err != 1);

0 commit comments

Comments
 (0)