2
0

359-mac80211-un-schedule-TXQs-on-powersave-start.patch 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. From: Felix Fietkau <[email protected]>
  2. Date: Tue, 19 Mar 2019 11:36:12 +0100
  3. Subject: [PATCH] mac80211: un-schedule TXQs on powersave start
  4. Once a station enters powersave, its queues should not be returned by
  5. ieee80211_next_txq() anymore. They will be re-scheduled again after the
  6. station has woken up again
  7. Fixes: 1866760096bf4 ("mac80211: Add TXQ scheduling API")
  8. Signed-off-by: Felix Fietkau <[email protected]>
  9. ---
  10. --- a/net/mac80211/rx.c
  11. +++ b/net/mac80211/rx.c
  12. @@ -1508,7 +1508,15 @@ static void sta_ps_start(struct sta_info
  13. return;
  14. for (tid = 0; tid < ARRAY_SIZE(sta->sta.txq); tid++) {
  15. - if (txq_has_queue(sta->sta.txq[tid]))
  16. + struct ieee80211_txq *txq = sta->sta.txq[tid];
  17. + struct txq_info *txqi = to_txq_info(txq);
  18. +
  19. + spin_lock(&local->active_txq_lock[txq->ac]);
  20. + if (!list_empty(&txqi->schedule_order))
  21. + list_del_init(&txqi->schedule_order);
  22. + spin_unlock(&local->active_txq_lock[txq->ac]);
  23. +
  24. + if (txq_has_queue(txq))
  25. set_bit(tid, &sta->txq_buffered_tids);
  26. else
  27. clear_bit(tid, &sta->txq_buffered_tids);