From: Lix Zhou Date: Wed, 19 Feb 2025 05:22:12 +0000 (+0800) Subject: wifi-scripts: failed to start hostapd if he_spr_psr_enabled is set X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=b74318481b424cf72ef178881c567e9f049c04dc;p=openwrt%2Fopenwrt.git wifi-scripts: failed to start hostapd if he_spr_psr_enabled is set he_spr_psr_enabled is appended to hostapd.conf if it's enabled, but hostapd doesn't support this config, it should be used as an internal flag to control the he_spr_sr_control configuring. Signed-off-by: Lix Zhou Link: https://github.com/openwrt/openwrt/pull/18025 Signed-off-by: John Crispin --- diff --git a/package/network/config/wifi-scripts/files/lib/netifd/wireless/mac80211.sh b/package/network/config/wifi-scripts/files/lib/netifd/wireless/mac80211.sh index b4aa19bf52..61813ab81b 100755 --- a/package/network/config/wifi-scripts/files/lib/netifd/wireless/mac80211.sh +++ b/package/network/config/wifi-scripts/files/lib/netifd/wireless/mac80211.sh @@ -471,7 +471,6 @@ mac80211_hostapd_setup_base() { he_su_beamformer:${he_phy_cap:6:2}:0x80:$he_su_beamformer \ he_su_beamformee:${he_phy_cap:8:2}:0x1:$he_su_beamformee \ he_mu_beamformer:${he_phy_cap:8:2}:0x2:$he_mu_beamformer \ - he_spr_psr_enabled:${he_phy_cap:14:2}:0x1:$he_spr_psr_enabled \ he_twt_required:${he_mac_cap:0:2}:0x6:$he_twt_required if [ "$he_bss_color_enabled" -gt 0 ]; then @@ -480,6 +479,7 @@ mac80211_hostapd_setup_base() { append base_cfg "he_spr_non_srg_obss_pd_max_offset=$he_spr_non_srg_obss_pd_max_offset" "$N" he_spr_sr_control=$((he_spr_sr_control | (1 << 2))) } + [ "$he_spr_psr_enabled" -gt 0 ] && he_spr_psr_enabled=$((0x${he_phy_cap:14:2} & 0x1)) [ "$he_spr_psr_enabled" -gt 0 ] || he_spr_sr_control=$((he_spr_sr_control | (1 << 0))) append base_cfg "he_spr_sr_control=$he_spr_sr_control" "$N" else