Lines Matching refs:mod

44 wbuff_get_pool_slot_from_len(struct wbuff_module *mod, uint16_t len)  in wbuff_get_pool_slot_from_len()  argument
51 pool = &mod->wbuff_pool[i]; in wbuff_get_pool_slot_from_len()
59 prev_buf_size = mod->wbuff_pool[i].buffer_size; in wbuff_get_pool_slot_from_len()
102 struct wbuff_module *mod = &wbuff.mod[module_id]; in wbuff_prepare_nbuf() local
103 struct wbuff_pool *wbuff_pool = &mod->wbuff_pool[pool_id]; in wbuff_prepare_nbuf()
129 (wbuff.mod[handle->id].registered)) in wbuff_is_valid_handle()
165 struct wbuff_module *mod; in wbuff_stats_debugfs_show() local
173 mod = &wbuff.mod[i]; in wbuff_stats_debugfs_show()
175 if (!mod->registered) in wbuff_stats_debugfs_show()
187 wbuff_pool = &mod->wbuff_pool[j]; in wbuff_stats_debugfs_show()
246 struct wbuff_module *mod = NULL; in wbuff_module_init() local
255 mod = &wbuff.mod[module_id]; in wbuff_module_init()
256 qdf_spinlock_create(&mod->lock); in wbuff_module_init()
258 mod->wbuff_pool[pool_id].pool = NULL; in wbuff_module_init()
259 mod->registered = false; in wbuff_module_init()
271 struct wbuff_module *mod = NULL; in wbuff_module_deinit() local
281 mod = &wbuff.mod[module_id]; in wbuff_module_deinit()
282 if (mod->registered) in wbuff_module_deinit()
284 &mod->handle); in wbuff_module_deinit()
285 qdf_spinlock_destroy(&mod->lock); in wbuff_module_deinit()
295 struct wbuff_module *mod = NULL; in wbuff_module_register() local
316 mod = &wbuff.mod[module_id]; in wbuff_module_register()
317 if (mod->registered) in wbuff_module_register()
320 mod->handle.id = module_id; in wbuff_module_register()
326 wbuff_pool = &mod->wbuff_pool[pool_id]; in wbuff_module_register()
354 mod->reserve = reserve; in wbuff_module_register()
355 mod->align = align; in wbuff_module_register()
356 mod->registered = true; in wbuff_module_register()
359 return (struct wbuff_mod_handle *)&mod->handle; in wbuff_module_register()
365 struct wbuff_module *mod = NULL; in wbuff_module_deregister() local
380 mod = &wbuff.mod[module_id]; in wbuff_module_deregister()
382 qdf_spin_lock_bh(&mod->lock); in wbuff_module_deregister()
384 wbuff_pool = &mod->wbuff_pool[pool_id]; in wbuff_module_deregister()
401 mod->registered = false; in wbuff_module_deregister()
402 qdf_spin_unlock_bh(&mod->lock); in wbuff_module_deregister()
412 struct wbuff_module *mod = NULL; in wbuff_buff_get() local
428 mod = &wbuff.mod[module_id]; in wbuff_buff_get()
431 pool_id = wbuff_get_pool_slot_from_len(mod, len); in wbuff_buff_get()
436 wbuff_pool = &mod->wbuff_pool[pool_id]; in wbuff_buff_get()
440 qdf_spin_lock_bh(&mod->lock); in wbuff_buff_get()
444 mod->pending_returns++; in wbuff_buff_get()
446 qdf_spin_unlock_bh(&mod->lock); in wbuff_buff_get()
483 wbuff_pool = &wbuff.mod[module_id].wbuff_pool[pool_id]; in wbuff_buff_put()
487 qdf_nbuf_reset(buffer, wbuff.mod[module_id].reserve, in wbuff_buff_put()
488 wbuff.mod[module_id].align); in wbuff_buff_put()
490 qdf_spin_lock_bh(&wbuff.mod[module_id].lock); in wbuff_buff_put()
491 if (wbuff.mod[module_id].registered) { in wbuff_buff_put()
494 wbuff.mod[module_id].pending_returns--; in wbuff_buff_put()
497 qdf_spin_unlock_bh(&wbuff.mod[module_id].lock); in wbuff_buff_put()