Quellcode durchsuchen

qcacld-3.0: Find extscan_in_progress irrespective of connected or pno

This is a qcacld-2.0 to qcacld-3.0 propagation.

The problem with the current code is we are finding whether connected or
pno_in_progress or extscan_in_progress in the same for loop and whenever
one of them matches, we break out of loop. It makes sense to keep
connected flag and pno_in_progress inside the for loop because both are
mutually exclusive. But same is not the case with extscan_in_progress,
this flag can be set to true or false irrespective of connected or
pno_in_progress.

Hence the fix is to move finding extscan_in_progress to a separate for loop.

Change-Id: Ie72ff7f7382adaea5626c0808a206d18c2916e0d
CRs-Fixed: 899322
Srinivas Girigowda vor 9 Jahren
Ursprung
Commit
0f09f999bd
1 geänderte Dateien mit 29 neuen und 7 gelöschten Zeilen
  1. 29 7
      core/wma/src/wma_features.c

+ 29 - 7
core/wma/src/wma_features.c

@@ -3722,6 +3722,33 @@ CDF_STATUS wma_wow_exit(tp_wma_handle wma, tpSirHalWowlExitParams info)
 	return CDF_STATUS_SUCCESS;
 }
 
+#ifdef FEATURE_WLAN_EXTSCAN
+/**
+ * wma_is_extscan_in_progress(): check if extscan is in progress
+ * @wma: wma handle
+ *
+ * Return: true is extscan in progress, false otherwise.
+ */
+static bool wma_is_extscan_in_progress(tp_wma_handle wma)
+{
+	int i;
+
+	for (i = 0; i < wma->max_bssid; i++) {
+		if (wma->interfaces[i].extscan_in_progress) {
+			WMA_LOGD("Extscan is in progress, enabling wow");
+			return true;
+		}
+	}
+
+	return false;
+}
+#else
+static bool wma_is_extscan_in_progress(tp_wma_handle wma)
+{
+	return false;
+}
+#endif
+
 /**
  * wma_suspend_req() -  Handles suspend indication request received from umac.
  * @wma: wma handle
@@ -3814,14 +3841,9 @@ CDF_STATUS wma_suspend_req(tp_wma_handle wma, tpSirWlanSuspendParam info)
 			break;
 		}
 #endif /* FEATURE_WLAN_SCAN_PNO */
-#ifdef FEATURE_WLAN_EXTSCAN
-		if (wma->interfaces[i].extscan_in_progress) {
-			WMA_LOGD("Extscan is in progress, enabling wow");
-			extscan_in_progress = true;
-			break;
-		}
-#endif
 	}
+	extscan_in_progress = wma_is_extscan_in_progress(wma);
+
 	for (i = 0; i < wma->max_bssid; i++) {
 		wma->wow.gtk_pdev_enable |= wma->wow.gtk_err_enable[i];
 		WMA_LOGD("VDEV_ID:%d, gtk_err_enable[%d]:%d, gtk_pdev_enable:%d", i,