wifi: Fix incorrect iface when handling interface init failure
The hostapd should report bridged AP iface failure to the frameworks
in bridged AP use case.
Bug: 200272186
Test: Manual Test, simulate interface init failure and check the result.
Change-Id: I32e88fd6beca0aeb81c89648c6a950b69e65cef7
diff --git a/hostapd/hidl/1.3/hostapd.cpp b/hostapd/hidl/1.3/hostapd.cpp
index 6add761..f9d2647 100644
--- a/hostapd/hidl/1.3/hostapd.cpp
+++ b/hostapd/hidl/1.3/hostapd.cpp
@@ -879,8 +879,8 @@
// Invoke the failure callback on all registered
// clients.
for (const auto& callback : callbacks_) {
- callback->onFailure(
- iface_hapd->conf->iface);
+ callback->onFailure(strlen(iface_hapd->conf->bridge) > 0 ?
+ iface_hapd->conf->bridge : iface_hapd->conf->iface);
}
}
};