diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-04-22 17:02:51 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-05-06 15:14:29 -0400 |
commit | d5edaedc16ebd0635435dec068d49e07a76ba7d9 (patch) | |
tree | 0d6215a5128a72e82f76a51b112d99a0a2bd7bd5 /net/mac80211/mlme.c | |
parent | 0e41f715c04f85a40ae6531d660be2241717be1c (diff) |
mac80211: fix PS vs. scan race
When somebody changes the PS parameters while scanning
is in progress, we enable PS -- during the scan. This
is clearly not desirable, and we can just abort enabling
PS when scanning since when the scan finishes it will
be taken care of.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 3610c11286bc..2029b71eb879 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -487,6 +487,13 @@ static void ieee80211_enable_ps(struct ieee80211_local *local, | |||
487 | { | 487 | { |
488 | struct ieee80211_conf *conf = &local->hw.conf; | 488 | struct ieee80211_conf *conf = &local->hw.conf; |
489 | 489 | ||
490 | /* | ||
491 | * If we are scanning right now then the parameters will | ||
492 | * take effect when scan finishes. | ||
493 | */ | ||
494 | if (local->hw_scanning || local->sw_scanning) | ||
495 | return; | ||
496 | |||
490 | if (conf->dynamic_ps_timeout > 0 && | 497 | if (conf->dynamic_ps_timeout > 0 && |
491 | !(local->hw.flags & IEEE80211_HW_SUPPORTS_DYNAMIC_PS)) { | 498 | !(local->hw.flags & IEEE80211_HW_SUPPORTS_DYNAMIC_PS)) { |
492 | mod_timer(&local->dynamic_ps_timer, jiffies + | 499 | mod_timer(&local->dynamic_ps_timer, jiffies + |