qcacmn: Define QDF API for vzalloc and vfree

Define QDF API for virtual memory allocation and free.
Also add new api to get time of the day in microseconds.

Change-Id: I2921055bbb6b5d2a1105d19448b2a10fa2d6ccc5
CRs-Fixed: 3038180
This commit is contained in:
Pragaspathi Thilagaraj
2021-09-14 15:50:06 +05:30
committed by Madan Koyyalamudi
parent e5255c7253
commit a8d8b663b2
10 changed files with 140 additions and 55 deletions

View File

@@ -1183,4 +1183,21 @@ int32_t qdf_mem_dp_rx_skb_max_cnt_read(void);
void qdf_mem_tx_desc_cnt_update(qdf_atomic_t pending_tx_descs,
int32_t tx_descs_max);
/**
* qdf_mem_vfree() - Free the virtual memory pointed to by ptr
* @ptr: Pointer to the starting address of the memory to
* be freed.
*
* Return: None
*/
#define qdf_mem_vfree(ptr) __qdf_mem_vfree(ptr)
/**
* qdf_mem_valloc() - Allocate virtual memory for the given
* size
* @size: Number of bytes of memory to be allocated
*
* Return: Pointer to the starting address of the allocated virtual memory
*/
#define qdf_mem_valloc(size) __qdf_mem_valloc(size, __func__, __LINE__)
#endif /* __QDF_MEMORY_H */