mirror of
				https://github.com/Telecominfraproject/wlan-ap.git
				synced 2025-10-31 02:17:58 +00:00 
			
		
		
		
	hostapd: more bss color improvements
Fixes: WIFI-14259 Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
		| @@ -425,8 +425,7 @@ mac80211_hostapd_setup_base() { | |||||||
| 			he_spr_sr_control:3 \ | 			he_spr_sr_control:3 \ | ||||||
| 			he_spr_psr_enabled:0 \ | 			he_spr_psr_enabled:0 \ | ||||||
| 			he_spr_non_srg_obss_pd_max_offset:0 \ | 			he_spr_non_srg_obss_pd_max_offset:0 \ | ||||||
| 			he_bss_color:0 \ | 			he_bss_color | ||||||
| 			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_phy_cap=${he_phy_cap:2} | ||||||
| @@ -446,7 +445,7 @@ mac80211_hostapd_setup_base() { | |||||||
| 			he_spr_psr_enabled:${he_phy_cap:14:2}:0x1:$he_spr_psr_enabled \ | 			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 | 			he_twt_required:${he_mac_cap:0:2}:0x6:$he_twt_required | ||||||
|  |  | ||||||
| 		if [ "$he_bss_color_enabled" -gt 0 ]; then | 		if [ "$he_bss_color" -ge 0 ]; then | ||||||
| 			append base_cfg "he_bss_color=$he_bss_color" "$N" | 			append base_cfg "he_bss_color=$he_bss_color" "$N" | ||||||
| 			[ "$he_spr_non_srg_obss_pd_max_offset" -gt 0 ] && { \ | 			[ "$he_spr_non_srg_obss_pd_max_offset" -gt 0 ] && { \ | ||||||
| 				append base_cfg "he_spr_non_srg_obss_pd_max_offset=$he_spr_non_srg_obss_pd_max_offset" "$N" | 				append base_cfg "he_spr_non_srg_obss_pd_max_offset=$he_spr_non_srg_obss_pd_max_offset" "$N" | ||||||
| @@ -454,8 +453,6 @@ mac80211_hostapd_setup_base() { | |||||||
| 			} | 			} | ||||||
| 			[ "$he_spr_psr_enabled" -gt 0 ] || he_spr_sr_control=$((he_spr_sr_control | (1 << 0))) | 			[ "$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" | 			append base_cfg "he_spr_sr_control=$he_spr_sr_control" "$N" | ||||||
| 		else |  | ||||||
| 			append base_cfg "he_bss_color_disabled=1" "$N" |  | ||||||
| 		fi | 		fi | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
| @@ -420,8 +420,7 @@ mac80211_hostapd_setup_base() { | |||||||
| 			he_spr_sr_control:3 \ | 			he_spr_sr_control:3 \ | ||||||
| 			he_spr_psr_enabled:0 \ | 			he_spr_psr_enabled:0 \ | ||||||
| 			he_spr_non_srg_obss_pd_max_offset:0 \ | 			he_spr_non_srg_obss_pd_max_offset:0 \ | ||||||
| 			he_bss_color:0 \ | 			he_bss_color | ||||||
| 			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_phy_cap=${he_phy_cap:2} | ||||||
| @@ -441,7 +440,7 @@ mac80211_hostapd_setup_base() { | |||||||
| 			he_spr_psr_enabled:${he_phy_cap:14:2}:0x1:$he_spr_psr_enabled \ | 			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 | 			he_twt_required:${he_mac_cap:0:2}:0x6:$he_twt_required | ||||||
|  |  | ||||||
| 		if [ "$he_bss_color_enabled" -gt 0 ]; then | 		if [ "$he_bss_color" -ge 0 ]; then | ||||||
| 			append base_cfg "he_bss_color=$he_bss_color" "$N" | 			append base_cfg "he_bss_color=$he_bss_color" "$N" | ||||||
| 			[ "$he_spr_non_srg_obss_pd_max_offset" -gt 0 ] && { \ | 			[ "$he_spr_non_srg_obss_pd_max_offset" -gt 0 ] && { \ | ||||||
| 				append base_cfg "he_spr_non_srg_obss_pd_max_offset=$he_spr_non_srg_obss_pd_max_offset" "$N" | 				append base_cfg "he_spr_non_srg_obss_pd_max_offset=$he_spr_non_srg_obss_pd_max_offset" "$N" | ||||||
| @@ -449,8 +448,6 @@ mac80211_hostapd_setup_base() { | |||||||
| 			} | 			} | ||||||
| 			[ "$he_spr_psr_enabled" -gt 0 ] || he_spr_sr_control=$((he_spr_sr_control | (1 << 0))) | 			[ "$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" | 			append base_cfg "he_spr_sr_control=$he_spr_sr_control" "$N" | ||||||
| 		else |  | ||||||
| 			append base_cfg "he_bss_color_disabled=1" "$N" |  | ||||||
| 		fi | 		fi | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 John Crispin
					John Crispin