summaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2010-04-09 08:38:46 +0000
committerGabor Juhos <juhosg@openwrt.org>2010-04-09 08:38:46 +0000
commit4a28844d80e086fa00ca39f3fabcf5a199606a8f (patch)
tree08b1719d2a036edc2f2fadd41231292b1521d643 /target
parent722e75f066ae034273e416c272bb4365d18ddd57 (diff)
downloadmtk-20170518-4a28844d80e086fa00ca39f3fabcf5a199606a8f.zip
mtk-20170518-4a28844d80e086fa00ca39f3fabcf5a199606a8f.tar.gz
mtk-20170518-4a28844d80e086fa00ca39f3fabcf5a199606a8f.tar.bz2
ar71xx: ag71xx: call the phy driver's netif_receive_skb()
Ag71xx needs to call the phy's netif_receive_skb() to allow phy drivers to mangle rx packets. This patch fixes it. This fixes the header mangling of the AR8216 driver. Signed-off-by: Jonas Gorski <jonas.gorski+openwrt@gmail.com> Cc:backfire@openwrt.org SVN-Revision: 20750
Diffstat (limited to 'target')
-rw-r--r--target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h2
-rw-r--r--target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c8
2 files changed, 7 insertions, 3 deletions
diff --git a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h
index a64b4a8..77551dd 100644
--- a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h
+++ b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h
@@ -38,7 +38,7 @@
#define ETH_FCS_LEN 4
#define AG71XX_DRV_NAME "ag71xx"
-#define AG71XX_DRV_VERSION "0.5.33"
+#define AG71XX_DRV_VERSION "0.5.34"
#define AG71XX_NAPI_WEIGHT 64
#define AG71XX_OOM_REFILL (1 + HZ/10)
diff --git a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c
index 4b35b1f..27c1956 100644
--- a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c
+++ b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c
@@ -826,8 +826,12 @@ static int ag71xx_rx_packets(struct ag71xx *ag, int limit)
} else {
skb->dev = dev;
skb->ip_summed = CHECKSUM_NONE;
- skb->protocol = eth_type_trans(skb, dev);
- netif_receive_skb(skb);
+ if (ag->phy_dev) {
+ ag->phy_dev->netif_receive_skb(skb);
+ } else {
+ skb->protocol = eth_type_trans(skb, dev);
+ netif_receive_skb(skb);
+ }
}
ring->buf[i].skb = NULL;