From: Michael Tremer Date: Wed, 23 Jul 2025 13:46:09 +0000 (+0200) Subject: hostapd: Filter out some unsupported VHT caps by driver X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=61f0cb9cfb5f37a3b762d835586cd66d8884bbc5;p=ipfire-2.x.git hostapd: Filter out some unsupported VHT caps by driver Signed-off-by: Michael Tremer --- diff --git a/src/initscripts/packages/hostapd b/src/initscripts/packages/hostapd index 0e58c3f1c..53d77545f 100644 --- a/src/initscripts/packages/hostapd +++ b/src/initscripts/packages/hostapd @@ -86,6 +86,11 @@ declare -A VHT_CAPS=( [0x20000000]="[TX-ANTENNA-PATTERN]" ) +declare -A VHT_CAPS_DRIVER_FILTERS=( + # ath12k does not support Short GI for 160 MHz + [ath12k_pci]="$(( 0xffffffff & ~0x00000020 ))" +) + find_interface() { local address="${1}" @@ -137,6 +142,12 @@ write_config() { ht_flags="$(( ${ht_flags} & ${HT_CAPS_DRIVER_FILTERS[${driver}]} ))" fi + # Fix the VHT caps because some drivers don't support everything + # that the actual hardware supports (or have it turned off because of bugs). + if [ -n "${VHT_CAPS_DRIVER_FILTERS[${driver}]}" ]; then + vht_flags="$(( ${vht_flags} & ${VHT_CAPS_DRIVER_FILTERS[${driver}]} ))" + fi + # HT Capabilities for flag in ${!HT_CAPS[@]}; do if (( ${ht_flags} & ${flag} )); then