qcacmn: Increase timeout values for napier emu

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

Change-Id: I358259801018dc7ce48bd85f35594dec44704017
CRs-Fixed: 1089638
This commit is contained in:
Ankit Gupta
2016-11-10 21:20:35 -08:00
committed by qcabuildsw
parent d5b4fa8eea
commit 7ee2ab073b
2 changed files with 19 additions and 0 deletions

View File

@@ -38,6 +38,13 @@
#include "qdf_event.h" #include "qdf_event.h"
#include <linux/export.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 */ /* 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; return QDF_STATUS_E_INVAL;
} }
/* update the timeout if its on a emaulation platform */
timeout *= QDF_TIMER_MULTIPLIER;
if (timeout) { if (timeout) {
long ret; long ret;
ret = wait_for_completion_timeout(&event->complete, ret = wait_for_completion_timeout(&event->complete,

View File

@@ -46,6 +46,13 @@
#define LINUX_INVALID_TIMER_COOKIE 0xfeedface #define LINUX_INVALID_TIMER_COOKIE 0xfeedface
#define TMR_INVALID_ID (0) #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 */ /* Type declarations */
/* Static Variable Definitions */ /* 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; 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 */ /* make sure the remainer of the logic isn't interrupted */
qdf_spin_lock_irqsave(&timer->platform_info.spinlock); qdf_spin_lock_irqsave(&timer->platform_info.spinlock);