diff --git a/qdf/inc/qdf_list.h b/qdf/inc/qdf_list.h index a57d423ae6..2b214968a2 100644 --- a/qdf/inc/qdf_list.h +++ b/qdf/inc/qdf_list.h @@ -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); diff --git a/qdf/linux/src/i_qdf_list.h b/qdf/linux/src/i_qdf_list.h index 1a20615088..254817aa2a 100644 --- a/qdf/linux/src/i_qdf_list.h +++ b/qdf/linux/src/i_qdf_list.h @@ -51,6 +51,26 @@ static inline void __qdf_list_create(__qdf_list_t *list, uint32_t max_size) list->max_size = max_size; } +/** + * __qdf_list_size() - gives the size of the list + * @list: object of list + * Return: size of the list + */ +static inline uint32_t __qdf_list_size(__qdf_list_t *list) +{ + return list->count; +} + +/** + * __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 list->max_size; +} + #define __QDF_LIST_ANCHOR(list) ((list).anchor) #define __QDF_LIST_NODE_INIT(prev_node, next_node) \