summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYu Wang <yyuwang@codeaurora.org>2017-09-15 18:37:07 +0800
committerYu Wang <yyuwang@codeaurora.org>2017-09-18 19:15:49 +0800
commitb00452a85421a993713846fddbf1b0758d451cc1 (patch)
tree869527dfc691cb1b3e48fb8bfa94f8e8d4c3bb6c
parent1fc8e4375355987a5a9b740685c8b3f07f43ba45 (diff)
qcacld-2.0: use qdf_do_div to do 64 bit division
Use qdf_do_div() for 64 bit division, because '/' can't be used for 64 bit division on arm32 platform. Change-Id: I047334565643e695ac343a5da06e030d8e37d7e4 CRs-Fixed: 2111578
-rw-r--r--CORE/HDD/src/wlan_hdd_tsf.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/CORE/HDD/src/wlan_hdd_tsf.c b/CORE/HDD/src/wlan_hdd_tsf.c
index 257ea797b906..eb916dc52cd5 100644
--- a/CORE/HDD/src/wlan_hdd_tsf.c
+++ b/CORE/HDD/src/wlan_hdd_tsf.c
@@ -585,13 +585,15 @@ static inline int32_t hdd_get_targettime_from_hosttime(
if (host_time < adapter->last_host_time)
ret = hdd_uint64_minus(adapter->last_target_time,
- (adapter->last_host_time - host_time) /
- HOST_TO_TARGET_TIME_RATIO,
+ vos_do_div(adapter->last_host_time -
+ host_time,
+ HOST_TO_TARGET_TIME_RATIO),
target_time);
else
ret = hdd_uint64_plus(adapter->last_target_time,
- (host_time - adapter->last_host_time) /
- HOST_TO_TARGET_TIME_RATIO,
+ vos_do_div(host_time -
+ adapter->last_host_time,
+ HOST_TO_TARGET_TIME_RATIO),
target_time);
if (in_cap_state)