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

Commit 643fed7c authored by Liangwei Dong's avatar Liangwei Dong Committed by Madan Koyyalamudi
Browse files

qcacld-3.0: Init 5G SAP mandatory list with 2G+5G band

When SAP starts on 5G, initialize SAP mandatory list with
2G and 5G mandatory list. And also select same band channel
SCC channel firstly in the intersection of PCL and mandatory
channel list.

Change-Id: Iac86b5caf38bf72f143be81122f8378fc61b29e2
CRs-Fixed: 3039268
parent a519136e
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
/*
 * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
 * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
 *
 * Permission to use, copy, modify, and/or distribute this software for
 * any purpose with or without fee is hereby granted, provided that the
@@ -3630,9 +3631,8 @@ void policy_mgr_init_sap_mandatory_chan(struct wlan_objmgr_psoc *psoc,
	if (WLAN_REG_IS_5GHZ_CH_FREQ(org_ch_freq)) {
		policy_mgr_debug("channel %hu, sap mandatory chan list enabled",
				 org_ch_freq);
		if (!policy_mgr_get_sap_mandatory_chan_list_len(psoc))
		policy_mgr_init_sap_mandatory_chan_by_band(
				psoc, BIT(REG_BAND_2G));
			psoc, BIT(REG_BAND_2G) | BIT(REG_BAND_5G));
		policy_mgr_add_sap_mandatory_chan(
			psoc, org_ch_freq);
	} else if (WLAN_REG_IS_6GHZ_CHAN_FREQ(org_ch_freq)) {
+3 −1
Original line number Diff line number Diff line
@@ -2506,7 +2506,9 @@ policy_mgr_get_sap_mandatory_channel(struct wlan_objmgr_psoc *psoc,
	}

	sap_new_freq = pcl.pcl_list[0];
	if (WLAN_REG_IS_6GHZ_CHAN_FREQ(sap_ch_freq)) {
	if (WLAN_REG_IS_6GHZ_CHAN_FREQ(sap_ch_freq) ||
	    (WLAN_REG_IS_5GHZ_CH_FREQ(sap_ch_freq) &&
	     WLAN_REG_IS_5GHZ_CH_FREQ(*intf_ch_freq))) {
		for (i = 0; i < pcl.pcl_len; i++) {
			if (pcl.pcl_list[i] == *intf_ch_freq) {
				sap_new_freq = pcl.pcl_list[i];