From 37dcc705252fe58a4aa04ef414b3b877f225cd62 Mon Sep 17 00:00:00 2001 From: gaurank kathpalia Date: Mon, 9 Dec 2019 19:40:56 +0530 Subject: [PATCH] qcacld-3.0: Lower down the channel BW in 2.4ghz case Currently the driver in case of force SCC picks up 2.4ghz SCC channel if any other STA/AP is already up on that channel, so in the process of shifting in the API sap_validate_channel it picks up 2.4ghz and calls a reg API to set the freq related params to it. Now since the frequency for 2.4ghz is 40 mhz capable the max BW supported for 2.4ghz becomes 40 and the driver starts the SAP on 40mhz. Now since the OBSS scan is offloaded to the hostpad and now since it was driver which started the SAP on 40mhz there is no mechanism to start OBSS scan from driver, which leads to channel blockage if any legacy 11g, 11b lient is operating on the channel. Fix is to lower down the BW to 20Mhz if the SAP does a force SCC in 2.4ghz. Change-Id: I0d85dfb5e9e8332957d853173063e77d18ea600c CRs-Fixed: 2581495 --- core/sap/src/sap_fsm.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c index c41316abdd53..4bbcaf7a81b6 100644 --- a/core/sap/src/sap_fsm.c +++ b/core/sap/src/sap_fsm.c @@ -798,10 +798,16 @@ sap_validate_chan(struct sap_context *sap_context, con_ch); sap_context->chan_freq = wlan_reg_chan_to_freq( mac_ctx->pdev, con_ch); + if (WLAN_REG_IS_24GHZ_CH_FREQ( + sap_context->chan_freq)) + sap_context->ch_params.ch_width = + CH_WIDTH_20MHZ; + wlan_reg_set_channel_params_for_freq( - mac_ctx->pdev, - sap_context->chan_freq, 0, - &sap_context->ch_params); + mac_ctx->pdev, + sap_context->chan_freq, + 0, + &sap_context->ch_params); } } #endif