Quellcode durchsuchen

qcacld-3.0: Restore gDisableDfsJapanW53 ini support

Restore gDisableDfsJapanW53 ini support.

Change-Id: I085e62e7cd8b1fdfe931997d35915f55d079f11d
CRs-Fixed: 2371006
Arif Hussain vor 6 Jahren
Ursprung
Commit
0b634b48ed

+ 2 - 0
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);
 }

+ 23 - 0
components/mlme/dispatcher/inc/cfg_mlme_dfs.h

@@ -176,6 +176,28 @@
 			0, \
 			"DFS master mode capability")
 
+/*
+ * <ini>
+ * 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
+ *
+ * </ini>
+ */
+#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 */

+ 2 - 0
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;
 };
 

+ 2 - 0
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))) {