1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2025-01-24 10:21:06 +02:00
* use netif_rx of the phydev if it is provided


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26353 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
blogic 2011-03-29 06:19:31 +00:00
parent a3ce1ceaa0
commit 050513302a

View File

@ -1,6 +1,6 @@
--- a/drivers/net/Kconfig --- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig +++ b/drivers/net/Kconfig
@@ -358,6 +358,12 @@ @@ -235,6 +235,12 @@
source "drivers/net/arm/Kconfig" source "drivers/net/arm/Kconfig"
@ -15,7 +15,7 @@
depends on ARM || MIPS || SUPERH depends on ARM || MIPS || SUPERH
--- a/drivers/net/Makefile --- a/drivers/net/Makefile
+++ b/drivers/net/Makefile +++ b/drivers/net/Makefile
@@ -213,6 +213,7 @@ @@ -212,6 +212,7 @@
obj-$(CONFIG_MVME16x_NET) += 82596.o obj-$(CONFIG_MVME16x_NET) += 82596.o
obj-$(CONFIG_BVME6000_NET) += 82596.o obj-$(CONFIG_BVME6000_NET) += 82596.o
obj-$(CONFIG_SC92031) += sc92031.o obj-$(CONFIG_SC92031) += sc92031.o
@ -25,7 +25,7 @@
obj-$(CONFIG_LP486E) += lp486e.o obj-$(CONFIG_LP486E) += lp486e.o
--- /dev/null --- /dev/null
+++ b/drivers/net/lantiq_etop.c +++ b/drivers/net/lantiq_etop.c
@@ -0,0 +1,552 @@ @@ -0,0 +1,557 @@
+/* +/*
+ * This program is free software; you can redistribute it and/or modify it + * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published + * under the terms of the GNU General Public License version 2 as published
@ -201,8 +201,13 @@
+ +
+ skb_put(skb, len); + skb_put(skb, len);
+ skb->dev = dev; + skb->dev = dev;
+
+ if (priv->phydev && priv->phydev->netif_rx) {
+ priv->phydev->netif_rx(skb);
+ } else {
+ skb->protocol = eth_type_trans(skb, dev); + skb->protocol = eth_type_trans(skb, dev);
+ netif_rx(skb); + netif_rx(skb);
+ }
+ +
+ priv->stats.rx_packets++; + priv->stats.rx_packets++;
+ priv->stats.rx_bytes += len; + priv->stats.rx_bytes += len;