diff --git a/core/sap/src/sap_api_link_cntl.c b/core/sap/src/sap_api_link_cntl.c index 9bf2b40ca62b..6df64e85f7da 100644 --- a/core/sap/src/sap_api_link_cntl.c +++ b/core/sap/src/sap_api_link_cntl.c @@ -567,6 +567,7 @@ wlansap_roam_process_dfs_chansw_update(tHalHandle hHal, FL("sapdfs: from state eSAP_STARTED => eSAP_DISCONNECTING")); /* SAP to be moved to DISCONNECTING state */ sap_ctx->sapsMachine = eSAP_DISCONNECTING; + sap_ctx->is_chan_change_inprogress = true; /* * The associated stations have been informed to move to a different * channel. However, the AP may not always select the advertised channel @@ -1088,6 +1089,8 @@ wlansap_roam_callback(void *ctx, struct csr_roam_info *csr_roam_info, case eCSR_ROAM_SET_CHANNEL_RSP: QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH, FL("Received set channel response")); + /* SAP channel change request processing is completed */ + sap_ctx->is_chan_change_inprogress = false; break; case eCSR_ROAM_CAC_COMPLETE_IND: QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH, diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c index 9f6faa59f062..eb0605f753b2 100644 --- a/core/sap/src/sap_fsm.c +++ b/core/sap/src/sap_fsm.c @@ -3604,6 +3604,13 @@ static QDF_STATUS sap_fsm_state_disconnecting(struct sap_context *sap_ctx, "eSAP_DISCONNECTING ", msg, sap_event->u2); if (sap_event->u2 == eCSR_ROAM_RESULT_CHANNEL_CHANGE_FAILURE) qdf_status = sap_goto_disconnecting(sap_ctx); + } else if ((msg == eSAP_HDD_STOP_INFRA_BSS) && + (sap_ctx->is_chan_change_inprogress)) { + /* stop bss is recieved while processing channel change */ + QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO, + FL("in state %s, event msg %d result %d"), + "eSAP_DISCONNECTING ", msg, sap_event->u2); + sap_goto_disconnecting(sap_ctx); } else { QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR, FL("in state %s, invalid event msg %d"), diff --git a/core/sap/src/sap_internal.h b/core/sap/src/sap_internal.h index 4b41f1744de5..318867e6b812 100644 --- a/core/sap/src/sap_internal.h +++ b/core/sap/src/sap_internal.h @@ -258,6 +258,7 @@ struct sap_context { uint8_t sap_acs_pre_start_bss; uint8_t sap_sta_id; bool dfs_cac_offload; + bool is_chan_change_inprogress; }; /*---------------------------------------------------------------------------- diff --git a/core/sap/src/sap_module.c b/core/sap/src/sap_module.c index 5c68366ce507..8b543cb197c9 100644 --- a/core/sap/src/sap_module.c +++ b/core/sap/src/sap_module.c @@ -685,6 +685,7 @@ QDF_STATUS wlansap_start_bss(struct sap_context *sap_ctx, sap_ctx->acs_cfg = &pConfig->acs_cfg; sap_ctx->dfs_cac_offload = pConfig->dfs_cac_offload; sap_ctx->isCacEndNotified = false; + sap_ctx->is_chan_change_inprogress = false; /* Set the BSSID to your "self MAC Addr" read the mac address from Configuation ITEM received from HDD */ sap_ctx->csr_roamProfile.BSSIDs.numOfBSSIDs = 1;