Lines Matching refs:rx

94 static void reset_asix_rx_fixup_info(struct asix_rx_fixup_info *rx)  in reset_asix_rx_fixup_info()  argument
101 if (rx->ax_skb) { in reset_asix_rx_fixup_info()
103 kfree_skb(rx->ax_skb); in reset_asix_rx_fixup_info()
104 rx->ax_skb = NULL; in reset_asix_rx_fixup_info()
110 rx->remaining = 0; in reset_asix_rx_fixup_info()
111 rx->split_head = false; in reset_asix_rx_fixup_info()
112 rx->header = 0; in reset_asix_rx_fixup_info()
116 struct asix_rx_fixup_info *rx) in asix_rx_fixup_internal() argument
130 if (rx->remaining && (rx->remaining + sizeof(u32) <= skb->len)) { in asix_rx_fixup_internal()
131 offset = ((rx->remaining + 1) & 0xfffe); in asix_rx_fixup_internal()
132 rx->header = get_unaligned_le32(skb->data + offset); in asix_rx_fixup_internal()
135 size = (u16)(rx->header & 0x7ff); in asix_rx_fixup_internal()
136 if (size != ((~rx->header >> 16) & 0x7ff)) { in asix_rx_fixup_internal()
138 rx->remaining); in asix_rx_fixup_internal()
139 reset_asix_rx_fixup_info(rx); in asix_rx_fixup_internal()
146 if (!rx->remaining) { in asix_rx_fixup_internal()
148 rx->header = get_unaligned_le16( in asix_rx_fixup_internal()
150 rx->split_head = true; in asix_rx_fixup_internal()
155 if (rx->split_head == true) { in asix_rx_fixup_internal()
156 rx->header |= (get_unaligned_le16( in asix_rx_fixup_internal()
158 rx->split_head = false; in asix_rx_fixup_internal()
161 rx->header = get_unaligned_le32(skb->data + in asix_rx_fixup_internal()
167 size = (u16)(rx->header & 0x7ff); in asix_rx_fixup_internal()
168 if (size != ((~rx->header >> 16) & 0x7ff)) { in asix_rx_fixup_internal()
170 rx->header, offset); in asix_rx_fixup_internal()
171 reset_asix_rx_fixup_info(rx); in asix_rx_fixup_internal()
177 reset_asix_rx_fixup_info(rx); in asix_rx_fixup_internal()
186 rx->ax_skb = netdev_alloc_skb_ip_align(dev->net, size); in asix_rx_fixup_internal()
188 rx->remaining = size; in asix_rx_fixup_internal()
191 if (rx->remaining > skb->len - offset) { in asix_rx_fixup_internal()
193 rx->remaining -= copy_length; in asix_rx_fixup_internal()
195 copy_length = rx->remaining; in asix_rx_fixup_internal()
196 rx->remaining = 0; in asix_rx_fixup_internal()
199 if (rx->ax_skb) { in asix_rx_fixup_internal()
200 skb_put_data(rx->ax_skb, skb->data + offset, in asix_rx_fixup_internal()
202 if (!rx->remaining) { in asix_rx_fixup_internal()
203 usbnet_skb_return(dev, rx->ax_skb); in asix_rx_fixup_internal()
204 rx->ax_skb = NULL; in asix_rx_fixup_internal()
214 reset_asix_rx_fixup_info(rx); in asix_rx_fixup_internal()
224 struct asix_rx_fixup_info *rx = &dp->rx_fixup_info; in asix_rx_fixup_common() local
226 return asix_rx_fixup_internal(dev, skb, rx); in asix_rx_fixup_common()
231 struct asix_rx_fixup_info *rx; in asix_rx_fixup_common_free() local
236 rx = &dp->rx_fixup_info; in asix_rx_fixup_common_free()
238 if (rx->ax_skb) { in asix_rx_fixup_common_free()
239 kfree_skb(rx->ax_skb); in asix_rx_fixup_common_free()
240 rx->ax_skb = NULL; in asix_rx_fixup_common_free()