diff options
author | 2025-02-05 13:24:20 -0800 | |
---|---|---|
committer | 2025-02-05 13:24:20 -0800 | |
commit | 32a8b6b9dddc0411681e0aa6d38f096789a04b94 (patch) | |
tree | dff8f5d6e3838dd519b70261fad11e950936bf29 /framework/java | |
parent | efe359a1abf2b0317d82f0b0aa3fea6a7d115b38 (diff) | |
parent | 5eec0acd38359b809ff2ec5684aefc9761cf61d2 (diff) |
Merge "Fix RTT preamble based on band and RTT type" into main
Diffstat (limited to 'framework/java')
-rw-r--r-- | framework/java/android/net/wifi/rtt/ResponderConfig.java | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/framework/java/android/net/wifi/rtt/ResponderConfig.java b/framework/java/android/net/wifi/rtt/ResponderConfig.java index 213c8ed801..5b4f2da08a 100644 --- a/framework/java/android/net/wifi/rtt/ResponderConfig.java +++ b/framework/java/android/net/wifi/rtt/ResponderConfig.java @@ -439,6 +439,10 @@ public final class ResponderConfig implements Parcelable { int centerFreq1 = scanResult.centerFreq1; int preamble; + // The IEEE 802.11mc is only compatible with HE and EHT when using the 6 GHz band. + // However, the IEEE 802.11az supports HE and EHT across all Wi-Fi bands (2.4GHz, 5 GHz, + // and 6 GHz). + boolean isHeOrEhtAllowed = supports80211azNtbRanging || ScanResult.is6GHz(frequency); if (scanResult.informationElements != null && scanResult.informationElements.length != 0) { boolean htCapabilitiesPresent = false; boolean vhtCapabilitiesPresent = false; @@ -457,9 +461,9 @@ public final class ResponderConfig implements Parcelable { } } - if (ehtCapabilitiesPresent && ScanResult.is6GHz(frequency)) { + if (ehtCapabilitiesPresent && isHeOrEhtAllowed) { preamble = ScanResult.PREAMBLE_EHT; - } else if (heCapabilitiesPresent && ScanResult.is6GHz(frequency)) { + } else if (heCapabilitiesPresent && isHeOrEhtAllowed) { preamble = ScanResult.PREAMBLE_HE; } else if (vhtCapabilitiesPresent) { preamble = ScanResult.PREAMBLE_VHT; @@ -470,9 +474,10 @@ public final class ResponderConfig implements Parcelable { } } else { Log.e(TAG, "Scan Results do not contain IEs - using backup method to select preamble"); - if (channelWidth == ScanResult.CHANNEL_WIDTH_320MHZ) { + if (channelWidth == ScanResult.CHANNEL_WIDTH_320MHZ && isHeOrEhtAllowed) { preamble = ScanResult.PREAMBLE_EHT; - } else if (channelWidth == ScanResult.CHANNEL_WIDTH_80MHZ + } else if (channelWidth == ScanResult.CHANNEL_WIDTH_320MHZ + || channelWidth == ScanResult.CHANNEL_WIDTH_80MHZ || channelWidth == ScanResult.CHANNEL_WIDTH_160MHZ) { preamble = ScanResult.PREAMBLE_VHT; } else { |