From adf3de44ca717cb8faa852d481edbd54b0c3cb16 Mon Sep 17 00:00:00 2001 From: Veerendranath Jakkam Date: Tue, 11 Feb 2020 01:04:33 +0530 Subject: [PATCH] Add check to consider band in enabling connection_vht flag connection_vht flag was set to true when both Association Request and Response frame IEs have VHT capability. Thus all devices that have support for the vendor specific partial VHT support in the 2.4 GHz band were also being reported as VHT capable. However, IEEE Std 802.11ac-2013 defines VHT STA to operate in frequency bands below 6 GHz excluding the 2.4 GHz band. Do not set connection_vht when the operating band is 2.4 GHz. This avoids reporting wifi_generation 5 on the 2.4 GHz band and reserves the generation value 5 for full VHT as defined in the IEEE 802.11 standard. Signed-off-by: Veerendranath Jakkam --- wpa_supplicant/events.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index ba03d9f1f..e3fce8f72 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -2567,8 +2567,14 @@ static int wpa_supplicant_event_associnfo(struct wpa_supplicant *wpa_s, wpa_s->connection_set = 1; wpa_s->connection_ht = req_elems.ht_capabilities && resp_elems.ht_capabilities; + /* Do not include subset of VHT on 2.4 GHz vendor + * extension in consideration for reporting VHT + * association. */ wpa_s->connection_vht = req_elems.vht_capabilities && - resp_elems.vht_capabilities; + resp_elems.vht_capabilities && + (!data->assoc_info.freq || + wpas_freq_to_band(data->assoc_info.freq) != + BAND_2_4_GHZ); wpa_s->connection_he = req_elems.he_capabilities && resp_elems.he_capabilities; }