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.fors...@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 +
                                  
msecs_to_jiffies(sdata->vif.dynamic_ps_timeout));
        }
-- 
1.8.3.2


_______________________________________________
b43-dev mailing list
b43-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/b43-dev

Reply via email to