qcacmn: Add API to get max size of the list

The list APIs only provides the current size of the list.
In certain cases, to be able to decide if the queue is full
we can compare the current size with the max size of the list
and not attempt to add to the list at all.

Change-Id: Ic0844ae9fccd8bcc9603d31c41692680966e1753
CRs-Fixed:2304508
This commit is contained in:
Vivek
2018-08-30 14:35:24 +05:30
کامیت شده توسط nshrivas
والد 6ca4112f46
کامیت e4bd23b400
2فایلهای تغییر یافته به همراه31 افزوده شده و 1 حذف شده

مشاهده پرونده

@@ -137,7 +137,17 @@ static inline void qdf_list_destroy(qdf_list_t *list)
*/
static inline uint32_t qdf_list_size(qdf_list_t *list)
{
return list->count;
return __qdf_list_size(list);
}
/**
* qdf_list_max_size() - gives the max size of the list
* @list: object of list
* Return: max size of the list
*/
static inline uint32_t qdf_list_max_size(qdf_list_t *list)
{
return __qdf_list_max_size(list);
}
QDF_STATUS qdf_list_insert_back(qdf_list_t *list, qdf_list_node_t *node);