mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-17 17:31:27 +00:00
74 lines
2.3 KiB
Diff
74 lines
2.3 KiB
Diff
From 6ab1c08908767246cf0550787adb75371ab00c96 Mon Sep 17 00:00:00 2001
|
|
From: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
|
|
Date: Tue, 2 Mar 2021 23:03:03 -0800
|
|
Subject: [PATCH 3/4] hostapd: add config option to specify 6Ghz AP type
|
|
|
|
IEEE P802.11ax/D7.0 introduces Regulatory info subfield which
|
|
is interpreted to 6Ghz ap type.
|
|
|
|
When not specified, Indoor AP type is selected for 6GHz AP by
|
|
default.
|
|
|
|
Signed-off-by: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
|
|
---
|
|
hostapd/config_file.c | 2 ++
|
|
hostapd/hostapd.conf | 7 +++++++
|
|
src/ap/ap_config.h | 12 ++++++++++++
|
|
3 files changed, 21 insertions(+)
|
|
|
|
--- a/hostapd/config_file.c
|
|
+++ b/hostapd/config_file.c
|
|
@@ -3535,6 +3535,8 @@ static int hostapd_config_fill(struct ho
|
|
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) {
|
|
--- a/hostapd/hostapd.conf
|
|
+++ b/hostapd/hostapd.conf
|
|
@@ -583,6 +583,13 @@ wmm_ac_vo_acm=0
|
|
# Enable co-locate for a 6GHz radio
|
|
#co_locate=0
|
|
|
|
+# 6GHz regulatory AP type
|
|
+# This config is to set 6GHz access point type. Possible options
|
|
+# are 0 = Indoor AP, 1 = Standard Power AP
|
|
+# If not specified Indoor AP is selected by default.
|
|
+# option is no operation for non 6GHz band.
|
|
+#he_6ghz_reg_pwr_type=0
|
|
+
|
|
##### IEEE 802.11n related configuration ######################################
|
|
|
|
# ieee80211n: Whether IEEE 802.11n (HT) is enabled
|
|
--- a/src/ap/ap_config.h
|
|
+++ b/src/ap/ap_config.h
|
|
@@ -1081,6 +1081,9 @@ struct hostapd_config {
|
|
u8 he_6ghz_rx_ant_pat;
|
|
u8 he_6ghz_tx_ant_pat;
|
|
bool he_co_locate;
|
|
+#define AP_TYPE_6GHZ_INDOOR_AP 0
|
|
+#define AP_TYPE_6GHZ_STANDARD_POWER_AP 1
|
|
+ u8 he_6ghz_reg_pwr_type;
|
|
#endif /* CONFIG_IEEE80211AX */
|
|
|
|
/* VHT enable/disable config from CHAN_SWITCH */
|
|
@@ -1110,6 +1113,15 @@ struct hostapd_config {
|
|
#endif /* CONFIG_AIRTIME_POLICY */
|
|
};
|
|
|
|
+static inline u8 hostapd_get_he_6ghz_reg_pwr_type(struct hostapd_config *conf)
|
|
+{
|
|
+#ifdef CONFIG_IEEE80211AX
|
|
+ if (conf->ieee80211ax)
|
|
+ return conf->he_6ghz_reg_pwr_type;
|
|
+#endif /* CONFIG_IEEE80211AX */
|
|
+ return 0;
|
|
+}
|
|
+
|
|
|
|
static inline u8 hostapd_get_oper_chwidth(struct hostapd_config *conf)
|
|
{
|