Prechádzať zdrojové kódy

qcacmn: Increase timeout values for napier emu

Increase the timeout duration for protocol events
for napier emulation platform.

Change-Id: I358259801018dc7ce48bd85f35594dec44704017
CRs-Fixed: 1089638
Ankit Gupta 8 rokov pred
rodič
commit
7ee2ab073b
2 zmenil súbory, kde vykonal 19 pridanie a 0 odobranie
  1. 9 0
      qdf/linux/src/qdf_event.c
  2. 10 0
      qdf/linux/src/qdf_mc_timer.c

+ 9 - 0
qdf/linux/src/qdf_event.c

@@ -38,6 +38,13 @@
 #include "qdf_event.h"
 #include <linux/export.h>
 
+/* Flag for napier emulation */
+#ifdef QCA_WIFI_NAPIER_EMULATION
+#define QDF_TIMER_MULTIPLIER 100
+#else
+#define QDF_TIMER_MULTIPLIER 1
+#endif
+
 /* Function Definitions and Documentation */
 
 /**
@@ -243,6 +250,8 @@ QDF_STATUS qdf_wait_single_event(qdf_event_t *event, uint32_t timeout)
 		return QDF_STATUS_E_INVAL;
 	}
 
+	/* update the timeout if its on a emaulation platform */
+	timeout *= QDF_TIMER_MULTIPLIER;
 	if (timeout) {
 		long ret;
 		ret = wait_for_completion_timeout(&event->complete,

+ 10 - 0
qdf/linux/src/qdf_mc_timer.c

@@ -46,6 +46,13 @@
 #define LINUX_INVALID_TIMER_COOKIE 0xfeedface
 #define TMR_INVALID_ID (0)
 
+/* Flag for napier emulation */
+#ifdef QCA_WIFI_NAPIER_EMULATION
+#define QDF_TIMER_MULTIPLIER 100
+#else
+#define QDF_TIMER_MULTIPLIER 1
+#endif
+
 /* Type declarations */
 
 /* Static Variable Definitions */
@@ -562,6 +569,9 @@ QDF_STATUS qdf_mc_timer_start(qdf_mc_timer_t *timer, uint32_t expiration_time)
 		return QDF_STATUS_E_INVAL;
 	}
 
+	/* update expiration time based on if emulation platform */
+	expiration_time *= QDF_TIMER_MULTIPLIER;
+
 	/* make sure the remainer of the logic isn't interrupted */
 	qdf_spin_lock_irqsave(&timer->platform_info.spinlock);