Al 02/11/10 17:35, En/na Jonas Gorski ha escrit:

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.


Well, I tried but I failed (unsurprisingly since I know nothing about Linux network code).
This is a danube based board and this is the patch I tried:
--- trunk/target/linux/ifxmips/files-2.6.33/drivers/net/ifxmips.c.orig 2010-11-02 17:53:28.187618000 +0100 +++ trunk/target/linux/ifxmips/files-2.6.33/drivers/net/ifxmips.c 2010-11-02 20:02:13.871765000 +0100
@@ -141,8 +141,14 @@

        skb_put(skb, len);
        skb->dev = dev;
-       skb->protocol = eth_type_trans(skb, dev);
-       netif_rx(skb);
+       if (priv->phydev) {
+               printk(KERN_INFO "using  ar8216 netif_rx\n");
+               priv->phydev->netif_rx(skb);
+       } else {
+               printk(KERN_INFO "cannot see ar8216 here!!!\n");
+               skb->protocol = eth_type_trans(skb, dev);
+               netif_rx(skb);
+       }

        priv->stats.rx_packets++;
        priv->stats.rx_bytes += len;


The printks are to see what path the code took, it takes the "correct" one but still the network doesn't work (but I still can see the arp entries).

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

Reply via email to