qcacmn: Update debug info in wbuff_buff_get()

The debug node for all the nbufs allocated by wbuff
for a module contains the file and line info
pertaining to wbuff_module_register().

To enhance debugging, Use qdf_net_buf_debug_update_node()
to update debug info when nbuf is requested through
wbuff_buff_get().

Change-Id: Ie8b148ef6313bd3b265cfa3f141e8d0de8b75597
CRs-Fixed: 2328257
This commit is contained in:
Rakshith Suresh Patkar 2018-10-05 15:21:37 +05:30 • committed by nshrivas
commit 5c881ec3ec
3 changed files with 15 additions and 6 deletions

View file

@ -296,7 +296,8 @@ QDF_STATUS wbuff_module_deregister(struct wbuff_mod_handle *hdl)
return QDF_STATUS_SUCCESS;
}
qdf_nbuf_t wbuff_buff_get(struct wbuff_mod_handle *hdl, uint32_t len)
qdf_nbuf_t wbuff_buff_get(struct wbuff_mod_handle *hdl, uint32_t len,
uint8_t *file_name, uint32_t line_num)
{
struct wbuff_handle *handle;
struct wbuff_module *mod = NULL;
@ -321,8 +322,10 @@ qdf_nbuf_t wbuff_buff_get(struct wbuff_mod_handle *hdl, uint32_t len)
mod->pending_returns++;
}
qdf_spin_unlock_bh(&mod->lock);
if (buf)
if (buf) {
qdf_nbuf_set_next(buf, NULL);
qdf_net_buf_debug_update_node(buf, file_name, line_num);
}
return buf;
}