I've been chasing down strange lag / disconnect behavior observed over SSH with Raspberry Pi Zero W connecting to an OpenWRT AP on an IPQ4019. The symptoms are that the session seems non-responsive for several seconds, than comes back to life. It then "falls asleep" for a while.
Some articles have suggested setting
IPQoS 0x00 in either or both the sshd config of the RPi, or the ssh config of the connecting client. In my case, this did not resolve the issue.
Running with two, different Zero Ws, a Zero 2, or a Pi 4 did not change the behavior, so it doesn't seem to be a hardware-compatibility issue.
I have only seen this on 2.4 GHz. The Pi3B+ and Pi4 both connect robustly on 5 GHz.
So far, turning off WMM on this one, specific VAP seems to have improved things. I can't say "resolved" as I think there is still a bit of hesitation, though a fraction of a second is far from the "Hello? Anyone there?" of before.
It may be related to power-save or QoS features of WMM. I have not determined.
As WMM has benefits in many situations, I have only disabled it on the single VAP where it seems problematic. Most of my other devices are on other VAPs (with WMM enabled).