From 74f6fc1d310087f31fe69cdaf224eaca77694f7a Mon Sep 17 00:00:00 2001 From: Vignesh Viswanathan Date: Fri, 17 Aug 2018 15:34:21 +0530 Subject: [PATCH] qcacld-3.0: Force cleanup vdev for FW down case in vdev_detach Currently VDEV Force cleanup happens only if FW is in recovery state and not if target_ready is set to false. However, since FW down flag is set for recovery case also, even during SSR, the VDEV Force clean up is not triggered. Force cleanup vdev for FW down case also in wma_vdev_detach. Change-Id: I3ba6dc92c1c5ea1090f9f5dc9062775de6db1954 CRs-Fixed: 2298278 --- core/wma/src/wma_dev_if.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c index a1ef1880e9..ca79dfa459 100644 --- a/core/wma/src/wma_dev_if.c +++ b/core/wma/src/wma_dev_if.c @@ -766,17 +766,17 @@ QDF_STATUS wma_vdev_detach(tp_wma_handle wma_handle, struct wma_txrx_node *iface = &wma_handle->interfaces[vdev_id]; struct wma_target_req *req_msg; - if (!iface->handle || !cds_is_target_ready()) { - WMA_LOGE("handle of vdev_id %d is NULL vdev is already freed or target is not ready", + if (!iface->handle) { + WMA_LOGE("handle of vdev_id %d is NULL vdev is already freed", vdev_id); goto send_rsp; } /* - * In SSR case, there is no need to destroy vdev in firmware since - * it has already asserted. + * In SSR case or if FW is down, there is no need to destroy vdev in + * firmware since it has already asserted. */ - if (cds_is_driver_recovering()) { + if (cds_is_driver_recovering() || !cds_is_target_ready()) { wma_force_vdev_cleanup(wma_handle, vdev_id); /* Delete objmgr self peer of STA as part of SSR. */ if (iface->type == WMI_VDEV_TYPE_STA) {