From 3280ce7359f081628980661afc46890bd90a71c9 Mon Sep 17 00:00:00 2001 From: Veerendranath Jakkam Date: Mon, 11 May 2020 09:33:06 +0530 Subject: Add check to consider band in determining VHT capability determineMode returning MODE_11AC capability when VHT IEs found. Thus all APs that have support for the vendor specific partial VHT support in the 2.4 GHz band were also being reported as 11AC 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 report MODE_11AC capability when operating channel is 2.4 GHz. Bug: 156571060 Test: Manual - Enabled verbose logging in NetworkDetail Class and verified that WifiMode is determined correctly for 2.4GHz APs supporting 11ax, 11ac and 11n. Test: atest com.android.server.wifi.util.InformationElementUtilTest Change-Id: Iae202a0d3116f99e9a672d7510bec9baf7c709d2 --- .../java/com/android/server/wifi/util/InformationElementUtil.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'service') diff --git a/service/java/com/android/server/wifi/util/InformationElementUtil.java b/service/java/com/android/server/wifi/util/InformationElementUtil.java index 091707a7a..0b10bf45e 100644 --- a/service/java/com/android/server/wifi/util/InformationElementUtil.java +++ b/service/java/com/android/server/wifi/util/InformationElementUtil.java @@ -1494,13 +1494,15 @@ public class InformationElementUtil { boolean foundVht, boolean foundHt, boolean foundErp) { if (foundHe) { return MODE_11AX; - } else if (foundVht) { + } else if (!ScanResult.is24GHz(frequency) && foundVht) { + // Do not include subset of VHT on 2.4 GHz vendor extension + // in consideration for reporting VHT. return MODE_11AC; } else if (foundHt) { return MODE_11N; } else if (foundErp) { return MODE_11G; - } else if (frequency < 3000) { + } else if (ScanResult.is24GHz(frequency)) { if (maxRate < 24000000) { return MODE_11B; } else { -- cgit v1.2.3