From 08ea6492e671b121c5aabc272bde9b56db81a09d Mon Sep 17 00:00:00 2001 From: Aloka Dixit Date: Thu, 31 Mar 2022 17:37:51 -0700 Subject: [PATCH 1/3] acs: configuration option for RU puncturing threshold Add new option 'ru_punct_acs_threshold' where the value indicates the percentage of ideal channel average interference factor above which a channel should be punctured. Default is set to 75. Signed-off-by: Aloka Dixit --- hostapd/config_file.c | 2 ++ hostapd/hostapd.conf | 5 +++++ src/ap/ap_config.c | 1 + src/ap/ap_config.h | 1 + 4 files changed, 9 insertions(+) --- a/hostapd/config_file.c +++ b/hostapd/config_file.c @@ -4691,6 +4691,14 @@ static int hostapd_config_fill(struct ho conf->ru_punct_bitmap = atoi(pos); } else if (os_strcmp(buf, "ru_punct_ofdma") == 0) { conf->ru_punct_ofdma = atoi(pos); + } else if (os_strcmp(buf, "ru_punct_acs_threshold") == 0) { + conf->ru_punct_acs_threshold = atoi(pos); + if (conf->ru_punct_acs_threshold > 100) { + wpa_printf(MSG_ERROR, + "Line %d: ru_punct_acs_threshold must be between 0 and 100", + line); + return 1; + } #endif /* CONFIG_IEEE80211BE */ } else { wpa_printf(MSG_ERROR, --- a/hostapd/hostapd.conf +++ b/hostapd/hostapd.conf @@ -1028,6 +1028,12 @@ wmm_ac_vo_acm=0 # RU puncturing bitmap. Default value is 0. #ru_punct_ofdma=1 +# RU puncturing threshold in automatic channel selection (ACS), where the +# value indicates the percentage of ideal channel average interference factor +# above which a channel should be punctured. +# Default is 0, indicates that ACS algorithm should not puncture any channel. +#ru_punct_acs_threshold=75 + ##### IEEE 802.1X-2004 related configuration ################################## # Require IEEE 802.1X authorization --- a/src/ap/ap_config.h +++ b/src/ap/ap_config.h @@ -1150,6 +1150,7 @@ struct hostapd_config { unsigned int ch_switch_eht_config; u16 ru_punct_bitmap; u8 ru_punct_ofdma; + u8 ru_punct_acs_threshold; }; static inline u8 hostapd_get_he_6ghz_reg_pwr_type(struct hostapd_config *conf)