소스 검색

qcacmn: dont send Spectral stop WMI if Spectral scan is not in progress

Before sending Spectral stop WMI to FW check whether Spectral
scan is in progress. When all vdevs are in down state host driver
will send a stop Spectral scan command to FW. In that scenario there
is a possibility that stop Spectral scan WMI message may go to FW
even though Spectral scan is not active. To prevent this we add a check
in stop Spectral scan routine to send WMI message only if
scan is in progress.

CRs-Fixed: 2424020
Change-Id: I2119935759c40f62df75574b6a29174973f2703f
Edayilliam Jayadev 6 년 전
부모
커밋
79a5edccee
1개의 변경된 파일17개의 추가작업 그리고 0개의 파일을 삭제
  1. 17 0
      target_if/spectral/target_if_spectral.c

+ 17 - 0
target_if/spectral/target_if_spectral.c

@@ -1011,6 +1011,23 @@ target_if_sops_stop_spectral_scan(void *arg)
 	struct target_if_spectral *spectral = (struct target_if_spectral *)arg;
 	uint8_t val = 0;
 	int tempret, ret = 0;
+	uint8_t enabled = 0;
+
+	tempret = target_if_spectral_info_read(
+		spectral,
+		TARGET_IF_SPECTRAL_INFO_ENABLED,
+		&enabled, sizeof(enabled));
+
+	if (tempret)
+		/*
+		 * Could not determine if Spectral is enabled. Assume scan is
+		 * not in progress
+		 */
+		enabled = 0;
+
+	/* if scan is not enabled, no need to send stop to FW */
+	if (!enabled)
+		return -EPERM;
 
 	tempret = target_if_spectral_info_write(
 			spectral,