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
szülő f2526d44ee
commit 2ec3781464
4 fájl változott, egészen pontosan 18 új sor hozzáadva és 12 régi sor törölve

Fájl megtekintése

@@ -51,6 +51,14 @@ qdf_timer_init(qdf_handle_t hdl, qdf_timer_t *timer, qdf_timer_func_t func,
return __qdf_timer_init(timer, func, arg, type);
}
#ifdef QDF_TIMER_MULTIPLIER_FRAC
#define qdf_msecs_to_jiffies(msec) \
(QDF_TIMER_MULTIPLIER_FRAC * __qdf_msecs_to_jiffies(msec))
#else
#define qdf_msecs_to_jiffies(msec) \
(qdf_timer_get_multiplier() * __qdf_msecs_to_jiffies(msec))
#endif
/**
* qdf_timer_start() - start a timer
* @timer: timer to start