Merge changes from topic 'fuguWifi' into oc-dev
* changes:
Improve logger feature set handling
Add capabilities for wifi_hal_legacy
diff --git a/audio/2.0/default/Device.cpp b/audio/2.0/default/Device.cpp
index 5ced0bc..9a4aff6 100644
--- a/audio/2.0/default/Device.cpp
+++ b/audio/2.0/default/Device.cpp
@@ -225,7 +225,7 @@
if (version() >= AUDIO_DEVICE_API_VERSION_3_0) {
std::unique_ptr<audio_port_config[]> halSources(HidlUtils::audioPortConfigsToHal(sources));
std::unique_ptr<audio_port_config[]> halSinks(HidlUtils::audioPortConfigsToHal(sinks));
- audio_patch_handle_t halPatch;
+ audio_patch_handle_t halPatch = AUDIO_PATCH_HANDLE_NONE;
retval = analyzeStatus(
"create_audio_patch",
mDevice->create_audio_patch(
diff --git a/automotive/evs/1.0/default/EvsCamera.cpp b/automotive/evs/1.0/default/EvsCamera.cpp
index 148b796..e0782ec 100644
--- a/automotive/evs/1.0/default/EvsCamera.cpp
+++ b/automotive/evs/1.0/default/EvsCamera.cpp
@@ -311,9 +311,7 @@
while (added < numToAdd) {
buffer_handle_t memHandle = nullptr;
- status_t result = alloc.allocate(mWidth, mHeight,
- mFormat, 1,
- mUsage, mUsage,
+ status_t result = alloc.allocate(mWidth, mHeight, mFormat, 1, mUsage,
&memHandle, &mStride, 0, "EvsCamera");
if (result != NO_ERROR) {
ALOGE("Error %d allocating %d x %d graphics buffer", result, mWidth, mHeight);
diff --git a/automotive/evs/1.0/default/EvsDisplay.cpp b/automotive/evs/1.0/default/EvsDisplay.cpp
index 9ad332a..9dd546d 100644
--- a/automotive/evs/1.0/default/EvsDisplay.cpp
+++ b/automotive/evs/1.0/default/EvsDisplay.cpp
@@ -166,11 +166,9 @@
// Allocate the buffer that will hold our displayable image
buffer_handle_t handle = nullptr;
GraphicBufferAllocator& alloc(GraphicBufferAllocator::get());
- status_t result = alloc.allocate(mBuffer.width, mBuffer.height,
- mBuffer.format, 1, mBuffer.usage,
- mBuffer.usage, &handle,
- &mBuffer.stride,
- 0, "EvsDisplay");
+ status_t result = alloc.allocate(
+ mBuffer.width, mBuffer.height, mBuffer.format, 1, mBuffer.usage,
+ &handle, &mBuffer.stride, 0, "EvsDisplay");
if (result != NO_ERROR) {
ALOGE("Error %d allocating %d x %d graphics buffer",
result, mBuffer.width, mBuffer.height);
diff --git a/automotive/vehicle/2.0/default/VehicleService.cpp b/automotive/vehicle/2.0/default/VehicleService.cpp
index e6d292e..ff112c6 100644
--- a/automotive/vehicle/2.0/default/VehicleService.cpp
+++ b/automotive/vehicle/2.0/default/VehicleService.cpp
@@ -33,7 +33,7 @@
auto emulator = std::make_unique<impl::VehicleEmulator>(hal.get());
auto service = std::make_unique<VehicleHalManager>(hal.get());
- configureRpcThreadpool(1, true /* callerWillJoin */);
+ configureRpcThreadpool(4, true /* callerWillJoin */);
ALOGI("Registering as service...");
service->registerAsService();
diff --git a/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h b/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h
index c4f935b..4835288 100644
--- a/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h
+++ b/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h
@@ -77,6 +77,8 @@
.prop = toInt(VehicleProperty::PERF_VEHICLE_SPEED),
.access = VehiclePropertyAccess::READ,
.changeMode = VehiclePropertyChangeMode::ON_CHANGE,
+ .minSampleRate = 1.0f,
+ .maxSampleRate = 1000.0f,
},
.initialValue = { .floatValues = {0.0f} }
},
@@ -95,8 +97,10 @@
.prop = toInt(VehicleProperty::ENGINE_RPM),
.access = VehiclePropertyAccess::READ,
.changeMode = VehiclePropertyChangeMode::CONTINUOUS,
+ .minSampleRate = 1.0f,
+ .maxSampleRate = 1000.0f,
},
- .initialValue = { .floatValues = {0.0f} }
+ .initialValue = { .floatValues = {0.0f} },
},
{
diff --git a/automotive/vehicle/2.0/default/impl/vhal_v2_0/VehicleEmulator.h b/automotive/vehicle/2.0/default/impl/vhal_v2_0/VehicleEmulator.h
index c8bcd60..1a8cfe2 100644
--- a/automotive/vehicle/2.0/default/impl/vhal_v2_0/VehicleEmulator.h
+++ b/automotive/vehicle/2.0/default/impl/vhal_v2_0/VehicleEmulator.h
@@ -52,8 +52,7 @@
protected:
VehicleEmulator* getEmulatorOrDie() {
std::lock_guard<std::mutex> g(mEmulatorLock);
- ALOGI("%s, emulator: %p", __func__, mEmulator);
- assert(mEmulator != nullptr);
+ if (mEmulator == nullptr) abort();
return mEmulator;
}
diff --git a/automotive/vehicle/2.1/default/impl/vhal_v2_1/DefaultConfig.h b/automotive/vehicle/2.1/default/impl/vhal_v2_1/DefaultConfig.h
index aa9aa3c..0f10086 100644
--- a/automotive/vehicle/2.1/default/impl/vhal_v2_1/DefaultConfig.h
+++ b/automotive/vehicle/2.1/default/impl/vhal_v2_1/DefaultConfig.h
@@ -42,6 +42,8 @@
.prop = WHEEL_TICK,
.access = V2_0::VehiclePropertyAccess::READ,
.changeMode = V2_0::VehiclePropertyChangeMode::CONTINUOUS,
+ .minSampleRate = 1.0f,
+ .maxSampleRate = 100.0f,
},
{
diff --git a/boot/1.0/default/android.hardware.boot@1.0-service.rc b/boot/1.0/default/android.hardware.boot@1.0-service.rc
index ef5dd91..68e7c22 100644
--- a/boot/1.0/default/android.hardware.boot@1.0-service.rc
+++ b/boot/1.0/default/android.hardware.boot@1.0-service.rc
@@ -1,4 +1,4 @@
service boot-hal-1-0 /vendor/bin/hw/android.hardware.boot@1.0-service
- class hal
+ class early_hal
user root
group root
diff --git a/camera/provider/2.4/vts/functional/Android.bp b/camera/provider/2.4/vts/functional/Android.bp
index a0be5cb..85312c1 100644
--- a/camera/provider/2.4/vts/functional/Android.bp
+++ b/camera/provider/2.4/vts/functional/Android.bp
@@ -33,7 +33,7 @@
"libgui",
"libui"
],
- static_libs: ["VtsHalHidlTargetTestBase"],
+ static_libs: ["VtsHalHidlTargetTestBase", "libgrallocusage"],
cflags: [
"-O0",
"-g",
diff --git a/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp b/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
index b7ce858..c8e44d3 100644
--- a/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
+++ b/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
@@ -15,28 +15,29 @@
*/
#define LOG_TAG "camera_hidl_hal_test"
-#include <android/hardware/camera/provider/2.4/ICameraProvider.h>
-#include <android/hardware/camera/device/3.2/ICameraDevice.h>
-#include <android/hardware/camera/device/1.0/ICameraDevice.h>
-#include "CameraParameters.h"
-#include <system/camera.h>
-#include <android/log.h>
-#include <ui/GraphicBuffer.h>
#include <VtsHalHidlTargetTestBase.h>
+#include <android/hardware/camera/device/1.0/ICameraDevice.h>
+#include <android/hardware/camera/device/3.2/ICameraDevice.h>
+#include <android/hardware/camera/provider/2.4/ICameraProvider.h>
+#include <android/log.h>
+#include <binder/MemoryHeapBase.h>
+#include <grallocusage/GrallocUsageConversion.h>
+#include <gui/BufferItemConsumer.h>
#include <gui/BufferQueue.h>
#include <gui/Surface.h>
-#include <gui/BufferItemConsumer.h>
-#include <binder/MemoryHeapBase.h>
-#include <regex>
-#include "system/camera_metadata.h"
#include <hardware/gralloc.h>
#include <hardware/gralloc1.h>
-#include <unordered_map>
-#include <mutex>
-#include <condition_variable>
-#include <chrono>
#include <inttypes.h>
+#include <system/camera.h>
+#include <ui/GraphicBuffer.h>
#include <utils/Errors.h>
+#include <chrono>
+#include <condition_variable>
+#include <mutex>
+#include <regex>
+#include <unordered_map>
+#include "CameraParameters.h"
+#include "system/camera_metadata.h"
using ::android::hardware::Return;
using ::android::hardware::Void;
@@ -2480,11 +2481,12 @@
settings = req; });
ASSERT_TRUE(ret.isOk());
- sp<GraphicBuffer> gb = new GraphicBuffer(previewStream.width,
- previewStream.height,
- static_cast<int32_t> (halStreamConfig.streams[0].overrideFormat),
- 1, halStreamConfig.streams[0].producerUsage,
- halStreamConfig.streams[0].consumerUsage);
+ sp<GraphicBuffer> gb = new GraphicBuffer(
+ previewStream.width, previewStream.height,
+ static_cast<int32_t>(halStreamConfig.streams[0].overrideFormat),
+ 1, android_convertGralloc1To0Usage(
+ halStreamConfig.streams[0].producerUsage,
+ halStreamConfig.streams[0].consumerUsage));
ASSERT_NE(nullptr, gb.get());
StreamBuffer outputBuffer = {halStreamConfig.streams[0].id,
bufferId, hidl_handle(gb->getNativeBuffer()->handle),
@@ -2586,11 +2588,12 @@
&session /*out*/, &previewStream /*out*/,
&halStreamConfig /*out*/);
- sp<GraphicBuffer> gb = new GraphicBuffer(previewStream.width,
- previewStream.height,
- static_cast<int32_t> (halStreamConfig.streams[0].overrideFormat),
- 1, halStreamConfig.streams[0].producerUsage,
- halStreamConfig.streams[0].consumerUsage);
+ sp<GraphicBuffer> gb = new GraphicBuffer(
+ previewStream.width, previewStream.height,
+ static_cast<int32_t>(halStreamConfig.streams[0].overrideFormat),
+ 1, android_convertGralloc1To0Usage(
+ halStreamConfig.streams[0].producerUsage,
+ halStreamConfig.streams[0].consumerUsage));
StreamBuffer outputBuffer = {halStreamConfig.streams[0].id,
bufferId, hidl_handle(gb->getNativeBuffer()->handle),
@@ -2706,11 +2709,12 @@
settings = req; });
ASSERT_TRUE(ret.isOk());
- sp<GraphicBuffer> gb = new GraphicBuffer(previewStream.width,
- previewStream.height,
- static_cast<int32_t> (halStreamConfig.streams[0].overrideFormat),
- 1, halStreamConfig.streams[0].producerUsage,
- halStreamConfig.streams[0].consumerUsage);
+ sp<GraphicBuffer> gb = new GraphicBuffer(
+ previewStream.width, previewStream.height,
+ static_cast<int32_t>(halStreamConfig.streams[0].overrideFormat),
+ 1, android_convertGralloc1To0Usage(
+ halStreamConfig.streams[0].producerUsage,
+ halStreamConfig.streams[0].consumerUsage));
ASSERT_NE(nullptr, gb.get());
StreamBuffer outputBuffer = {halStreamConfig.streams[0].id,
bufferId, hidl_handle(gb->getNativeBuffer()->handle),
diff --git a/current.txt b/current.txt
index 1d2801e..575e8fa 100644
--- a/current.txt
+++ b/current.txt
@@ -76,7 +76,7 @@
da13bd69282fb275767abb18704c57ff8038e6c139ad17157dc702810f70d06a android.hardware.gatekeeper@1.0::types
37c7da4f823ec958dfa9c960e2d341c48f877e0bfa758f3fa9e2d9c1e1bd66d9 android.hardware.gnss@1.0::IAGnss
7ec9afdb964bfb8369866913caf018f2636592885bcb558a65de2c5436ab4f60 android.hardware.gnss@1.0::IAGnssCallback
-f3219d8f33d5186a01f617bb7812b64620f9f28b65758ede939423ab0ba798fa android.hardware.gnss@1.0::IAGnssRil
+d16e6a359be6963ea753d7138e84ecf2b93052097938938c4d36d7a47ea2e2ae android.hardware.gnss@1.0::IAGnssRil
2f907708d74d94b1e121ed27651c9c72af65952d347b58ff07dac5d5d7a7f678 android.hardware.gnss@1.0::IAGnssRilCallback
5ac7edad06d76064b882be161f3f9d9692a997ec72e9f36addb7fe8918f49992 android.hardware.gnss@1.0::IGnss
b05c983c87c3376e145223688c3b541b5e11b827f211e38d5a31af1ca3a2e222 android.hardware.gnss@1.0::IGnssBatching
@@ -89,7 +89,7 @@
9ea8987bb1089c8c5d7b67866575b866ef516045021d9efcc37c6352bce072a3 android.hardware.gnss@1.0::IGnssMeasurement
d6a00007b30f0e3ed196df677f311b3e25b15082c5e82756f392677d3b66ec0a android.hardware.gnss@1.0::IGnssMeasurementCallback
af85aa0f48ae99a39f4688c344e4419304f681f9af818a5c8d759286fc4418de android.hardware.gnss@1.0::IGnssNavigationMessage
-8afadd3b15858bba57cfc2a1093e3704cf687245d8267f59604a48ac9d889973 android.hardware.gnss@1.0::IGnssNavigationMessageCallback
+649b1b0fb98bdd3a1ace84f4e08bfa2df813afdd4862856693f107c281a929ba android.hardware.gnss@1.0::IGnssNavigationMessageCallback
248bcf51da4273d64f367bf6877baef2feeaca365459842fd3c214a2dc6e0224 android.hardware.gnss@1.0::IGnssNi
e4f2c1b80172a73e2e743fba3ddc24ef58bc42d40bdb8f7352c9e19440b220eb android.hardware.gnss@1.0::IGnssNiCallback
c1142657de16fdb292a502372fe938614d65270ab8359217d6e13604fe4dbca4 android.hardware.gnss@1.0::IGnssXtra
@@ -114,7 +114,7 @@
d4ed2f0e14f9e914d0b1275d2e0363192fe30aca9059c84edb5fad15995f9ec4 android.hardware.light@2.0::ILight
d9584bfcaedd6e62cf337881748246b23e36cbc2bc3aa84c01b6a1e622061400 android.hardware.light@2.0::types
16c0cf0f73de1e5208a95020c6c6474903e7094f76b2d782651afaca0e5fd86f android.hardware.media@1.0::types
-f65c927479a4cde505326773681217cde4ebe9191b66d8b7a422e463bee24161 android.hardware.media.omx@1.0::IGraphicBufferSource
+8bc2f5fdcad68856eb61a62fe4cc043fa064bb7f1dab95a71d1918ec1eef7b55 android.hardware.media.omx@1.0::IGraphicBufferSource
0d3de9cd89d4718ea3b772f2d8b93be004feb3abb7e7dc5402e37047cc730d05 android.hardware.media.omx@1.0::IOmx
32002e1c358c64de106c977a6dc6af7da27be4803a5bb66fd6f891a5ba0a1617 android.hardware.media.omx@1.0::IOmxBufferSource
81ad8d8bb1cf6f41923cf11dd39354a8fe433db284a234cc675de7e75a82224c android.hardware.media.omx@1.0::IOmxNode
@@ -177,12 +177,12 @@
56b5c7267cb3d3337f44eb8b0b38ff4c6260dcc70e07687fcab94b1ccea8d159 android.hardware.wifi.supplicant@1.0::ISupplicantCallback
35ba7bcdf18f24a866a7e5429548f06768bb20a257f75b10a397c4d825ef8438 android.hardware.wifi.supplicant@1.0::ISupplicantIface
cda01008c06922fa37c1213e9bb831a109b3174532805616fb7161edc403866f android.hardware.wifi.supplicant@1.0::ISupplicantNetwork
-f41e9e2a8f9eb9196b829cc9442c279a0135ddb0937e7b0c01d2d25b3d593c3d android.hardware.wifi.supplicant@1.0::ISupplicantP2pIface
+4907410338c5e8dbeec4b5edc2608ea323f5561945f8810af81810c47b019184 android.hardware.wifi.supplicant@1.0::ISupplicantP2pIface
8b63f5efa2e3be3a7cb8a428760d82285a4ab79bcbdea6ef90aa547555e582d4 android.hardware.wifi.supplicant@1.0::ISupplicantP2pIfaceCallback
56128f74560571b6777d59453f35c6b35693ee377e2a23c807708906928f09de android.hardware.wifi.supplicant@1.0::ISupplicantP2pNetwork
2067c22197bca9743dab66a6f561a8a8375c67b4f76aed05f776839499bd4c8f android.hardware.wifi.supplicant@1.0::ISupplicantP2pNetworkCallback
7752e1de93aaf5fed37011c219ac247069f6af320b0810daa98510584a10e7b4 android.hardware.wifi.supplicant@1.0::ISupplicantStaIface
d781c8d7e7b3fe5cca8cf6e1d8806e770982ae5358c7816ed51b0f0ec272e70d android.hardware.wifi.supplicant@1.0::ISupplicantStaIfaceCallback
-5da0aa908aae85e8d81a5e393390030024a30b499f8a48b3dac67358b4752ca6 android.hardware.wifi.supplicant@1.0::ISupplicantStaNetwork
+b12ef0bdd8a4d247a8a6e960b227ed32383f2b0241f55d67fcea6eff6a6737fa android.hardware.wifi.supplicant@1.0::ISupplicantStaNetwork
d8f0877ae1d321c1d884c7631dfe36cab0ec8a4b2863d4b687f85d3549a63bcc android.hardware.wifi.supplicant@1.0::ISupplicantStaNetworkCallback
fe3c3c2f572b72f15f8594c538b0577bd5c28722c31879cfe6231330cddb6747 android.hardware.wifi.supplicant@1.0::types
diff --git a/gnss/1.0/IAGnssRil.hal b/gnss/1.0/IAGnssRil.hal
index 6f91f7f..12289f6 100644
--- a/gnss/1.0/IAGnssRil.hal
+++ b/gnss/1.0/IAGnssRil.hal
@@ -131,14 +131,13 @@
generates (bool success);
/**
- * Notify GNSS of network status changes.
+ * Notify GNSS of network status changes and current APN.
*
* @param available Indicates whether network connectivity is available.
- * @param apn String containing the Access Point Name.
+ * @param apn String containing the telephony preferred Access Point Name.
*
* @return success True if all parameters were valid and the operation was
* successful.
- * TODO(b/32022567): Add VTS test to validate the format of APN.
*/
updateNetworkAvailability(bool available, string apn) generates (bool success);
diff --git a/gnss/1.0/IGnssNavigationMessageCallback.hal b/gnss/1.0/IGnssNavigationMessageCallback.hal
index 714351b..e18f7e2 100644
--- a/gnss/1.0/IGnssNavigationMessageCallback.hal
+++ b/gnss/1.0/IGnssNavigationMessageCallback.hal
@@ -51,11 +51,11 @@
/**
* Status of Navigation Message
* When a message is received properly without any parity error in its
- * navigation words, the status must be set to PARITY_PASSED. But if a message is
- * received with words that failed parity check, but GNSS is able to correct
- * those words, the status must be set to PARITY_REBUILT.
- * No need to send any navigation message that contains words with parity error
- * and cannot be corrected.
+ * navigation words, the status must be set to PARITY_PASSED.
+ * If a message is received with words that failed a parity check, but the GNSS
+ * receiver has corrected those words, the status must be set to PARITY_REBUILT.
+ * Do not send any navigation message that contains words with parity errors
+ * that cannot be corrected.
*/
@export(name="navigation_message_status", value_prefix="NAV_MESSAGE_STATUS_")
enum NavigationMessageStatus : uint16_t {
@@ -80,7 +80,7 @@
/**
* The status of the received navigation message.
* No need to send any navigation message that contains words with parity
- * error and cannot be corrected.
+ * errors that cannot be corrected.
*/
bitfield<NavigationMessageStatus> status;
@@ -125,8 +125,7 @@
/**
* The data of the reported GNSS message. The bytes (or words) are specified
- * using big endian format (MSB first). The data is stored and decoded
- * in a server for research purposes.
+ * using big endian format (MSB first).
*
* - For GNSS L1 C/A, Beidou D1 & Beidou D2, each subframe contains 10 30-bit
* words. Each word (30 bits) must fit into the last 30 bits in a
@@ -150,10 +149,9 @@
* into 29 bytes, with MSB first (skip B229-B232). The standard followed
* is same as above.
*
- * TODO(b/32022567): Describe this relationship with data to the VTS
- * via custom annotations and plug in a VTS test to verify that the data
- * correctly follows the standard.
- *
+ * The data reported here must be the raw data as demodulated by the GNSS
+ * receiver, not data received from an external source (i.e. not from a server
+ * download.)
*/
vec<uint8_t> data;
};
diff --git a/keymaster/3.0/default/KeymasterDevice.cpp b/keymaster/3.0/default/KeymasterDevice.cpp
index 58102bb..9c7c860 100644
--- a/keymaster/3.0/default/KeymasterDevice.cpp
+++ b/keymaster/3.0/default/KeymasterDevice.cpp
@@ -528,6 +528,8 @@
case Tag::ATTESTATION_ID_SERIAL:
case Tag::ATTESTATION_ID_IMEI:
case Tag::ATTESTATION_ID_MEID:
+ case Tag::ATTESTATION_ID_MANUFACTURER:
+ case Tag::ATTESTATION_ID_MODEL:
// Device id attestation may only be supported if the device is able to permanently
// destroy its knowledge of the ids. This device is unable to do this, so it must
// never perform any device id attestation.
diff --git a/media/omx/1.0/IGraphicBufferSource.hal b/media/omx/1.0/IGraphicBufferSource.hal
index 62073ad..494d0cb 100644
--- a/media/omx/1.0/IGraphicBufferSource.hal
+++ b/media/omx/1.0/IGraphicBufferSource.hal
@@ -37,12 +37,14 @@
setMaxFps(float maxFps) generates (Status status);
- setTimeLapseConfig(int64_t timePerFrameUs, int64_t timePerCaptureUs) generates (Status status);
+ setTimeLapseConfig(double fps, double captureFps) generates (Status status);
setStartTimeUs(int64_t startTimeUs) generates (Status status);
setStopTimeUs(int64_t stopTimeUs) generates (Status status);
+ getStopTimeOffsetUs() generates (Status status, int64_t stopTimeOffsetUs);
+
setColorAspects(ColorAspects aspects) generates (Status status);
setTimeOffsetUs(int64_t timeOffsetUs) generates (Status status);
diff --git a/wifi/1.0/default/wifi_legacy_hal.cpp b/wifi/1.0/default/wifi_legacy_hal.cpp
index ba57ba7..6641be5 100644
--- a/wifi/1.0/default/wifi_legacy_hal.cpp
+++ b/wifi/1.0/default/wifi_legacy_hal.cpp
@@ -581,6 +581,11 @@
return {status, std::move(freqs)};
}
+wifi_error WifiLegacyHal::setDfsFlag(bool dfs_on) {
+ return global_func_table_.wifi_set_nodfs_flag(
+ wlan_interface_handle_, dfs_on ? 0 : 1);
+}
+
wifi_error WifiLegacyHal::enableLinkLayerStats(bool debug) {
wifi_link_layer_params params;
params.mpdu_size_threshold = kLinkLayerStatsDataMpduSizeThreshold;
diff --git a/wifi/1.0/default/wifi_legacy_hal.h b/wifi/1.0/default/wifi_legacy_hal.h
index 576dfe6..1656f68 100644
--- a/wifi/1.0/default/wifi_legacy_hal.h
+++ b/wifi/1.0/default/wifi_legacy_hal.h
@@ -181,6 +181,7 @@
wifi_error stopGscan(wifi_request_id id);
std::pair<wifi_error, std::vector<uint32_t>> getValidFrequenciesForBand(
wifi_band band);
+ wifi_error setDfsFlag(bool dfs_on);
// Link layer stats functions.
wifi_error enableLinkLayerStats(bool debug);
wifi_error disableLinkLayerStats();
diff --git a/wifi/1.0/default/wifi_sta_iface.cpp b/wifi/1.0/default/wifi_sta_iface.cpp
index 611da94..3c52048 100644
--- a/wifi/1.0/default/wifi_sta_iface.cpp
+++ b/wifi/1.0/default/wifi_sta_iface.cpp
@@ -31,7 +31,14 @@
WifiStaIface::WifiStaIface(
const std::string& ifname,
const std::weak_ptr<legacy_hal::WifiLegacyHal> legacy_hal)
- : ifname_(ifname), legacy_hal_(legacy_hal), is_valid_(true) {}
+ : ifname_(ifname), legacy_hal_(legacy_hal), is_valid_(true) {
+ // Turn on DFS channel usage for STA iface.
+ legacy_hal::wifi_error legacy_status =
+ legacy_hal_.lock()->setDfsFlag(true);
+ if (legacy_status != legacy_hal::WIFI_SUCCESS) {
+ LOG(ERROR) << "Failed to set DFS flag; DFS channels may be unavailable.";
+ }
+}
void WifiStaIface::invalidate() {
legacy_hal_.reset();
diff --git a/wifi/supplicant/1.0/ISupplicantP2pIface.hal b/wifi/supplicant/1.0/ISupplicantP2pIface.hal
index fb4323c..9b6ec5b 100644
--- a/wifi/supplicant/1.0/ISupplicantP2pIface.hal
+++ b/wifi/supplicant/1.0/ISupplicantP2pIface.hal
@@ -154,6 +154,7 @@
* |SupplicantStatusCode.SUCCESS|,
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|
+ * |SupplicantStatusCode.FAILURE_IFACE_DISABLED|
*/
find(uint32_t timeoutInSec) generates (SupplicantStatus status);
@@ -165,6 +166,7 @@
* |SupplicantStatusCode.SUCCESS|,
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|
+ * |SupplicantStatusCode.FAILURE_IFACE_DISABLED|
*/
stopFind() generates (SupplicantStatus status);
@@ -292,6 +294,7 @@
* |SupplicantStatusCode.SUCCESS|,
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|
+ * |SupplicantStatusCode.FAILURE_IFACE_DISABLED|
*/
reject(MacAddress peerAddress) generates (SupplicantStatus status);
diff --git a/wifi/supplicant/1.0/ISupplicantStaNetwork.hal b/wifi/supplicant/1.0/ISupplicantStaNetwork.hal
index 7d5159a..269d7ef 100644
--- a/wifi/supplicant/1.0/ISupplicantStaNetwork.hal
+++ b/wifi/supplicant/1.0/ISupplicantStaNetwork.hal
@@ -354,6 +354,8 @@
/**
* Set EAP Phase2 Method for this network.
*
+ * EAP method needs to be set for this to work.
+ *
* @param method value to set.
* Must be one of |EapPhase2Method| values.
* @return status Status of the operation.