From 930304cc262fc8b6d1927325e5b497af4d81d5ac Mon Sep 17 00:00:00 2001 From: Ganesh Kondabattini Date: Tue, 10 Oct 2017 15:25:36 +0530 Subject: [PATCH] qcacld-3.0: ini parameter to allow STA+SAP SCC on DFS channel Add an ini parameter to allow STA+SAP SCC on DFS channel with master mode support disabled. CRs-Fixed: 2127458 Change-Id: I52c5687e10bf94f0d01e60d269357a9d3d1d5fe3 --- core/hdd/inc/wlan_hdd_cfg.h | 27 +++++++++++++++++++++++++++ core/hdd/src/wlan_hdd_cfg.c | 11 +++++++++++ core/mac/inc/ani_global.h | 1 + core/sme/inc/csr_api.h | 1 + core/sme/src/csr/csr_api_roam.c | 4 ++++ 5 files changed, 44 insertions(+) diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h index 740fb1a9ef3e..2924b63ef233 100644 --- a/core/hdd/inc/wlan_hdd_cfg.h +++ b/core/hdd/inc/wlan_hdd_cfg.h @@ -8904,6 +8904,32 @@ enum dot11p_mode { #define CFG_DBS_SCAN_SELECTION_NAME "gdbs_scan_selection" #define CFG_DBS_SCAN_SELECTION_DEFAULT "" +/* + * + * g_sta_sap_scc_on_dfs_chan - Allow STA+SAP SCC on DFS channel with master + * mode support disabled. + * @Min: 0 + * @Max: 1 + * @Default: 0 + * + * This ini is used to allow STA+SAP SCC on DFS channel with master mode + * support disabled. + * 0 - Disallow STA+SAP SCC on DFS channel + * 1 - Allow STA+SAP SCC on DFS channel with master mode disabled + * + * Related: None. + * + * Supported Feature: Non-DBS, DBS + * + * Usage: Internal/External + * + * + */ +#define CFG_STA_SAP_SCC_ON_DFS_CHAN "g_sta_sap_scc_on_dfs_chan" +#define CFG_STA_SAP_SCC_ON_DFS_CHAN_MIN (0) +#define CFG_STA_SAP_SCC_ON_DFS_CHAN_MAX (1) +#define CFG_STA_SAP_SCC_ON_DFS_CHAN_DEFAULT (0) + /* * gPNOChannelPrediction will allow user to enable/disable the * PNO channel prediction feature. @@ -13823,6 +13849,7 @@ struct hdd_config { bool ce_classify_enabled; uint32_t dual_mac_feature_disable; uint8_t dbs_scan_selection[CFG_DBS_SCAN_PARAM_LENGTH]; + uint32_t sta_sap_scc_on_dfs_chan; bool tx_chain_mask_cck; uint8_t tx_chain_mask_1ss; bool smart_chainmask_enabled; diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c index b8766311db19..1c270bd3d2e6 100644 --- a/core/hdd/src/wlan_hdd_cfg.c +++ b/core/hdd/src/wlan_hdd_cfg.c @@ -3796,6 +3796,14 @@ struct reg_table_entry g_registry_table[] = { VAR_FLAGS_OPTIONAL, (void *)CFG_DBS_SCAN_SELECTION_DEFAULT), + REG_VARIABLE(CFG_STA_SAP_SCC_ON_DFS_CHAN, WLAN_PARAM_HexInteger, + struct hdd_config, sta_sap_scc_on_dfs_chan, + VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, + CFG_STA_SAP_SCC_ON_DFS_CHAN_DEFAULT, + CFG_STA_SAP_SCC_ON_DFS_CHAN_MIN, + CFG_STA_SAP_SCC_ON_DFS_CHAN_MAX), + + #ifdef FEATURE_WLAN_SCAN_PNO REG_VARIABLE(CFG_PNO_CHANNEL_PREDICTION_NAME, WLAN_PARAM_Integer, struct hdd_config, pno_channel_prediction, @@ -6579,6 +6587,9 @@ void hdd_cfg_print(struct hdd_context *hdd_ctx) hdd_debug("Name = [%s] Value = [%s]", CFG_DBS_SCAN_SELECTION_NAME, hdd_ctx->config->dbs_scan_selection); + hdd_debug("Name = [%s] value = [%u]", + CFG_STA_SAP_SCC_ON_DFS_CHAN, + hdd_ctx->config->sta_sap_scc_on_dfs_chan); #ifdef FEATURE_WLAN_SCAN_PNO hdd_debug("Name = [%s] Value = [%u]", CFG_PNO_CHANNEL_PREDICTION_NAME, diff --git a/core/mac/inc/ani_global.h b/core/mac/inc/ani_global.h index 87118444ff33..84ac59f90940 100644 --- a/core/mac/inc/ani_global.h +++ b/core/mac/inc/ani_global.h @@ -944,6 +944,7 @@ typedef struct sAniSirGlobal { uint8_t hw_dbs_capable; /* Based on INI parameter */ uint32_t dual_mac_feature_disable; + uint32_t sta_sap_scc_on_dfs_chan; sir_mgmt_frame_ind_callback mgmt_frame_ind_cb; bool first_scan_done; int8_t first_scan_bucket_threshold; diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h index 0e56a302ab5f..778f7f4fd3a3 100644 --- a/core/sme/inc/csr_api.h +++ b/core/sme/inc/csr_api.h @@ -1307,6 +1307,7 @@ typedef struct tagCsrConfigParam { bool is_ps_enabled; uint32_t auto_bmps_timer_val; uint32_t dual_mac_feature_disable; + uint32_t sta_sap_scc_on_dfs_chan; uint32_t roam_dense_traffic_thresh; uint32_t roam_dense_rssi_thresh_offset; uint32_t roam_dense_min_aps; diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index f7c9b52cc32f..6e8ebf2f026b 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -2872,6 +2872,8 @@ QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac, pParam->ignore_peer_ht_opmode; pMac->dual_mac_feature_disable = pParam->dual_mac_feature_disable; + pMac->sta_sap_scc_on_dfs_chan = + pParam->sta_sap_scc_on_dfs_chan; pMac->roam.configParam.early_stop_scan_enable = pParam->early_stop_scan_enable; pMac->roam.configParam.early_stop_scan_min_threshold = @@ -3114,6 +3116,8 @@ QDF_STATUS csr_get_config_param(tpAniSirGlobal pMac, tCsrConfigParam *pParam) pMac->f_prefer_non_dfs_on_radar; pParam->dual_mac_feature_disable = pMac->dual_mac_feature_disable; + pParam->sta_sap_scc_on_dfs_chan = + pMac->sta_sap_scc_on_dfs_chan; pParam->is_ps_enabled = pMac->sme.ps_global_info.ps_enabled; pParam->auto_bmps_timer_val = pMac->sme.ps_global_info.auto_bmps_timer_val;