mac80211: brcmfmac: backport wowlan netdetect fixes
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / 321-Revert-mac80211-allow-using-AP_LINK_PS-with-mac80211.patch
1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Thu, 3 Nov 2016 12:10:34 +0100
3 Subject: [PATCH] Revert "mac80211: allow using AP_LINK_PS with
4 mac80211-generated TIM IE"
5
6 This reverts commit c68df2e7be0c1238ea3c281fd744a204ef3b15a0.
7
8 __sta_info_recalc_tim turns into a no-op if local->ops->set_tim is not
9 set. This prevents the beacon TIM bit from being set for all drivers
10 that do not implement this op (almost all of them), thus thoroughly
11 essential AP mode powersave functionality.
12
13 Cc: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
14 Fixes: c68df2e7be0c ("mac80211: allow using AP_LINK_PS with mac80211-generated TIM IE")
15 Signed-off-by: Felix Fietkau <nbd@nbd.name>
16 ---
17
18 --- a/net/mac80211/sta_info.c
19 +++ b/net/mac80211/sta_info.c
20 @@ -688,7 +688,7 @@ static void __sta_info_recalc_tim(struct
21 }
22
23 /* No need to do anything if the driver does all */
24 - if (!local->ops->set_tim)
25 + if (ieee80211_hw_check(&local->hw, AP_LINK_PS))
26 return;
27
28 if (sta->dead)