From 73e793e2a6ad38185511bd8bc86fe1e02209aaa2 Mon Sep 17 00:00:00 2001 From: bings Date: Fri, 8 Dec 2017 15:11:09 +0800 Subject: [PATCH] qcacld-3.0: Switch channel when radar is found in dfs channel When radar is found, the current channel is put in NOL list and the state is set as CHANNEL_STATE_DISABLE. Currently if channel state is not CHANNEL_STATE_DFS, it will not do channel change. This is not correct. Do channel change when radar is found in dfs channel Change-Id: Iabc8ef5ee92e9d2dc83a95d8fce36a2271ca056c CRs-Fixed: 2155835 --- core/sap/src/sap_fsm.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c index bfc847c72a..335abc1be4 100644 --- a/core/sap/src/sap_fsm.c +++ b/core/sap/src/sap_fsm.c @@ -3261,7 +3261,8 @@ static QDF_STATUS sap_fsm_state_dfs_cac_wait(struct sap_context *sap_ctx, t_sap_ctx != NULL && t_sap_ctx->sapsMachine != eSAP_DISCONNECTED) { profile = &t_sap_ctx->csr_roamProfile; - if (!wlan_reg_is_dfs_ch(mac_ctx->pdev, + if (!wlan_reg_is_passive_or_disable_ch( + mac_ctx->pdev, profile->operationChannel)) continue; /* SAP to be moved to DISCONNECTING state */ @@ -3274,10 +3275,6 @@ static QDF_STATUS sap_fsm_state_dfs_cac_wait(struct sap_context *sap_ctx, * Send the Channel change message to SME/PE. * sap_radar_found_status is set to 1 */ - sap_signal_hdd_event(t_sap_ctx, NULL, - eSAP_DFS_RADAR_DETECT, - (void *)eSAP_STATUS_SUCCESS); - wlansap_channel_change_request( t_sap_ctx, mac_ctx->sap.SapDfsInfo.target_channel); @@ -3490,7 +3487,8 @@ static QDF_STATUS sap_fsm_state_started(struct sap_context *sap_ctx, * no need to move them */ profile = &temp_sap_ctx->csr_roamProfile; - if (!wlan_reg_is_dfs_ch(mac_ctx->pdev, + if (!wlan_reg_is_passive_or_disable_ch( + mac_ctx->pdev, profile->operationChannel)) continue; QDF_TRACE(QDF_MODULE_ID_SAP,