12 #include <linux/list.h>
13 #include <linux/netdevice.h>
14 #include <linux/slab.h>
24 dev->
stats.tx_packets++;
33 if (skb_cow_head(skb, 0) < 0)
40 dsa_header[0] = 0x60 | p->
parent->index;
41 dsa_header[1] = p->
port << 3;
46 if (dsa_header[2] & 0x10) {
47 dsa_header[1] |= 0x01;
48 dsa_header[2] &= ~0x10;
61 dsa_header[0] = 0x40 | p->
parent->index;
62 dsa_header[1] = p->
port << 3;
101 dsa_header = skb->
data - 2;
106 if ((dsa_header[0] & 0xc0) != 0x00 && (dsa_header[0] & 0xc0) != 0xc0)
112 source_device = dsa_header[0] & 0x1f;
113 source_port = (dsa_header[1] >> 3) & 0x1f;
119 if (source_device >= dst->
pd->nr_chips)
121 ds = dst->
ds[source_device];
130 if (dsa_header[0] & 0x20) {
140 new_header[2] = dsa_header[2] & ~0x10;
141 new_header[3] = dsa_header[3];
147 if (dsa_header[1] & 0x01)
148 new_header[2] |= 0x10;
176 skb->
dev->stats.rx_packets++;
177 skb->
dev->stats.rx_bytes += skb->
len;