From 8e913fa1ec673573247d6515629561cecde887ae Mon Sep 17 00:00:00 2001 From: Abhishek Singh Date: Wed, 26 Sep 2018 15:04:05 +0530 Subject: [PATCH] qcacld-3.0: Handle channel switch failure in START_RESTART_PROGRESS During CAC wait if radar indication is found, SAP try to switch to new channel. If this channel switch fails, SAP is stopped internally. This stopped indication is not handled if VDEV state is START_RESTART_PROGRESS and thus vdev down is not sent to vdev FSM. Handle SAP stop in START_RESTART_PROGRESS vdev state. Change-Id: I92e48cc9a85249c88315fbb09fe1a61bd07983fd CRs-Fixed: 2322996 --- core/sap/src/sap_fsm.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c index 02cd9697e659..25a741dc27a4 100644 --- a/core/sap/src/sap_fsm.c +++ b/core/sap/src/sap_fsm.c @@ -2506,8 +2506,11 @@ static QDF_STATUS sap_fsm_state_starting(struct sap_context *sap_ctx, #ifdef CONFIG_VDEV_SM if (msg == eSAP_HDD_STOP_INFRA_BSS && - wlan_vdev_mlme_get_state(sap_ctx->vdev) == - WLAN_VDEV_S_DFS_CAC_WAIT) { + ((wlan_vdev_mlme_get_state(sap_ctx->vdev) == + WLAN_VDEV_S_DFS_CAC_WAIT) || + (wlan_vdev_mlme_get_substate(sap_ctx->vdev) == + WLAN_VDEV_SS_START_RESTART_PROGRESS))) { + /* Transition from SAP_STARTING to SAP_STOPPING */ QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH, FL("In cac wait state from state %s => %s"),