Lines Matching defs:skb
81 static int genelink_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
89 header = (struct gl_header *) skb->data;
91 // get the packet count of the received skb
102 skb_pull(skb, 4);
114 // allocate the skb for the individual packet
118 // copy the packet data to the new skb
129 skb_pull(skb, size + 4);
133 skb_pull(skb, 4);
135 if (skb->len > GL_MAX_PACKET_LEN) {
136 dbg("genelink: invalid rx length %d", skb->len);
143 genelink_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags)
146 int length = skb->len;
147 int headroom = skb_headroom(skb);
148 int tailroom = skb_tailroom(skb);
152 padlen = ((skb->len + (4 + 4*1)) % 64) ? 0 : 1;
154 if ((!skb_cloned(skb))
157 skb->data = memmove(skb->head + (4 + 4*1),
158 skb->data, skb->len);
159 skb_set_tail_pointer(skb, skb->len);
163 skb2 = skb_copy_expand(skb, (4 + 4*1) , padlen, flags);
164 dev_kfree_skb_any(skb);
165 skb = skb2;
166 if (!skb)
171 packet_count = (__le32 *) skb_push(skb, (4 + 4*1));
178 if ((skb->len % dev->maxpacket) == 0)
179 skb_put(skb, 1);
181 return skb;