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

Commit 72a123fc authored by Utkarsh Bhatnagar's avatar Utkarsh Bhatnagar Committed by Madan Koyyalamudi
Browse files

qcacld-3.0: Initialize sap ch_width by Max ch_width

Initialize sap bw as MAX BW in
policy_mgr_valid_sap_conc_channel_check() as
wlansap_get_csa_chanwidth_from_phymode() take care
of selecting BW for sap and it has a check that will
take minimum of selected BW and initialized BW.
If this BW is not initialized with Max BW then in cases
where original BW is 0 (20 Mhz) (cases such as channel
switch happens from 2.4Ghz to 5Ghz), the above mentioned
check will result in selected BW being 0 (20 Mhz) for
non-DBS HW.

Change-Id: I29febf09036ffa0163df58ce51b399abe2a43fe2
CRs-Fixed: 3101285
parent 57f7b094
Loading
Loading
Loading
Loading
+13 −2
Original line number Diff line number Diff line
@@ -797,7 +797,7 @@ sap_validate_chan(struct sap_context *sap_context,
	uint32_t sta_sap_bit_mask = QDF_STA_MASK | QDF_SAP_MASK;
	uint32_t concurrent_state;
	bool go_force_scc;
	struct ch_params ch_params;
	struct ch_params ch_params = {0};

	mac_handle = cds_get_context(QDF_MODULE_ID_SME);
	mac_ctx = MAC_CONTEXT(mac_handle);
@@ -837,6 +837,14 @@ sap_validate_chan(struct sap_context *sap_context,
					sap_context->cc_switch_mode);
			sap_debug("After check overlap: sap freq %d con freq:%d",
				  sap_context->chan_freq, con_ch_freq);
			/*
			 * For non-DBS platform, a 2.4Ghz can become a 5Ghz freq
			 * so lets used max BW in that case, if it remain 2.4Ghz
			 * then BW will be limited to 20 anyway
			 */
			if (WLAN_REG_IS_24GHZ_CH_FREQ(sap_context->chan_freq))
				ch_params.ch_width = CH_WIDTH_MAX;
			else
				ch_params = sap_context->ch_params;

			if (sap_context->cc_switch_mode !=
@@ -851,6 +859,9 @@ sap_validate_chan(struct sap_context *sap_context,
					return QDF_STATUS_E_ABORTED;
				}
			}
			/* if CH width didn't change fallback to original */
			if (ch_params.ch_width == CH_WIDTH_MAX)
				ch_params = sap_context->ch_params;

			sap_debug("After check concurrency: con freq:%d",
				  con_ch_freq);