From 46ef0bf334e1704155f18d10984a3472233cdf36 Mon Sep 17 00:00:00 2001 From: Min Liu Date: Tue, 17 Apr 2018 16:25:48 +0800 Subject: [PATCH] qcacld-3.0: Do not wait for peer deletion for SSR When SSR is in progress, WMI commands for peer and vdev deletion will not be sent to FW. Do not wait for peer deletion for it will always lead to timeout since peer delete command will not be sent. And the check is not needed since vdev delete command will not be sent, either. Change-Id: Ib6f921a7c7ff09bf30ed19b443a30542db2b51a3 CRs-Fixed: 2217366 --- core/wma/src/wma_dev_if.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c index c89b6fef7008..4a641a184a2d 100644 --- a/core/wma/src/wma_dev_if.c +++ b/core/wma/src/wma_dev_if.c @@ -710,6 +710,9 @@ static void wma_force_vdev_cleanup(tp_wma_handle wma_handle, uint8_t vdev_id) wma_peer_remove_for_vdev_callback, wma_handle); + qdf_atomic_init(&iface->fw_peer_count); + qdf_event_destroy(&iface->fw_peer_delete_completion); + VDEV_DETACH: wma_cdp_vdev_detach(soc, wma_handle, vdev_id); } @@ -729,8 +732,17 @@ void wma_vdev_wait_for_peer_delete_completion(tp_wma_handle wma_handle, { struct wma_txrx_node *iface = &wma_handle->interfaces[vdev_id]; - if (!iface) { - WMA_LOGE("%s: iface of vdev-%d is NULL", __func__, vdev_id); + /* Do NOT wait when SSR is in progress + * since all WMI commands will be ignored and not sent to FW + */ + if (cds_is_driver_recovering()) { + WMA_LOGD("%s: SSR is in progress", __func__); + return; + } + + if (!iface || !iface->vdev_active) { + WMA_LOGE("%s: iface of vdev-%d is not available", + __func__, vdev_id); return; }