On 02/07/11 20:35, Luca Olivetti wrote:
> The following patch uses netif_receive_skb (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.
> The same operating mode was committed here (at the time lantiq_etop used 
> netif_rx):
> 
> https://dev.openwrt.org/changeset/26353
> 
> but it got lost in the recent reorganization of the lantiq code.
> 
> 
> Signed-off-by: Luca Olivetti <l...@ventoso.org>
> 
> --- 
> 
> Index: 
> target/linux/lantiq/patches-2.6.39/0011-MIPS-Lantiq-Add-ethernet-driver.patch
> ===================================================================
> --- 
> target/linux/lantiq/patches-2.6.39/0011-MIPS-Lantiq-Add-ethernet-driver.patch 
>     (revisiĆ³n: 27363)
> +++ 
> target/linux/lantiq/patches-2.6.39/0011-MIPS-Lantiq-Add-ethernet-driver.patch 
>     (copia de trabajo)
> @@ -126,7 +126,7 @@
>   
>  --- /dev/null
>  +++ b/drivers/net/lantiq_etop.c
> -@@ -0,0 +1,813 @@
> +@@ -0,0 +1,817 @@
>  +/*
>  + *   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
> @@ -284,8 +284,12 @@
>  +
>  +    skb_put(skb, len);
>  +    skb->dev = ch->netdev;
> -+    skb->protocol = eth_type_trans(skb, ch->netdev);
> -+    netif_receive_skb(skb);
> ++    if (priv->phydev && priv->phydev->netif_receive_skb) {
> ++            priv->phydev->netif_receive_skb(skb);
> ++    } else {
> ++            skb->protocol = eth_type_trans(skb, ch->netdev);
> ++            netif_receive_skb(skb);
> ++    }
>  +}
>  +
>  +static int
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> 


oops ... that got lost, i will also send it upstream to the lmo tree ...
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to