wifi(implementation): Use real iface names
Currently the HAL shim uses fake names to ensure that each type of
IWifiIface has a unique name. This is not a true reflection of the
network interfaces exposed by the wifi driver. So, change the HIDL shim
to use the corresponding interfaces names.
IWifiStaIface, IWifiApIface & IWifiNanIface all use the same "wlan0"
network interface.
IWifiP2pIface uses the "p2p0" network interface.
In the future, we'll be extending this to create a second IWifiStaIface
or IWifiApIface using "wlan1" network interface.
IWifiRttController does not need to be associated with an iface object.
So, it will just default to using "wlan0" always.
TODO(b/34702983): Need to deprecate the bound iface from the HIDL interface.
Bug: 65671875
Test: Device boots up and connects to wifi networks.
Test: Will send for regression tests.
Change-Id: I33fef1332f2fe2da3f48ee87ef06660844699253
diff --git a/wifi/1.2/default/wifi_rtt_controller.cpp b/wifi/1.2/default/wifi_rtt_controller.cpp
index 2fab06c..8c3bbe2 100644
--- a/wifi/1.2/default/wifi_rtt_controller.cpp
+++ b/wifi/1.2/default/wifi_rtt_controller.cpp
@@ -29,9 +29,11 @@
using hidl_return_util::validateAndCall;
WifiRttController::WifiRttController(
+ const std::string& iface_name,
const sp<IWifiIface>& bound_iface,
const std::weak_ptr<legacy_hal::WifiLegacyHal> legacy_hal)
- : bound_iface_(bound_iface), legacy_hal_(legacy_hal), is_valid_(true) {}
+ : ifname_(iface_name), bound_iface_(bound_iface), legacy_hal_(legacy_hal),
+ is_valid_(true) {}
void WifiRttController::invalidate() {
legacy_hal_.reset();