wifi(implementation): Send NAN disabled on wlan0 down & up
When the iface state is toggled for MAC address change on the underlying
interface for NAN operations, send NAN disabled event up to the
framework. The iface down/up toggle resets all NAN operations in the
firmware. So, this callback should trigger a cleanup of any
operations initiated by the framework.
Bug: 132943959
Test: Unit tests in the follow-up CL.
Test: Will send for regression tests.
Change-Id: I760dc5ca3b9276956f5edd40a97c3c13811f442c
diff --git a/wifi/1.3/default/wifi_nan_iface.h b/wifi/1.3/default/wifi_nan_iface.h
index f735d61..737be93 100644
--- a/wifi/1.3/default/wifi_nan_iface.h
+++ b/wifi/1.3/default/wifi_nan_iface.h
@@ -22,6 +22,7 @@
#include <android/hardware/wifi/1.2/IWifiNanIface.h>
#include "hidl_callback_util.h"
+#include "wifi_iface_util.h"
#include "wifi_legacy_hal.h"
namespace android {
@@ -37,7 +38,8 @@
class WifiNanIface : public V1_2::IWifiNanIface {
public:
WifiNanIface(const std::string& ifname,
- const std::weak_ptr<legacy_hal::WifiLegacyHal> legacy_hal);
+ const std::weak_ptr<legacy_hal::WifiLegacyHal> legacy_hal,
+ const std::weak_ptr<iface_util::WifiIfaceUtil> iface_util);
// Refer to |WifiChip::invalidate()|.
void invalidate();
bool isValid();
@@ -147,6 +149,7 @@
std::string ifname_;
std::weak_ptr<legacy_hal::WifiLegacyHal> legacy_hal_;
+ std::weak_ptr<iface_util::WifiIfaceUtil> iface_util_;
bool is_valid_;
hidl_callback_util::HidlCallbackHandler<V1_0::IWifiNanIfaceEventCallback>
event_cb_handler_;