forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-02-19 1c055e55a242a33e574e48be530e06770a210dcd
kernel/drivers/net/wireless/rockchip_wlan/cywdhd/bcmdhd/include/bcm_mpool_pub.h
....@@ -1,4 +1,3 @@
1
-/* SPDX-License-Identifier: GPL-2.0 */
21 /*
32 * Memory pools library, Public interface
43 *
....@@ -36,14 +35,16 @@
3635 * and instrumentation on top of the heap, without modifying the heap
3736 * allocation implementation.
3837 *
39
- * Copyright (C) 1999-2019, Broadcom Corporation
40
- *
38
+ * Portions of this code are copyright (c) 2022 Cypress Semiconductor Corporation
39
+ *
40
+ * Copyright (C) 1999-2017, Broadcom Corporation
41
+ *
4142 * Unless you and Broadcom execute a separate written software license
4243 * agreement governing use of this software, this software is licensed to you
4344 * under the terms of the GNU General Public License version 2 (the "GPL"),
4445 * available at http://www.broadcom.com/licenses/GPLv2.php, with the
4546 * following added to such license:
46
- *
47
+ *
4748 * As a special exception, the copyright holders of this software give you
4849 * permission to link this software with independent modules, and to copy and
4950 * distribute the resulting executable under terms of your choice, provided that
....@@ -51,7 +52,7 @@
5152 * the license of that module. An independent module is a module which is not
5253 * derived from this software. The special exception does not apply to any
5354 * modifications of the software.
54
- *
55
+ *
5556 * Notwithstanding the above, under no circumstances may you combine this
5657 * software in any way with any other Broadcom software provided under a license
5758 * other than the GPL, without Broadcom's express prior written consent.
....@@ -59,14 +60,13 @@
5960 *
6061 * <<Broadcom-WL-IPTag/Open:>>
6162 *
62
- * $Id: bcm_mpool_pub.h 514727 2014-11-12 03:02:48Z $
63
+ * $Id: bcm_mpool_pub.h 535090 2015-02-17 04:49:01Z $
6364 */
6465
6566 #ifndef _BCM_MPOOL_PUB_H
6667 #define _BCM_MPOOL_PUB_H 1
6768
6869 #include <typedefs.h> /* needed for uint16 */
69
-
7070
7171 /*
7272 **************************************************************************
....@@ -98,14 +98,12 @@
9898 struct bcm_mp_pool;
9999 typedef struct bcm_mp_pool *bcm_mp_pool_h;
100100
101
-
102101 /*
103102 * To make instrumentation more readable, every memory
104103 * pool must have a readable name. Pool names are up to
105104 * 8 bytes including '\0' termination. (7 printable characters.)
106105 */
107106 #define BCM_MP_NAMELEN 8
108
-
109107
110108 /*
111109 * Type definition for pool statistics.
....@@ -118,7 +116,6 @@
118116 uint16 high_water; /* Max number of allocated objects. */
119117 uint16 failed_alloc; /* Failed allocations. */
120118 } bcm_mp_stats_t;
121
-
122119
123120 /*
124121 **************************************************************************
....@@ -141,7 +138,6 @@
141138 * BCME_NOMEM Initialization failed due to no memory. Object must not be used.
142139 */
143140 int bcm_mpm_init(struct osl_info *osh, int max_pools, bcm_mpm_mgr_h *mgrp);
144
-
145141
146142 /*
147143 * bcm_mpm_deinit() - de-initialize the whole memory pool system.
....@@ -187,7 +183,6 @@
187183 const char poolname[BCM_MP_NAMELEN],
188184 bcm_mp_pool_h *newp);
189185
190
-
191186 /*
192187 * bcm_mpm_delete_prealloc_pool() - Delete a memory pool. This should only be called after
193188 * all memory objects have been freed back to the pool.
....@@ -226,7 +221,6 @@
226221 const char poolname[BCM_MP_NAMELEN],
227222 bcm_mp_pool_h *newp);
228223
229
-
230224 /*
231225 * bcm_mpm_delete_heap_pool() - Delete a memory pool. This should only be called after
232226 * all memory objects have been freed back to the pool.
....@@ -241,7 +235,6 @@
241235 *
242236 */
243237 int bcm_mpm_delete_heap_pool(bcm_mpm_mgr_h mgr, bcm_mp_pool_h *poolp);
244
-
245238
246239 /*
247240 * bcm_mpm_stats() - Return stats for all pools
....@@ -259,7 +252,6 @@
259252 */
260253 int bcm_mpm_stats(bcm_mpm_mgr_h mgr, bcm_mp_stats_t *stats, int *nentries);
261254
262
-
263255 /*
264256 * bcm_mpm_dump() - Display statistics on all pools
265257 *
....@@ -273,7 +265,6 @@
273265 *
274266 */
275267 int bcm_mpm_dump(bcm_mpm_mgr_h mgr, struct bcmstrbuf *b);
276
-
277268
278269 /*
279270 * bcm_mpm_get_obj_size() - The size of memory objects may need to be padded to
....@@ -296,7 +287,6 @@
296287 */
297288 int bcm_mpm_get_obj_size(bcm_mpm_mgr_h mgr, unsigned int obj_sz, unsigned int *padded_obj_sz);
298289
299
-
300290 /*
301291 ***************************************************************************
302292 *
....@@ -304,7 +294,6 @@
304294 *
305295 ***************************************************************************
306296 */
307
-
308297
309298 /*
310299 * bcm_mp_alloc() - Allocate a memory pool object.
....@@ -344,8 +333,7 @@
344333 * other Error getting statistics.
345334 *
346335 */
347
-int bcm_mp_stats(bcm_mp_pool_h pool, bcm_mp_stats_t *stats);
348
-
336
+void bcm_mp_stats(bcm_mp_pool_h pool, bcm_mp_stats_t *stats);
349337
350338 /*
351339 * bcm_mp_dump() - Dump a pool
....@@ -360,6 +348,5 @@
360348 *
361349 */
362350 int bcm_mp_dump(bcm_mp_pool_h pool, struct bcmstrbuf *b);
363
-
364351
365352 #endif /* _BCM_MPOOL_PUB_H */