From 327d09aa03e7ab87a8261d75112fab08ba58d2d8 Mon Sep 17 00:00:00 2001 From: Pradeep Kumar Chitrapu Date: Wed, 16 Oct 2019 11:57:38 -0700 Subject: [PATCH] HE: Add 11ax info to ap mode ctrl iface STATUS command Signed-off-by: Pradeep Kumar Chitrapu --- src/ap/ctrl_iface_ap.c | 16 ++++++++++++++++ src/ap/sta_info.c | 3 ++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/ap/ctrl_iface_ap.c b/src/ap/ctrl_iface_ap.c index 676a4c783..bde61ee26 100644 --- a/src/ap/ctrl_iface_ap.c +++ b/src/ap/ctrl_iface_ap.c @@ -731,6 +731,22 @@ int hostapd_ctrl_iface_status(struct hostapd_data *hapd, char *buf, if (os_snprintf_error(buflen - len, ret)) return len; len += ret; + +#ifdef CONFIG_IEEE80211AX + if (iface->conf->ieee80211ax) { + ret = os_snprintf(buf + len, buflen - len, + "he_oper_chwidth=%d\n" + "he_oper_centr_freq_seg0_idx=%d\n" + "he_oper_centr_freq_seg1_idx=%d\n", + iface->conf->he_oper_chwidth, + iface->conf->he_oper_centr_freq_seg0_idx, + iface->conf->he_oper_centr_freq_seg1_idx); + if (os_snprintf_error(buflen - len, ret)) + return len; + len += ret; + } +#endif /* CONFIG_IEEE80211AX */ + if (iface->conf->ieee80211ac && !hapd->conf->disable_11ac) { ret = os_snprintf(buf + len, buflen - len, "vht_oper_chwidth=%d\n" diff --git a/src/ap/sta_info.c b/src/ap/sta_info.c index d7734ee64..cbb8752ea 100644 --- a/src/ap/sta_info.c +++ b/src/ap/sta_info.c @@ -1406,7 +1406,7 @@ int ap_sta_flags_txt(u32 flags, char *buf, size_t buflen) int res; buf[0] = '\0'; - res = os_snprintf(buf, buflen, "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", + res = os_snprintf(buf, buflen, "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", (flags & WLAN_STA_AUTH ? "[AUTH]" : ""), (flags & WLAN_STA_ASSOC ? "[ASSOC]" : ""), (flags & WLAN_STA_AUTHORIZED ? "[AUTHORIZED]" : ""), @@ -1425,6 +1425,7 @@ int ap_sta_flags_txt(u32 flags, char *buf, size_t buflen) (flags & WLAN_STA_GAS ? "[GAS]" : ""), (flags & WLAN_STA_HT ? "[HT]" : ""), (flags & WLAN_STA_VHT ? "[VHT]" : ""), + (flags & WLAN_STA_HE ? "[HE]" : ""), (flags & WLAN_STA_VENDOR_VHT ? "[VENDOR_VHT]" : ""), (flags & WLAN_STA_WNM_SLEEP_MODE ? "[WNM_SLEEP_MODE]" : ""));