diff --git a/qdf/linux/src/qdf_event.c b/qdf/linux/src/qdf_event.c index 3fcaae8204..f52fa1b9f6 100644 --- a/qdf/linux/src/qdf_event.c +++ b/qdf/linux/src/qdf_event.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2021 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -320,9 +320,8 @@ QDF_STATUS qdf_wait_for_event_completion(qdf_event_t *event, uint32_t timeout) long ret; /* update the timeout if it's on an emulation platform */ - timeout *= qdf_timer_get_multiplier(); ret = wait_for_completion_timeout(&event->complete, - msecs_to_jiffies(timeout)); + __qdf_scaled_msecs_to_jiffies(timeout)); if (ret <= 0) { status = QDF_STATUS_E_TIMEOUT; diff --git a/qdf/linux/src/qdf_mc_timer.c b/qdf/linux/src/qdf_mc_timer.c index 5a14b3c6ec..873fff79ee 100644 --- a/qdf/linux/src/qdf_mc_timer.c +++ b/qdf/linux/src/qdf_mc_timer.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2021 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -45,11 +45,19 @@ inline void qdf_timer_set_multiplier(uint32_t multiplier) } qdf_export_symbol(qdf_timer_set_multiplier); +#ifdef QDF_TIMER_MULTIPLIER_FRAC +inline uint32_t qdf_timer_get_multiplier(void) +{ + return QDF_TIMER_MULTIPLIER_FRAC; +} +qdf_export_symbol(qdf_timer_get_multiplier); +#else inline uint32_t qdf_timer_get_multiplier(void) { return g_qdf_timer_multiplier; } qdf_export_symbol(qdf_timer_get_multiplier); +#endif /* Type declarations */