[PATCH v2, 2/2] Add hw mode config for 80211ah

JUN-KYU SHIN jk.shin at newratek.com
Mon Nov 21 17:44:18 PST 2022


hostapd_select_hw_mode
 - Modified to use channel 14 in s1g channel.

ieee80211_phy_type_by_freq
 - In case of AH mode, phy type is not set to UNSPECIFIED.

Signed-off-by: JUN-KYU SHIN <jk.shin at newratek.com>
---
 src/ap/hw_features.c           | 1 +
 src/common/ieee802_11_common.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/src/ap/hw_features.c b/src/ap/hw_features.c
index 851daf3dc..6c6538454 100644
--- a/src/ap/hw_features.c
+++ b/src/ap/hw_features.c
@@ -1088,6 +1088,7 @@ int hostapd_select_hw_mode(struct hostapd_iface *iface)
 	if ((iface->conf->hw_mode == HOSTAPD_MODE_IEEE80211G ||
 	     iface->conf->ieee80211n || iface->conf->ieee80211ac ||
 	     iface->conf->ieee80211ax || iface->conf->ieee80211be) &&
+		 iface->conf->hw_mode != HOSTAPD_MODE_IEEE80211AH &&
 	    iface->conf->channel == 14) {
 		wpa_printf(MSG_INFO, "Disable OFDM/HT/VHT/HE/EHT on channel 14");
 		iface->conf->hw_mode = HOSTAPD_MODE_IEEE80211B;
diff --git a/src/common/ieee802_11_common.c b/src/common/ieee802_11_common.c
index 924fe24f0..e047bee6a 100644
--- a/src/common/ieee802_11_common.c
+++ b/src/common/ieee802_11_common.c
@@ -2011,6 +2011,7 @@ static enum phy_type ieee80211_phy_type_by_freq(int freq)
 
 	switch (hw_mode) {
 	case HOSTAPD_MODE_IEEE80211A:
+	case HOSTAPD_MODE_IEEE80211AH:
 		return PHY_TYPE_OFDM;
 	case HOSTAPD_MODE_IEEE80211B:
 		return PHY_TYPE_HRDSSS;
-- 
2.25.1




More information about the Hostap mailing list