]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
hostapd: Dump VHT/HE/EHT full capabilities in STA command output
authorJanusz Dziedzic <janusz.dziedzic@gmail.com>
Tue, 27 Feb 2024 17:17:47 +0000 (18:17 +0100)
committerJouni Malinen <j@w1.fi>
Sun, 3 Mar 2024 18:07:41 +0000 (20:07 +0200)
Show full VHT/HE/EHT capabilities for connected stations.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
src/ap/ctrl_iface_ap.c

index c39713c3725d5894b9b0dda30045be45c4b4ed9a..e65c3c4b27490f042b38d385eac680d07cbe73f7 100644 (file)
@@ -368,6 +368,34 @@ 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) {
+               res = os_snprintf(buf + len, buflen - len, "he_capab=");
+               if (!os_snprintf_error(buflen - len, res))
+                       len += res;
+               len += wpa_snprintf_hex(buf + len, buflen - len,
+                                       (const u8 *) sta->he_capab,
+                                       sta->he_capab_len);
+               res = os_snprintf(buf + len, buflen - len, "\n");
+               if (!os_snprintf_error(buflen - len, res))
+                       len += res;
+       }
+#endif /* CONFIG_IEEE80211AX */
+
+#ifdef CONFIG_IEEE80211BE
+       if ((sta->flags & WLAN_STA_EHT) && sta->eht_capab) {
+               res = os_snprintf(buf + len, buflen - len, "eht_capab=");
+               if (!os_snprintf_error(buflen - len, res))
+                       len += res;
+               len += wpa_snprintf_hex(buf + len, buflen - len,
+                                       (const u8 *) sta->eht_capab,
+                                       sta->eht_capab_len);
+               res = os_snprintf(buf + len, buflen - len, "\n");
+               if (!os_snprintf_error(buflen - len, res))
+                       len += res;
+       }
+#endif /* CONFIG_IEEE80211BE */
+
 #ifdef CONFIG_IEEE80211AC
        if ((sta->flags & WLAN_STA_VHT) && sta->vht_capabilities) {
                res = os_snprintf(buf + len, buflen - len,
@@ -376,6 +404,16 @@ static int hostapd_ctrl_iface_sta_mib(struct hostapd_data *hapd,
                                               vht_capabilities_info));
                if (!os_snprintf_error(buflen - len, res))
                        len += res;
+
+               res = os_snprintf(buf + len, buflen - len, "vht_capab=");
+               if (!os_snprintf_error(buflen - len, res))
+                       len += res;
+               len += wpa_snprintf_hex(buf + len, buflen - len,
+                                       (const u8 *) sta->vht_capabilities,
+                                       sizeof(*sta->vht_capabilities));
+               res = os_snprintf(buf + len, buflen - len, "\n");
+               if (!os_snprintf_error(buflen - len, res))
+                       len += res;
        }
 #endif /* CONFIG_IEEE80211AC */