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