Skip to content

Commit 0aa419e

Browse files
egrumbachjmberg-intel
authored andcommitted
mac80211: allow the driver not to pass the tid to ieee80211_sta_uapsd_trigger
iwlwifi will check internally that the tid maps to an AC that is trigger enabled, but can't know what tid exactly. Allow the driver to pass a generic tid and make mac80211 assume that a trigger frame was received. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Luca Coelho <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
1 parent b473b8f commit 0aa419e

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

include/net/mac80211.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4087,6 +4087,10 @@ void ieee80211_sta_pspoll(struct ieee80211_sta *sta);
40874087
* This must be used in conjunction with ieee80211_sta_ps_transition()
40884088
* and possibly ieee80211_sta_pspoll(); calls to all three must be
40894089
* serialized.
4090+
* %IEEE80211_NUM_TIDS can be passed as the tid if the tid is unknown.
4091+
* In this case, mac80211 will not check that this tid maps to an AC
4092+
* that is trigger enabled and assume that the caller did the proper
4093+
* checks.
40904094
*/
40914095
void ieee80211_sta_uapsd_trigger(struct ieee80211_sta *sta, u8 tid);
40924096

net/mac80211/rx.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1394,13 +1394,14 @@ void ieee80211_sta_uapsd_trigger(struct ieee80211_sta *pubsta, u8 tid)
13941394
u8 ac = ieee802_1d_to_ac[tid & 7];
13951395

13961396
/*
1397-
* If this AC is not trigger-enabled do nothing.
1397+
* If this AC is not trigger-enabled do nothing unless the
1398+
* driver is calling us after it already checked.
13981399
*
13991400
* NB: This could/should check a separate bitmap of trigger-
14001401
* enabled queues, but for now we only implement uAPSD w/o
14011402
* TSPEC changes to the ACs, so they're always the same.
14021403
*/
1403-
if (!(sta->sta.uapsd_queues & BIT(ac)))
1404+
if (!(sta->sta.uapsd_queues & BIT(ac)) && tid != IEEE80211_NUM_TIDS)
14041405
return;
14051406

14061407
/* if we are in a service period, do nothing */

0 commit comments

Comments
 (0)