From 696ad5c2d70b91d460c3beb05cf183cdac84afb9 Mon Sep 17 00:00:00 2001 From: Veerendranath Jakkam Date: Wed, 4 May 2022 00:34:47 +0530 Subject: [PATCH] EHT: Indicate wifi_generation=7 in wpa_supplicant STATUS output This adds wifi_generation=7 line to the STATUS output if the driver reports (Re)Association Request frame and (Re)Association Response frame information elements in the association or connection event with EHT capability IEs. Signed-off-by: Veerendranath Jakkam --- wpa_supplicant/ctrl_iface.c | 7 ++++--- wpa_supplicant/events.c | 2 ++ wpa_supplicant/wpa_supplicant_i.h | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index 70538b578..4f9aa667a 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -2312,11 +2312,12 @@ static int wpa_supplicant_ctrl_iface_status(struct wpa_supplicant *wpa_s, if (wpa_s->connection_set && (wpa_s->connection_ht || wpa_s->connection_vht || - wpa_s->connection_he)) { + wpa_s->connection_he || wpa_s->connection_eht)) { ret = os_snprintf(pos, end - pos, "wifi_generation=%u\n", - wpa_s->connection_he ? 6 : - (wpa_s->connection_vht ? 5 : 4)); + wpa_s->connection_eht ? 7 : + (wpa_s->connection_he ? 6 : + (wpa_s->connection_vht ? 5 : 4))); if (os_snprintf_error(end - pos, ret)) return pos - buf; pos += ret; diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index 81f4a5f43..0ce3d8fb0 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -2997,6 +2997,8 @@ static int wpa_supplicant_event_associnfo(struct wpa_supplicant *wpa_s, BAND_2_4_GHZ); wpa_s->connection_he = req_elems.he_capabilities && resp_elems.he_capabilities; + wpa_s->connection_eht = req_elems.eht_capabilities && + resp_elems.eht_capabilities; } } diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h index 0ba352fcb..504660e87 100644 --- a/wpa_supplicant/wpa_supplicant_i.h +++ b/wpa_supplicant/wpa_supplicant_i.h @@ -961,6 +961,7 @@ struct wpa_supplicant { unsigned int connection_ht:1; unsigned int connection_vht:1; unsigned int connection_he:1; + unsigned int connection_eht:1; unsigned int disable_mbo_oce:1; struct os_reltime last_mac_addr_change;