[LAN latency] Can i force a VHT rate for a client or the entire radio?

Im chasing the reason of (rare) microstutters happening with wireless VR, i thought MCS/NSS rate switching (happens pretty often from what i see in the wireless tab) could be a contributor. As far as im aware these rate changes happens for a good reason eg. when retransmission rate from client or router goes above a certain threshold. But the catch here is clients transmission with its dinky antennas being a little shaky is a complete non-issue in this application, client transmits very little data (probably in kilobytes) so it can retransmit as much as it wants. As long as client can receive the video stream router should push at best rate it can.

I did every other optimization i know of, selected channel is barren and not DFS, client has direct line of sight and is within 3 meters of the router, 5g radio is exclusively used by the client, cpu load never goes above 1.0.

No, this cannot be set; but you can configure your SSID in such a manner that it lowers to e.g. 802.11b or g. I don't advise this.

Seems OK. Can you show your /etc/config/network config?

This is the number of antennas in use. Multi antenna was introduced in 802.11n.

Unfortunely i need AC rates, but i had a similar thought. Instead of forcing a higher VHT rate assigning a lower maximum VHT rate could be more beneficial.

But no matter what i do i cant set the lower VHT rates. Im about 90% sure commands i entered below are correct, I wonder if its just not supported in the driver level or something. (Xiaomi 4a gigabit, mt7621)

iw dev wlan1 set bitrates vht-mcs-5 2:0-6
iw dev wlan1 set bitrates vht-mcs-5 1:0-6


 2 config interface 'loopback'
 3         option device 'lo'
 4         option proto 'static'
 5         option ipaddr '127.0.0.1'
 6         option netmask '255.0.0.0'
 7
 8 config globals 'globals'
 9         option packet_steering '1'
10         option ula_prefix 'fd51:646b:6d9d::/48'
11
12 config device
13         option name 'br-lan'
14         option type 'bridge'
15         list ports 'lan1'
16         list ports 'lan2'
17
18 config interface 'lan'
19         option device 'br-lan'
20         option proto 'static'
21         option netmask '255.255.255.0'
22         option ipaddr '192.168.4.1'
23
24 config interface 'wan'
25         option device 'wan'
26         option proto 'pppoe'
27         option username '----------'
28         option password '----------'
29         option ipv6 'auto'
30
31

root@OpenWrt:~# iw phy1 info
Wiphy phy1
        wiphy index: 1
        max # scan SSIDs: 4
        max scan IEs length: 2247 bytes
        max # sched scan SSIDs: 0
        max # match sets: 0
        Retry short limit: 7
        Retry long limit: 4
        Coverage class: 0 (up to 0m)
        Device supports AP-side u-APSD.
        Device supports T-DLS.
        Available Antennas: TX 0x3 RX 0x3
        Configured Antennas: TX 0x3 RX 0x3
        Supported interface modes:
                 * IBSS
                 * managed
                 * AP
                 * AP/VLAN
                 * monitor
                 * mesh point
                 * P2P-client
                 * P2P-GO
        Band 2:
                Capabilities: 0x1ff
                        RX LDPC
                        HT20/HT40
                        SM Power Save disabled
                        RX Greenfield
                        RX HT20 SGI
                        RX HT40 SGI
                        TX STBC
                        RX STBC 1-stream
                        Max AMSDU length: 3839 bytes
                        No DSSS/CCK HT40
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
                Minimum RX AMPDU time spacing: No restriction (0x00)
                HT TX/RX MCS rate indexes supported: 0-15
                VHT Capabilities (0x318001b0):
                        Max MPDU length: 3895
                        Supported Channel Width: neither 160 nor 80+80
                        RX LDPC
                        short GI (80 MHz)
                        TX STBC
                        RX antenna pattern consistency
                        TX antenna pattern consistency
                VHT RX MCS set:
                        1 streams: MCS 0-9
                        2 streams: MCS 0-9
                        3 streams: not supported
                        4 streams: not supported
                        5 streams: not supported
                        6 streams: not supported
                        7 streams: not supported
                        8 streams: not supported
                VHT RX highest supported: 0 Mbps
                VHT TX MCS set:
                        1 streams: MCS 0-9
                        2 streams: MCS 0-9
                        3 streams: not supported
                        4 streams: not supported
                        5 streams: not supported
                        6 streams: not supported
                        7 streams: not supported
                        8 streams: not supported
                VHT TX highest supported: 0 Mbps
                Frequencies:
                        * 5180 MHz [36] (23.0 dBm)
                        * 5200 MHz [40] (23.0 dBm)
                        * 5220 MHz [44] (23.0 dBm)
                        * 5240 MHz [48] (23.0 dBm)
                        * 5260 MHz [52] (23.0 dBm) (radar detection)
                        * 5280 MHz [56] (23.0 dBm) (radar detection)
                        * 5300 MHz [60] (23.0 dBm) (radar detection)
                        * 5320 MHz [64] (23.0 dBm) (radar detection)
                        * 5500 MHz [100] (23.0 dBm) (radar detection)
                        * 5520 MHz [104] (23.0 dBm) (radar detection)
                        * 5540 MHz [108] (23.0 dBm) (radar detection)
                        * 5560 MHz [112] (23.0 dBm) (radar detection)
                        * 5580 MHz [116] (23.0 dBm) (radar detection)
                        * 5600 MHz [120] (23.0 dBm) (radar detection)
                        * 5620 MHz [124] (23.0 dBm) (radar detection)
                        * 5640 MHz [128] (23.0 dBm) (radar detection)
                        * 5660 MHz [132] (23.0 dBm) (radar detection)
                        * 5680 MHz [136] (23.0 dBm) (radar detection)
                        * 5700 MHz [140] (23.0 dBm) (radar detection)
                        * 5720 MHz [144] (23.0 dBm) (radar detection)
                        * 5745 MHz [149] (23.0 dBm)
                        * 5765 MHz [153] (23.0 dBm)
                        * 5785 MHz [157] (23.0 dBm)
                        * 5805 MHz [161] (23.0 dBm)
                        * 5825 MHz [165] (23.0 dBm)
                        * 5845 MHz [169] (23.0 dBm) (no IR)
                        * 5865 MHz [173] (23.0 dBm) (no IR)
        valid interface combinations:
                 * #{ IBSS } <= 1, #{ managed, AP, mesh point, P2P-client, P2P-GO } <= 8,
                   total <= 8, #channels <= 1, STA/AP BI must match, radar detect widths: { 20 MHz (no HT), 20 MHz, 40 MHz, 80 MHz }

        HT Capability overrides:
                 * MCS: ff ff ff ff ff ff ff ff ff ff
                 * maximum A-MSDU length
                 * supported channel width
                 * short GI for 40 MHz
                 * max A-MPDU length exponent
                 * min MPDU start spacing
        max # scan plans: 1
        max scan plan interval: -1
        max scan plan iterations: 0
        Supported extended features:
                * [ VHT_IBSS ]: VHT-IBSS
                * [ RRM ]: RRM
                * [ FILS_STA ]: STA FILS (Fast Initial Link Setup)
                * [ CQM_RSSI_LIST ]: multiple CQM_RSSI_THOLD records
                * [ CONTROL_PORT_OVER_NL80211 ]: control port over nl80211
                * [ TXQS ]: FQ-CoDel-enabled intermediate TXQs
                * [ AIRTIME_FAIRNESS ]: airtime fairness scheduling
                * [ AQL ]: Airtime Queue Limits (AQL)
                * [ SCAN_RANDOM_SN ]: use random sequence numbers in scans
                * [ SCAN_MIN_PREQ_CONTENT ]: use probe request with only rate IEs in scans
                * [ CONTROL_PORT_NO_PREAUTH ]: disable pre-auth over nl80211 control port support
                * [ DEL_IBSS_STA ]: deletion of IBSS station support
                * [ SCAN_FREQ_KHZ ]: scan on kHz frequency support
                * [ CONTROL_PORT_OVER_NL80211_TX_STATUS ]: tx status for nl80211 control port support

Ok, ive noticed a behaviour that struck me as extremely odd, or even janky. The command "iw dev wlan1 set bitrates vht-mcs-5 2:5" and variations applies, but only to the half of the radio? I think its more appropriate if i start an another thread about that.

I'll have to test manually entering iw commands - as that's not official instructions (you're just entering raw Linux commands).

If you mean that one SSID has different parameter, I believe that is possible,

I found out what it was, bitrate applies to tx but not rx (which i assume is expected behaviour)

Correct, this is expected behavior. Rx is controlled by the transmitting client.


(Some notes form the duplicate thread you closed)

  • It's also normal for different clients. This is normal behavior, the radio applies Tx parameters to each individual client.
  • Also, using raw commands instead of OpenWrt configs could be problematic too.

Thank you for the clarification. If only i had done iwinfo earlier i would realize i was getting worked up over nothing :sweat_smile:

About openwrt config, is there way to do this with uci? I scoured the docs (notably basic#ac_capabilities and hostapd.conf) but couldnt find a way. Its okay though, if this method proves to be stable ill just add it to cron.