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/tests/mock_wifi_iface_util.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/tests/mock_wifi_iface_util.cpp')
-rw-r--r-- | wifi/1.5/default/tests/mock_wifi_iface_util.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/wifi/1.5/default/tests/mock_wifi_iface_util.cpp b/wifi/1.5/default/tests/mock_wifi_iface_util.cpp index fe6e9e2e57..b101c4ac34 100644 --- a/wifi/1.5/default/tests/mock_wifi_iface_util.cpp +++ b/wifi/1.5/default/tests/mock_wifi_iface_util.cpp @@ -29,8 +29,9 @@ namespace implementation { namespace iface_util { MockWifiIfaceUtil::MockWifiIfaceUtil( - const std::weak_ptr<wifi_system::InterfaceTool> iface_tool) - : WifiIfaceUtil(iface_tool) {} + const std::weak_ptr<wifi_system::InterfaceTool> iface_tool, + const std::weak_ptr<legacy_hal::WifiLegacyHal> legacy_hal) + : WifiIfaceUtil(iface_tool, legacy_hal) {} } // namespace iface_util } // namespace implementation } // namespace V1_5 |