mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 16:50:18 +00:00
WifiNanIface: Validate interface before cleanup.
Calling invalidate() API twice would lead to fatal error. This commit is to check if interface isValid() before doing other operations in invalidate() API. Bug: 166412651 Test: atest VtsHalWifiNanV1_4TargetTest WifiNanIfaceTest Change-Id: Ia3fc48bb3d98660705bba9a32b7a5845ff7af79f
This commit is contained in:
@@ -534,6 +534,9 @@ WifiNanIface::WifiNanIface(
|
||||
}
|
||||
|
||||
void WifiNanIface::invalidate() {
|
||||
if (!isValid()) {
|
||||
return;
|
||||
}
|
||||
// send commands to HAL to actually disable and destroy interfaces
|
||||
legacy_hal_.lock()->nanDisableRequest(ifname_, 0xFFFF);
|
||||
legacy_hal_.lock()->nanDataInterfaceDelete(ifname_, 0xFFFE, "aware_data0");
|
||||
|
||||
Reference in New Issue
Block a user