diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2009-12-24 15:26:09 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-12-28 16:20:04 -0500 |
commit | b98c06b6debfe84c90200143bb1102f312f50a33 (patch) | |
tree | 65b8aba72d4350e3a77372e77796353a5ec3f580 /net/mac80211/tx.c | |
parent | 5b479a076de091590423a9e6dfc2584126b28761 (diff) |
mac80211: fix race with suspend and dynamic_ps_disable_work
When mac80211 suspends it calls a driver's suspend callback
as a last step and after that the driver assumes no calls will
be made to it until we resume and its start callback is kicked.
If such calls are made, however, suspend can end up throwing
hardware in an unexpected state and making the device unusable
upon resume.
Fix this by preventing mac80211 to schedule dynamic_ps_disable_work
by checking for when mac80211 starts to suspend and starts
quiescing. Frames should be allowed to go through though as
that is part of the quiescing steps and we do not flush the
mac80211 workqueue since it was already done towards the
beginning of suspend cycle.
The other mac80211 issue will be hanled in the next patch.
For further details see refer to the thread:
http://marc.info/?t=126144866100001&r=1&w=2
Cc: stable@kernel.org
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r-- | net/mac80211/tx.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 8834cc93c716..27ceaefd7bc8 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -1419,6 +1419,10 @@ static bool need_dynamic_ps(struct ieee80211_local *local) | |||
1419 | if (!local->ps_sdata) | 1419 | if (!local->ps_sdata) |
1420 | return false; | 1420 | return false; |
1421 | 1421 | ||
1422 | /* No point if we're going to suspend */ | ||
1423 | if (local->quiescing) | ||
1424 | return false; | ||
1425 | |||
1422 | return true; | 1426 | return true; |
1423 | } | 1427 | } |
1424 | 1428 | ||