aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLes Lee <lesl@google.com>2022-04-19 17:39:23 +0800
committerLes Lee <lesl@google.com>2022-04-26 01:15:17 +0000
commita0c90cbe9e537f643bdfdcffe893ccf981aeb06b (patch)
treee4e64e0503b500c5ff234119352974d396e53358
parent621ef2db6261d5ab9fb830d2d8c98d02a66de0e0 (diff)
downloadwpa_supplicant_8-a0c90cbe9e537f643bdfdcffe893ccf981aeb06b.tar.gz
wifi: Support interface disable event in hostapd
Fork from ag/17725527. There is a case which the frameworks would remove interface in the bridged mode. The hostapd should monitor interface status and report to the framework for aligning the status. Bug: 207055799 Test: manual test via "adb shell cmd wifi remove-softap-instance" Change-Id: Id29648abbb5219464ea6c5f3b19ca9360a1531cd
-rw-r--r--hostapd/aidl/hostapd.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/hostapd/aidl/hostapd.cpp b/hostapd/aidl/hostapd.cpp
index d973dae8..e4e0a88e 100644
--- a/hostapd/aidl/hostapd.cpp
+++ b/hostapd/aidl/hostapd.cpp
@@ -1013,7 +1013,9 @@ std::vector<uint8_t> generateRandomOweSsid()
for (const auto &callback : callbacks_) {
callback->onApInstanceInfoChanged(info);
}
- } else if (os_strncmp(txt, AP_EVENT_DISABLED, strlen(AP_EVENT_DISABLED)) == 0) {
+ } else if (os_strncmp(txt, AP_EVENT_DISABLED, strlen(AP_EVENT_DISABLED)) == 0
+ || os_strncmp(txt, INTERFACE_DISABLED, strlen(INTERFACE_DISABLED)) == 0)
+ {
// Invoke the failure callback on all registered clients.
for (const auto& callback : callbacks_) {
callback->onFailure(strlen(iface_hapd->conf->bridge) > 0 ?