Merge "Add Display ID when Getting Display State" into udc-dev
diff --git a/automotive/vehicle/2.0/types.hal b/automotive/vehicle/2.0/types.hal
index 00d0452..d75b046 100644
--- a/automotive/vehicle/2.0/types.hal
+++ b/automotive/vehicle/2.0/types.hal
@@ -1810,11 +1810,11 @@
*
* This parameter selects the memory preset to use to select the seat
* position. The minValue is always 0, and the maxValue determines the
- * number of seat positions available.
+ * number of seat positions available (i.e. numSeatPositions - 1).
*
* For instance, if the driver's seat has 3 memory presets, the maxValue
- * will be 3. When the user wants to select a preset, the desired preset
- * number (1, 2, or 3) is set.
+ * will be 2. When the user wants to select a preset, the desired preset
+ * number (0, 1, or 2) is set.
*
* @change_mode VehiclePropertyChangeMode:ON_CHANGE
* @access VehiclePropertyAccess:WRITE
diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl
index cd1f294..9c67650 100644
--- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl
+++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl
@@ -407,6 +407,10 @@
* all energy sources in a vehicle. For example, a hybrid car's range will
* be the sum of the ranges based on fuel and battery.
*
+ * This property may be writable because a navigation app could update the range if it has a
+ * more accurate estimate based on the upcoming route. However, this property can be set to
+ * VehiclePropertyAccess.READ only at the OEM's discretion.
+ *
* @change_mode VehiclePropertyChangeMode.CONTINUOUS
* @access VehiclePropertyAccess.READ_WRITE
* @unit VehicleUnit:METER
@@ -1596,11 +1600,11 @@
*
* This parameter selects the memory preset to use to select the seat
* position. The minValue is always 0, and the maxValue determines the
- * number of seat positions available.
+ * number of seat preset memory slots available (i.e. numSeatPresets - 1).
*
* For instance, if the driver's seat has 3 memory presets, the maxValue
- * will be 3. When the user wants to select a preset, the desired preset
- * number (1, 2, or 3) is set.
+ * will be 2. When the user wants to select a preset, the desired preset
+ * number (0, 1, or 2) is set.
*
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
* @access VehiclePropertyAccess.WRITE
diff --git a/camera/device/aidl/aidl_api/android.hardware.camera.device/current/android/hardware/camera/device/CameraBlobId.aidl b/camera/device/aidl/aidl_api/android.hardware.camera.device/current/android/hardware/camera/device/CameraBlobId.aidl
index 632499d..24083ad 100644
--- a/camera/device/aidl/aidl_api/android.hardware.camera.device/current/android/hardware/camera/device/CameraBlobId.aidl
+++ b/camera/device/aidl/aidl_api/android.hardware.camera.device/current/android/hardware/camera/device/CameraBlobId.aidl
@@ -34,6 +34,6 @@
package android.hardware.camera.device;
@Backing(type="int") @VintfStability
enum CameraBlobId {
- JPEG = 255,
- JPEG_APP_SEGMENTS = 256,
+ JPEG = 0x00FF,
+ JPEG_APP_SEGMENTS = 0x100,
}
diff --git a/camera/device/aidl/aidl_api/android.hardware.camera.device/current/android/hardware/camera/device/RequestTemplate.aidl b/camera/device/aidl/aidl_api/android.hardware.camera.device/current/android/hardware/camera/device/RequestTemplate.aidl
index b70b899..1f87aa3 100644
--- a/camera/device/aidl/aidl_api/android.hardware.camera.device/current/android/hardware/camera/device/RequestTemplate.aidl
+++ b/camera/device/aidl/aidl_api/android.hardware.camera.device/current/android/hardware/camera/device/RequestTemplate.aidl
@@ -40,5 +40,5 @@
VIDEO_SNAPSHOT = 4,
ZERO_SHUTTER_LAG = 5,
MANUAL = 6,
- VENDOR_TEMPLATE_START = 1073741824,
+ VENDOR_TEMPLATE_START = 0x40000000,
}
diff --git a/camera/device/aidl/aidl_api/android.hardware.camera.device/current/android/hardware/camera/device/StreamConfiguration.aidl b/camera/device/aidl/aidl_api/android.hardware.camera.device/current/android/hardware/camera/device/StreamConfiguration.aidl
index f340578..97fd067 100644
--- a/camera/device/aidl/aidl_api/android.hardware.camera.device/current/android/hardware/camera/device/StreamConfiguration.aidl
+++ b/camera/device/aidl/aidl_api/android.hardware.camera.device/current/android/hardware/camera/device/StreamConfiguration.aidl
@@ -39,4 +39,5 @@
android.hardware.camera.device.CameraMetadata sessionParams;
int streamConfigCounter;
boolean multiResolutionInputImage;
+ long logId = 0;
}
diff --git a/camera/device/aidl/aidl_api/android.hardware.camera.device/current/android/hardware/camera/device/StreamConfigurationMode.aidl b/camera/device/aidl/aidl_api/android.hardware.camera.device/current/android/hardware/camera/device/StreamConfigurationMode.aidl
index bdef412..ef7ec25 100644
--- a/camera/device/aidl/aidl_api/android.hardware.camera.device/current/android/hardware/camera/device/StreamConfigurationMode.aidl
+++ b/camera/device/aidl/aidl_api/android.hardware.camera.device/current/android/hardware/camera/device/StreamConfigurationMode.aidl
@@ -36,12 +36,12 @@
enum StreamConfigurationMode {
NORMAL_MODE = 0,
CONSTRAINED_HIGH_SPEED_MODE = 1,
- VENDOR_MODE_0 = 32768,
- VENDOR_MODE_1 = 32769,
- VENDOR_MODE_2 = 32770,
- VENDOR_MODE_3 = 32771,
- VENDOR_MODE_4 = 32772,
- VENDOR_MODE_5 = 32773,
- VENDOR_MODE_6 = 32774,
- VENDOR_MODE_7 = 32775,
+ VENDOR_MODE_0 = 0x8000,
+ VENDOR_MODE_1,
+ VENDOR_MODE_2,
+ VENDOR_MODE_3,
+ VENDOR_MODE_4,
+ VENDOR_MODE_5,
+ VENDOR_MODE_6,
+ VENDOR_MODE_7,
}
diff --git a/camera/device/aidl/android/hardware/camera/device/StreamConfiguration.aidl b/camera/device/aidl/android/hardware/camera/device/StreamConfiguration.aidl
index cacd32c..197d9af 100644
--- a/camera/device/aidl/android/hardware/camera/device/StreamConfiguration.aidl
+++ b/camera/device/aidl/android/hardware/camera/device/StreamConfiguration.aidl
@@ -62,7 +62,7 @@
*/
CameraMetadata sessionParams;
- /**
+ /**
* An incrementing counter used for HAL to keep track of the stream
* configuration and the paired oneway signalStreamFlush call. When the
* counter in signalStreamFlush call is less than the counter here, that
@@ -83,4 +83,13 @@
* any one of the supported multi-resolution input stream sizes.
*/
boolean multiResolutionInputImage;
+
+ /**
+ * Logging identifier to join HAL logs to logs collected by cameraservice. This field has no
+ * functional purpose.
+ *
+ * See documentation of 'mLogId' in frameworks/av/camera/include/camera/CameraSessionStats.h
+ * for specifics of this identifier and how it can be used to join with cameraservice logs.
+ */
+ long logId = 0;
}
diff --git a/current.txt b/current.txt
index c40f9ea..a6c4d80 100644
--- a/current.txt
+++ b/current.txt
@@ -936,5 +936,6 @@
a2fbd9747fbb9ceb8c1090b5a24138312246502d5af0654a8c2b603a9bf521fc android.hardware.gnss@1.0::IGnssCallback
889b59e3e7a59afa67bf19882a44f51a2f9e43b6556ec52baa9ec3efd1ef7fbe android.hardware.camera.device@3.2::types
db37a1c757e2e69b1ec9c75a981a6987bd87a131d92ab6acc00e04d19f374281 android.hardware.automotive.vehicle@2.0::types
+997017f581406fca1675d2f612f7ccd73f0d04eadd54bf6212e6cf5971d0872d android.hardware.automotive.vehicle@2.0::types
# There will be no more HIDL HALs. Use AIDL instead.
diff --git a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp
index 1dec8d7..5e27bd0 100644
--- a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp
+++ b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp
@@ -1292,6 +1292,19 @@
return retval;
}
+
+bool KeyMintAidlTestBase::IsRkpSupportRequired() const {
+ if (get_vsr_api_level() >= __ANDROID_API_T__) {
+ return true;
+ }
+
+ if (get_vsr_api_level() >= __ANDROID_API_S__) {
+ return SecLevel() != SecurityLevel::STRONGBOX;
+ }
+
+ return false;
+}
+
vector<uint32_t> KeyMintAidlTestBase::ValidKeySizes(Algorithm algorithm) {
switch (algorithm) {
case Algorithm::RSA:
diff --git a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.h b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.h
index 3c753d1..3245ca9 100644
--- a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.h
+++ b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.h
@@ -309,6 +309,7 @@
}
bool IsSecure() const { return securityLevel_ != SecurityLevel::SOFTWARE; }
SecurityLevel SecLevel() const { return securityLevel_; }
+ bool IsRkpSupportRequired() const;
vector<uint32_t> ValidKeySizes(Algorithm algorithm);
vector<uint32_t> InvalidKeySizes(Algorithm algorithm);
diff --git a/security/keymint/aidl/vts/functional/KeyMintTest.cpp b/security/keymint/aidl/vts/functional/KeyMintTest.cpp
index 9e66f08..c6b8906 100644
--- a/security/keymint/aidl/vts/functional/KeyMintTest.cpp
+++ b/security/keymint/aidl/vts/functional/KeyMintTest.cpp
@@ -1136,8 +1136,8 @@
* that has been generated using an associate IRemotelyProvisionedComponent.
*/
TEST_P(NewKeyGenerationTest, RsaWithRkpAttestation) {
- if (get_vsr_api_level() < __ANDROID_API_T__ || AidlVersion() < 2) {
- GTEST_SKIP() << "Only required for VSR 12+ and KeyMint 2+";
+ if (!IsRkpSupportRequired()) {
+ GTEST_SKIP() << "RKP support is not required on this platform";
}
// There should be an IRemotelyProvisionedComponent instance associated with the KeyMint
@@ -1214,8 +1214,8 @@
* that has been generated using an associate IRemotelyProvisionedComponent.
*/
TEST_P(NewKeyGenerationTest, EcdsaWithRkpAttestation) {
- if (get_vsr_api_level() < __ANDROID_API_T__ || AidlVersion() < 2) {
- GTEST_SKIP() << "Only required for VSR 12+ and KeyMint 2+";
+ if (!IsRkpSupportRequired()) {
+ GTEST_SKIP() << "RKP support is not required on this platform";
}
// There should be an IRemotelyProvisionedComponent instance associated with the KeyMint
diff --git a/security/rkp/aidl/aidl_api/android.hardware.security.rkp/2/.hash b/security/rkp/aidl/aidl_api/android.hardware.security.rkp/2/.hash
index 8700d33..4b3b2a6 100644
--- a/security/rkp/aidl/aidl_api/android.hardware.security.rkp/2/.hash
+++ b/security/rkp/aidl/aidl_api/android.hardware.security.rkp/2/.hash
@@ -1 +1,2 @@
+207c9f218b9b9e4e74ff5232eb16511eca9d7d2e
c8d34e56ae0807b61f028019622d8b60a37e0a8b
diff --git a/sensors/common/vts/2_X/VtsHalSensorsV2_XTargetTest.h b/sensors/common/vts/2_X/VtsHalSensorsV2_XTargetTest.h
index 7e22b19..aa6e881 100644
--- a/sensors/common/vts/2_X/VtsHalSensorsV2_XTargetTest.h
+++ b/sensors/common/vts/2_X/VtsHalSensorsV2_XTargetTest.h
@@ -559,6 +559,11 @@
}
TEST_P(SensorsHidlTest, CleanupConnectionsOnInitialize) {
+ if (getSensorsList().size() == 0) {
+ // No sensors
+ return;
+ }
+
activateAllSensors(true);
// Verify that events are received
diff --git a/tv/input/aidl/aidl_api/android.hardware.tv.input/current/android/hardware/tv/input/TvMessageEventType.aidl b/tv/input/aidl/aidl_api/android.hardware.tv.input/current/android/hardware/tv/input/TvMessageEventType.aidl
index a033903..3006198 100644
--- a/tv/input/aidl/aidl_api/android.hardware.tv.input/current/android/hardware/tv/input/TvMessageEventType.aidl
+++ b/tv/input/aidl/aidl_api/android.hardware.tv.input/current/android/hardware/tv/input/TvMessageEventType.aidl
@@ -36,5 +36,5 @@
enum TvMessageEventType {
WATERMARK = 1,
CLOSED_CAPTION = 2,
- OTHER = 3,
+ OTHER = 1000,
}
diff --git a/tv/input/aidl/android/hardware/tv/input/TvMessageEventType.aidl b/tv/input/aidl/android/hardware/tv/input/TvMessageEventType.aidl
index 5a5f472..518c7fc 100644
--- a/tv/input/aidl/android/hardware/tv/input/TvMessageEventType.aidl
+++ b/tv/input/aidl/android/hardware/tv/input/TvMessageEventType.aidl
@@ -21,5 +21,5 @@
enum TvMessageEventType {
WATERMARK = 1,
CLOSED_CAPTION = 2,
- OTHER = 3,
+ OTHER = 1000,
}
diff --git a/tv/tuner/config/TunerTestingConfigReaderV1_0.h b/tv/tuner/config/TunerTestingConfigReaderV1_0.h
index d049b07..fb76de7 100644
--- a/tv/tuner/config/TunerTestingConfigReaderV1_0.h
+++ b/tv/tuner/config/TunerTestingConfigReaderV1_0.h
@@ -65,6 +65,7 @@
using android::hardware::tv::tuner::V1_0::LnbVoltage;
using android::hardware::tv::tuner::V1_0::PlaybackSettings;
using android::hardware::tv::tuner::V1_0::RecordSettings;
+using android::hardware::tv::tuner::V1_0::FrontendAtscSettings;
const string emptyHardwareId = "";
@@ -241,6 +242,7 @@
break;
case FrontendTypeEnum::ATSC:
type = FrontendType::ATSC;
+ frontendMap[id].settings.atsc(readAtscFrontendSettings(feConfig));
break;
case FrontendTypeEnum::ATSC3:
type = FrontendType::ATSC3;
@@ -627,6 +629,13 @@
return dvbsSettings;
}
+ static FrontendAtscSettings readAtscFrontendSettings(Frontend feConfig) {
+ FrontendAtscSettings atscSettings{
+ .frequency = (uint32_t)feConfig.getFrequency(),
+ };
+ return atscSettings;
+ }
+
static bool readFilterTypeAndSettings(Filter filterConfig, DemuxFilterType& type,
DemuxFilterSettings& settings) {
auto mainType = filterConfig.getMainType();
diff --git a/wifi/aidl/Android.bp b/wifi/aidl/Android.bp
index c0ca667..0c8572c 100644
--- a/wifi/aidl/Android.bp
+++ b/wifi/aidl/Android.bp
@@ -37,6 +37,8 @@
],
min_sdk_version: "30",
lint: {
+ // Disable linter to avoid error about fixed size arrays.
+ // Interface will only be accessed on devices >= U.
enabled: false,
},
},
diff --git a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/IWifiApIface.aidl b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/IWifiApIface.aidl
index a102b97..e71dde4 100644
--- a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/IWifiApIface.aidl
+++ b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/IWifiApIface.aidl
@@ -38,7 +38,6 @@
String[] getBridgedInstances();
byte[6] getFactoryMacAddress();
void setCountryCode(in byte[2] code);
- int[] getValidFrequenciesForBand(in android.hardware.wifi.WifiBand band);
void resetToFactoryMacAddress();
void setMacAddress(in byte[6] mac);
}
diff --git a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/IWifiChip.aidl b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/IWifiChip.aidl
index 23f4030..502e7ac 100644
--- a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/IWifiChip.aidl
+++ b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/IWifiChip.aidl
@@ -47,7 +47,7 @@
@PropagateAllowBlocking android.hardware.wifi.IWifiApIface getApIface(in String ifname);
String[] getApIfaceNames();
android.hardware.wifi.IWifiChip.ChipMode[] getAvailableModes();
- int getCapabilities();
+ int getFeatureSet();
android.hardware.wifi.WifiDebugHostWakeReasonStats getDebugHostWakeReasonStats();
android.hardware.wifi.WifiDebugRingBufferStatus[] getDebugRingBuffersStatus();
int getId();
@@ -85,7 +85,7 @@
void setMloMode(in android.hardware.wifi.IWifiChip.ChipMloMode mode);
const int NO_POWER_CAP_CONSTANT = 0x7FFFFFFF;
@Backing(type="int") @VintfStability
- enum ChipCapabilityMask {
+ enum FeatureSetMask {
SET_TX_POWER_LIMIT = (1 << 0) /* 1 */,
D2D_RTT = (1 << 1) /* 2 */,
D2AP_RTT = (1 << 2) /* 4 */,
diff --git a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/IWifiStaIface.aidl b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/IWifiStaIface.aidl
index a7f2081..923deff 100644
--- a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/IWifiStaIface.aidl
+++ b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/IWifiStaIface.aidl
@@ -41,13 +41,12 @@
void enableNdOffload(in boolean enable);
android.hardware.wifi.StaApfPacketFilterCapabilities getApfPacketFilterCapabilities();
android.hardware.wifi.StaBackgroundScanCapabilities getBackgroundScanCapabilities();
- int getCapabilities();
+ int getFeatureSet();
android.hardware.wifi.WifiDebugRxPacketFateReport[] getDebugRxPacketFates();
android.hardware.wifi.WifiDebugTxPacketFateReport[] getDebugTxPacketFates();
byte[6] getFactoryMacAddress();
android.hardware.wifi.StaLinkLayerStats getLinkLayerStats();
android.hardware.wifi.StaRoamingCapabilities getRoamingCapabilities();
- int[] getValidFrequenciesForBand(in android.hardware.wifi.WifiBand band);
void installApfPacketFilter(in byte[] program);
byte[] readApfPacketFilterData();
void registerEventCallback(in android.hardware.wifi.IWifiStaIfaceEventCallback callback);
@@ -63,7 +62,7 @@
void stopSendingKeepAlivePackets(in int cmdId);
void setDtimMultiplier(in int multiplier);
@Backing(type="int") @VintfStability
- enum StaIfaceCapabilityMask {
+ enum FeatureSetMask {
APF = (1 << 0) /* 1 */,
BACKGROUND_SCAN = (1 << 1) /* 2 */,
LINK_LAYER_STATS = (1 << 2) /* 4 */,
diff --git a/wifi/aidl/android/hardware/wifi/IWifiApIface.aidl b/wifi/aidl/android/hardware/wifi/IWifiApIface.aidl
index 71ea385..b14a800 100644
--- a/wifi/aidl/android/hardware/wifi/IWifiApIface.aidl
+++ b/wifi/aidl/android/hardware/wifi/IWifiApIface.aidl
@@ -68,20 +68,6 @@
void setCountryCode(in byte[2] code);
/**
- * Used to query the list of valid frequencies (depending on country code set)
- * for the provided band.
- *
- * @param band Band for which the frequency list is being generated.
- * @return Vector of valid frequencies for the provided band.
- * @throws ServiceSpecificException with one of the following values:
- * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
- * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
- * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
- * |WifiStatusCode.ERROR_UNKNOWN|
- */
- int[] getValidFrequenciesForBand(in WifiBand band);
-
- /**
* Reset all of the AP interfaces' MAC address to the factory MAC address.
*
* @throws ServiceSpecificException with one of the following values:
diff --git a/wifi/aidl/android/hardware/wifi/IWifiChip.aidl b/wifi/aidl/android/hardware/wifi/IWifiChip.aidl
index 1710f63..9322d7a 100644
--- a/wifi/aidl/android/hardware/wifi/IWifiChip.aidl
+++ b/wifi/aidl/android/hardware/wifi/IWifiChip.aidl
@@ -44,7 +44,7 @@
*/
@VintfStability
@Backing(type="int")
- enum ChipCapabilityMask {
+ enum FeatureSetMask {
/**
* Set/Reset Tx Power limits.
*/
@@ -582,15 +582,15 @@
ChipMode[] getAvailableModes();
/**
- * Get the capabilities supported by this chip.
+ * Get the features supported by this chip.
*
- * @return Bitset of |ChipCapabilityMask| values.
+ * @return Bitset of |FeatureSetMask| values.
* @throws ServiceSpecificException with one of the following values:
* |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
* |WifiStatusCode.ERROR_NOT_AVAILABLE|,
* |WifiStatusCode.ERROR_UNKNOWN|
*/
- int getCapabilities();
+ int getFeatureSet();
/**
* API to retrieve the wifi wake up reason stats for debugging.
diff --git a/wifi/aidl/android/hardware/wifi/IWifiStaIface.aidl b/wifi/aidl/android/hardware/wifi/IWifiStaIface.aidl
index 8e9a06d..2c81984 100644
--- a/wifi/aidl/android/hardware/wifi/IWifiStaIface.aidl
+++ b/wifi/aidl/android/hardware/wifi/IWifiStaIface.aidl
@@ -38,7 +38,7 @@
*/
@VintfStability
@Backing(type="int")
- enum StaIfaceCapabilityMask {
+ enum FeatureSetMask {
/**
* Support for APF APIs. APF (Android Packet Filter) is a
* BPF-like packet filtering bytecode executed by the firmware.
@@ -190,15 +190,15 @@
StaBackgroundScanCapabilities getBackgroundScanCapabilities();
/**
- * Get the capabilities supported by this STA iface.
+ * Get the features supported by this STA iface.
*
- * @return Bitset of |StaIfaceCapabilityMask| values.
+ * @return Bitset of |FeatureSetMask| values.
* @throws ServiceSpecificException with one of the following values:
* |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
* |WifiStatusCode.ERROR_NOT_AVAILABLE|,
* |WifiStatusCode.ERROR_UNKNOWN|
*/
- int getCapabilities();
+ int getFeatureSet();
/**
* API to retrieve the fates of inbound packets.
@@ -288,22 +288,6 @@
StaRoamingCapabilities getRoamingCapabilities();
/**
- * Used to query the list of valid frequencies (depending on the country
- * code set) for the provided band. These channels may be specified in the
- * |BackgroundScanBucketParameters.frequenciesInMhz| for a background scan
- * request.
- *
- * @param band Band for which the frequency list is being generated.
- * @return Vector of valid frequencies for the provided band.
- * @throws ServiceSpecificException with one of the following values:
- * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
- * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
- * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
- * |WifiStatusCode.ERROR_UNKNOWN|
- */
- int[] getValidFrequenciesForBand(in WifiBand band);
-
- /**
* Installs an APF program on this iface, replacing an existing
* program if present.
* Must fail if |StaIfaceCapabilityMask.APF| is not set.
diff --git a/wifi/aidl/default/aidl_struct_util.cpp b/wifi/aidl/default/aidl_struct_util.cpp
index 4acdd2f..7bc2eeb 100644
--- a/wifi/aidl/default/aidl_struct_util.cpp
+++ b/wifi/aidl/default/aidl_struct_util.cpp
@@ -41,68 +41,67 @@
return std::vector<int32_t>(in.begin(), in.end());
}
-IWifiChip::ChipCapabilityMask convertLegacyFeatureToAidlChipCapability(uint64_t feature) {
+IWifiChip::FeatureSetMask convertLegacyChipFeatureToAidl(uint64_t feature) {
switch (feature) {
case WIFI_FEATURE_SET_TX_POWER_LIMIT:
- return IWifiChip::ChipCapabilityMask::SET_TX_POWER_LIMIT;
+ return IWifiChip::FeatureSetMask::SET_TX_POWER_LIMIT;
case WIFI_FEATURE_USE_BODY_HEAD_SAR:
- return IWifiChip::ChipCapabilityMask::USE_BODY_HEAD_SAR;
+ return IWifiChip::FeatureSetMask::USE_BODY_HEAD_SAR;
case WIFI_FEATURE_D2D_RTT:
- return IWifiChip::ChipCapabilityMask::D2D_RTT;
+ return IWifiChip::FeatureSetMask::D2D_RTT;
case WIFI_FEATURE_D2AP_RTT:
- return IWifiChip::ChipCapabilityMask::D2AP_RTT;
+ return IWifiChip::FeatureSetMask::D2AP_RTT;
case WIFI_FEATURE_INFRA_60G:
- return IWifiChip::ChipCapabilityMask::WIGIG;
+ return IWifiChip::FeatureSetMask::WIGIG;
case WIFI_FEATURE_SET_LATENCY_MODE:
- return IWifiChip::ChipCapabilityMask::SET_LATENCY_MODE;
+ return IWifiChip::FeatureSetMask::SET_LATENCY_MODE;
case WIFI_FEATURE_P2P_RAND_MAC:
- return IWifiChip::ChipCapabilityMask::P2P_RAND_MAC;
+ return IWifiChip::FeatureSetMask::P2P_RAND_MAC;
case WIFI_FEATURE_AFC_CHANNEL:
- return IWifiChip::ChipCapabilityMask::SET_AFC_CHANNEL_ALLOWANCE;
+ return IWifiChip::FeatureSetMask::SET_AFC_CHANNEL_ALLOWANCE;
};
CHECK(false) << "Unknown legacy feature: " << feature;
return {};
}
-IWifiStaIface::StaIfaceCapabilityMask convertLegacyFeatureToAidlStaIfaceCapability(
- uint64_t feature) {
+IWifiStaIface::FeatureSetMask convertLegacyStaIfaceFeatureToAidl(uint64_t feature) {
switch (feature) {
case WIFI_FEATURE_GSCAN:
- return IWifiStaIface::StaIfaceCapabilityMask::BACKGROUND_SCAN;
+ return IWifiStaIface::FeatureSetMask::BACKGROUND_SCAN;
case WIFI_FEATURE_LINK_LAYER_STATS:
- return IWifiStaIface::StaIfaceCapabilityMask::LINK_LAYER_STATS;
+ return IWifiStaIface::FeatureSetMask::LINK_LAYER_STATS;
case WIFI_FEATURE_RSSI_MONITOR:
- return IWifiStaIface::StaIfaceCapabilityMask::RSSI_MONITOR;
+ return IWifiStaIface::FeatureSetMask::RSSI_MONITOR;
case WIFI_FEATURE_CONTROL_ROAMING:
- return IWifiStaIface::StaIfaceCapabilityMask::CONTROL_ROAMING;
+ return IWifiStaIface::FeatureSetMask::CONTROL_ROAMING;
case WIFI_FEATURE_IE_WHITELIST:
- return IWifiStaIface::StaIfaceCapabilityMask::PROBE_IE_ALLOWLIST;
+ return IWifiStaIface::FeatureSetMask::PROBE_IE_ALLOWLIST;
case WIFI_FEATURE_SCAN_RAND:
- return IWifiStaIface::StaIfaceCapabilityMask::SCAN_RAND;
+ return IWifiStaIface::FeatureSetMask::SCAN_RAND;
case WIFI_FEATURE_INFRA_5G:
- return IWifiStaIface::StaIfaceCapabilityMask::STA_5G;
+ return IWifiStaIface::FeatureSetMask::STA_5G;
case WIFI_FEATURE_HOTSPOT:
- return IWifiStaIface::StaIfaceCapabilityMask::HOTSPOT;
+ return IWifiStaIface::FeatureSetMask::HOTSPOT;
case WIFI_FEATURE_PNO:
- return IWifiStaIface::StaIfaceCapabilityMask::PNO;
+ return IWifiStaIface::FeatureSetMask::PNO;
case WIFI_FEATURE_TDLS:
- return IWifiStaIface::StaIfaceCapabilityMask::TDLS;
+ return IWifiStaIface::FeatureSetMask::TDLS;
case WIFI_FEATURE_TDLS_OFFCHANNEL:
- return IWifiStaIface::StaIfaceCapabilityMask::TDLS_OFFCHANNEL;
+ return IWifiStaIface::FeatureSetMask::TDLS_OFFCHANNEL;
case WIFI_FEATURE_CONFIG_NDO:
- return IWifiStaIface::StaIfaceCapabilityMask::ND_OFFLOAD;
+ return IWifiStaIface::FeatureSetMask::ND_OFFLOAD;
case WIFI_FEATURE_MKEEP_ALIVE:
- return IWifiStaIface::StaIfaceCapabilityMask::KEEP_ALIVE;
+ return IWifiStaIface::FeatureSetMask::KEEP_ALIVE;
};
CHECK(false) << "Unknown legacy feature: " << feature;
return {};
}
-bool convertLegacyFeaturesToAidlChipCapabilities(uint64_t legacy_feature_set, uint32_t* aidl_caps) {
- if (!aidl_caps) {
+bool convertLegacyChipFeaturesToAidl(uint64_t legacy_feature_set, uint32_t* aidl_feature_set) {
+ if (!aidl_feature_set) {
return false;
}
- *aidl_caps = {};
+ *aidl_feature_set = 0;
std::vector<uint64_t> features = {WIFI_FEATURE_SET_TX_POWER_LIMIT,
WIFI_FEATURE_USE_BODY_HEAD_SAR,
WIFI_FEATURE_D2D_RTT,
@@ -113,7 +112,7 @@
WIFI_FEATURE_AFC_CHANNEL};
for (const auto feature : features) {
if (feature & legacy_feature_set) {
- *aidl_caps |= static_cast<uint32_t>(convertLegacyFeatureToAidlChipCapability(feature));
+ *aidl_feature_set |= static_cast<uint32_t>(convertLegacyChipFeatureToAidl(feature));
}
}
@@ -449,24 +448,23 @@
return true;
}
-bool convertLegacyFeaturesToAidlStaCapabilities(uint64_t legacy_feature_set, uint32_t* aidl_caps) {
- if (!aidl_caps) {
+bool convertLegacyStaIfaceFeaturesToAidl(uint64_t legacy_feature_set, uint32_t* aidl_feature_set) {
+ if (!aidl_feature_set) {
return false;
}
- *aidl_caps = {};
+ *aidl_feature_set = 0;
for (const auto feature :
{WIFI_FEATURE_GSCAN, WIFI_FEATURE_LINK_LAYER_STATS, WIFI_FEATURE_RSSI_MONITOR,
WIFI_FEATURE_CONTROL_ROAMING, WIFI_FEATURE_IE_WHITELIST, WIFI_FEATURE_SCAN_RAND,
WIFI_FEATURE_INFRA_5G, WIFI_FEATURE_HOTSPOT, WIFI_FEATURE_PNO, WIFI_FEATURE_TDLS,
WIFI_FEATURE_TDLS_OFFCHANNEL, WIFI_FEATURE_CONFIG_NDO, WIFI_FEATURE_MKEEP_ALIVE}) {
if (feature & legacy_feature_set) {
- *aidl_caps |=
- static_cast<uint32_t>(convertLegacyFeatureToAidlStaIfaceCapability(feature));
+ *aidl_feature_set |= static_cast<uint32_t>(convertLegacyStaIfaceFeatureToAidl(feature));
}
}
// There is no flag for this one in the legacy feature set. Adding it to the
// set because all the current devices support it.
- *aidl_caps |= static_cast<uint32_t>(IWifiStaIface::StaIfaceCapabilityMask::APF);
+ *aidl_feature_set |= static_cast<uint32_t>(IWifiStaIface::FeatureSetMask::APF);
return true;
}
diff --git a/wifi/aidl/default/aidl_struct_util.h b/wifi/aidl/default/aidl_struct_util.h
index 9a13672..e4ff963 100644
--- a/wifi/aidl/default/aidl_struct_util.h
+++ b/wifi/aidl/default/aidl_struct_util.h
@@ -40,7 +40,7 @@
namespace aidl_struct_util {
// Chip conversion methods.
-bool convertLegacyFeaturesToAidlChipCapabilities(uint64_t legacy_feature_set, uint32_t* aidl_caps);
+bool convertLegacyChipFeaturesToAidl(uint64_t legacy_feature_set, uint32_t* aidl_feature_set);
bool convertLegacyDebugRingBufferStatusToAidl(
const legacy_hal::wifi_ring_buffer_status& legacy_status,
WifiDebugRingBufferStatus* aidl_status);
@@ -74,7 +74,7 @@
legacy_hal::wifi_iface_concurrency_matrix& legacy_matrix, IWifiChip::ChipMode* chip_mode);
// STA iface conversion methods.
-bool convertLegacyFeaturesToAidlStaCapabilities(uint64_t legacy_feature_set, uint32_t* aidl_caps);
+bool convertLegacyStaIfaceFeaturesToAidl(uint64_t legacy_feature_set, uint32_t* aidl_feature_set);
bool convertLegacyApfCapabilitiesToAidl(const legacy_hal::PacketFilterCapabilities& legacy_caps,
StaApfPacketFilterCapabilities* aidl_caps);
bool convertLegacyGscanCapabilitiesToAidl(const legacy_hal::wifi_gscan_capabilities& legacy_caps,
diff --git a/wifi/aidl/default/tests/aidl_struct_util_unit_tests.cpp b/wifi/aidl/default/tests/aidl_struct_util_unit_tests.cpp
index 4bd77ac..5c334f8 100644
--- a/wifi/aidl/default/tests/aidl_struct_util_unit_tests.cpp
+++ b/wifi/aidl/default/tests/aidl_struct_util_unit_tests.cpp
@@ -658,16 +658,16 @@
}
TEST_F(AidlStructUtilTest, CanConvertLegacyFeaturesToAidl) {
- using AidlChipCaps = IWifiChip::ChipCapabilityMask;
+ using AidlChipCaps = IWifiChip::FeatureSetMask;
- uint32_t aidl_caps;
+ uint32_t aidl_features;
uint32_t legacy_feature_set = WIFI_FEATURE_D2D_RTT | WIFI_FEATURE_SET_LATENCY_MODE;
- ASSERT_TRUE(aidl_struct_util::convertLegacyFeaturesToAidlChipCapabilities(legacy_feature_set,
- &aidl_caps));
+ ASSERT_TRUE(
+ aidl_struct_util::convertLegacyChipFeaturesToAidl(legacy_feature_set, &aidl_features));
EXPECT_EQ((uint32_t)AidlChipCaps::D2D_RTT | (uint32_t)AidlChipCaps::SET_LATENCY_MODE,
- aidl_caps);
+ aidl_features);
}
void insertRadioCombination(legacy_hal::wifi_radio_combination* dst_radio_combination_ptr,
diff --git a/wifi/aidl/default/wifi_ap_iface.cpp b/wifi/aidl/default/wifi_ap_iface.cpp
index 6cd932d..7779750 100644
--- a/wifi/aidl/default/wifi_ap_iface.cpp
+++ b/wifi/aidl/default/wifi_ap_iface.cpp
@@ -64,12 +64,6 @@
&WifiApIface::setCountryCodeInternal, in_code);
}
-ndk::ScopedAStatus WifiApIface::getValidFrequenciesForBand(WifiBand in_band,
- std::vector<int32_t>* _aidl_return) {
- return validateAndCall(this, WifiStatusCode::ERROR_WIFI_IFACE_INVALID,
- &WifiApIface::getValidFrequenciesForBandInternal, _aidl_return, in_band);
-}
-
ndk::ScopedAStatus WifiApIface::setMacAddress(const std::array<uint8_t, 6>& in_mac) {
return validateAndCall(this, WifiStatusCode::ERROR_WIFI_IFACE_INVALID,
&WifiApIface::setMacAddressInternal, in_mac);
@@ -101,18 +95,6 @@
return createWifiStatusFromLegacyError(legacy_status);
}
-std::pair<std::vector<int32_t>, ndk::ScopedAStatus> WifiApIface::getValidFrequenciesForBandInternal(
- WifiBand band) {
- static_assert(sizeof(WifiChannelWidthInMhz) == sizeof(int32_t), "Size mismatch");
- legacy_hal::wifi_error legacy_status;
- std::vector<uint32_t> valid_frequencies;
- std::tie(legacy_status, valid_frequencies) = legacy_hal_.lock()->getValidFrequenciesForBand(
- instances_.size() > 0 ? instances_[0] : ifname_,
- aidl_struct_util::convertAidlWifiBandToLegacy(band));
- return {std::vector<int32_t>(valid_frequencies.begin(), valid_frequencies.end()),
- createWifiStatusFromLegacyError(legacy_status)};
-}
-
ndk::ScopedAStatus WifiApIface::setMacAddressInternal(const std::array<uint8_t, 6>& mac) {
// Support random MAC up to 2 interfaces
if (instances_.size() == 2) {
diff --git a/wifi/aidl/default/wifi_ap_iface.h b/wifi/aidl/default/wifi_ap_iface.h
index b5673fc..7378f98 100644
--- a/wifi/aidl/default/wifi_ap_iface.h
+++ b/wifi/aidl/default/wifi_ap_iface.h
@@ -45,8 +45,6 @@
// AIDL methods exposed.
ndk::ScopedAStatus getName(std::string* _aidl_return) override;
ndk::ScopedAStatus setCountryCode(const std::array<uint8_t, 2>& in_code) override;
- ndk::ScopedAStatus getValidFrequenciesForBand(WifiBand in_band,
- std::vector<int32_t>* _aidl_return) override;
ndk::ScopedAStatus setMacAddress(const std::array<uint8_t, 6>& in_mac) override;
ndk::ScopedAStatus getFactoryMacAddress(std::array<uint8_t, 6>* _aidl_return) override;
ndk::ScopedAStatus resetToFactoryMacAddress() override;
@@ -56,8 +54,6 @@
// Corresponding worker functions for the AIDL methods.
std::pair<std::string, ndk::ScopedAStatus> getNameInternal();
ndk::ScopedAStatus setCountryCodeInternal(const std::array<uint8_t, 2>& code);
- std::pair<std::vector<int32_t>, ndk::ScopedAStatus> getValidFrequenciesForBandInternal(
- WifiBand band);
ndk::ScopedAStatus setMacAddressInternal(const std::array<uint8_t, 6>& mac);
std::pair<std::array<uint8_t, 6>, ndk::ScopedAStatus> getFactoryMacAddressInternal(
const std::string& ifaceName);
diff --git a/wifi/aidl/default/wifi_chip.cpp b/wifi/aidl/default/wifi_chip.cpp
index dd24e6b..3b2dba2 100644
--- a/wifi/aidl/default/wifi_chip.cpp
+++ b/wifi/aidl/default/wifi_chip.cpp
@@ -455,9 +455,9 @@
&WifiChip::registerEventCallbackInternal, event_callback);
}
-ndk::ScopedAStatus WifiChip::getCapabilities(int32_t* _aidl_return) {
+ndk::ScopedAStatus WifiChip::getFeatureSet(int32_t* _aidl_return) {
return validateAndCall(this, WifiStatusCode::ERROR_WIFI_CHIP_INVALID,
- &WifiChip::getCapabilitiesInternal, _aidl_return);
+ &WifiChip::getFeatureSetInternal, _aidl_return);
}
ndk::ScopedAStatus WifiChip::getAvailableModes(std::vector<IWifiChip::ChipMode>* _aidl_return) {
@@ -786,7 +786,7 @@
return ndk::ScopedAStatus::ok();
}
-std::pair<int32_t, ndk::ScopedAStatus> WifiChip::getCapabilitiesInternal() {
+std::pair<int32_t, ndk::ScopedAStatus> WifiChip::getFeatureSetInternal() {
legacy_hal::wifi_error legacy_status;
uint64_t legacy_feature_set;
uint32_t legacy_logger_feature_set;
@@ -802,12 +802,11 @@
// some devices don't support querying logger feature set
legacy_logger_feature_set = 0;
}
- uint32_t aidl_caps;
- if (!aidl_struct_util::convertLegacyFeaturesToAidlChipCapabilities(legacy_feature_set,
- &aidl_caps)) {
+ uint32_t aidl_feature_set;
+ if (!aidl_struct_util::convertLegacyChipFeaturesToAidl(legacy_feature_set, &aidl_feature_set)) {
return {0, createWifiStatus(WifiStatusCode::ERROR_UNKNOWN)};
}
- return {aidl_caps, ndk::ScopedAStatus::ok()};
+ return {aidl_feature_set, ndk::ScopedAStatus::ok()};
}
std::pair<std::vector<IWifiChip::ChipMode>, ndk::ScopedAStatus>
diff --git a/wifi/aidl/default/wifi_chip.h b/wifi/aidl/default/wifi_chip.h
index c5dcee7..6d2a59e 100644
--- a/wifi/aidl/default/wifi_chip.h
+++ b/wifi/aidl/default/wifi_chip.h
@@ -85,7 +85,7 @@
ndk::ScopedAStatus getId(int32_t* _aidl_return) override;
ndk::ScopedAStatus registerEventCallback(
const std::shared_ptr<IWifiChipEventCallback>& in_callback) override;
- ndk::ScopedAStatus getCapabilities(int32_t* _aidl_return) override;
+ ndk::ScopedAStatus getFeatureSet(int32_t* _aidl_return) override;
ndk::ScopedAStatus getAvailableModes(std::vector<IWifiChip::ChipMode>* _aidl_return) override;
ndk::ScopedAStatus configureChip(int32_t in_modeId) override;
ndk::ScopedAStatus getMode(int32_t* _aidl_return) override;
@@ -162,7 +162,7 @@
std::pair<int32_t, ndk::ScopedAStatus> getIdInternal();
ndk::ScopedAStatus registerEventCallbackInternal(
const std::shared_ptr<IWifiChipEventCallback>& event_callback);
- std::pair<int32_t, ndk::ScopedAStatus> getCapabilitiesInternal();
+ std::pair<int32_t, ndk::ScopedAStatus> getFeatureSetInternal();
std::pair<std::vector<IWifiChip::ChipMode>, ndk::ScopedAStatus> getAvailableModesInternal();
ndk::ScopedAStatus configureChipInternal(std::unique_lock<std::recursive_mutex>* lock,
int32_t mode_id);
diff --git a/wifi/aidl/default/wifi_sta_iface.cpp b/wifi/aidl/default/wifi_sta_iface.cpp
index eceeeb5..800813f 100644
--- a/wifi/aidl/default/wifi_sta_iface.cpp
+++ b/wifi/aidl/default/wifi_sta_iface.cpp
@@ -82,9 +82,9 @@
&WifiStaIface::registerEventCallbackInternal, in_callback);
}
-ndk::ScopedAStatus WifiStaIface::getCapabilities(int32_t* _aidl_return) {
+ndk::ScopedAStatus WifiStaIface::getFeatureSet(int32_t* _aidl_return) {
return validateAndCall(this, WifiStatusCode::ERROR_WIFI_IFACE_INVALID,
- &WifiStaIface::getCapabilitiesInternal, _aidl_return);
+ &WifiStaIface::getFeatureSetInternal, _aidl_return);
}
ndk::ScopedAStatus WifiStaIface::getApfPacketFilterCapabilities(
@@ -109,13 +109,6 @@
&WifiStaIface::getBackgroundScanCapabilitiesInternal, _aidl_return);
}
-ndk::ScopedAStatus WifiStaIface::getValidFrequenciesForBand(WifiBand in_band,
- std::vector<int32_t>* _aidl_return) {
- return validateAndCall(this, WifiStatusCode::ERROR_WIFI_IFACE_INVALID,
- &WifiStaIface::getValidFrequenciesForBandInternal, _aidl_return,
- in_band);
-}
-
ndk::ScopedAStatus WifiStaIface::startBackgroundScan(int32_t in_cmdId,
const StaBackgroundScanParameters& in_params) {
return validateAndCall(this, WifiStatusCode::ERROR_WIFI_IFACE_INVALID,
@@ -238,7 +231,7 @@
return ndk::ScopedAStatus::ok();
}
-std::pair<int32_t, ndk::ScopedAStatus> WifiStaIface::getCapabilitiesInternal() {
+std::pair<int32_t, ndk::ScopedAStatus> WifiStaIface::getFeatureSetInternal() {
legacy_hal::wifi_error legacy_status;
uint64_t legacy_feature_set;
std::tie(legacy_status, legacy_feature_set) =
@@ -246,12 +239,12 @@
if (legacy_status != legacy_hal::WIFI_SUCCESS) {
return {0, createWifiStatusFromLegacyError(legacy_status)};
}
- uint32_t aidl_caps;
- if (!aidl_struct_util::convertLegacyFeaturesToAidlStaCapabilities(legacy_feature_set,
- &aidl_caps)) {
+ uint32_t aidl_feature_set;
+ if (!aidl_struct_util::convertLegacyStaIfaceFeaturesToAidl(legacy_feature_set,
+ &aidl_feature_set)) {
return {0, createWifiStatus(WifiStatusCode::ERROR_UNKNOWN)};
}
- return {aidl_caps, ndk::ScopedAStatus::ok()};
+ return {aidl_feature_set, ndk::ScopedAStatus::ok()};
}
std::pair<StaApfPacketFilterCapabilities, ndk::ScopedAStatus>
@@ -298,17 +291,6 @@
return {aidl_caps, ndk::ScopedAStatus::ok()};
}
-std::pair<std::vector<int32_t>, ndk::ScopedAStatus>
-WifiStaIface::getValidFrequenciesForBandInternal(WifiBand band) {
- static_assert(sizeof(WifiChannelWidthInMhz) == sizeof(int32_t), "Size mismatch");
- legacy_hal::wifi_error legacy_status;
- std::vector<uint32_t> valid_frequencies;
- std::tie(legacy_status, valid_frequencies) = legacy_hal_.lock()->getValidFrequenciesForBand(
- ifname_, aidl_struct_util::convertAidlWifiBandToLegacy(band));
- return {std::vector<int32_t>(valid_frequencies.begin(), valid_frequencies.end()),
- createWifiStatusFromLegacyError(legacy_status)};
-}
-
ndk::ScopedAStatus WifiStaIface::startBackgroundScanInternal(
int32_t cmd_id, const StaBackgroundScanParameters& params) {
legacy_hal::wifi_scan_cmd_params legacy_params;
diff --git a/wifi/aidl/default/wifi_sta_iface.h b/wifi/aidl/default/wifi_sta_iface.h
index 0831e16..3d7ec4d 100644
--- a/wifi/aidl/default/wifi_sta_iface.h
+++ b/wifi/aidl/default/wifi_sta_iface.h
@@ -54,15 +54,13 @@
ndk::ScopedAStatus getName(std::string* _aidl_return) override;
ndk::ScopedAStatus registerEventCallback(
const std::shared_ptr<IWifiStaIfaceEventCallback>& in_callback) override;
- ndk::ScopedAStatus getCapabilities(int32_t* _aidl_return) override;
+ ndk::ScopedAStatus getFeatureSet(int32_t* _aidl_return) override;
ndk::ScopedAStatus getApfPacketFilterCapabilities(
StaApfPacketFilterCapabilities* _aidl_return) override;
ndk::ScopedAStatus installApfPacketFilter(const std::vector<uint8_t>& in_program) override;
ndk::ScopedAStatus readApfPacketFilterData(std::vector<uint8_t>* _aidl_return) override;
ndk::ScopedAStatus getBackgroundScanCapabilities(
StaBackgroundScanCapabilities* _aidl_return) override;
- ndk::ScopedAStatus getValidFrequenciesForBand(WifiBand in_band,
- std::vector<int32_t>* _aidl_return) override;
ndk::ScopedAStatus startBackgroundScan(int32_t in_cmdId,
const StaBackgroundScanParameters& in_params) override;
ndk::ScopedAStatus stopBackgroundScan(int32_t in_cmdId) override;
@@ -98,15 +96,13 @@
std::pair<std::string, ndk::ScopedAStatus> getNameInternal();
ndk::ScopedAStatus registerEventCallbackInternal(
const std::shared_ptr<IWifiStaIfaceEventCallback>& callback);
- std::pair<int32_t, ndk::ScopedAStatus> getCapabilitiesInternal();
+ std::pair<int32_t, ndk::ScopedAStatus> getFeatureSetInternal();
std::pair<StaApfPacketFilterCapabilities, ndk::ScopedAStatus>
getApfPacketFilterCapabilitiesInternal();
ndk::ScopedAStatus installApfPacketFilterInternal(const std::vector<uint8_t>& program);
std::pair<std::vector<uint8_t>, ndk::ScopedAStatus> readApfPacketFilterDataInternal();
std::pair<StaBackgroundScanCapabilities, ndk::ScopedAStatus>
getBackgroundScanCapabilitiesInternal();
- std::pair<std::vector<int32_t>, ndk::ScopedAStatus> getValidFrequenciesForBandInternal(
- WifiBand band);
ndk::ScopedAStatus startBackgroundScanInternal(int32_t cmd_id,
const StaBackgroundScanParameters& params);
ndk::ScopedAStatus stopBackgroundScanInternal(int32_t cmd_id);
diff --git a/wifi/aidl/vts/functional/wifi_aidl_test_utils.cpp b/wifi/aidl/vts/functional/wifi_aidl_test_utils.cpp
index 4cf14a2..ca3c4b7 100644
--- a/wifi/aidl/vts/functional/wifi_aidl_test_utils.cpp
+++ b/wifi/aidl/vts/functional/wifi_aidl_test_utils.cpp
@@ -207,10 +207,10 @@
}
}
-int32_t getChipCapabilities(const std::shared_ptr<IWifiChip>& wifi_chip) {
- int32_t caps = 0;
- if (wifi_chip->getCapabilities(&caps).isOk()) {
- return caps;
+int32_t getChipFeatureSet(const std::shared_ptr<IWifiChip>& wifi_chip) {
+ int32_t features = 0;
+ if (wifi_chip->getFeatureSet(&features).isOk()) {
+ return features;
}
return 0;
}
diff --git a/wifi/aidl/vts/functional/wifi_aidl_test_utils.h b/wifi/aidl/vts/functional/wifi_aidl_test_utils.h
index 2eac950..0d70c3b 100644
--- a/wifi/aidl/vts/functional/wifi_aidl_test_utils.h
+++ b/wifi/aidl/vts/functional/wifi_aidl_test_utils.h
@@ -44,6 +44,6 @@
IfaceConcurrencyType type, int* configured_mode_id);
// Used to trigger IWifi.stop() at the end of every test.
void stopWifiService(const char* instance_name);
-int32_t getChipCapabilities(const std::shared_ptr<IWifiChip>& wifi_chip);
+int32_t getChipFeatureSet(const std::shared_ptr<IWifiChip>& wifi_chip);
bool checkStatusCode(ndk::ScopedAStatus* status, WifiStatusCode expected_code);
bool isAidlServiceAvailable(const char* instance_name);
diff --git a/wifi/aidl/vts/functional/wifi_ap_iface_aidl_test.cpp b/wifi/aidl/vts/functional/wifi_ap_iface_aidl_test.cpp
index 0eaf660..d39cfb4 100644
--- a/wifi/aidl/vts/functional/wifi_ap_iface_aidl_test.cpp
+++ b/wifi/aidl/vts/functional/wifi_ap_iface_aidl_test.cpp
@@ -68,19 +68,6 @@
}
/*
- * GetValidFrequenciesForBand
- * Ensures that we can retrieve valid frequencies for the 2.4 GHz band.
- */
-TEST_P(WifiApIfaceAidlTest, GetValidFrequenciesForBand) {
- std::shared_ptr<IWifiApIface> wifi_ap_iface = getWifiApIface(getInstanceName());
- ASSERT_NE(nullptr, wifi_ap_iface.get());
-
- std::vector<int32_t> freqs;
- EXPECT_TRUE(wifi_ap_iface->getValidFrequenciesForBand(WifiBand::BAND_24GHZ, &freqs).isOk());
- EXPECT_NE(freqs.size(), 0);
-}
-
-/*
* GetFactoryMacAddress
*/
TEST_P(WifiApIfaceAidlTest, GetFactoryMacAddress) {
diff --git a/wifi/aidl/vts/functional/wifi_chip_aidl_test.cpp b/wifi/aidl/vts/functional/wifi_chip_aidl_test.cpp
index dbff949..ca88d8e 100644
--- a/wifi/aidl/vts/functional/wifi_chip_aidl_test.cpp
+++ b/wifi/aidl/vts/functional/wifi_chip_aidl_test.cpp
@@ -185,12 +185,12 @@
}
/*
- * GetCapabilities
+ * GetFeatureSet
*/
-TEST_P(WifiChipAidlTest, GetCapabilities) {
+TEST_P(WifiChipAidlTest, GetFeatureSet) {
configureChipForConcurrencyType(IfaceConcurrencyType::STA);
- int32_t caps = getChipCapabilities(wifi_chip_);
- EXPECT_NE(static_cast<int32_t>(caps), 0);
+ int32_t features = getChipFeatureSet(wifi_chip_);
+ EXPECT_NE(features, 0);
}
/*
@@ -269,9 +269,9 @@
*/
TEST_P(WifiChipAidlTest, SetLatencyMode_normal) {
configureChipForConcurrencyType(IfaceConcurrencyType::STA);
- int32_t caps = getChipCapabilities(wifi_chip_);
+ int32_t features = getChipFeatureSet(wifi_chip_);
auto status = wifi_chip_->setLatencyMode(IWifiChip::LatencyMode::NORMAL);
- if (caps & static_cast<int32_t>(IWifiChip::ChipCapabilityMask::SET_LATENCY_MODE)) {
+ if (features & static_cast<int32_t>(IWifiChip::FeatureSetMask::SET_LATENCY_MODE)) {
EXPECT_TRUE(status.isOk());
} else {
EXPECT_TRUE(checkStatusCode(&status, WifiStatusCode::ERROR_NOT_SUPPORTED));
@@ -284,9 +284,9 @@
*/
TEST_P(WifiChipAidlTest, SetLatencyMode_low) {
configureChipForConcurrencyType(IfaceConcurrencyType::STA);
- int32_t caps = getChipCapabilities(wifi_chip_);
+ int32_t features = getChipFeatureSet(wifi_chip_);
auto status = wifi_chip_->setLatencyMode(IWifiChip::LatencyMode::LOW);
- if (caps & static_cast<int32_t>(IWifiChip::ChipCapabilityMask::SET_LATENCY_MODE)) {
+ if (features & static_cast<int32_t>(IWifiChip::FeatureSetMask::SET_LATENCY_MODE)) {
EXPECT_TRUE(status.isOk());
} else {
EXPECT_TRUE(checkStatusCode(&status, WifiStatusCode::ERROR_NOT_SUPPORTED));
@@ -366,12 +366,12 @@
*/
TEST_P(WifiChipAidlTest, SelectTxPowerScenario_body) {
configureChipForConcurrencyType(IfaceConcurrencyType::STA);
- int32_t caps = getChipCapabilities(wifi_chip_);
- int32_t expected_caps =
- static_cast<int32_t>(IWifiChip::ChipCapabilityMask::SET_TX_POWER_LIMIT) |
- static_cast<int32_t>(IWifiChip::ChipCapabilityMask::USE_BODY_HEAD_SAR);
+ int32_t features = getChipFeatureSet(wifi_chip_);
+ int32_t expected_features =
+ static_cast<int32_t>(IWifiChip::FeatureSetMask::SET_TX_POWER_LIMIT) |
+ static_cast<int32_t>(IWifiChip::FeatureSetMask::USE_BODY_HEAD_SAR);
auto status = wifi_chip_->selectTxPowerScenario(IWifiChip::TxPowerScenario::ON_BODY_CELL_OFF);
- if (caps & expected_caps) {
+ if (features & expected_features) {
EXPECT_TRUE(status.isOk());
} else {
EXPECT_TRUE(checkStatusCode(&status, WifiStatusCode::ERROR_NOT_SUPPORTED));
@@ -383,9 +383,9 @@
*/
TEST_P(WifiChipAidlTest, SelectTxPowerScenario_voiceCall) {
configureChipForConcurrencyType(IfaceConcurrencyType::STA);
- int32_t caps = getChipCapabilities(wifi_chip_);
+ int32_t features = getChipFeatureSet(wifi_chip_);
auto status = wifi_chip_->selectTxPowerScenario(IWifiChip::TxPowerScenario::VOICE_CALL);
- if (caps & static_cast<int32_t>(IWifiChip::ChipCapabilityMask::SET_TX_POWER_LIMIT)) {
+ if (features & static_cast<int32_t>(IWifiChip::FeatureSetMask::SET_TX_POWER_LIMIT)) {
EXPECT_TRUE(status.isOk());
} else {
EXPECT_TRUE(checkStatusCode(&status, WifiStatusCode::ERROR_NOT_SUPPORTED));
@@ -397,9 +397,9 @@
*/
TEST_P(WifiChipAidlTest, ResetTxPowerScenario) {
configureChipForConcurrencyType(IfaceConcurrencyType::STA);
- int32_t caps = getChipCapabilities(wifi_chip_);
+ int32_t features = getChipFeatureSet(wifi_chip_);
auto status = wifi_chip_->resetTxPowerScenario();
- if (caps & static_cast<int32_t>(IWifiChip::ChipCapabilityMask::SET_TX_POWER_LIMIT)) {
+ if (features & static_cast<int32_t>(IWifiChip::FeatureSetMask::SET_TX_POWER_LIMIT)) {
EXPECT_TRUE(status.isOk());
} else {
EXPECT_TRUE(checkStatusCode(&status, WifiStatusCode::ERROR_NOT_SUPPORTED));
diff --git a/wifi/aidl/vts/functional/wifi_sta_iface_aidl_test.cpp b/wifi/aidl/vts/functional/wifi_sta_iface_aidl_test.cpp
index b772bc3..07817cc 100644
--- a/wifi/aidl/vts/functional/wifi_sta_iface_aidl_test.cpp
+++ b/wifi/aidl/vts/functional/wifi_sta_iface_aidl_test.cpp
@@ -53,10 +53,10 @@
void TearDown() override { stopWifiService(getInstanceName()); }
protected:
- bool isCapabilitySupported(IWifiStaIface::StaIfaceCapabilityMask expected) {
- int32_t caps = 0;
- EXPECT_TRUE(wifi_sta_iface_->getCapabilities(&caps).isOk());
- return caps & static_cast<int32_t>(expected);
+ bool isFeatureSupported(IWifiStaIface::FeatureSetMask expected) {
+ int32_t features = 0;
+ EXPECT_TRUE(wifi_sta_iface_->getFeatureSet(&features).isOk());
+ return features & static_cast<int32_t>(expected);
}
ndk::ScopedAStatus createStaIface(std::shared_ptr<IWifiStaIface>* sta_iface) {
@@ -83,19 +83,19 @@
}
/*
- * GetCapabilities
+ * GetFeatureSet
*/
-TEST_P(WifiStaIfaceAidlTest, GetCapabilities) {
- int32_t caps = 0;
- EXPECT_TRUE(wifi_sta_iface_->getCapabilities(&caps).isOk());
- EXPECT_NE(caps, 0);
+TEST_P(WifiStaIfaceAidlTest, GetFeatureSet) {
+ int32_t features = 0;
+ EXPECT_TRUE(wifi_sta_iface_->getFeatureSet(&features).isOk());
+ EXPECT_NE(features, 0);
}
/*
* GetApfPacketFilterCapabilities
*/
TEST_P(WifiStaIfaceAidlTest, GetApfPacketFilterCapabilities) {
- if (!isCapabilitySupported(IWifiStaIface::StaIfaceCapabilityMask::APF)) {
+ if (!isFeatureSupported(IWifiStaIface::FeatureSetMask::APF)) {
GTEST_SKIP() << "APF packet filter capabilities are not supported.";
}
StaApfPacketFilterCapabilities apf_caps = {};
@@ -106,7 +106,7 @@
* GetBackgroundScanCapabilities
*/
TEST_P(WifiStaIfaceAidlTest, GetBackgroundScanCapabilities) {
- if (!isCapabilitySupported(IWifiStaIface::StaIfaceCapabilityMask::BACKGROUND_SCAN)) {
+ if (!isFeatureSupported(IWifiStaIface::FeatureSetMask::BACKGROUND_SCAN)) {
GTEST_SKIP() << "Background scan capabilities are not supported.";
}
StaBackgroundScanCapabilities caps = {};
@@ -114,22 +114,12 @@
}
/*
- * GetValidFrequenciesForBand
- * Ensures that we can retrieve valid frequencies for the 2.4 GHz band.
- */
-TEST_P(WifiStaIfaceAidlTest, GetValidFrequenciesForBand) {
- std::vector<int> freqs;
- EXPECT_TRUE(wifi_sta_iface_->getValidFrequenciesForBand(WifiBand::BAND_24GHZ, &freqs).isOk());
- EXPECT_NE(freqs.size(), 0);
-}
-
-/*
* GetLinkLayerStats
* Ensures that calls to getLinkLayerStats will retrieve a non-empty
* StaLinkLayerStats after link layer stats collection is enabled.
*/
TEST_P(WifiStaIfaceAidlTest, GetLinkLayerStats) {
- if (!isCapabilitySupported(IWifiStaIface::StaIfaceCapabilityMask::LINK_LAYER_STATS)) {
+ if (!isFeatureSupported(IWifiStaIface::FeatureSetMask::LINK_LAYER_STATS)) {
GTEST_SKIP() << "Skipping this test since link layer stats are not supported.";
}
@@ -176,7 +166,7 @@
* LinkLayerStatsCollection
*/
TEST_P(WifiStaIfaceAidlTest, LinkLayerStatsCollection) {
- if (!isCapabilitySupported(IWifiStaIface::StaIfaceCapabilityMask::LINK_LAYER_STATS)) {
+ if (!isFeatureSupported(IWifiStaIface::FeatureSetMask::LINK_LAYER_STATS)) {
GTEST_SKIP() << "Link layer stats collection is not supported.";
}
@@ -197,7 +187,7 @@
* if the device is not connected to an AP.
*/
TEST_P(WifiStaIfaceAidlTest, RSSIMonitoring) {
- if (!isCapabilitySupported(IWifiStaIface::StaIfaceCapabilityMask::RSSI_MONITOR)) {
+ if (!isFeatureSupported(IWifiStaIface::FeatureSetMask::RSSI_MONITOR)) {
GTEST_SKIP() << "RSSI monitoring is not supported.";
}
@@ -213,7 +203,7 @@
* RoamingControl
*/
TEST_P(WifiStaIfaceAidlTest, RoamingControl) {
- if (!isCapabilitySupported(IWifiStaIface::StaIfaceCapabilityMask::CONTROL_ROAMING)) {
+ if (!isFeatureSupported(IWifiStaIface::FeatureSetMask::CONTROL_ROAMING)) {
GTEST_SKIP() << "Roaming control is not supported.";
}
@@ -245,7 +235,7 @@
* EnableNDOffload
*/
TEST_P(WifiStaIfaceAidlTest, EnableNDOffload) {
- if (!isCapabilitySupported(IWifiStaIface::StaIfaceCapabilityMask::ND_OFFLOAD)) {
+ if (!isFeatureSupported(IWifiStaIface::FeatureSetMask::ND_OFFLOAD)) {
GTEST_SKIP() << "ND offload is not supported.";
}
EXPECT_TRUE(wifi_sta_iface_->enableNdOffload(true).isOk());