Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5653ff6f authored by Amar Singhal's avatar Amar Singhal Committed by nshrivas
Browse files

qcacld-3.0: Conditionally remove SRD channels from ACS configuration

Remove SRD channels from ACS configuration if INI
etsi_srd_chan_in_master_mode is not set and reg-domain is ETSI13.

Change-Id: If734115e5e0927715a1fe947816944e607b82d0b
CRs-Fixed: 2283398
parent 7b668c3b
Loading
Loading
Loading
Loading
+17 −1
Original line number Diff line number Diff line
@@ -1598,12 +1598,13 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
	hdd_context_t *hdd_ctx = wiphy_priv(wiphy);
	tsap_Config_t *sap_config;
	struct sk_buff *temp_skbuff;
	int ret, i;
	int ret, i, ch_cnt = 0;
	QDF_STATUS status;
	struct nlattr *tb[QCA_WLAN_VENDOR_ATTR_ACS_MAX + 1];
	bool ht_enabled, ht40_enabled, vht_enabled;
	uint8_t ch_width;
	enum qca_wlan_vendor_acs_hw_mode hw_mode;
	bool skip_etsi13_srd_chan;
	/* ***Note*** Donot set SME config related to ACS operation here because
	 * ACS operation is not synchronouse and ACS for Second AP may come when
@@ -1772,6 +1773,21 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
		goto out;
	}
	skip_etsi13_srd_chan =
		!hdd_ctx->config->etsi_srd_chan_in_master_mode &&
		cds_is_5g_regdmn_etsi13();
	if (skip_etsi13_srd_chan) {
		for (i = 0; i < sap_config->acs_cfg.ch_list_count; i++) {
			if (cds_is_etsi13_regdmn_srd_chan(sap_config->acs_cfg.
							  ch_list[i]))
				continue;
			sap_config->acs_cfg.ch_list[ch_cnt++] =
				sap_config->acs_cfg.ch_list[i];
		}
		sap_config->acs_cfg.ch_list_count = ch_cnt;
	}
	hdd_debug("get pcl for DO_ACS vendor command");
	/* consult policy manager to get PCL */