[RFC PATCH 5/8] mac80211: Don't start dynamic PS timer when leaving off-channel if still scanning

Seth Forshee seth.forshee at canonical.com
Mon Dec 16 17:00:57 EST 2013

Most of mac80211 does not update the dynamic PS timer during
scans, but ieee80211_offchannel_ps_disable() will still restart
it if a scan is in progress. It doesn't make sense to do this if
no other code is updating the timer, so update this function to
only restart the timer if not scanning.

Signed-off-by: Seth Forshee <seth.forshee at canonical.com>
 net/mac80211/offchannel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c
index 5802c00..1744886 100644
--- a/net/mac80211/offchannel.c
+++ b/net/mac80211/offchannel.c
@@ -72,7 +72,7 @@ static void ieee80211_offchannel_ps_disable(struct ieee80211_sub_if_data *sdata)
 	ieee80211_vif_set_ps_mode(sdata, mode);
 	if (mode == IEEE80211_VIF_PS_AWAKE) {
 		ieee80211_send_nullfunc(local, sdata, 0);
-		if (sdata->vif.dynamic_ps_active)
+		if (sdata->vif.dynamic_ps_active && !local->scanning)
 			mod_timer(&ifmgd->dynamic_ps_timer, jiffies +

More information about the b43-dev mailing list