Re: [PATCH] wifi: mt76: mt7603: discard power-save loopbacks after wakeup
From: Cristian Papa
Date: Tue Oct 20 2026 - 14:04:22 EST
On 20.10.26 18:44, Felix Fietkau wrote:
> It all depends on whether the receiver has moved on and considers the
> frame lost, or if there is value in sending it to avoid the reorder
> timeout (which would cause some jitter). Either way, we should likely
> only allow immediate-tx if aggregation is enabled.
>
> If you have some time, could you test, which variant works better?
I tried, but I could not get the late case to happen here.
Setup: MT7603E AP (EcoNet EN751221 board, OpenWrt, 6.18), channel 11,
HT20, one Android phone (Galaxy A56) as the only client, screen off,
about -35 dBm. I added a debugfs knob for a loopback that arrives after
the wakeup drained psq: 0 drops it (this patch), 1 sends it right away
only if its TID has an active TX aggregation session, 2 always sends it.
Counters record every loopback, whether it arrived before or after the
wakeup, and how long after the wakeup.
Traffic was ICMP echo from the AP to the phone, 1000 bytes:
- One every 50 ms, modes 0/1/2/0/1/2 for 3 minutes each: 4-21 wakeups
per phase and no late loopback in any of them, so all three modes ran
the same code. Loss and RTT matched across modes (0.03-0.06% loss,
p99 10-15 ms).
- Bursts so the phone dozes between them (30 every 400 ms, 10 every
250 ms, 60 every 1 s, one minute each), repeated three times: about
1,000 sleep/wake transitions in total and no late loopback. In the
runs that also counted on-time loopbacks (about 690 transitions) there
was exactly one, and it arrived while the station was still asleep.
So with this client the hardware almost never holds a frame for the
station when it starts to doze, and none came back after a wakeup. I
can't say which variant works better, since neither path ran. This is
one client on one AP, though; a client that dozes while traffic is
still flowing could behave differently.
Given that, I'd keep the drop as in this patch, since it is the simpler
path and costs at most an occasional frame. If you'd prefer immediate
TX gated on aggregation, I can send a v2 with that instead, and if you
know a client or traffic pattern that triggers late loopbacks more
often, I'm happy to rerun the test with it.
Cristian