Lines Matching refs:pktids

300 	struct brcmf_msgbuf_pktids *pktids;  in brcmf_msgbuf_init_pktids()  local
306 pktids = kzalloc(sizeof(*pktids), GFP_KERNEL); in brcmf_msgbuf_init_pktids()
307 if (!pktids) { in brcmf_msgbuf_init_pktids()
311 pktids->array = array; in brcmf_msgbuf_init_pktids()
312 pktids->array_size = nr_array_entries; in brcmf_msgbuf_init_pktids()
314 return pktids; in brcmf_msgbuf_init_pktids()
320 struct brcmf_msgbuf_pktids *pktids, in brcmf_msgbuf_alloc_pktid() argument
327 array = pktids->array; in brcmf_msgbuf_alloc_pktid()
330 skb->len - data_offset, pktids->direction); in brcmf_msgbuf_alloc_pktid()
337 *idx = pktids->last_allocated_idx; in brcmf_msgbuf_alloc_pktid()
342 if (*idx == pktids->array_size) in brcmf_msgbuf_alloc_pktid()
348 } while (count < pktids->array_size); in brcmf_msgbuf_alloc_pktid()
350 if (count == pktids->array_size) { in brcmf_msgbuf_alloc_pktid()
352 pktids->direction); in brcmf_msgbuf_alloc_pktid()
360 pktids->last_allocated_idx = *idx; in brcmf_msgbuf_alloc_pktid()
367 brcmf_msgbuf_get_pktid(struct device *dev, struct brcmf_msgbuf_pktids *pktids, in brcmf_msgbuf_get_pktid() argument
373 if (idx >= pktids->array_size) { in brcmf_msgbuf_get_pktid()
375 pktids->array_size); in brcmf_msgbuf_get_pktid()
378 if (pktids->array[idx].allocated.counter) { in brcmf_msgbuf_get_pktid()
379 pktid = &pktids->array[idx]; in brcmf_msgbuf_get_pktid()
382 pktids->direction); in brcmf_msgbuf_get_pktid()
396 struct brcmf_msgbuf_pktids *pktids) in brcmf_msgbuf_release_array() argument
402 array = pktids->array; in brcmf_msgbuf_release_array()
409 pktids->direction); in brcmf_msgbuf_release_array()
413 } while (count < pktids->array_size); in brcmf_msgbuf_release_array()
416 kfree(pktids); in brcmf_msgbuf_release_array()