Skip to content

Commit

Permalink
mac80211: fix dynamic power save for devices with nullfunc support in hw
Browse files Browse the repository at this point in the history
In TX path it was assumed that dynamic power save works only if
IEEE80211_HW_PS_NULLFUNC_STACK is set. But is not the case, there are
devices which have nullfunc support in hardware but need mac80211
to handle dynamic power save timers, TI's wl1251 is one of them.

The fix is to not check for IEEE80211_HW_PS_NULLFUNC_STACK in
is_dynamic_ps_enabled(), instead check IEEE80211_HW_SUPPORTS_PS and
IEEE80211_HW_SUPPORTS_DYNAMIC_PS flags and act accordingly.

Tested with wl1251.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Kalle Valo authored and John W. Linville committed Oct 30, 2009
1 parent ed62059 commit a968533
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion net/mac80211/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1390,7 +1390,11 @@ static int ieee80211_skb_resize(struct ieee80211_local *local,
static bool need_dynamic_ps(struct ieee80211_local *local)
{
/* driver doesn't support power save */
if (!(local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK))
if (!(local->hw.flags & IEEE80211_HW_SUPPORTS_PS))
return false;

/* hardware does dynamic power save */
if (local->hw.flags & IEEE80211_HW_SUPPORTS_DYNAMIC_PS)
return false;

/* dynamic power save disabled */
Expand Down

0 comments on commit a968533

Please sign in to comment.