summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--api/system-current.txt1
-rw-r--r--wifi/java/android/net/wifi/ScanResult.java1
-rw-r--r--wifi/java/android/net/wifi/rtt/ResponderConfig.java17
3 files changed, 17 insertions, 2 deletions
diff --git a/api/system-current.txt b/api/system-current.txt
index 6258b33fa626..d5a4d347e2dd 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -5131,6 +5131,7 @@ package android.net.wifi.rtt {
field public static final int CHANNEL_WIDTH_80MHZ = 2; // 0x2
field public static final int CHANNEL_WIDTH_80MHZ_PLUS_MHZ = 4; // 0x4
field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.rtt.ResponderConfig> CREATOR;
+ field public static final int PREAMBLE_HE = 3; // 0x3
field public static final int PREAMBLE_HT = 1; // 0x1
field public static final int PREAMBLE_LEGACY = 0; // 0x0
field public static final int PREAMBLE_VHT = 2; // 0x2
diff --git a/wifi/java/android/net/wifi/ScanResult.java b/wifi/java/android/net/wifi/ScanResult.java
index aa895a61df9b..ed1a2f9f16ca 100644
--- a/wifi/java/android/net/wifi/ScanResult.java
+++ b/wifi/java/android/net/wifi/ScanResult.java
@@ -549,6 +549,7 @@ public class ScanResult implements Parcelable {
/**
* Extension IDs
*/
+ public static final int EID_EXT_HE_CAPABILITIES = 35;
public static final int EID_EXT_HE_OPERATION = 36;
@UnsupportedAppUsage
diff --git a/wifi/java/android/net/wifi/rtt/ResponderConfig.java b/wifi/java/android/net/wifi/rtt/ResponderConfig.java
index 64dfc3499aaf..be4eeccd0c31 100644
--- a/wifi/java/android/net/wifi/rtt/ResponderConfig.java
+++ b/wifi/java/android/net/wifi/rtt/ResponderConfig.java
@@ -16,6 +16,8 @@
package android.net.wifi.rtt;
+import static android.net.wifi.ScanResult.InformationElement.EID_EXTENSION_PRESENT;
+import static android.net.wifi.ScanResult.InformationElement.EID_EXT_HE_CAPABILITIES;
import static android.net.wifi.ScanResult.InformationElement.EID_HT_CAPABILITIES;
import static android.net.wifi.ScanResult.InformationElement.EID_VHT_CAPABILITIES;
@@ -106,7 +108,7 @@ public final class ResponderConfig implements Parcelable {
public static final int CHANNEL_WIDTH_80MHZ_PLUS_MHZ = 4;
/** @hide */
- @IntDef({PREAMBLE_LEGACY, PREAMBLE_HT, PREAMBLE_VHT})
+ @IntDef({PREAMBLE_LEGACY, PREAMBLE_HT, PREAMBLE_VHT, PREAMBLE_HE})
@Retention(RetentionPolicy.SOURCE)
public @interface PreambleType {
}
@@ -126,6 +128,10 @@ public final class ResponderConfig implements Parcelable {
*/
public static final int PREAMBLE_VHT = 2;
+ /**
+ * Preamble type: HE.
+ */
+ public static final int PREAMBLE_HE = 3;
/**
* The MAC address of the Responder. Will be null if a Wi-Fi Aware peer identifier (the
@@ -307,14 +313,21 @@ public final class ResponderConfig implements Parcelable {
if (scanResult.informationElements != null && scanResult.informationElements.length != 0) {
boolean htCapabilitiesPresent = false;
boolean vhtCapabilitiesPresent = false;
+ boolean heCapabilitiesPresent = false;
+
for (ScanResult.InformationElement ie : scanResult.informationElements) {
if (ie.id == EID_HT_CAPABILITIES) {
htCapabilitiesPresent = true;
} else if (ie.id == EID_VHT_CAPABILITIES) {
vhtCapabilitiesPresent = true;
+ } else if (ie.id == EID_EXTENSION_PRESENT && ie.idExt == EID_EXT_HE_CAPABILITIES) {
+ heCapabilitiesPresent = true;
}
}
- if (vhtCapabilitiesPresent) {
+
+ if (heCapabilitiesPresent) {
+ preamble = PREAMBLE_HE;
+ } else if (vhtCapabilitiesPresent) {
preamble = PREAMBLE_VHT;
} else if (htCapabilitiesPresent) {
preamble = PREAMBLE_HT;