mac80211: parse the correct set of HE capabilities for AP mode
[openwrt/openwrt.git] / package / kernel / mac80211 / files / lib / netifd / wireless / mac80211.sh
index 62afd9e6a0fb6c4b047432ac8b1e8b97e42fc72b..f5249408546771e2c0dee27f11578c28444214d1 100644 (file)
@@ -421,9 +421,9 @@ mac80211_hostapd_setup_base() {
                        he_spr_non_srg_obss_pd_max_offset:1 \
                        he_bss_color
 
-               he_phy_cap=$(iw phy "$phy" info | awk -F "[()]" '/HE PHY Capabilities/ { print $2 }' | head -1)
+               he_phy_cap=$(iw phy "$phy" info | sed -n '/HE Iftypes: AP/,$p' | awk -F "[()]" '/HE PHY Capabilities/ { print $2 }' | head -1)
                he_phy_cap=${he_phy_cap:2}
-               he_mac_cap=$(iw phy "$phy" info | awk -F "[()]" '/HE MAC Capabilities/ { print $2 }' | head -1)
+               he_mac_cap=$(iw phy "$phy" info | sed -n '/HE Iftypes: AP/,$p' | awk -F "[()]" '/HE MAC Capabilities/ { print $2 }' | head -1)
                he_mac_cap=${he_mac_cap:2}
 
                append base_cfg "ieee80211ax=1" "$N"