Jelajahi Sumber

qcacld-3.0: Skip ACS based on hw mode and STA's channel

If the STA is already present, and a SAP has to come up,
return the STA channel as the best channel, and skip ACS,
if the Hw_mode is set according to the STA channel
Eg:- STA on channel 1, and hw_mode is 11B, or 11G.
Also the driver doesnt check the DFS master mode, and
includes the DFS channels in the ACS scan list, which
may result in SAP bringup on a DFS channel

Check the conc_channel, and acs_policy ini, and return the
best channel as the STA channel.
Also exclude the DFS channels from the ACS scan list if
DFS master mode is disabled.

Change-Id: I70951d7b51b620db8cda7ed771d5c36a7571a125
CRs-Fixed: 2340965
gaurank kathpalia 6 tahun lalu
induk
melakukan
5f6919b0f4
2 mengubah file dengan 7 tambahan dan 4 penghapusan
  1. 2 2
      core/hdd/src/wlan_hdd_cfg80211.c
  2. 5 2
      core/sap/src/sap_fsm.c

+ 2 - 2
core/hdd/src/wlan_hdd_cfg80211.c

@@ -2790,12 +2790,12 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
 	if (!QDF_IS_STATUS_SUCCESS(qdf_status))
 		hdd_err("get_external_acs_policy failed");
 
-	if (is_external_acs_policy) {
+	if (is_external_acs_policy && conc_channel) {
 		if ((conc_channel >= WLAN_REG_CH_NUM(CHAN_ENUM_36) &&
 		     sap_config->acs_cfg.band == QCA_ACS_MODE_IEEE80211A) ||
 		     (conc_channel <= WLAN_REG_CH_NUM(CHAN_ENUM_14) &&
 		      (sap_config->acs_cfg.band == QCA_ACS_MODE_IEEE80211B ||
-		       sap_config->acs_cfg.band == QCA_ACS_MODE_IEEE80211A))) {
+		       sap_config->acs_cfg.band == QCA_ACS_MODE_IEEE80211G))) {
 			sap_config->acs_cfg.pri_ch = conc_channel;
 			wlan_sap_set_sap_ctx_acs_cfg(
 				WLAN_HDD_GET_SAP_CTX_PTR(adapter), sap_config);

+ 5 - 2
core/sap/src/sap_fsm.c

@@ -3226,6 +3226,7 @@ static QDF_STATUS sap_get_channel_list(struct sap_context *sap_ctx,
 	uint8_t loop_count;
 	uint8_t *list;
 	uint8_t ch_count;
+	uint8_t dfs_master_enable;
 	uint8_t start_ch_num, band_start_ch;
 	uint8_t end_ch_num, band_end_ch;
 	uint32_t en_lte_coex;
@@ -3244,6 +3245,7 @@ static QDF_STATUS sap_get_channel_list(struct sap_context *sap_ctx,
 		return QDF_STATUS_E_FAULT;
 	}
 
+	dfs_master_enable = mac_ctx->mlme_cfg->dfs_cfg.dfs_master_capable;
 	start_ch_num = sap_ctx->acs_cfg->start_ch;
 	end_ch_num = sap_ctx->acs_cfg->end_ch;
 	ch_width = sap_ctx->acs_cfg->ch_width;
@@ -3320,8 +3322,9 @@ static QDF_STATUS sap_get_channel_list(struct sap_context *sap_ctx,
 		 */
 		if (wlan_reg_is_dfs_ch(mac_ctx->pdev,
 		    WLAN_REG_CH_NUM(loop_count)) &&
-		    policy_mgr_disallow_mcc(mac_ctx->psoc,
-		    WLAN_REG_CH_NUM(loop_count)))
+		    (policy_mgr_disallow_mcc(mac_ctx->psoc,
+		    WLAN_REG_CH_NUM(loop_count)) ||
+		    !dfs_master_enable))
 			continue;
 
 		/* Dont scan ETSI13 SRD channels if the ETSI13 SRD channels