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
This commit is contained in:
@@ -602,6 +602,19 @@ int qdf_set_dma_coherent_mask(struct device *dev, uint8_t addr_bits)
|
|||||||
return __qdf_set_dma_coherent_mask(dev, 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);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_get_random_bytes() - returns nbytes bytes of random
|
* qdf_get_random_bytes() - returns nbytes bytes of random
|
||||||
* data
|
* data
|
||||||
|
@@ -422,4 +422,19 @@ void __qdf_get_random_bytes(void *buf, int nbytes)
|
|||||||
return get_random_bytes(buf, nbytes);
|
return get_random_bytes(buf, nbytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* __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*/
|
#endif /*_I_QDF_UTIL_H*/
|
||||||
|
Reference in New Issue
Block a user