wifi-scripts: Support HE Iftypes with multiple entries
[openwrt/staging/pepe2k.git] / package / network / config / wifi-scripts / files / lib / netifd / wireless / mac80211.sh
index 49ffb219bcd3c430ffdbf7d7654aac4630a86113..55df71ee3d585758f232331fa30acf9f06331b7d 100755 (executable)
@@ -432,9 +432,9 @@ mac80211_hostapd_setup_base() {
                        he_bss_color:128 \
                        he_bss_color_enabled: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=$(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 | sed -n '/HE Iftypes: AP/,$p' | 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"