diff --git a/hostapd/config_file.c b/hostapd/config_file.c index 4c1eeda58..8e179d151 100644 --- a/hostapd/config_file.c +++ b/hostapd/config_file.c @@ -4760,6 +4760,16 @@ static int hostapd_config_fill(struct hostapd_config *conf, conf->eht_phy_capab.mu_beamformer = atoi(pos); } else if (os_strcmp(buf, "punct_bitmap") == 0) { conf->punct_bitmap = atoi(pos); + } else if (os_strcmp(buf, "punct_acs_threshold") == 0) { + int val = atoi(pos); + + if (val < 0 || val > 100) { + wpa_printf(MSG_ERROR, + "Line %d: punct_acs_threshold must be between 0 and 100", + line); + return 1; + } + conf->punct_acs_threshold = val; #endif /* CONFIG_IEEE80211BE */ } else { wpa_printf(MSG_ERROR, diff --git a/hostapd/hostapd.conf b/hostapd/hostapd.conf index 401c84f19..bc4a0f6ef 100644 --- a/hostapd/hostapd.conf +++ b/hostapd/hostapd.conf @@ -1034,6 +1034,12 @@ wmm_ac_vo_acm=0 # value is 0 indicating that all channels are active. #punct_bitmap=0 +# Preamble puncturing threshold in automatic channel selection (ACS). +# 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. +#punct_acs_threshold=75 + ##### IEEE 802.1X-2004 related configuration ################################## # Require IEEE 802.1X authorization diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h index 04a9c409c..8598602b1 100644 --- a/src/ap/ap_config.h +++ b/src/ap/ap_config.h @@ -1157,6 +1157,7 @@ struct hostapd_config { u8 eht_oper_centr_freq_seg0_idx; struct eht_phy_capabilities_info eht_phy_capab; u16 punct_bitmap; /* a bitmap of disabled 20 MHz channels */ + u8 punct_acs_threshold; #endif /* CONFIG_IEEE80211BE */ /* EHT enable/disable config from CHAN_SWITCH */