[PATCH] hostapd: dump VHT/HE/EHT full capabilities

Janusz Dziedzic janusz.dziedzic at gmail.com
Tue Feb 27 09:17:47 PST 2024


Show full VHT/HE/EHT capablities for
connected stations.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic at gmail.com>
---
 src/ap/ctrl_iface_ap.c | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/src/ap/ctrl_iface_ap.c b/src/ap/ctrl_iface_ap.c
index 537867180..e6b2a5955 100644
--- a/src/ap/ctrl_iface_ap.c
+++ b/src/ap/ctrl_iface_ap.c
@@ -364,6 +364,26 @@ static int hostapd_ctrl_iface_sta_mib(struct hostapd_data *hapd,
 			len += ret;
 	}
 
+#ifdef CONFIG_IEEE80211AX
+	if ((sta->flags & WLAN_STA_HE) && sta->he_capab) {
+		len += os_snprintf(buf + len, buflen - len, "he_capab=");
+		len += wpa_snprintf_hex(buf + len, buflen - len,
+					(const u8 *) sta->he_capab,
+					sta->he_capab_len);
+		len += os_snprintf(buf + len, buflen - len, "\n");
+	}
+#endif /* CONFIG_IEEE80211AX */
+
+#ifdef CONFIG_IEEE80211BE
+	if ((sta->flags & WLAN_STA_EHT) && sta->eht_capab) {
+		len += os_snprintf(buf + len, buflen - len, "eht_capab=");
+		len += wpa_snprintf_hex(buf + len, buflen - len,
+					(const u8 *) sta->eht_capab,
+					sta->eht_capab_len);
+		len += os_snprintf(buf + len, buflen - len, "\n");
+	}
+#endif /* CONFIG_IEEE80211BE */
+
 #ifdef CONFIG_IEEE80211AC
 	if ((sta->flags & WLAN_STA_VHT) && sta->vht_capabilities) {
 		res = os_snprintf(buf + len, buflen - len,
@@ -372,6 +392,12 @@ static int hostapd_ctrl_iface_sta_mib(struct hostapd_data *hapd,
 					       vht_capabilities_info));
 		if (!os_snprintf_error(buflen - len, res))
 			len += res;
+
+		len += os_snprintf(buf + len, buflen - len, "vht_capab=");
+		len += wpa_snprintf_hex(buf + len, buflen - len,
+					(const u8 *) sta->vht_capabilities,
+					sizeof(*sta->vht_capabilities));
+		len += os_snprintf(buf + len, buflen - len, "\n");
 	}
 #endif /* CONFIG_IEEE80211AC */
 
-- 
2.25.1




More information about the Hostap mailing list