2 * Atheros AR71xx built-in ethernet mac driver
3 * Special support for the Atheros ar8216 switch chip
5 * Copyright (C) 2009-2010 Gabor Juhos <juhosg@openwrt.org>
7 * Based on Atheros' AG7100 driver
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License version 2 as published
11 * by the Free Software Foundation.
16 #define AR8216_PACKET_TYPE_MASK 0xf
17 #define AR8216_PACKET_TYPE_NORMAL 0
19 #define AR8216_HEADER_LEN 2
21 void ag71xx_add_ar8216_header(struct ag71xx *ag, struct sk_buff *skb)
23 skb_push(skb, AR8216_HEADER_LEN);
28 int ag71xx_remove_ar8216_header(struct ag71xx *ag, struct sk_buff *skb,
33 type = skb->data[1] & AR8216_PACKET_TYPE_MASK;
35 case AR8216_PACKET_TYPE_NORMAL:
42 skb_pull(skb, AR8216_HEADER_LEN);