Skip to content

Commit

Permalink
mac80211: fix tim recalculation after PS response
Browse files Browse the repository at this point in the history
Handle the case where the mac80211 intermediate queues are empty and the
driver has buffered frames

Fixes: ba8c3d6 ("mac80211: add an intermediate software queue implementation")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Felix Fietkau authored and Johannes Berg committed Sep 12, 2016
1 parent 1554369 commit 83843c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/mac80211/sta_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -1616,7 +1616,6 @@ ieee80211_sta_ps_deliver_response(struct sta_info *sta,

sta_info_recalc_tim(sta);
} else {
unsigned long tids = sta->txq_buffered_tids & driver_release_tids;
int tid;

/*
Expand Down Expand Up @@ -1648,7 +1647,8 @@ ieee80211_sta_ps_deliver_response(struct sta_info *sta,
for (tid = 0; tid < ARRAY_SIZE(sta->sta.txq); tid++) {
struct txq_info *txqi = to_txq_info(sta->sta.txq[tid]);

if (!(tids & BIT(tid)) || txqi->tin.backlog_packets)
if (!(driver_release_tids & BIT(tid)) ||
txqi->tin.backlog_packets)
continue;

sta_info_recalc_tim(sta);
Expand Down

0 comments on commit 83843c8

Please sign in to comment.