2 * @File: buf_pool_api.h
4 * @Abstract: BUF Pool api
8 * Copyright (c) 2008 Atheros Communications Inc.
13 #ifndef _BUF_POOL_API_H
14 #define _BUF_POOL_API_H
18 /* endpoint defines */
21 POOL_ID_HTC_CONTROL = 0,
22 POOL_ID_WMI_SVC_CMD_REPLY = 1,
23 POOL_ID_WMI_SVC_EVENT = 2,
24 POOL_ID_WLAN_RX_BUF = 3,
28 typedef void* pool_handle_t;
30 /* hardware API table structure (API descriptions below) */
32 pool_handle_t (*_init)(adf_os_handle_t handle);
34 void (*_shutdown)(pool_handle_t handle);
36 void (*_create_pool)(pool_handle_t handle, BUF_POOL_ID poolId, int nItems, int nSize);
38 adf_nbuf_t (*_alloc_buf)(pool_handle_t handle, BUF_POOL_ID poolId, int reserve);
40 adf_nbuf_t (*_alloc_buf_align)(pool_handle_t handle, BUF_POOL_ID poolId, int reserve, int align);
42 void (*_free_buf)(pool_handle_t handle, BUF_POOL_ID poolId, adf_nbuf_t buf);
44 /* room to expand this table by another table */
48 extern void buf_pool_module_install(struct buf_pool_api *apis);
50 #endif /* #ifndef _BUF_POOL_API_H */