From 0eb686637d149aeff81d4a72ff233bf5c7616eff Mon Sep 17 00:00:00 2001 From: Pradeep Kumar Chitrapu Date: Thu, 7 Apr 2022 16:56:53 -0700 Subject: [PATCH] hostapd: Add config option to specify 6 GHz regulatory AP type IEEE Std 802.11ax-2021 introduces Regulatory Info subfield to specify the 6 GHz access point type per regulatory. Add a user config option for specifying this. When not specified, Indoor AP type is selected for the 6 GHz AP by default. Signed-off-by: Pradeep Kumar Chitrapu --- hostapd/config_file.c | 2 ++ hostapd/hostapd.conf | 7 +++++++ src/ap/ap_config.h | 1 + 3 files changed, 10 insertions(+) diff --git a/hostapd/config_file.c b/hostapd/config_file.c index 0b6858a71..7d1004fc9 100644 --- a/hostapd/config_file.c +++ b/hostapd/config_file.c @@ -3597,6 +3597,8 @@ static int hostapd_config_fill(struct hostapd_config *conf, line, pos); return 1; } + } else if (os_strcmp(buf, "he_6ghz_reg_pwr_type") == 0) { + conf->he_6ghz_reg_pwr_type = atoi(pos); } else if (os_strcmp(buf, "he_oper_chwidth") == 0) { conf->he_oper_chwidth = atoi(pos); } else if (os_strcmp(buf, "he_oper_centr_freq_seg0_idx") == 0) { diff --git a/hostapd/hostapd.conf b/hostapd/hostapd.conf index 71c11989e..6930ad20d 100644 --- a/hostapd/hostapd.conf +++ b/hostapd/hostapd.conf @@ -965,6 +965,13 @@ wmm_ac_vo_acm=0 # (default) #he_6ghz_tx_ant_pat=1 +# 6 GHz Access Point type +# This config is to set the 6 GHz Access Point type. Possible options are: +# 0 = Indoor AP (default) +# 1 = Standard Power AP +# This has no impact for operation on other bands. +#he_6ghz_reg_pwr_type=0 + # Unsolicited broadcast Probe Response transmission settings # This is for the 6 GHz band only. If the interval is set to a non-zero value, # the AP schedules unsolicited broadcast Probe Response frames to be diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h index 18d1af2e5..7f44de401 100644 --- a/src/ap/ap_config.h +++ b/src/ap/ap_config.h @@ -1084,6 +1084,7 @@ struct hostapd_config { u8 he_6ghz_max_ampdu_len_exp; u8 he_6ghz_rx_ant_pat; u8 he_6ghz_tx_ant_pat; + u8 he_6ghz_reg_pwr_type; #endif /* CONFIG_IEEE80211AX */ /* VHT enable/disable config from CHAN_SWITCH */