[PATCH] Add support for HE PHY type in neighbor reports

Trevor North trevor at freedisc.co.uk
Sat Jan 17 03:31:48 PST 2026


Add support for HE PHY type in neighbor reports as defined in
IEEE Std 802.11-2024 dot11PHYType.

To the best of my understanding this is the intended behaviour and I
have observed no adverse effects with the clients I have available in my
environment. I must caveat however that I am far from a subject matter
expert and most of my clients are modern.

Signed-off-by: Trevor North <trevor at freedisc.co.uk>
---
 src/ap/neighbor_db.c           | 2 +-
 src/common/ieee802_11_common.c | 4 +++-
 src/common/ieee802_11_common.h | 2 +-
 src/common/ieee802_11_defs.h   | 1 +
 wpa_supplicant/rrm.c           | 4 +++-
 wpa_supplicant/wnm_sta.c       | 4 +++-
 6 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/src/ap/neighbor_db.c b/src/ap/neighbor_db.c
index 0239ec259..ca651da18 100644
--- a/src/ap/neighbor_db.c
+++ b/src/ap/neighbor_db.c
@@ -310,7 +310,7 @@ void hostapd_neighbor_set_own_report(struct hostapd_data *hapd)
 	wpabuf_put_le32(nr, bssid_info);
 	wpabuf_put_u8(nr, op_class);
 	wpabuf_put_u8(nr, channel);
-	wpabuf_put_u8(nr, ieee80211_get_phy_type(hapd->iface->freq, ht, vht));
+	wpabuf_put_u8(nr, ieee80211_get_phy_type(hapd->iface->freq, ht, vht, he));
 
 	/*
 	 * Wide Bandwidth Channel subelement may be needed to allow the
diff --git a/src/common/ieee802_11_common.c b/src/common/ieee802_11_common.c
index 5d1e02f81..61fd6134b 100644
--- a/src/common/ieee802_11_common.c
+++ b/src/common/ieee802_11_common.c
@@ -2528,8 +2528,10 @@ static enum phy_type ieee80211_phy_type_by_freq(int freq)
 
 
 /* ieee80211_get_phy_type - Derive the phy type by freq and bandwidth */
-enum phy_type ieee80211_get_phy_type(int freq, int ht, int vht)
+enum phy_type ieee80211_get_phy_type(int freq, int ht, int vht, int he)
 {
+	if (he)
+		return PHY_TYPE_HE;
 	if (vht)
 		return PHY_TYPE_VHT;
 	if (ht)
diff --git a/src/common/ieee802_11_common.h b/src/common/ieee802_11_common.h
index 09bd0675a..d869bec24 100644
--- a/src/common/ieee802_11_common.h
+++ b/src/common/ieee802_11_common.h
@@ -257,7 +257,7 @@ int ieee80211_is_dfs(int freq, const struct hostapd_hw_modes *modes,
 		     u16 num_modes);
 int is_dfs_global_op_class(u8 op_class);
 bool is_80plus_op_class(u8 op_class);
-enum phy_type ieee80211_get_phy_type(int freq, int ht, int vht);
+enum phy_type ieee80211_get_phy_type(int freq, int ht, int vht, int he);
 
 int supp_rates_11b_only(struct ieee802_11_elems *elems);
 int mb_ies_info_by_ies(struct mb_ies_info *info, const u8 *ies_buf,
diff --git a/src/common/ieee802_11_defs.h b/src/common/ieee802_11_defs.h
index 89f0a1bf8..03399e0f3 100644
--- a/src/common/ieee802_11_defs.h
+++ b/src/common/ieee802_11_defs.h
@@ -2411,6 +2411,7 @@ enum phy_type {
 	PHY_TYPE_S1G = 11,
 	PHY_TYPE_CDMG = 12,
 	PHY_TYPE_CMMG = 13,
+	PHY_TYPE_HE = 14,
 };
 
 /* IEEE Std 802.11-2024, 9.4.2.35 - Neighbor Report element */
diff --git a/wpa_supplicant/rrm.c b/wpa_supplicant/rrm.c
index 74f190e34..dabbf8cfa 100644
--- a/wpa_supplicant/rrm.c
+++ b/wpa_supplicant/rrm.c
@@ -805,8 +805,10 @@ int wpas_get_op_chan_phy(int freq, const u8 *ies, size_t ies_len,
 		return -1;
 	}
 
+	int he = get_ie_ext(ies, ies_len, WLAN_EID_EXT_HE_OPERATION) != NULL;
+
 	*phy_type = ieee80211_get_phy_type(freq, ht_oper != NULL,
-					   vht_oper != NULL);
+					   vht_oper != NULL, he);
 	if (*phy_type == PHY_TYPE_UNSPECIFIED) {
 		wpa_printf(MSG_DEBUG, "Cannot determine phy type");
 		return -1;
diff --git a/wpa_supplicant/wnm_sta.c b/wpa_supplicant/wnm_sta.c
index a09f47620..07b59b198 100644
--- a/wpa_supplicant/wnm_sta.c
+++ b/wpa_supplicant/wnm_sta.c
@@ -926,8 +926,10 @@ static int wnm_nei_rep_add_bss(struct wpa_supplicant *wpa_s,
 		return -2;
 	}
 
+	int he = wpa_bss_get_ie_ext(bss, WLAN_EID_EXT_HE_OPERATION) != NULL;
+
 	phy_type = ieee80211_get_phy_type(bss->freq, (ht_oper != NULL),
-					  (vht_oper != NULL));
+					  (vht_oper != NULL), he);
 	if (phy_type == PHY_TYPE_UNSPECIFIED) {
 		wpa_printf(MSG_DEBUG,
 			   "WNM: Cannot determine BSS phy type for Neighbor Report");
-- 
2.52.0




More information about the Hostap mailing list