Forráskód Böngészése

qcacmn: Fix qdf_wait_single_event api to wait for infinite timeout

qdf_wait_single_event have contradicting impelmentation
when timeout value is set to 0.
The fix provides an implementation that works when timeout is
to zero aswell.

Change-Id: I1f03bd79227988b76fc9eb0fe9db3cf41542bd71
CRs-Fixed: 1035161
Anurag Chouhan 8 éve
szülő
commit
8f7d421854
1 módosított fájl, 4 hozzáadás és 5 törlés
  1. 4 5
      qdf/linux/src/qdf_event.c

+ 4 - 5
qdf/linux/src/qdf_event.c

@@ -249,12 +249,11 @@ QDF_STATUS qdf_wait_single_event(qdf_event_t *event, uint32_t timeout)
 		if (0 >= ret)
 			return QDF_STATUS_E_TIMEOUT;
 	} else {
-		QDF_ASSERT(0);
-		QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
-			  "Zero timeout value passed into %s", __func__);
-		return QDF_STATUS_E_FAULT;
+		wait_for_completion(&event->complete);
+		QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_INFO,
+			  "Signaled for completion %s", __func__);
+		return QDF_STATUS_SUCCESS;
 	}
-
 	return QDF_STATUS_SUCCESS;
 }
 EXPORT_SYMBOL(qdf_wait_single_event);