From 61f0cb9cfb5f37a3b762d835586cd66d8884bbc5 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 23 Jul 2025 15:46:09 +0200 Subject: [PATCH] hostapd: Filter out some unsupported VHT caps by driver Signed-off-by: Michael Tremer --- src/initscripts/packages/hostapd | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 -- 2.47.3