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

Commit 45d8b708 authored by Anand N Sunkad's avatar Anand N Sunkad
Browse files

wcnss: add proper macro value check to avoid unnecessary delay



wcnss_service is sends value zero to platform driver, to indicate cal data
is not present, but platform driver checking received value with macro
value -1, because of improper macro value check unnecessary delay is added.
To mitigate issue add proper macro value check and avoid the
unnecessary delay.

Change-Id: I8ff55c7e95c8b556063928d22940a16bee60e931
CRs-Fixed: 779421
Signed-off-by: default avatarAnand N Sunkad <asunka@codeaurora.org>
parent ca991bcd
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@
#define WCNSS_DISABLE_PC_LATENCY	100
#define WCNSS_ENABLE_PC_LATENCY	PM_QOS_DEFAULT_VALUE
#define WCNSS_PM_QOS_TIMEOUT	15000
#define IS_CAL_DATA_PRESENT     0

/* module params */
#define WCNSS_CONFIG_UNSPECIFIED (-1)
@@ -2481,7 +2482,7 @@ static void wcnss_nvbin_dnld_main(struct work_struct *worker)
	if (!FW_CALDATA_CAPABLE())
		goto nv_download;

	if (!penv->fw_cal_available && WCNSS_CONFIG_UNSPECIFIED
	if (!penv->fw_cal_available && IS_CAL_DATA_PRESENT
		!= has_calibrated_data && !penv->user_cal_available) {
		while (!penv->user_cal_available && retry++ < 5)
			msleep(500);