From 6645e9ea7183cd513599dfd8b01b597f2e83f1bc Mon Sep 17 00:00:00 2001 From: Les Lee Date: Fri, 29 Oct 2021 16:04:23 +0800 Subject: [PATCH] wifi: Extend onFailure callback for dual AP case There are two AP instances when bridged AP is running. Extend onFailure callback to support if there is a problem one of the instances, The framework can handle the failure separately. (i.e. No need to shutdown whole Soft Ap) Bug: 188921389 Test: Test with test code, the callback works normally. Change-Id: I0aba5f3c5bf21badd3cf925908c853e9285fa6aa --- .../android/hardware/wifi/hostapd/IHostapdCallback.aidl | 2 +- .../android/hardware/wifi/hostapd/IHostapdCallback.aidl | 7 +++++-- .../aidl/vts/functional/VtsHalHostapdTargetTest.cpp | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/current/android/hardware/wifi/hostapd/IHostapdCallback.aidl b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/current/android/hardware/wifi/hostapd/IHostapdCallback.aidl index 36d210476a..9dd062a1f2 100644 --- a/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/current/android/hardware/wifi/hostapd/IHostapdCallback.aidl +++ b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/current/android/hardware/wifi/hostapd/IHostapdCallback.aidl @@ -36,5 +36,5 @@ package android.hardware.wifi.hostapd; interface IHostapdCallback { oneway void onApInstanceInfoChanged(in android.hardware.wifi.hostapd.ApInfo apInfo); oneway void onConnectedClientsChanged(in android.hardware.wifi.hostapd.ClientInfo clientInfo); - oneway void onFailure(in String ifaceName); + oneway void onFailure(in String ifaceName, in String instanceName); } diff --git a/wifi/hostapd/aidl/android/hardware/wifi/hostapd/IHostapdCallback.aidl b/wifi/hostapd/aidl/android/hardware/wifi/hostapd/IHostapdCallback.aidl index 7b049442a6..456f46a6b1 100644 --- a/wifi/hostapd/aidl/android/hardware/wifi/hostapd/IHostapdCallback.aidl +++ b/wifi/hostapd/aidl/android/hardware/wifi/hostapd/IHostapdCallback.aidl @@ -41,7 +41,10 @@ interface IHostapdCallback { * Invoked when an asynchronous failure is encountered in one of the access * points added via |IHostapd.addAccessPoint|. * - * @param ifaceName Name of the interface. + * @param ifaceName Name of the interface which was added via + * |IHostapd.addAccessPoint|. + * @param instanceName Name of the AP instance which is associated with + * the interface. */ - oneway void onFailure(in String ifaceName); + oneway void onFailure(in String ifaceName, in String instanceName); } diff --git a/wifi/hostapd/aidl/vts/functional/VtsHalHostapdTargetTest.cpp b/wifi/hostapd/aidl/vts/functional/VtsHalHostapdTargetTest.cpp index 41c54b3725..dad708567c 100644 --- a/wifi/hostapd/aidl/vts/functional/VtsHalHostapdTargetTest.cpp +++ b/wifi/hostapd/aidl/vts/functional/VtsHalHostapdTargetTest.cpp @@ -232,7 +232,7 @@ class HostapdCallback : public BnHostapdCallback { const ::aidl::android::hardware::wifi::hostapd::ClientInfo &) override { return ndk::ScopedAStatus::ok(); } - ::ndk::ScopedAStatus onFailure(const std::string &) override { + ::ndk::ScopedAStatus onFailure(const std::string&, const std::string&) override { return ndk::ScopedAStatus::ok(); } };