diff options
| -rw-r--r-- | core/cds/inc/cds_config.h | 2 | ||||
| -rw-r--r-- | core/cds/src/cds_concurrency.c | 3 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_cfg80211.c | 7 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_main.c | 1 | ||||
| -rw-r--r-- | core/sap/inc/sap_api.h | 1 | ||||
| -rw-r--r-- | core/sap/src/sap_fsm.c | 6 |
6 files changed, 19 insertions, 1 deletions
diff --git a/core/cds/inc/cds_config.h b/core/cds/inc/cds_config.h index 33bb3b73a721..e311a2d32b22 100644 --- a/core/cds/inc/cds_config.h +++ b/core/cds/inc/cds_config.h @@ -155,6 +155,7 @@ enum cds_auto_pwr_detect_failure_mode_t { * @bandcapability: Configured band by user * @etsi_srd_chan_in_master_mode: Use of ETSI SRD chan in SAP/P2P-GO ACS/PCL * @dot11p_mode: dot11p user configuration + * @dfs_master_enable: DFS master capability * Structure for holding cds ini parameters. */ @@ -221,6 +222,7 @@ struct cds_config_info { uint8_t bandcapability; bool etsi_srd_chan_in_master_mode; uint8_t dot11p_mode; + bool dfs_master_enable; }; #ifdef WLAN_FEATURE_FILS_SK diff --git a/core/cds/src/cds_concurrency.c b/core/cds/src/cds_concurrency.c index 9843c1a196c4..ad4c98136696 100644 --- a/core/cds/src/cds_concurrency.c +++ b/core/cds/src/cds_concurrency.c @@ -5238,6 +5238,9 @@ static QDF_STATUS cds_get_channel_list(enum cds_pcl_type pcl, skip_dfs_channel = true; } + if (!cds_cfg->dfs_master_enable) + skip_dfs_channel = true; + if ((mode == CDS_SAP_MODE) || (mode == CDS_P2P_GO_MODE)) { skip_srd_chan = !cds_cfg->etsi_srd_chan_in_master_mode && cds_is_5g_regdmn_etsi13(); diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 2ed23470d770..a8bb76e62349 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -1725,6 +1725,13 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy, else sap_config->acs_cfg.ch_width = CH_WIDTH_20MHZ; + /* + * Update dfs master capability info in acs cfg, used to exclude + * the dfs channels from acs scan list, in API sap_get_channel_list + */ + sap_config->acs_cfg.dfs_master_enable = + hdd_ctx->config->enableDFSMasterCap; + /* hw_mode = a/b/g: QCA_WLAN_VENDOR_ATTR_ACS_CH_LIST and * QCA_WLAN_VENDOR_ATTR_ACS_FREQ_LIST attrs are present, and * QCA_WLAN_VENDOR_ATTR_ACS_CH_LIST is used for obtaining the diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index d2fe9b849275..0588d2cf53e0 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -9358,6 +9358,7 @@ static int hdd_update_cds_config(hdd_context_t *hdd_ctx) hdd_ctx->config->crash_inject_enabled; cds_cfg->enable_mc_list = hdd_ctx->config->fEnableMCAddrList; + cds_cfg->dfs_master_enable = hdd_ctx->config->enableDFSMasterCap; cds_cfg->ap_maxoffload_peers = hdd_ctx->config->apMaxOffloadPeers; cds_cfg->ap_maxoffload_reorderbuffs = diff --git a/core/sap/inc/sap_api.h b/core/sap/inc/sap_api.h index cf97b0aa02ed..6de2f4029a3a 100644 --- a/core/sap/inc/sap_api.h +++ b/core/sap/inc/sap_api.h @@ -515,6 +515,7 @@ struct sap_acs_cfg { uint8_t ht_sec_ch; uint8_t vht_seg0_center_ch; uint8_t vht_seg1_center_ch; + bool dfs_master_enable; }; /* diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c index f5243a4953bc..b77013b61aa7 100644 --- a/core/sap/src/sap_fsm.c +++ b/core/sap/src/sap_fsm.c @@ -4931,9 +4931,13 @@ static QDF_STATUS sap_get_channel_list(ptSapContext sap_ctx, /* Dont scan DFS channels in case of MCC disallowed * As it can result in SAP starting on DFS channel * resulting MCC on DFS channel + * Also if the dfs master mode in not enabled, exclude the + * dfs channels, as the user doesnt want the SAP bringup on + * dfs channel. */ if (CDS_IS_DFS_CH(CDS_CHANNEL_NUM(loop_count)) && - cds_disallow_mcc(CDS_CHANNEL_NUM(loop_count))) + (cds_disallow_mcc(CDS_CHANNEL_NUM(loop_count)) || + !sap_ctx->acs_cfg->dfs_master_enable)) continue; /* |
