qcacmn: Define qdf timer multiplier as a macro

The current QDF timer multiplier factor is of type
uint32 which takes whole number, so we cannot have multiplier
factors like 0.5 or 1.5

To provide such timer multiplier,
we define timer multiplier, as a macro, provided though
build options and support values like 0.5 or 1.5 through
1/2 and 3/2 respectively and this is used to configure the
timeout value.

Change-Id: I3f5441e33cca71f4a399cbbf9c6f61e2f21ee828
CRs-Fixed: 2450710
This commit is contained in:
Vivek
2019-05-15 15:22:46 +05:30
committed by nshrivas
parent f2526d44ee
commit 2ec3781464
4 changed files with 18 additions and 12 deletions

View File

@@ -29,6 +29,7 @@
#include "qdf_list.h"
#include "qdf_mem.h"
#include <qdf_module.h>
#include "qdf_timer.h"
/* Preprocessor definitions and constants */
#define LINUX_TIMER_COOKIE 0x12341234
@@ -662,9 +663,6 @@ 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_get_multiplier();
/* make sure the remainer of the logic isn't interrupted */
qdf_spin_lock_irqsave(&timer->platform_info.spinlock);
@@ -679,7 +677,7 @@ QDF_STATUS qdf_mc_timer_start(qdf_mc_timer_t *timer, uint32_t expiration_time)
/* start the timer */
mod_timer(&(timer->platform_info.timer),
jiffies + msecs_to_jiffies(expiration_time));
jiffies + qdf_msecs_to_jiffies(expiration_time));
timer->state = QDF_TIMER_STATE_RUNNING;