From 6a39866dcfc65fb44cfea13f9455b71a516b0f4f Mon Sep 17 00:00:00 2001 From: Muna Sinada Date: Wed, 2 Mar 2022 15:29:58 -0800 Subject: [PATCH 2/6] ru_puncturing: add configuration option - New option 'ru_punct_bitmap' to configure RU puncturing bitmap. - New option 'ru_punct_ofdma' which indicates if kernel should consider OFDMA pattern. Signed-off-by: Muna Sinada Signed-off-by: Aloka Dixit --- hostapd/config_file.c | 4 ++++ hostapd/hostapd.conf | 11 +++++++++++ src/ap/ap_config.h | 2 ++ 3 files changed, 17 insertions(+) diff --git a/hostapd/config_file.c b/hostapd/config_file.c index 72e00c337e07..80f3fc020f2a 100644 --- a/hostapd/config_file.c +++ b/hostapd/config_file.c @@ -4687,6 +4687,10 @@ static int hostapd_config_fill(struct hostapd_config *conf, conf->eht_phy_capab.su_beamformee = atoi(pos); } else if (os_strcmp(buf, "eht_mu_beamformer") == 0) { conf->eht_phy_capab.mu_beamformer = atoi(pos); + } else if (os_strcmp(buf, "ru_punct_bitmap") == 0) { + conf->ru_punct_bitmap = atoi(pos); + } else if (os_strcmp(buf, "ru_punct_ofdma") == 0) { + conf->ru_punct_ofdma = atoi(pos); #endif /* CONFIG_IEEE80211BE */ } else { wpa_printf(MSG_ERROR, diff --git a/hostapd/hostapd.conf b/hostapd/hostapd.conf index 481911784f46..5fda6c614c80 100644 --- a/hostapd/hostapd.conf +++ b/hostapd/hostapd.conf @@ -1017,6 +1017,17 @@ wmm_ac_vo_acm=0 #eht_oper_chwidth #eht_oper_centr_freq_seg0_idx +# RU puncturing bitmap (16 bits) where each bit corresponds to +# a 20 MHz channel in the given bandwidth, bit 0 corresponding to the channel +# with lowest frequency. +# Bit set to 1 indicates that the channel is punctured, otherwise active. +# Default value is 0 indicating that no channel is punctured. +#ru_punct_bitmap=4 + +# If the kernel should consider OFDMA patterns while validating the provided +# RU puncturing bitmap. Default value is 0. +#ru_punct_ofdma=1 + ##### 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 884809388d18..19955beaefba 100644 --- a/src/ap/ap_config.h +++ b/src/ap/ap_config.h @@ -1148,6 +1148,8 @@ struct hostapd_config { #define CH_SWITCH_EHT_ENABLED BIT(0) #define CH_SWITCH_EHT_DISABLED BIT(1) unsigned int ch_switch_eht_config; + u16 ru_punct_bitmap; + u8 ru_punct_ofdma; }; static inline u8 hostapd_get_he_6ghz_reg_pwr_type(struct hostapd_config *conf) -- 2.31.1