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

Commit 5b2fe2d5 authored by Govind Singh's avatar Govind Singh Committed by Akash Patel
Browse files

qcacld-3.0: Fix build failure in cds module

pRoamInfo is not initialized in cds_force_sap_on_scc function.
This is resulting in build failure when FEATURE_WLAN_FORCE_SAP_SCC
flag is enabled. Modify cds_force_sap_on_scc function to fix the same.

CRs-Fixed: 953618
Change-Id: I136d33f108dab19c236c7bf1aadf7608c0673baf
parent 234d3528
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -499,9 +499,11 @@ bool cds_check_for_session_conc(uint8_t session_id, uint8_t channel);
CDF_STATUS cds_handle_conc_multiport(uint8_t session_id, uint8_t channel);

#ifdef FEATURE_WLAN_FORCE_SAP_SCC
void cds_force_sap_on_scc(eCsrRoamResult roam_result);
void cds_force_sap_on_scc(eCsrRoamResult roam_result,
		uint8_t channel_id);
#else
static inline void cds_force_sap_on_scc(eCsrRoamResult roam_result)
static inline void cds_force_sap_on_scc(eCsrRoamResult roam_result,
				uint8_t channel_id)
{

}
+5 −3
Original line number Diff line number Diff line
@@ -6556,13 +6556,15 @@ void cds_restart_softap(hdd_adapter_t *pHostapdAdapter)
/**
 * cds_force_sap_on_scc() - Force SAP on SCC
 * @roam_result: Roam result
 * @channel_id: STA channel id
 *
 * Restarts SAP on SCC if its operating channel is different from that of the
 * STA-AP interface
 *
 * Return: None
 */
void cds_force_sap_on_scc(eCsrRoamResult roam_result)
void cds_force_sap_on_scc(eCsrRoamResult roam_result,
			 uint8_t channel_id)
{
	hdd_adapter_t *hostapd_adapter;
	hdd_context_t *hdd_ctx;
@@ -6584,10 +6586,10 @@ void cds_force_sap_on_scc(eCsrRoamResult roam_result)
		 * from AP channel.
		 */
		if (hostapd_adapter->sessionCtx.ap.operatingChannel !=
				pRoamInfo->pBssDesc->channelId) {
				channel_id) {
			cds_err("Restart SAP: SAP channel-%d, STA channel-%d",
				hostapd_adapter->sessionCtx.ap.operatingChannel,
				pRoamInfo->pBssDesc->channelId);
				channel_id);
			cds_restart_softap(hostapd_adapter);
		}
	}
+7 −1
Original line number Diff line number Diff line
@@ -2333,7 +2333,13 @@ defined(FEATURE_WLAN_LFR)
					roamResult, pHddStaCtx))
		return CDF_STATUS_E_FAILURE;

	cds_force_sap_on_scc(roamResult);
	if (NULL != pRoamInfo && NULL != pRoamInfo->pBssDesc) {
		cds_force_sap_on_scc(roamResult,
				pRoamInfo->pBssDesc->channelId);
	} else {
		hdd_err("pRoamInfo profile is not set properly");
		return CDF_STATUS_E_FAILURE;
	}

	return CDF_STATUS_SUCCESS;
}