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 --- 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