wifi: mt7603: fix U-APSD EOSP signaling before frame transmission - #1084
wifi: mt7603: fix U-APSD EOSP signaling before frame transmission#1084bot08 wants to merge 2 commits into
Conversation
Signed-off-by: bot08 <71845954+bot08@users.noreply.github.com>
|
mark |
|
I tested this patch and didn't notice any difference. Packets are still being lost and ping gets "stuck" on devices that aggressively save battery. |
|
Could it be because more_data is always 1? Or perhaps the issue wasn't fully resolved in #865, as the symptoms are very similar |
|
Hi @bot08, It should call ieee80211_sta_eosp after last sp frame is actually acknowledged |
|
Hi @andburt-tlt, tested your patch today. Yeah, iPhone freezes are gone. But tx retries and packet loss are still high, looks like a separate bug. Overall, much better already. Also had a Wi-Fi restart due to WAN link drop, but that's unrelated. Here are the logs: System logKernel logStation dump@andburt-tlt should I add your patch as a commit to this PR, or would you prefer a separate one? Also noticed a new issue after applying the patch. |
|
Unfortunately, the issue is still there, caught 2 freezes today. Also worth noting, I have another router with ath9k connected in cascade to the MT7628 one, both sharing the same config, and I don't observe any issues on it. So this is likely not a configuration problem |
|
@bot08, can you check the updated patch, it also acts on mt7603_sta_ps path: |
|
@andburt-tlt Got worse with this patch :( Freezes and packet loss are still there. Maybe it should be applied together with the previous patch? I only applied this one. Here are 2 videos of how the freeze looks: |
|
@bot08 ok, maybe you can check the output of |
|
@andburt-tlt I checked. cat /sys/kernel/debug/ieee80211/phy0/mt76/resetInterestingly, when only the iPhone was connected, Here's the station dump captured during a freeze. iw dev phy0-ap0 station dumpAn interesting fact, the iPhone was completely idle/sleeping during this time. It just lay on the table, but it never generated such a huge inactive time, it kept waking up or responding normally, maintaining a normal inactivity counter. |
|
I think I stumbled upon an important clue while experimenting with the Coverage Cell Density setting on the router. The behavior changes completely depending on this option. When it is set to Normal, the iPhone doesn’t actually freeze anymore. Instead, it just quietly disconnects from the Wi-Fi on the phone's side. However, the router doesn't notice this immediately - it keeps showing the device as active and associated for a few minutes while the inactive time climbs all the way up. Eventually, hostapd just kicks it out due to inactivity. Here is what the logs look like under On the other hand, when I set Coverage Cell Density to Disabled, the iPhone doesn't drop the connection at all. It just experiences that total traffic freeze for some time (exactly as described in the issue above) but stays connected. |
|
I also tested a new patch. The good news is that it successfully brought the TX retries down to much more realistic values, around +-5%. Unfortunately, it doesn't fix the underlying freeze or the disconnection issue. |
|
I have a pending branch in the mt76 tree with some untested mt7603 fixes. Can you please test it? |
|
Of course |
|
@nbd168 Build fails on Build log |
|
Built and flashed with the fix applied: |
|
sounds like you are missing this patch in your openwrt branch for the mac80211 kernel package: Either you backport it or you build snapshots (openwrt main branch) instead of releases (branch openwrt-25.12) |
|
I built a snapshot (r35584-520d6d9784) using the mt76 version from the pending branch. To make sure I was actually running that exact build, I made a small cosmetic change to the name in debugfs.c, just a typo-level edit, shouldn't affect functionality in any way. Testing was done with default settings, the only things I changed were SSID, encryption type, and password. Channel Analysis shows 10–15 nearby APs besides my own interface. The freezing is gone. Ping and throughput are both back to normal. Over 3 days of uptime I didn't notice any memory leak, usage stays within a small, stable range. Logs are clean, no crashes or anything alarming. Overall this looks like a solid improvement. However, a new problem showed up, the device disconnects on its own. If auto-reconnect is enabled, you might not even notice it happening. I haven't been able to pin down a trigger. The device can run fine for 12+ hours and then suddenly drop, or it can disconnect just an hour after connecting. It's happened while playing video and while the screen was locked, no clear pattern so far. Unfortunately I don't have a way to monitor the client side to see what's actually happening on its end. What I can say is that the phone simply disconnects on its own without any obvious trigger. From the AP perspective, the client just stops transmitting frames, and hostapd eventually disconnects it due to inactivity. This happens despite the phone sitting in the same room as the router the whole time. System LogOne thing I noticed (unrelated to the patch, this was happening before too): the phone sometimes shows 2 signal bars instead of 3, even at close range. My guess is that at some point the signal looks weak enough to the phone that it drops the connection without notifying the AP. I tried enabling dynamic sensitivity (echo 1 > /sys/kernel/debug/ieee80211/phy0/mt76/dynamic_sensitivity, as suggested here), but didn't notice any difference. Also worth mentioning, sometimes during a scan, the phone doesn't find the AP on the first try. This also predates the patch, but it might be related, possibly too few beacon frames, though I'm not sure. This is all based on just 3 short days of testing. I'll keep testing and trying different settings to see if anything helps. cat /sys/kernel/debug/ieee80211/phy0/mt76/resetiw dev phy0-ap0 station dump
Overall, I think these changes are genuinely valuable and worth pushing forward. There's now a huge number of devices across all price ranges using this chipset, and the list keeps growing. For example, the device I'm testing on was released in 2025 and I bought it just a couple of months ago on Amazon. |
|
After setting This also gave me a lead that might help with debugging: during a channel scan in Channel Analysis, my iPhone and GPixel disconnect in most cases (though less consistently on the Pixel), while my laptop shows no such behavior. It looks like modern devices treat a missed beacon as a reason to disconnect. Here's what it looks like on video: https://www.youtube.com/shorts/Jrhj628Iwb4 So my current theory is that the client eventually decides the AP is no longer reachable after missing enough consecutive beacon frames. That would also explain why the AP never sees an explicit disconnect and only removes the client later due to inactivity. As for the earlier note about the phone showing 2 bars instead of 3 even at -50 dBm from the AP. I'm now not sure that's related. It could still be caused by missed beacons/packets, but thinking about it more, this is probably a separate workcase and I wouldn't tie it directly to the disconnect issue above. |
#1080