qcacmn: Add data structures for SWLM

Add the necessary data structures for the
software latency manager.

Change-Id: Ibf55f0eef7ee6602b007de39a28f09c4622bd356
CRs-Fixed: 2769004
This commit is contained in:
Rakesh Pillai
2020-08-24 04:55:01 -07:00
committed by snandini
parent 4b6f9e082b
commit 21af5ba8cf
8 changed files with 213 additions and 5 deletions

View File

@@ -984,6 +984,30 @@ hal_srng_access_start_unlocked(hal_soc_handle_t hal_soc_hdl,
return 0;
}
/**
* hal_srng_try_access_start - Try to start (locked) ring access
*
* @hal_soc: Opaque HAL SOC handle
* @hal_ring_hdl: Ring pointer (Source or Destination ring)
*
* Return: 0 on success; error on failure
*/
static inline int hal_srng_try_access_start(hal_soc_handle_t hal_soc_hdl,
hal_ring_handle_t hal_ring_hdl)
{
struct hal_srng *srng = (struct hal_srng *)hal_ring_hdl;
if (qdf_unlikely(!hal_ring_hdl)) {
qdf_print("Error: Invalid hal_ring\n");
return -EINVAL;
}
if (!SRNG_TRY_LOCK(&(srng->lock)))
return -EINVAL;
return hal_srng_access_start_unlocked(hal_soc_hdl, hal_ring_hdl);
}
/**
* hal_srng_access_start - Start (locked) ring access
*