|
Lines 1079-1095
static int aqc111_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
Link Here
|
| 1079 |
u16 pkt_count = 0; |
1079 |
u16 pkt_count = 0; |
| 1080 |
u64 desc_hdr = 0; |
1080 |
u64 desc_hdr = 0; |
| 1081 |
u16 vlan_tag = 0; |
1081 |
u16 vlan_tag = 0; |
| 1082 |
u32 skb_len = 0; |
1082 |
u32 skb_len; |
| 1083 |
|
1083 |
|
| 1084 |
if (!skb) |
1084 |
if (!skb) |
| 1085 |
goto err; |
1085 |
goto err; |
| 1086 |
|
1086 |
|
| 1087 |
if (skb->len == 0) |
1087 |
skb_len = skb->len; |
|
|
1088 |
if (skb_len < sizeof(desc_hdr)) |
| 1088 |
goto err; |
1089 |
goto err; |
| 1089 |
|
1090 |
|
| 1090 |
skb_len = skb->len; |
|
|
| 1091 |
/* RX Descriptor Header */ |
1091 |
/* RX Descriptor Header */ |
| 1092 |
skb_trim(skb, skb->len - sizeof(desc_hdr)); |
1092 |
skb_trim(skb, skb_len - sizeof(desc_hdr)); |
| 1093 |
desc_hdr = le64_to_cpup((u64 *)skb_tail_pointer(skb)); |
1093 |
desc_hdr = le64_to_cpup((u64 *)skb_tail_pointer(skb)); |
| 1094 |
|
1094 |
|
| 1095 |
/* Check these packets */ |
1095 |
/* Check these packets */ |
| 1096 |
- |
|
|