aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKalle Valo <kalle.valo@nokia.com>2009-10-27 11:36:17 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-10-30 16:49:18 -0400
commita9685338ab9d331c25ca92b0e8a92631e14c6b45 (patch)
tree3c6def8eb28a1ee93a74fcb0c6d48a9fd5d5541d
parented620590de15021f6baf08ca098c90f47470efd7 (diff)
mac80211: fix dynamic power save for devices with nullfunc support in hw
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>
-rw-r--r--net/mac80211/tx.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 498cdd435d73..cb06d8e56496 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1390,7 +1390,11 @@ static int ieee80211_skb_resize(struct ieee80211_local *local,
1390static bool need_dynamic_ps(struct ieee80211_local *local) 1390static bool need_dynamic_ps(struct ieee80211_local *local)
1391{ 1391{
1392 /* driver doesn't support power save */ 1392 /* driver doesn't support power save */
1393 if (!(local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK)) 1393 if (!(local->hw.flags & IEEE80211_HW_SUPPORTS_PS))
1394 return false;
1395
1396 /* hardware does dynamic power save */
1397 if (local->hw.flags & IEEE80211_HW_SUPPORTS_DYNAMIC_PS)
1394 return false; 1398 return false;
1395 1399
1396 /* dynamic power save disabled */ 1400 /* dynamic power save disabled */