Lines Matching full:txb
166 void libipw_txb_free(struct libipw_txb *txb) in libipw_txb_free() argument
169 if (unlikely(!txb)) in libipw_txb_free()
171 for (i = 0; i < txb->nr_frags; i++) in libipw_txb_free()
172 if (txb->fragments[i]) in libipw_txb_free()
173 dev_kfree_skb_any(txb->fragments[i]); in libipw_txb_free()
174 kfree(txb); in libipw_txb_free()
180 struct libipw_txb *txb; in libipw_alloc_txb() local
183 txb = kzalloc(struct_size(txb, fragments, nr_frags), gfp_mask); in libipw_alloc_txb()
184 if (!txb) in libipw_alloc_txb()
187 txb->nr_frags = nr_frags; in libipw_alloc_txb()
188 txb->frag_size = txb_size; in libipw_alloc_txb()
191 txb->fragments[i] = __dev_alloc_skb(txb_size + headroom, in libipw_alloc_txb()
193 if (unlikely(!txb->fragments[i])) { in libipw_alloc_txb()
197 skb_reserve(txb->fragments[i], headroom); in libipw_alloc_txb()
201 dev_kfree_skb_any(txb->fragments[i--]); in libipw_alloc_txb()
202 kfree(txb); in libipw_alloc_txb()
205 return txb; in libipw_alloc_txb()
238 /* Incoming skb is converted to a txb which consists of
243 struct libipw_txb *txb = NULL; in libipw_xmit() local
267 /* If there is no driver handler to take the TXB, dont' bother in libipw_xmit()
332 /* Determine total amount of storage required for TXB packets */ in libipw_xmit()
408 /* When we allocate the TXB we allocate enough space for the reserve in libipw_xmit()
411 txb = libipw_alloc_txb(nr_frags, frag_size, in libipw_xmit()
413 if (unlikely(!txb)) { in libipw_xmit()
414 printk(KERN_WARNING "%s: Could not allocate TXB\n", in libipw_xmit()
418 txb->encrypted = encrypt; in libipw_xmit()
420 txb->payload_size = frag_size * (nr_frags - 1) + in libipw_xmit()
423 txb->payload_size = bytes; in libipw_xmit()
426 skb_frag = txb->fragments[0]; in libipw_xmit()
445 txb->rts_included = 1; in libipw_xmit()
451 skb_frag = txb->fragments[i]; in libipw_xmit()
497 if (txb) { in libipw_xmit()
498 netdev_tx_t ret = (*ieee->hard_start_xmit)(txb, dev, priority); in libipw_xmit()
501 dev->stats.tx_bytes += txb->payload_size; in libipw_xmit()
505 libipw_txb_free(txb); in libipw_xmit()