Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH mt76-next 01/19] wifi: mt76: don't pin undrainable PS stations in the tx scheduler
@ 2026-11-17 18:01 Felix Fietkau
  2026-11-17 18:01 ` [PATCH mt76-next 02/19] wifi: mt76: mt7996: return a negative error for a firmware status Felix Fietkau
                   ` (18 more replies)
  0 siblings, 19 replies; 33+ messages in thread
From: Felix Fietkau @ 2026-11-17 18:01 UTC (permalink / raw)
  To: linux-wireless

A power save station whose buffered frames cannot be delivered consumes
no airtime, so its airtime deficit never goes negative, and
ieee80211_return_txq() keeps it at the head of the active_txqs list.
With all bands on one ieee80211_hw, each scheduling round then ends at
that station, and all other stations starve.

Return the txq only when it sent frames or its queue is stopped.
__mt76_tx_complete_skb() schedules it again when a buffered frame
completes.

Fixes: a547b414bf7e ("wifi: mt76: add PS buffering support for HW-managed TIM drivers")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
 drivers/net/wireless/mediatek/mt76/tx.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/tx.c b/drivers/net/wireless/mediatek/mt76/tx.c
index ea9993e9a199..0085b7a29fce 100644
--- a/drivers/net/wireless/mediatek/mt76/tx.c
+++ b/drivers/net/wireless/mediatek/mt76/tx.c
@@ -625,10 +625,13 @@ mt76_txq_schedule_list(struct mt76_phy *phy, enum mt76_txq_id qid)
 			if (!mt76_txq_stopped(q))
 				n_frames = mt76_txq_send_burst(phy, q, mtxq, wcid);
 
-			ieee80211_return_txq(phy->hw, txq, false);
-
 			if (unlikely(n_frames < 0))
 				return n_frames;
+
+			/* an undrainable PS station would starve all others */
+			if (n_frames > 0 || mt76_txq_stopped(q))
+				ieee80211_return_txq(phy->hw, txq, false);
+
 			ret += n_frames;
 			continue;
 		}
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2026-11-18  9:42 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-17 18:01 [PATCH mt76-next 01/19] wifi: mt76: don't pin undrainable PS stations in the tx scheduler Felix Fietkau
2026-11-17 18:01 ` [PATCH mt76-next 02/19] wifi: mt76: mt7996: return a negative error for a firmware status Felix Fietkau
2026-11-17 18:01 ` [PATCH mt76-next 03/19] wifi: mt76: mt7996: use the default timeout for STA_REC and BSS_INFO Felix Fietkau
2026-11-18  8:22   ` Lorenzo Bianconi
2026-11-17 18:01 ` [PATCH mt76-next 04/19] wifi: mt76: mt7915: " Felix Fietkau
2026-11-18  8:23   ` Lorenzo Bianconi
2026-11-17 18:01 ` [PATCH mt76-next 05/19] wifi: mt76: delete only the RX NAPIs that were added Felix Fietkau
2026-11-18  8:32   ` Lorenzo Bianconi
2026-11-17 18:01 ` [PATCH mt76-next 06/19] wifi: mt76: mt7996: report radar on the channel context of its band Felix Fietkau
2026-11-17 18:01 ` [PATCH mt76-next 07/19] wifi: mt76: mt7996: stop WED before the DMA reset of a full reset Felix Fietkau
2026-11-18  8:38   ` Lorenzo Bianconi
2026-11-17 18:01 ` [PATCH mt76-next 08/19] wifi: mt76: skip the radiotap TLVs in mt76_skb_get_hdr() Felix Fietkau
2026-11-17 18:01 ` [PATCH mt76-next 09/19] wifi: mt76: find the first A-MSDU subframe behind the radiotap data Felix Fietkau
2026-11-18  8:43   ` Lorenzo Bianconi
2026-11-18  9:34     ` Felix Fietkau
2026-11-18  9:42       ` Lorenzo Bianconi
2026-11-17 18:01 ` [PATCH mt76-next 10/19] wifi: mt76: mark all but the last subframe of an A-MSDU chain Felix Fietkau
2026-11-18  8:47   ` Lorenzo Bianconi
2026-11-17 18:01 ` [PATCH mt76-next 11/19] wifi: mt76: mt7996: set qos_ctl of a frame that hardware reordered Felix Fietkau
2026-11-18  8:50   ` Lorenzo Bianconi
2026-11-17 18:01 ` [PATCH mt76-next 12/19] wifi: mt76: check the PN of a BA session frame at its release Felix Fietkau
2026-11-18  8:55   ` Lorenzo Bianconi
2026-11-17 18:01 ` [PATCH mt76-next 13/19] wifi: mt76: check the RX PN of CCMP-256, GCMP and GCMP-256 keys Felix Fietkau
2026-11-17 18:01 ` [PATCH mt76-next 14/19] wifi: mt76: connac: return a negative error for a firmware status Felix Fietkau
2026-11-17 18:01 ` [PATCH mt76-next 15/19] wifi: mt76: guard the tx_list of every phy with one lock Felix Fietkau
2026-11-18  8:52   ` Lorenzo Bianconi
2026-11-17 18:01 ` [PATCH mt76-next 16/19] wifi: mt76: keep an unpublished wcid off the TX and poll lists Felix Fietkau
2026-11-17 18:01 ` [PATCH mt76-next 17/19] wifi: mt76: mt7925: do not take iflist_mtx under the mutex Felix Fietkau
2026-11-17 18:01 ` [PATCH mt76-next 18/19] wifi: mt76: mt7925: take each polled link under sta_poll_lock Felix Fietkau
2026-11-18  8:58   ` Lorenzo Bianconi
2026-11-17 18:01 ` [PATCH mt76-next 19/19] wifi: mt76: mt7615: take each polled station " Felix Fietkau
2026-11-18  8:57   ` Lorenzo Bianconi
2026-11-18  8:20 ` [PATCH mt76-next 01/19] wifi: mt76: don't pin undrainable PS stations in the tx scheduler Lorenzo Bianconi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox