summaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_ar8216.c
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2010-04-03 13:59:08 +0000
committerGabor Juhos <juhosg@openwrt.org>2010-04-03 13:59:08 +0000
commitc874513cfad123d5577f38cb6f316a77e13aa7d7 (patch)
tree6ff948209f3e759a4ab547b1478d2510379343a6 /target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_ar8216.c
parent10c00a63684c778d05306f5d3c8ea1a262a6ced2 (diff)
downloadmaster-31e0f0ae-c874513cfad123d5577f38cb6f316a77e13aa7d7.tar.gz
master-31e0f0ae-c874513cfad123d5577f38cb6f316a77e13aa7d7.tar.bz2
master-31e0f0ae-c874513cfad123d5577f38cb6f316a77e13aa7d7.zip
ar71xx: fix broken LAN ports on the boards with AR8216 switch (closes #7024)
* cc: backfire@openwrt.org SVN-Revision: 20673
Diffstat (limited to 'target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_ar8216.c')
-rw-r--r--target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_ar8216.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_ar8216.c b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_ar8216.c
index 564fae7eb5..7801b9f0ed 100644
--- a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_ar8216.c
+++ b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_ar8216.c
@@ -25,19 +25,21 @@ void ag71xx_add_ar8216_header(struct ag71xx *ag, struct sk_buff *skb)
skb->data[1] = 0x80;
}
-int ag71xx_remove_ar8216_header(struct ag71xx *ag,
- struct sk_buff *skb)
+int ag71xx_remove_ar8216_header(struct ag71xx *ag, struct sk_buff *skb,
+ int pktlen)
{
u8 type;
type = skb->data[1] & AR8216_PACKET_TYPE_MASK;
switch (type) {
case AR8216_PACKET_TYPE_NORMAL:
- skb_pull(skb, AR8216_HEADER_LEN);
break;
+
default:
return -EINVAL;
}
+ skb_put(skb, pktlen);
+ skb_pull(skb, AR8216_HEADER_LEN);
return 0;
}