Re: [PATCH 1/2] mac80211: allow to support AP_LINK_PS when the set_tim is still needed

2016-09-16 Thread Johannes Berg
Both applied.

johannes


[PATCH 1/2] mac80211: allow to support AP_LINK_PS when the set_tim is still needed

2016-09-15 Thread Luca Coelho
From: Emmanuel Grumbach 

In 46fa38e84b656f80edf83d21144221b0cad18d61, Johannes
allowed to use mac80211's code for handling stations
that go to PS or send PS-Poll / uAPSD trigger frames
for devices that enable RSS.
This means that mac80211 doesn't look at frames anymore
but rather relies on a notification that will come from
the device when a PS transition occurs or when a
PS-Poll / trigger frame is detected by the firmware.

iwlwifi will need this capability but still needs mac80211
to take care of the TIM IE. Today, if a driver sets
AP_LINK_PS, mac80211 will not update the TIM IE.
Change mac80211 to look at the set_tim driver callback
rather than AP_LINK_PS to decide if the driver handles
the TIM IE internally or not.

Signed-off-by: Emmanuel Grumbach 
Signed-off-by: Luca Coelho 
---
 net/mac80211/sta_info.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index 5e70fa5..1b1b28f 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -690,7 +690,7 @@ static void __sta_info_recalc_tim(struct sta_info *sta, 
bool ignore_pending)
}
 
/* No need to do anything if the driver does all */
-   if (ieee80211_hw_check(>hw, AP_LINK_PS))
+   if (!local->ops->set_tim)
return;
 
if (sta->dead)
-- 
2.9.3