On 2 November 2010 17:25, Luca Olivetti <[email protected]> wrote:
> BTW, doesn't the ar8216 driver already modifies the function table of the
> attached device?
>
>
>        /* VID fixup only needed on ar8216 */
>        if (pdev->addr == 0 && priv->chip == AR8216) {
>                pdev->pkt_align = 2;
>                pdev->netif_receive_skb = ar8216_netif_receive_skb;
>                pdev->netif_rx = ar8216_netif_rx;
>                priv->ndo_old = dev->netdev_ops;
>                memcpy(&priv->ndo, priv->ndo_old, sizeof(struct
> net_device_ops));
>                priv->ndo.ndo_start_xmit = ar8216_mangle_tx;
>                dev->netdev_ops = &priv->ndo;
>        }
>
>
> If so what's done in the ag71xx shouldn't be needed, and I have to find
> another reason why the network isn't working on my device (strangely enough
> ping doesn't work, but pinging the device fills the arp table on both
> sides).

This is only the half of it, it replaces the TX function, but it can't
overwrite the RX function. So it still needs help from the ethernet
driver. This is where this code comes into play:

                        if (ag->phy_dev) {
                                ag->phy_dev->netif_receive_skb(skb);
                        } else {
                                skb->protocol = eth_type_trans(skb, dev);
                                netif_receive_skb(skb);
                        }


If your architecture isn't ar71xx or atheros, you probably need to
port this for the ethernet driver.

Jonas

P.S: A revised patch was later committed that enables the workaround
for only those devices that need it. *This* is a different workaround
for some problem with VLAN tagging, Felix can probably tell say more
about this.
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to