diff --git a/components/mlme/core/src/wlan_mlme_main.c b/components/mlme/core/src/wlan_mlme_main.c index 2073bb1569..1e0c170dc8 100644 --- a/components/mlme/core/src/wlan_mlme_main.c +++ b/components/mlme/core/src/wlan_mlme_main.c @@ -879,6 +879,8 @@ static void mlme_init_dfs_cfg(struct wlan_objmgr_psoc *psoc, cfg_get(psoc, CFG_ENABLE_NON_DFS_CHAN_ON_RADAR); dfs_cfg->dfs_beacon_tx_enhanced = cfg_get(psoc, CFG_DFS_BEACON_TX_ENHANCED); + dfs_cfg->dfs_disable_japan_w53 = + cfg_get(psoc, CFG_DISABLE_DFS_JAPAN_W53); dfs_cfg->sap_tx_leakage_threshold = cfg_get(psoc, CFG_SAP_TX_LEAKAGE_THRESHOLD); } diff --git a/components/mlme/dispatcher/inc/cfg_mlme_dfs.h b/components/mlme/dispatcher/inc/cfg_mlme_dfs.h index 0a5ce30c5d..bfc4763826 100644 --- a/components/mlme/dispatcher/inc/cfg_mlme_dfs.h +++ b/components/mlme/dispatcher/inc/cfg_mlme_dfs.h @@ -176,6 +176,28 @@ 0, \ "DFS master mode capability") +/* + * + * gDisableDfsJapanW53 - Block W53 channels in random channel selection + * @Min: 0 + * @Max: 1 + * @Default: 0 + * + * This ini is used to block W53 Japan channel in random channel selection + * + * Related: none + * + * Supported Feature: DFS + * + * Usage: External + * + * + */ +#define CFG_DISABLE_DFS_JAPAN_W53 CFG_INI_BOOL( \ + "gDisableDfsJapanW53", \ + 0, \ + "Block W53 channels in random selection") + #define CFG_DFS_ALL \ CFG(CFG_IGNORE_CAC) \ CFG(CFG_DISABLE_DFS_CH_SWITCH) \ @@ -183,6 +205,7 @@ CFG(CFG_SAP_TX_LEAKAGE_THRESHOLD) \ CFG(CFG_ENABLE_NON_DFS_CHAN_ON_RADAR) \ CFG(CFG_ENABLE_DFS_MASTER_CAPABILITY) \ + CFG(CFG_DISABLE_DFS_JAPAN_W53) \ CFG(CFG_ENABLE_DFS_PHYERR_FILTEROFFLOAD) #endif /* __CFG_MLME_DFS_H */ diff --git a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h index 4cd7313fa1..b7c954cee7 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h @@ -587,6 +587,7 @@ struct wlan_mlme_cfg_sap { * @dfs_filter_offload: dfs filter offloaad * @dfs_beacon_tx_enhanced: enhance dfs beacon tx * @dfs_prefer_non_dfs: perefer non dfs channel after radar + * @dfs_disable_japan_w53: Disable W53 channels * @sap_tx_leakage_threshold: sap tx leakage threshold */ struct wlan_mlme_dfs_cfg { @@ -596,6 +597,7 @@ struct wlan_mlme_dfs_cfg { bool dfs_filter_offload; bool dfs_beacon_tx_enhanced; bool dfs_prefer_non_dfs; + bool dfs_disable_japan_w53; uint32_t sap_tx_leakage_threshold; }; diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c index cce413d324..805d6bd974 100644 --- a/core/sap/src/sap_fsm.c +++ b/core/sap/src/sap_fsm.c @@ -229,6 +229,8 @@ static uint8_t sap_random_channel_sel(struct sap_context *sap_ctx) if (mac_ctx->mlme_cfg->dfs_cfg.dfs_prefer_non_dfs) flag |= DFS_RANDOM_CH_FLAG_NO_DFS_CH; + if (mac_ctx->mlme_cfg->dfs_cfg.dfs_disable_japan_w53) + flag |= DFS_RANDOM_CH_FLAG_NO_JAPAN_W53_CH; if (QDF_IS_STATUS_ERROR(utils_dfs_get_random_channel( pdev, flag, ch_params, &hw_mode, &ch, &acs_info))) {