mac80211: fix PS vs. scan race
Johannes Berg
maintainerPATCH 1/1 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.
--- net/mac80211/mlme.c | 7 +++++++ 1 file changed, 7 insertions(+)
net/mac80211/mlme.c +7 -0
@@ -487,6 +487,13 @@ static void ieee80211_enable_ps(struct i {struct ieee80211_conf *conf = &local->hw.conf; +/* +* If we are scanning right now then the parameters will +* take effect when scan finishes. +*/ +if (local->hw_scanning || local->sw_scanning) +return ; +if (conf->dynamic_ps_timeout >0 && !(local->hw.flags &IEEE80211_HW_SUPPORTS_DYNAMIC_PS )) { mod_timer(&local->dynamic_ps_timer, jiffies +
Quoted 7 lines · Johannes Berg
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 <[email protected]>
Signature · 1 line
Kalle Valo
Johannes Berg
maintainerQuoted 5 lines · Johannes Berg
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.
John, did this fall through the cracks? I see you included a patch from today but not this :)
johannes
Quoted 28 lines
Signed-off-by Johannes Berg <[email protected]>--- net/mac80211/mlme.c | 7 +++++++ 1 file changed, 7 insertions(+)net/mac80211/mlme.c +7
-1@@ -487,6 +487,13 @@ static void ieee80211_enable_ps(struct i {struct ieee80211_conf *conf = &local->hw.conf; +/* +* If we are scanning right now then the parameters will +* take effect when scan finishes. +*/ +if (local->hw_scanning || local->sw_scanning) +return ; +if (conf->dynamic_ps_timeout >0 && !(local->hw.flags &IEEE80211_HW_SUPPORTS_DYNAMIC_PS )) { mod_timer(&local->dynamic_ps_timer, jiffies + --To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
John W. Linville
Reviewed-by Kalle ValoQuoted 9 lines · Johannes Berg
Quoted 5 lines · Johannes Berg
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.
John, did this fall through the cracks? I see you included a patch from today but not this :)
Looks like this one (on wireless-testing#master)?
commit da6cbb045d04706157d3117153b275ed9126bd1d
Author: Johannes Berg <[email protected]> Date: Wed Apr 22 23:02:51 2009 +0200
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.
Signature · 2 lines
John W. Linville Someday the world will need a hero, and you [email protected] might be all we have. Be ready.
Johannes Berg
maintainerQuoted 7 lines · John W. Linville
Looks like this one (on wireless-testing#master)?
commit
da6cbb045d04706157d3117153b275ed9126bd1dAuthor: Johannes Berg <[email protected]> Date: Wed Apr 22 23:02:51 2009 +0200mac80211: fix PS vs. scan race
Sorry, looks like I never learn... The patch still applied (probably with some fuzz) so I figured it wasn't in.
johannes