qcacmn: Return proper value of qdf timer multiplier

Return proper value of qdf timer multiplier based on this
Kbuild option QDF_TIMER_MULTIPLIER_FRAC.

Change-Id: I10c08ba900aad49fb9134d2e4d337f04a19dec7b
CRs-Fixed: 2855512
This commit is contained in:
Alan Chen
2021-01-14 18:51:18 -08:00
committed by snandini
parent 9ad985593b
commit 64782f823f
2 changed files with 11 additions and 4 deletions

View File

@@ -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;

View File

@@ -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 */