Page MenuHomeVyOS Platform

vyos-1x: Wrong VHT configuration for WiFi 802.11ac
Closed, ResolvedPublicBUG

Description

Motivation:

The configuration of 802.11ac access points requires correct configuration of VHT capabilities for the cards in use. Wrong flags in the vht_capab flag variable in /run/hostapd/wlanX.conf files will prevent access points from working. Several flags in that variable have to be synced to other settings within this file.

Bug:

[...]
# supported_chan_width: [VHT160] [VHT160-80PLUS80]
# Indicates supported Channel widths
# 0 = 160 MHz & 80+80 channel widths are not supported (default)
# 1 = 160 MHz channel width is supported
# 2 = 160 MHz & 80+80 channel widths are supported
# 3 = reserved
[...]
# 0 = 20 or 40 MHz operating Channel width
# 1 = 80 MHz channel width
# 2 = 160 MHz channel width
# 3 = 80+80 MHz channel width
#vht_oper_chwidth=1
[...]
  • Expected behavior:
    • Neither [VHT160] nor [VHT160-80PLUS80] must be set if channel-set-width 0 or channel-set-width 1 is defined in config.boot.
    • Only [VHT160] must be set if channel-set-width 2 is defined in config.boot.
    • Only [VHT160-80PLUS80] must be set if channel-set-width 3 is defined in config.boot.

Test setup:

Real-World setup:

A PC-Engines APU2 with 2x Compex WLE600VX which support 80MHz channel width, but neither 160MHz nor 80+80MHz.

VHT Capabilities as taken from /config/config.boot -- WiFi interface was configured for 80MHz channel width (channel-set-width 1):

vht {
    antenna-count 2
    antenna-pattern-fixed
    center-channel-freq {
        freq-1 42
    }
    channel-set-width 1
    ldpc
    link-adaptation both
    max-mpdu 11454
    max-mpdu-exp 3
    short-gi 80
    stbc {
        rx 1
        tx
    }
}

Virtual Machine setup:

To verify the correct generation of hostapd config files, you may run simulated WiFi interfaces as follows:

  • Set up a VyOS within a VM.
  • Add a file /etc/modprobe.d/mac80211_hwsim.conf containing the line options mac80211_hwsim radios=2 which will cause 2 WiFi interfaces to appear when the module mac80211_hwsim is loaded.
  • Auto-load the module mac80211_hwsim by adding it to /etc/modules.
  • Reboot.

You are now set to test the correct generation of hostapd config files within /run/hostapd/wlanX.conf.

Details

Difficulty level
Normal (likely a few hours)
Version
1.4-rolling-202308240020 (nightly)
Why the issue appeared?
Implementation mistake
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

alainlamar changed the task status from Open to In progress.Sep 3 2023, 2:19 PM
alainlamar claimed this task.
alainlamar changed Why the issue appeared? from Will be filled on close to Implementation mistake.
alainlamar changed Is it a breaking change? from Stricter validation to Perfectly compatible.