From 7e95dbc9f67fa3e6cd6b0af556655c4784fa956a Mon Sep 17 00:00:00 2001 From: Abhishek Singh Date: Thu, 6 Jul 2017 17:57:50 +0530 Subject: [PATCH] qcacld-3.0: Cleanup the sme session if sme open session times out Call sme close session if sme open session times out, to clean up the vdev created. Change-Id: Icd718138d0198a6285243a15eb56ce912149f038 CRs-Fixed: 2043263 --- core/hdd/src/wlan_hdd_main.c | 3 ++- core/wma/src/wma_dev_if.c | 11 ++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 0357aa4d3e72..e88813e11f6d 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -3139,7 +3139,8 @@ int hdd_vdev_create(hdd_adapter_t *adapter) if (!rc) { hdd_err("timed out waiting for open sme session: %ld", rc); errno = -ETIMEDOUT; - goto objmgr_vdev_destroy; + set_bit(SME_SESSION_OPENED, &adapter->event_flags); + goto hdd_vdev_destroy; } /* firmware ready for component communication, raise vdev_ready event */ diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c index c18df48add9b..98b3a8bfa389 100644 --- a/core/wma/src/wma_dev_if.c +++ b/core/wma/src/wma_dev_if.c @@ -650,8 +650,13 @@ QDF_STATUS wma_vdev_detach(tp_wma_handle wma_handle, if (!iface->handle) { WMA_LOGE("handle of vdev_id %d is NULL vdev is already freed", vdev_id); - qdf_mem_free(pdel_sta_self_req_param); - pdel_sta_self_req_param = NULL; + pdel_sta_self_req_param->status = status; + if (generateRsp) { + wma_send_del_sta_self_resp(pdel_sta_self_req_param); + } else { + qdf_mem_free(pdel_sta_self_req_param); + pdel_sta_self_req_param = NULL; + } return status; } @@ -2025,7 +2030,7 @@ struct cdp_vdev *wma_vdev_attach(tp_wma_handle wma_handle, (self_sta_req->type == WMI_VDEV_TYPE_OCB) || (self_sta_req->type == WMI_VDEV_TYPE_MONITOR) || (self_sta_req->type == WMI_VDEV_TYPE_NDI)) { - WMA_LOGA("Creating self peer %pM, vdev_id %hu", + WMA_LOGD("Creating self peer %pM, vdev_id %hu", self_sta_req->self_mac_addr, self_sta_req->session_id); status = wma_create_peer(wma_handle, txrx_pdev, txrx_vdev_handle,