diff options
| author | Yingying Tang <yintang@codeaurora.org> | 2017-03-06 18:14:14 +0800 |
|---|---|---|
| committer | Sandeep Puligilla <spuligil@codeaurora.org> | 2017-03-20 21:15:37 -0700 |
| commit | a6eb7d089b6770641bd79d84e885a5f6bbdbcb85 (patch) | |
| tree | 715c343ef182b3d15692a8ae96ef6e20bfad274d | |
| parent | 2bca19dc6b2ae971a3cd7f1653edf8dc07a32349 (diff) | |
qcacmn: Fix "__aeabi_uldivmod" symbol error
There is an unknown symbol error "__aeabi_uldivmod" due to
a division operation between uint64 value in wlan driver.
Add qdf API to use do_div to avoid "__aeabi_uldivmod" symbol
error.
Change-Id: I24e51990ff9e0ecea327ad9c71266fd768d62a6c
CRs-Fixed: 2013952
| -rw-r--r-- | qdf/inc/qdf_util.h | 12 | ||||
| -rw-r--r-- | qdf/linux/src/i_qdf_util.h | 15 |
2 files changed, 27 insertions, 0 deletions
diff --git a/qdf/inc/qdf_util.h b/qdf/inc/qdf_util.h index 2e14a5449230..20eb11077c48 100644 --- a/qdf/inc/qdf_util.h +++ b/qdf/inc/qdf_util.h @@ -513,4 +513,16 @@ int qdf_set_dma_coherent_mask(struct device *dev, uint8_t addr_bits) return __qdf_set_dma_coherent_mask(dev, addr_bits); } +/** + * qdf_do_div() - wrapper function for kernel macro(do_div). + * @dividend: Dividend value + * @divisor : Divisor value + * + * Return: Quotient + */ +static inline +uint64_t qdf_do_div(uint64_t dividend, uint32_t divisor) +{ + return __qdf_do_div(dividend, divisor); +} #endif /*_QDF_UTIL_H*/ diff --git a/qdf/linux/src/i_qdf_util.h b/qdf/linux/src/i_qdf_util.h index 711fc3ebe261..ad3f769b59ef 100644 --- a/qdf/linux/src/i_qdf_util.h +++ b/qdf/linux/src/i_qdf_util.h @@ -372,4 +372,19 @@ int __qdf_set_dma_coherent_mask(struct device *dev, uint8_t addr_bits) } #endif +/** + * __qdf_do_div() - wrapper function for kernel macro(do_div). + * @dividend: Dividend value + * @divisor : Divisor value + * + * Return: Quotient + */ +static inline +uint64_t __qdf_do_div(uint64_t dividend, uint32_t divisor) +{ + do_div(dividend, divisor); + /*do_div macro updates dividend with Quotient of dividend/divisor */ + return dividend; +} + #endif /*_I_QDF_UTIL_H*/ |
