[openwrt/openwrt] wifi-scripts: Support HE Iftypes with multiple entries

LEDE Commits lede-commits at lists.infradead.org
Thu Feb 22 13:22:48 PST 2024


hauke pushed a commit to openwrt/openwrt.git, branch openwrt-22.03:
https://git.openwrt.org/4432454037bddd87e86614ec0738820fd3a073f2

commit 4432454037bddd87e86614ec0738820fd3a073f2
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sat Feb 17 17:58:50 2024 +0100

    wifi-scripts: Support HE Iftypes with multiple entries
    
    With mac80211_hwsim I have seen such entries in OpenWrt 22.03:
        HE Iftypes: managed, AP
    The mac80211.sh script did not detect the entry and failed. Allow
    arbitrary other entries before to fix this problem.
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
    (cherry picked from commit 5df7a78e821cbdcc3beb80150798712a4c00b00e)
---
 package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
index 3b5071518c..bfeeae42f9 100644
--- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
@@ -413,9 +413,9 @@ mac80211_hostapd_setup_base() {
 			he_spr_non_srg_obss_pd_max_offset:1 \
 			he_bss_color
 
-		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"




More information about the lede-commits mailing list