diff --git a/qdf/linux/src/i_qdf_timer.h b/qdf/linux/src/i_qdf_timer.h index 683d876b8d..527f91b8ad 100644 --- a/qdf/linux/src/i_qdf_timer.h +++ b/qdf/linux/src/i_qdf_timer.h @@ -28,11 +28,15 @@ #include #include #include +#include "qdf_mc_timer.h" #include #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) #include #endif +#define qdf_msecs_to_jiffies(msec) \ + (qdf_timer_get_multiplier() * msecs_to_jiffies(msec)) + #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0) struct __qdf_timer_t { struct timer_list os_timer; @@ -77,13 +81,13 @@ static inline void __qdf_timer_start(struct __qdf_timer_t *timer, uint32_t msec) { struct timer_list *os_timer = &timer->os_timer; - os_timer->expires = jiffies + msecs_to_jiffies(msec); + os_timer->expires = jiffies + qdf_msecs_to_jiffies(msec); add_timer(os_timer); } static inline void __qdf_timer_mod(struct __qdf_timer_t *timer, uint32_t msec) { - mod_timer(&timer->os_timer, jiffies + msecs_to_jiffies(msec)); + mod_timer(&timer->os_timer, jiffies + qdf_msecs_to_jiffies(msec)); } static inline bool __qdf_timer_stop(struct __qdf_timer_t *timer) @@ -140,13 +144,13 @@ static inline QDF_STATUS __qdf_timer_init(__qdf_timer_t *os_timer, static inline void __qdf_timer_start(__qdf_timer_t *timer, uint32_t msec) { - timer->expires = jiffies + msecs_to_jiffies(msec); + timer->expires = jiffies + qdf_msecs_to_jiffies(msec); add_timer(timer); } static inline void __qdf_timer_mod(__qdf_timer_t *timer, uint32_t msec) { - mod_timer(timer, jiffies + msecs_to_jiffies(msec)); + mod_timer(timer, jiffies + qdf_msecs_to_jiffies(msec)); } static inline bool __qdf_timer_stop(__qdf_timer_t *timer) diff --git a/qdf/linux/src/qdf_mc_timer.c b/qdf/linux/src/qdf_mc_timer.c index 7a3d297bea..6726f321f4 100644 --- a/qdf/linux/src/qdf_mc_timer.c +++ b/qdf/linux/src/qdf_mc_timer.c @@ -35,12 +35,7 @@ #define LINUX_INVALID_TIMER_COOKIE 0xfeedface #define TMR_INVALID_ID (0) -/* qdf timer multiplier */ -#ifdef QCA_WIFI_NAPIER_EMULATION -static uint32_t g_qdf_timer_multiplier = 100; -#else static uint32_t g_qdf_timer_multiplier = 1; -#endif inline void qdf_timer_set_multiplier(uint32_t multiplier) {