فهرست منبع

qcacmn: Add API to iterate list from a given node

Add QDF API to iterate linked list starting from
a specific node.

Change-Id: I1bf7137213eefa434c983a8d10aa8e1398fa586e
CRs-Fixed: 3029986
Edayilliam Jayadev 3 سال پیش
والد
کامیت
76ba042a40
2فایلهای تغییر یافته به همراه8 افزوده شده و 2 حذف شده
  1. 4 1
      qdf/inc/qdf_list.h
  2. 4 1
      qdf/linux/src/i_qdf_list.h

+ 4 - 1
qdf/inc/qdf_list.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2021 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -104,6 +104,9 @@ static inline void qdf_list_create(__qdf_list_t *list, uint32_t max_size)
 #define qdf_list_for_each_del(list_ptr, cursor, next, node_field) \
 	__qdf_list_for_each_del(list_ptr, cursor, next, node_field)
 
+#define qdf_list_for_each_from(list_ptr, cursor, node_field) \
+	__qdf_list_for_each_from(list_ptr, cursor, node_field)
+
 /**
  * qdf_init_list_head() - initialize list head
  * @list_head: pointer to list head

+ 4 - 1
qdf/linux/src/i_qdf_list.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2016, 2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2016, 2021 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -94,6 +94,9 @@ static inline uint32_t __qdf_list_max_size(__qdf_list_t *list)
 #define __qdf_list_for_each_del(list_ptr, cursor, next, node_field) \
 	list_for_each_entry_safe(cursor, next, &(list_ptr)->anchor, node_field)
 
+#define __qdf_list_for_each_from(list_ptr, cursor, node_field) \
+	list_for_each_entry_from(cursor, &(list_ptr)->anchor, node_field)
+
 /**
  * __qdf_init_list_head() - initialize list head
  * @list_head: pointer to list head