* [PATCH] mac80211: when receiving DTIM disable power-save mode only if it was enabled
@ 2012-03-19 13:37 Ronald Wahl
2012-03-19 20:20 ` Gertjan van Wingerde
0 siblings, 1 reply; 2+ messages in thread
From: Ronald Wahl @ 2012-03-19 13:37 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, RT2x00 Users
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>
---
Index: linux/net/mac80211/mlme.c
===================================================================
--- linux/net/mac80211/mlme.c (revision 213137)
+++ linux/net/mac80211/mlme.c (working copy)
@@ -1922,9 +1922,11 @@
if (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK) {
if (directed_tim) {
if (local->hw.conf.dynamic_ps_timeout > 0) {
- local->hw.conf.flags &= ~IEEE80211_CONF_PS;
- ieee80211_hw_config(local,
- IEEE80211_CONF_CHANGE_PS);
+ if (local->hw.conf.flags & IEEE80211_CONF_PS) {
+ local->hw.conf.flags &= ~IEEE80211_CONF_PS;
+ ieee80211_hw_config(local,
+ IEEE80211_CONF_CHANGE_PS);
+ }
ieee80211_send_nullfunc(local, sdata, 0);
} else {
local->pspolling = true;
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] mac80211: when receiving DTIM disable power-save mode only if it was enabled
2012-03-19 13:37 [PATCH] mac80211: when receiving DTIM disable power-save mode only if it was enabled Ronald Wahl
@ 2012-03-19 20:20 ` Gertjan van Wingerde
0 siblings, 0 replies; 2+ messages in thread
From: Gertjan van Wingerde @ 2012-03-19 20:20 UTC (permalink / raw)
To: Ronald Wahl
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org,
RT2x00 Users
On 19 mrt. 2012, at 14:37, Ronald Wahl <ronald.wahl@raritan.com> wrote:
> 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>
Obviously rt2x00 is the only one that seems to need this, but simply replicating maintaining the PS state inside rt2x00 while mac80211 already does this doesn't seem right to me.
> ---
> Index: linux/net/mac80211/mlme.c
> ===================================================================
> --- linux/net/mac80211/mlme.c (revision 213137)
> +++ linux/net/mac80211/mlme.c (working copy)
> @@ -1922,9 +1922,11 @@
> if (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK) {
> if (directed_tim) {
> if (local->hw.conf.dynamic_ps_timeout > 0) {
> - local->hw.conf.flags &= ~IEEE80211_CONF_PS;
> - ieee80211_hw_config(local,
> - IEEE80211_CONF_CHANGE_PS);
> + if (local->hw.conf.flags & IEEE80211_CONF_PS) {
> + local->hw.conf.flags &= ~IEEE80211_CONF_PS;
> + ieee80211_hw_config(local,
> + IEEE80211_CONF_CHANGE_PS);
> + }
> ieee80211_send_nullfunc(local, sdata, 0);
> } else {
> local->pspolling = true;
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-03-19 20:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-19 13:37 [PATCH] mac80211: when receiving DTIM disable power-save mode only if it was enabled Ronald Wahl
2012-03-19 20:20 ` Gertjan van Wingerde
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).