diff options
author | Roshan Pius <rpius@google.com> | 2021-03-02 10:00:23 -0800 |
---|---|---|
committer | Roshan Pius <rpius@google.com> | 2021-03-03 09:00:00 -0800 |
commit | 8c1a67b7af5851a01fedf087bfd998afdbcfeaaa (patch) | |
tree | 19e0675c0c7a34efe4003232078aeee00343b3df /wifi/1.5/default/wifi_legacy_hal.cpp | |
parent | 0a04fe136757c9df5f79533fe24fc6f5dd74d8ae (diff) |
wifi: Wait for driver ready and bring up the interface when setMacAddress fails
setMacAddress may fail in some scenarios like SSR inprogress. In such
case framework is not bringing up the iface again if it was brought down
to set random MAC address. Due to this subsequent operations like scans
are failing with "Network Down" error and Wi-Fi can't recover until
Wi-Fi restarts. To avoid this bring up the iface irrespective of
setMacAddress status.
Modified the original CL to move the WifiIfaceUtil creation to inside
Wifi object since that is where the legacy HAL instance is created for
the corresponding chip. This helps keeping the setMacAddress logic still
inside WifiIfaceUtil. Modified the iface_util lifetime - no longer a
singleton, one instance created per wifi chip instance.
Bug: 174183763
Test: Wifi can be enabled when back-to-back SSR and wifi on
Change-Id: I926b59f5da126aba222e05d1e570c0c19de739ed
Diffstat (limited to 'wifi/1.5/default/wifi_legacy_hal.cpp')
-rw-r--r-- | wifi/1.5/default/wifi_legacy_hal.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/wifi/1.5/default/wifi_legacy_hal.cpp b/wifi/1.5/default/wifi_legacy_hal.cpp index f5ca753824..260f186457 100644 --- a/wifi/1.5/default/wifi_legacy_hal.cpp +++ b/wifi/1.5/default/wifi_legacy_hal.cpp @@ -476,6 +476,10 @@ wifi_error WifiLegacyHal::stop( bool WifiLegacyHal::isStarted() { return is_started_; } +wifi_error WifiLegacyHal::waitForDriverReady() { + return global_func_table_.wifi_wait_for_driver_ready(); +} + std::pair<wifi_error, std::string> WifiLegacyHal::getDriverVersion( const std::string& iface_name) { std::array<char, kMaxVersionStringLength> buffer; |