From 819bdead9e090eb81fbeed2334c90f846b3e9147 Mon Sep 17 00:00:00 2001 From: bings Date: Wed, 27 Dec 2017 16:05:44 +0800 Subject: [PATCH] qcacld-3.0: Do not switch channel in DFS testing mode If gDisableDFSChSwitch is configured as 1, channel should not be switched even radar is found. Set usenol as 0 when gDisableDFSChSwitch is configured as 1. Change-Id: I05c4afea3eb9af9c541b2324a2d50ea59c05f7d7 CRs-Fixed: 2178652 --- core/sap/src/sap_fsm.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c index 37fe09cb2bc3..bfc847c72ae6 100644 --- a/core/sap/src/sap_fsm.c +++ b/core/sap/src/sap_fsm.c @@ -1392,6 +1392,8 @@ void sap_dfs_set_current_channel(void *ctx) struct wlan_objmgr_pdev *pdev; tpAniSirGlobal mac_ctx; tHalHandle hal; + uint32_t use_nol = 0; + int error; hal = CDS_GET_HAL_CB(); if (!hal) { @@ -1449,6 +1451,9 @@ void sap_dfs_set_current_channel(void *ctx) if (wlan_reg_is_dfs_ch(pdev, sap_ctx->channel)) { tgt_dfs_get_radars(pdev); tgt_dfs_radar_enable(pdev, 0, 0); + if (sap_ctx->csr_roamProfile.disableDFSChSwitch) + tgt_dfs_control(pdev, DFS_SET_USENOL, &use_nol, + sizeof(uint32_t), NULL, NULL, &error); } }