From 1bbf145bfc30d8969c5e54fbec6b052cfc39cd0d Mon Sep 17 00:00:00 2001 From: Ganesh Kondabattini Date: Tue, 12 Dec 2017 17:32:11 +0530 Subject: qcacld-3.0: Allow SAP to move from one DFS chan to another DFS chan Allow the SAP to move from DFS channel to another DFS channel in STA+SAP SCC concurrency scenario. CRs-Fixed: 2156032 Change-Id: I3d1f5e57415ed39a30125d4565bb768926dff4c9 --- core/cds/src/cds_concurrency.c | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) (limited to 'core/cds') diff --git a/core/cds/src/cds_concurrency.c b/core/cds/src/cds_concurrency.c index a896d9295e..00c4c0e749 100644 --- a/core/cds/src/cds_concurrency.c +++ b/core/cds/src/cds_concurrency.c @@ -7896,8 +7896,16 @@ static void cds_check_sta_ap_concurrent_ch_intf(void *data) static bool cds_valid_sta_channel_check(uint8_t sta_channel) { - if ((CDS_IS_DFS_CH(sta_channel) && - (!cds_is_sta_sap_scc_allowed_on_dfs_channel())) || + bool sta_sap_scc_on_dfs_chan; + + sta_sap_scc_on_dfs_chan = cds_is_sta_sap_scc_allowed_on_dfs_channel(); + if (CDS_IS_DFS_CH(sta_channel) && sta_sap_scc_on_dfs_chan) { + cds_debug("STA, SAP SCC is allowed on DFS chan %u", + sta_channel); + return true; + } + + if (CDS_IS_DFS_CH(sta_channel) || CDS_IS_PASSIVE_OR_DISABLE_CH(sta_channel) || !cds_is_safe_channel(sta_channel)) if (wma_is_hw_dbs_capable()) @@ -9910,6 +9918,8 @@ QDF_STATUS cds_valid_sap_conc_channel_check(uint8_t *con_ch, uint8_t sap_ch) { uint8_t channel = *con_ch; uint8_t temp_channel = 0; + bool sta_sap_scc_on_dfs_chan; + /* * if force SCC is set, Check if conc channel is DFS * or passive or part of LTE avoided channel list. @@ -9930,6 +9940,8 @@ QDF_STATUS cds_valid_sap_conc_channel_check(uint8_t *con_ch, uint8_t sap_ch) else if (!channel) channel = sap_ch; + sta_sap_scc_on_dfs_chan = cds_is_sta_sap_scc_allowed_on_dfs_channel(); + if (cds_valid_sta_channel_check(channel)) { if (CDS_IS_DFS_CH(channel) || CDS_IS_PASSIVE_OR_DISABLE_CH(channel) || @@ -9952,13 +9964,21 @@ QDF_STATUS cds_valid_sap_conc_channel_check(uint8_t *con_ch, uint8_t sap_ch) return QDF_STATUS_E_FAILURE; } } else { + if (CDS_IS_DFS_CH(channel) && + sta_sap_scc_on_dfs_chan) { + cds_debug("STA, SAP SCC is allowed on DFS chan %u", + channel); + goto update_chan; + } + cds_warn("Can't have concurrency on %d", - channel); + channel); return QDF_STATUS_E_FAILURE; } } } +update_chan: if (channel != sap_ch) *con_ch = channel; -- cgit v1.2.3