diff mbox series

[v2,1/2] HE: add 11ax info to ctrl iface status

Message ID 1571252259-25443-1-git-send-email-pradeepc@codeaurora.org
State Accepted
Headers show
Series [v2,1/2] HE: add 11ax info to ctrl iface status | expand

Commit Message

Pradeep Kumar Chitrapu Oct. 16, 2019, 6:57 p.m. UTC
Signed-off-by: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
---
 src/ap/ctrl_iface_ap.c | 14 ++++++++++++++
 src/ap/sta_info.c      |  3 ++-
 2 files changed, 16 insertions(+), 1 deletion(-)

Comments

Jouni Malinen Oct. 25, 2019, 4:54 p.m. UTC | #1
Thanks, both patches applied.

On Wed, Oct 16, 2019 at 11:57:38AM -0700, Pradeep Kumar Chitrapu wrote:
> diff --git a/src/ap/ctrl_iface_ap.c b/src/ap/ctrl_iface_ap.c
> @@ -731,6 +731,20 @@ int hostapd_ctrl_iface_status(struct hostapd_data *hapd, char *buf,
>  	if (os_snprintf_error(buflen - len, ret))
>  		return len;
>  	len += ret;
> +	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,

With a fix here to avoid breaking the build without CONFIG_IEEE80211AX.
diff mbox series

Patch

diff --git a/src/ap/ctrl_iface_ap.c b/src/ap/ctrl_iface_ap.c
index 676a4c7835f3..5ece4ae3b392 100644
--- a/src/ap/ctrl_iface_ap.c
+++ b/src/ap/ctrl_iface_ap.c
@@ -731,6 +731,20 @@  int hostapd_ctrl_iface_status(struct hostapd_data *hapd, char *buf,
 	if (os_snprintf_error(buflen - len, ret))
 		return len;
 	len += ret;
+	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;
+	}
+
+
 	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 d7734ee64606..cbb8752ea681 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]" : ""));