diff --git a/qdf/inc/qdf_timer.h b/qdf/inc/qdf_timer.h index 83ec8d3bd1..07841a44a6 100644 --- a/qdf/inc/qdf_timer.h +++ b/qdf/inc/qdf_timer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2016, 2018-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2016, 2018-2020 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 @@ -74,11 +74,11 @@ static inline void qdf_timer_start(qdf_timer_t *timer, int msec) * * If QDF timer multiplier is set, the timeout value may get scaled. * - * Return: none + * Return: true if @timer is already active, false if @timer was not active */ -static inline void qdf_timer_mod(qdf_timer_t *timer, int msec) +static inline bool qdf_timer_mod(qdf_timer_t *timer, int msec) { - __qdf_timer_mod(timer, msec); + return __qdf_timer_mod(timer, msec); } /** diff --git a/qdf/linux/src/i_qdf_timer.h b/qdf/linux/src/i_qdf_timer.h index 29c7782a94..4bd1332c4f 100644 --- a/qdf/linux/src/i_qdf_timer.h +++ b/qdf/linux/src/i_qdf_timer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2020 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 @@ -131,10 +131,10 @@ static inline void __qdf_timer_start(struct __qdf_timer_t *timer, uint32_t msec) add_timer(os_timer); } -static inline void __qdf_timer_mod(struct __qdf_timer_t *timer, uint32_t msec) +static inline bool __qdf_timer_mod(struct __qdf_timer_t *timer, uint32_t msec) { - mod_timer(&timer->os_timer, - jiffies + __qdf_scaled_msecs_to_jiffies(msec)); + return mod_timer(&timer->os_timer, + jiffies + __qdf_scaled_msecs_to_jiffies(msec)); } static inline bool __qdf_timer_stop(struct __qdf_timer_t *timer)