diff options
| author | Mukul Sharma <mukul@codeaurora.org> | 2017-04-03 19:50:44 +0530 |
|---|---|---|
| committer | Sandeep Puligilla <spuligil@codeaurora.org> | 2017-04-04 09:58:33 -0700 |
| commit | f3357ea9b163f95e2fca449441e589b91ecdc250 (patch) | |
| tree | f277ee30201b68641886ccfcab82f97ec19b1c0b | |
| parent | 7e9b3658edf0f508e9a60c6d37bcf7ed6a933562 (diff) | |
qcacld-3.0: Avoid twice stop adapter/close adpater for pre cac
Currently, during del_virtual_iface if adapter is of type SAP
and cac is active, then host schedules a work which stop and
close adapter and in same context it again stop /close_Adapter.
As a part of this fix, avoid stop / close adapter if cac is
in progress.
Change-Id: I68a53b3b67f4a0222a35c15a3d4a9574dd3a9e90
CRs-Fixed: 2027509
| -rw-r--r-- | core/hdd/src/wlan_hdd_p2p.c | 19 | ||||
| -rw-r--r-- | core/mac/src/sys/legacy/src/system/src/mac_init_api.c | 2 |
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; } |
