The following patch uses netif_rx (if present) from the phy driver.
When used with an ar8216, it will fix incoming packets in case vlan
mode is enabled (the ar8216 driver already intercepts outgoing packets).
Other switches currently used by the lantiq platform (adm6996 and rtl8306)
don't provide a netif_rx function, so they should not be affected by
this patch.

Signed-off-by: Luca Olivetti <[email protected]>

--- 

Index: target/linux/lantiq/patches/230-xway_etop.patch
===================================================================
--- target/linux/lantiq/patches/230-xway_etop.patch     (revisión: 25626)
+++ target/linux/lantiq/patches/230-xway_etop.patch     (copia de trabajo)
@@ -1,6 +1,6 @@
 --- a/drivers/net/Kconfig
 +++ b/drivers/net/Kconfig
-@@ -343,6 +343,12 @@ config MACB
+@@ -355,6 +355,12 @@ config MACB
  
  source "drivers/net/arm/Kconfig"
  
@@ -15,7 +15,7 @@
        depends on ARM || MIPS || SUPERH
 --- a/drivers/net/Makefile
 +++ b/drivers/net/Makefile
-@@ -204,6 +204,7 @@ obj-$(CONFIG_SNI_82596) += sni_82596.o
+@@ -209,6 +209,7 @@ obj-$(CONFIG_SNI_82596) += sni_82596.o
  obj-$(CONFIG_MVME16x_NET) += 82596.o
  obj-$(CONFIG_BVME6000_NET) += 82596.o
  obj-$(CONFIG_SC92031) += sc92031.o
@@ -25,7 +25,7 @@
  obj-$(CONFIG_LP486E) += lp486e.o
 --- /dev/null
 +++ 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
 + *   under the terms of the GNU General Public License version 2 as published
@@ -201,8 +201,13 @@
 +
 +      skb_put(skb, len);
 +      skb->dev = dev;
-+      skb->protocol = eth_type_trans(skb, dev);
-+      netif_rx(skb);
++      if (priv->phydev && priv->phydev->netif_rx) {
++              priv->phydev->netif_rx(skb);
++      } else
++      {
++              skb->protocol = eth_type_trans(skb, dev);
++              netif_rx(skb);
++      }
 +
 +      priv->stats.rx_packets++;
 +      priv->stats.rx_bytes += len;


_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to