diff options
| author | Zhu Jianmin <jianminz@codeaurora.org> | 2018-05-09 09:25:18 +0800 |
|---|---|---|
| committer | nshrivas <nshrivas@codeaurora.org> | 2018-05-09 15:52:18 -0700 |
| commit | 5ce40978eda282bb14da0cb1e682d491676c72f8 (patch) | |
| tree | 67be15707016c69d8bccaa6d67e86433e75a447d | |
| parent | d7313dba1f70ca7f6e6f8a36d9006c4dbed79eaa (diff) | |
qcacld-3.0: Switch SAP channel to STA for scc on LTE coex channel
When Force SCC and STA+SAP SCC on LTE coex channel are enabled:
1. When STA on LTE coex channel, start SAP, select STA
channel.
2. When SAP on, connect STA on LTE coex channel, then switch
SAP channel to STA channel.
Change-Id: Ia2dc817883d09f1f33f24c377a8eb0d17bcf1e28
CRs-Fixed: 2235704
| -rw-r--r-- | core/hdd/src/wlan_hdd_hostapd.c | 2 | ||||
| -rw-r--r-- | core/sap/src/sap_fsm.c | 26 |
2 files changed, 22 insertions, 6 deletions
diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index 3e23f4f54e03..471eee5d9827 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -2854,7 +2854,7 @@ int hdd_softap_set_channel_change(struct net_device *dev, int target_channel, status = wlansap_set_channel_change_with_csa( WLAN_HDD_GET_SAP_CTX_PTR(pHostapdAdapter), (uint32_t)target_channel, - target_bw, true); + target_bw, !(pHddCtx->config->sta_sap_scc_on_lte_coex_chan)); if (QDF_STATUS_SUCCESS != status) { hdd_err("SAP set channel failed for channel: %d, bw: %d", diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c index 24830a537c5b..b631235d5c9e 100644 --- a/core/sap/src/sap_fsm.c +++ b/core/sap/src/sap_fsm.c @@ -2293,6 +2293,13 @@ QDF_STATUS sap_goto_channel_sel(ptSapContext sap_context, tHalHandle h_hal; uint8_t con_ch; bool sta_sap_scc_on_dfs_chan; + hdd_context_t *hdd_ctx; + + hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD); + if (!hdd_ctx) { + cds_err("HDD context is NULL"); + return QDF_STATUS_E_FAILURE; + } h_hal = cds_get_context(QDF_MODULE_ID_SME); if (NULL == h_hal) { @@ -2375,6 +2382,9 @@ QDF_STATUS sap_goto_channel_sel(ptSapContext sap_context, sap_context->channel, sap_context->csr_roamProfile.phyMode, sap_context->cc_switch_mode); + QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_DEBUG, + FL("After check overlap: con_ch:%d"), + con_ch); if (QDF_IS_STATUS_ERROR( cds_valid_sap_conc_channel_check(&con_ch, sap_context->channel))) { @@ -2383,14 +2393,20 @@ QDF_STATUS sap_goto_channel_sel(ptSapContext sap_context, FL("SAP can't start (no MCC)")); return QDF_STATUS_E_ABORTED; } - + QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_DEBUG, + FL("After check concurrency: con_ch:%d"), + con_ch); sta_sap_scc_on_dfs_chan = cds_is_sta_sap_scc_allowed_on_dfs_channel(); - if (con_ch && cds_is_safe_channel(con_ch) && - (!CDS_IS_DFS_CH(con_ch) || - (CDS_IS_DFS_CH(con_ch) && - sta_sap_scc_on_dfs_chan))) { + if (con_ch && + (cds_is_safe_channel(con_ch) || + (!cds_is_safe_channel(con_ch) && + hdd_ctx->config->sta_sap_scc_on_lte_coex_chan) + ) && + (!CDS_IS_DFS_CH(con_ch) || + (CDS_IS_DFS_CH(con_ch) && + sta_sap_scc_on_dfs_chan))) { QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR, |
