qcacmn: Add HIF CE RX support to WBUFF
Currently, WBUFF is being used only for WMI TX buffers. Add HIF CE RX buffers support to WBUFF in an effort to re-use the copy engine RX buffers instead of freeing/allocating buffers for every CE RX transaction. This fixes the problem of CE RX memory fragmentation. Change-Id: Id9c043a5c5d0882a7994fa03cd8c335555d46b8d CRs-Fixed: 3534539
This commit is contained in:

committad av
Rahul Choudhary

förälder
9b27c6e104
incheckning
cbe8170798
@@ -28,8 +28,13 @@
|
||||
#include <qdf_status.h>
|
||||
#include <qdf_nbuf.h>
|
||||
|
||||
/* Number of pools supported per module */
|
||||
#define WBUFF_MAX_POOLS 16
|
||||
#define WBUFF_MAX_POOL_ID WBUFF_MAX_POOLS
|
||||
|
||||
enum wbuff_module_id {
|
||||
WBUFF_MODULE_WMI_TX,
|
||||
WBUFF_MODULE_CE_RX,
|
||||
WBUFF_MAX_MODULES,
|
||||
};
|
||||
|
||||
@@ -93,6 +98,7 @@ QDF_STATUS wbuff_module_deregister(struct wbuff_mod_handle *hdl);
|
||||
/**
|
||||
* wbuff_buff_get() - return buffer to the requester
|
||||
* @hdl: wbuff_handle corresponding to the module
|
||||
* @pool_id: pool identifier
|
||||
* @len: length of buffer requested
|
||||
* @func_name: function from which buffer is requested
|
||||
* @line_num: line number in the file
|
||||
@@ -100,8 +106,9 @@ QDF_STATUS wbuff_module_deregister(struct wbuff_mod_handle *hdl);
|
||||
* Return: Network buffer if success
|
||||
* NULL if failure
|
||||
*/
|
||||
qdf_nbuf_t wbuff_buff_get(struct wbuff_mod_handle *hdl, uint32_t len,
|
||||
const char *func_name, uint32_t line_num);
|
||||
qdf_nbuf_t
|
||||
wbuff_buff_get(struct wbuff_mod_handle *hdl, uint8_t pool_id, uint32_t len,
|
||||
const char *func_name, uint32_t line_num);
|
||||
|
||||
/**
|
||||
* wbuff_buff_put() - put the buffer back to wbuff pool
|
||||
@@ -137,8 +144,8 @@ static inline QDF_STATUS wbuff_module_deregister(struct wbuff_mod_handle *hdl)
|
||||
}
|
||||
|
||||
static inline qdf_nbuf_t
|
||||
wbuff_buff_get(struct wbuff_mod_handle *hdl, uint32_t len, const char *func_name,
|
||||
uint32_t line_num)
|
||||
wbuff_buff_get(struct wbuff_mod_handle *hdl, uint8_t pool_id, uint32_t len,
|
||||
const char *func_name, uint32_t line_num)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
Referens i nytt ärende
Block a user