From c9ef24f82a9e9925d2335c6a25413dc70cade535 Mon Sep 17 00:00:00 2001 From: Yu Wang Date: Fri, 15 Sep 2017 18:37:07 +0800 Subject: [PATCH] qcacld-3.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: 2110736 --- core/hdd/src/wlan_hdd_tsf.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/core/hdd/src/wlan_hdd_tsf.c b/core/hdd/src/wlan_hdd_tsf.c index bfacfe15eb7d2..45f6a1cbe8b22 100644 --- a/core/hdd/src/wlan_hdd_tsf.c +++ b/core/hdd/src/wlan_hdd_tsf.c @@ -586,13 +586,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, + qdf_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, + qdf_do_div(host_time - + adapter->last_host_time, + HOST_TO_TARGET_TIME_RATIO), target_time); if (in_cap_state)