mac80211: do not emit VHT160 capabilities if channel width is less than 160 MHz
authorFelix Fietkau <nbd@nbd.name>
Tue, 9 Jan 2024 13:36:42 +0000 (14:36 +0100)
committerFelix Fietkau <nbd@nbd.name>
Tue, 9 Jan 2024 13:36:46 +0000 (14:36 +0100)
Fixes compatibility issues with VHT160 capable clients

Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh

index b5378e556eb232fdf30f42192d9a00dfb075c456..6ff627b03813bb2de0cd1f465014cc74031106a3 100644 (file)
@@ -327,6 +327,11 @@ mac80211_hostapd_setup_base() {
                [ "$rx_stbc" -lt "$cap_rx_stbc" ] && cap_rx_stbc="$rx_stbc"
                vht_cap="$(( ($vht_cap & ~(0x700)) | ($cap_rx_stbc << 8) ))"
 
+               [ "$vht_oper_chwidth" -lt 2 ] && {
+                       vht160=0
+                       short_gi_160=0
+               }
+
                mac80211_add_capabilities vht_capab $vht_cap \
                        RXLDPC:0x10::$rxldpc \
                        SHORT-GI-80:0x20::$short_gi_80 \