Re: [PATCH] wifi: mt76: mt7603: discard power-save loopbacks after wakeup

From: Felix Fietkau

Date: Tue Oct 20 2026 - 05:48:56 EST


On 14.10.26 08:22, Cristian Papa wrote:
A station wakeup drains its power-save queue once, while frames
redirected by the PSE can still be waiting on the MCU RX ring. Processing
those loopbacks after the wakeup queues them for an already awake station
and sets the driver's buffered indication again. The stale frames remain
queued until another service period or sleep/wake transition drains them.

Check ps_sleeping under ps_lock before buffering a loopback, and publish
the buffered indication under the same lock. The wakeup's state change
and queue drain use that lock too, so late frames cannot repopulate the
queue or leave a stale buffered indication after the wakeup.

Discard late frames rather than retransmitting their old sequence and
packet numbers after newer traffic or a wakeup BAR. This loses the late
frame; it does not recover delivery. Use the station's sleep state, not
the temporary hardware PS bypass used during U-APSD service periods.
Why did you decide to drop them instead of pushing them to immediate tx?

- Felix