Skip to content
Snippets Groups Projects
Commit 7331b6ae authored by Janusz Dziedzic's avatar Janusz Dziedzic
Browse files

hostapd: dump VHT/HE/EHT capabilities


Signed-off-by: default avatarJanusz Dziedzic <janusz.dziedzic@iopsys.eu>
parent 6d237fbc
No related branches found
No related tags found
1 merge request!535hostapd: dump VHT/HE/EHT capabilities
From 06a196bcf9d9b6dee1f1a64096c87425ad03496f Mon Sep 17 00:00:00 2001
From: Janusz Dziedzic <janusz.dziedzic@gmail.com>
Date: Tue, 27 Feb 2024 13:37:56 +0100
Subject: [PATCH] hostapd: dump VHT/HE/EHT full capabilities
Show full VHT/HE/EHT capablities for
connected stations.
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment