summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/hdd/src/wlan_hdd_p2p.c19
-rw-r--r--core/mac/src/sys/legacy/src/system/src/mac_init_api.c2
2 files changed, 11 insertions, 10 deletions
diff --git a/core/hdd/src/wlan_hdd_p2p.c b/core/hdd/src/wlan_hdd_p2p.c
index 870248944421..6709480dba63 100644
--- a/core/hdd/src/wlan_hdd_p2p.c
+++ b/core/hdd/src/wlan_hdd_p2p.c
@@ -2855,24 +2855,23 @@ int __wlan_hdd_del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev)
if (0 != status)
return status;
- /*
- * check state machine state and kickstart modules if they are closed.
- */
+ /* check state machine state and kickstart modules if they are closed */
status = hdd_wlan_start_modules(pHddCtx, pVirtAdapter, false);
if (status)
return status;
- wlan_hdd_release_intf_addr(pHddCtx,
- pVirtAdapter->macAddressCurrent.bytes);
-
- if ((pVirtAdapter->device_mode == QDF_SAP_MODE) &&
- wlan_sap_is_pre_cac_active(pHddCtx->hHal)) {
+ if (pVirtAdapter->device_mode == QDF_SAP_MODE &&
+ wlan_sap_is_pre_cac_active(pHddCtx->hHal)) {
hdd_clean_up_pre_cac_interface(pHddCtx);
+ } else {
+ wlan_hdd_release_intf_addr(pHddCtx,
+ pVirtAdapter->macAddressCurrent.bytes);
+ hdd_stop_adapter(pHddCtx, pVirtAdapter, true);
+ hdd_close_adapter(pHddCtx, pVirtAdapter, true);
}
- hdd_stop_adapter(pHddCtx, pVirtAdapter, true);
- hdd_close_adapter(pHddCtx, pVirtAdapter, true);
EXIT();
+
return 0;
}
diff --git a/core/mac/src/sys/legacy/src/system/src/mac_init_api.c b/core/mac/src/sys/legacy/src/system/src/mac_init_api.c
index 9e2422e201bc..7e07ca67118e 100644
--- a/core/mac/src/sys/legacy/src/system/src/mac_init_api.c
+++ b/core/mac/src/sys/legacy/src/system/src/mac_init_api.c
@@ -167,5 +167,7 @@ tSirRetStatus mac_close(tHalHandle hHal)
/* Call routine to free-up all CFG data structures */
cfg_de_init(pMac);
+ qdf_mem_zero(pMac, sizeof(*pMac));
+
return eSIR_SUCCESS;
}