I think I have identify the cause of ath9k slowness. I have an GL AR300m running OpenWRT 21.02 which only have a single 2.4Ghz radio. I run iperf and the slowness shows before 3hrs on AP. This rate increases in repeater mode with the repeater losing beacon and the WiFi stack reconnects.
I think the problem is txq buffer size.
Check your physical radio for 2.4ghz , it's either phy0 or phy1
Determine your phy 2.4ghz radio
iwinfo|grep -m 1 -A 10 '.*2\.4'|grep -Eo 'phy\d+$'
Check memory limit and double it. Mine was originally set at 4194304
iw phy phy0 get txq
iw phy phy0 set txq memory_limit 8388608
Don't forget to disable scan workaround if you got that running
I can confirm the below settting on a GL AR300 with 128M memory has resolved my issues.
root@repeater:~# iw phy phy0 get txq
Packet limit: 8192 pkts
Memory limit: 8388608 bytes
Quantum: 300 bytes
Number of queues: 4096
Backlog: 0 pkts
Memory usage: 0 bytes
Packet limit overflows: 0
Memory limit overflows: 0
Hash collisions: 3116
The above setting was testing for AP/STA. When testing for dumb AP, it dies alot quicker
so we know txq is part of the equation. I've also double the Packet limit to 16384 and currently testing
iw phy phy0 set txq limit 16384