[AWARE] Actually shut-down functionality when destroying NAN iface
Destroying the interface doesn't actually execute any functions on
the legacy HAL - i.e. on the HAL side. This may leave state around -
a problem when next "re-enabling" the interface as well as possibly
a power issue.
Add code to actually disable Aware and to destroy interfaces. There
is no need to check on current status since calls will simply fail
quietly if there's nothing to disable and nothing to destroy.
Bug: 62632805
Test: integration non-concurrence test cases NonConcurrencyTest
Change-Id: I11e5bd6f3ed47f6d709ff360c9f4adf5f40234a5
diff --git a/wifi/1.0/default/wifi_nan_iface.cpp b/wifi/1.0/default/wifi_nan_iface.cpp
index 1072015..88fb5b2 100644
--- a/wifi/1.0/default/wifi_nan_iface.cpp
+++ b/wifi/1.0/default/wifi_nan_iface.cpp
@@ -420,6 +420,11 @@
}
void WifiNanIface::invalidate() {
+ // send commands to HAL to actually disable and destroy interfaces
+ legacy_hal_.lock()->nanDisableRequest(0xFFFF);
+ legacy_hal_.lock()->nanDataInterfaceDelete(0xFFFE, "aware_data0");
+ legacy_hal_.lock()->nanDataInterfaceDelete(0xFFFD, "aware_data1");
+
legacy_hal_.reset();
event_cb_handler_.invalidate();
is_valid_ = false;