12 #include <linux/list.h>
13 #include <linux/netdevice.h>
14 #include <linux/slab.h>
24 dev->
stats.tx_packets++;
35 padlen = 60 - skb->
len;
44 skb_reset_mac_header(nskb);
45 skb_set_network_header(nskb, skb_network_header(skb) - skb->
head);
46 skb_set_transport_header(nskb, skb_transport_header(skb) - skb->
head);
57 trailer[1] = 1 << p->
port;
63 nskb->
dev = p->
parent->dst->master_netdev;
85 if (skb_linearize(skb))
88 trailer = skb_tail_pointer(skb) - 4;
89 if (trailer[0] != 0x80 || (trailer[1] & 0xf8) != 0x00 ||
90 (trailer[3] & 0xef) != 0x00 || trailer[3] != 0x00)
93 source_port = trailer[1] & 7;
97 pskb_trim_rcsum(skb, skb->
len - 4);
104 skb->
dev->stats.rx_packets++;
105 skb->
dev->stats.rx_bytes += skb->
len;