Lines Matching refs:rx
91 static void reset_asix_rx_fixup_info(struct asix_rx_fixup_info *rx) in reset_asix_rx_fixup_info() argument
98 if (rx->ax_skb) { in reset_asix_rx_fixup_info()
100 kfree_skb(rx->ax_skb); in reset_asix_rx_fixup_info()
101 rx->ax_skb = NULL; in reset_asix_rx_fixup_info()
107 rx->remaining = 0; in reset_asix_rx_fixup_info()
108 rx->split_head = false; in reset_asix_rx_fixup_info()
109 rx->header = 0; in reset_asix_rx_fixup_info()
113 struct asix_rx_fixup_info *rx) in asix_rx_fixup_internal() argument
127 if (rx->remaining && (rx->remaining + sizeof(u32) <= skb->len)) { in asix_rx_fixup_internal()
128 offset = ((rx->remaining + 1) & 0xfffe); in asix_rx_fixup_internal()
129 rx->header = get_unaligned_le32(skb->data + offset); in asix_rx_fixup_internal()
132 size = (u16)(rx->header & 0x7ff); in asix_rx_fixup_internal()
133 if (size != ((~rx->header >> 16) & 0x7ff)) { in asix_rx_fixup_internal()
135 rx->remaining); in asix_rx_fixup_internal()
136 reset_asix_rx_fixup_info(rx); in asix_rx_fixup_internal()
143 if (!rx->remaining) { in asix_rx_fixup_internal()
145 rx->header = get_unaligned_le16( in asix_rx_fixup_internal()
147 rx->split_head = true; in asix_rx_fixup_internal()
152 if (rx->split_head == true) { in asix_rx_fixup_internal()
153 rx->header |= (get_unaligned_le16( in asix_rx_fixup_internal()
155 rx->split_head = false; in asix_rx_fixup_internal()
158 rx->header = get_unaligned_le32(skb->data + in asix_rx_fixup_internal()
164 size = (u16)(rx->header & 0x7ff); in asix_rx_fixup_internal()
165 if (size != ((~rx->header >> 16) & 0x7ff)) { in asix_rx_fixup_internal()
167 rx->header, offset); in asix_rx_fixup_internal()
168 reset_asix_rx_fixup_info(rx); in asix_rx_fixup_internal()
174 reset_asix_rx_fixup_info(rx); in asix_rx_fixup_internal()
183 rx->ax_skb = netdev_alloc_skb_ip_align(dev->net, size); in asix_rx_fixup_internal()
185 rx->remaining = size; in asix_rx_fixup_internal()
188 if (rx->remaining > skb->len - offset) { in asix_rx_fixup_internal()
190 rx->remaining -= copy_length; in asix_rx_fixup_internal()
192 copy_length = rx->remaining; in asix_rx_fixup_internal()
193 rx->remaining = 0; in asix_rx_fixup_internal()
196 if (rx->ax_skb) { in asix_rx_fixup_internal()
197 skb_put_data(rx->ax_skb, skb->data + offset, in asix_rx_fixup_internal()
199 if (!rx->remaining) { in asix_rx_fixup_internal()
200 usbnet_skb_return(dev, rx->ax_skb); in asix_rx_fixup_internal()
201 rx->ax_skb = NULL; in asix_rx_fixup_internal()
211 reset_asix_rx_fixup_info(rx); in asix_rx_fixup_internal()
221 struct asix_rx_fixup_info *rx = &dp->rx_fixup_info; in asix_rx_fixup_common() local
223 return asix_rx_fixup_internal(dev, skb, rx); in asix_rx_fixup_common()
228 struct asix_rx_fixup_info *rx; in asix_rx_fixup_common_free() local
233 rx = &dp->rx_fixup_info; in asix_rx_fixup_common_free()
235 if (rx->ax_skb) { in asix_rx_fixup_common_free()
236 kfree_skb(rx->ax_skb); in asix_rx_fixup_common_free()
237 rx->ax_skb = NULL; in asix_rx_fixup_common_free()