diff options
author | Ronald Wahl <ronald.wahl@raritan.com> | 2012-03-19 09:37:20 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-04-09 16:12:30 -0400 |
commit | 70b12f2612a6b352d16342b5952cf9f9de6c1d56 (patch) | |
tree | 29d462f6632cc394e08fd463fca21e61d5791646 /net/mac80211/mlme.c | |
parent | 12d3952fc4a1cd96234bc7023bf7eefeb0bb6355 (diff) |
mac80211: when receiving DTIM disable power-save mode only if it was enabled
When receiving DTIM we currently disable power save mode in the
hardware unconditionally, i.e. also when the hardware was not sleeping.
This causes trouble with at least one wireless chipset (Ralink RT3572).
When the hardware is not sleeping and we send a wakeup command (e.g.
this happens after a scan) then a significant decrease of the link
quality or a disconnect may occur.
Disabling power save mode only when it was enabled prevents this issue.
Signed-off-by: Ronald Wahl <ronald.wahl@raritan.com>
Reviewed-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index c59bc509ed6f..bb7e5189e27e 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -2471,9 +2471,11 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata, | |||
2471 | if (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK) { | 2471 | if (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK) { |
2472 | if (directed_tim) { | 2472 | if (directed_tim) { |
2473 | if (local->hw.conf.dynamic_ps_timeout > 0) { | 2473 | if (local->hw.conf.dynamic_ps_timeout > 0) { |
2474 | local->hw.conf.flags &= ~IEEE80211_CONF_PS; | 2474 | if (local->hw.conf.flags & IEEE80211_CONF_PS) { |
2475 | ieee80211_hw_config(local, | 2475 | local->hw.conf.flags &= ~IEEE80211_CONF_PS; |
2476 | IEEE80211_CONF_CHANGE_PS); | 2476 | ieee80211_hw_config(local, |
2477 | IEEE80211_CONF_CHANGE_PS); | ||
2478 | } | ||
2477 | ieee80211_send_nullfunc(local, sdata, 0); | 2479 | ieee80211_send_nullfunc(local, sdata, 0); |
2478 | } else if (!local->pspolling && sdata->u.mgd.powersave) { | 2480 | } else if (!local->pspolling && sdata->u.mgd.powersave) { |
2479 | local->pspolling = true; | 2481 | local->pspolling = true; |