Al 03/11/10 13:33, En/na Jonas Gorski ha escrit:
On 2 November 2010 21:24, Luca Olivetti<[email protected]>  wrote:
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).

The code looks good. I don't know much about proper kernel debugging,
so my next step would be e.g. printk'ing the first 16 bytes of
received packets, so you have the ethernet header + the atheros
header, if VLAN is enabled (you should only see the atheros header in
this case).

Right after the "skb_put(skb,len); skb->dev=dev;" I dump the packet.
The packets seems ok (they're without the ar8216 header), *but* I'm only getting multicast (01:00:5e:00:00:16) or broadcast (ff:ff:ff:ff:ff:ff) packets, nothing else, e.g.

60 byte frame 01:00:5e:00:00:16 to 00:0b:6a:51:ff:ea type  800
     01 00 5e 00  00 16 00 0b  6a 51 ff ea  08 00 46 c0
     00 28 00 00  40 00 01 02  39 44 c0 a8  0a 0d e0 00
     00 16 94 04  00 00 22 00  fb 02 00 00  00 01 02 00
     00 00 e0 00  00 fb ff ff  ff ff ff ff

60 byte frame ff:ff:ff:ff:ff:ff to 00:16:01:41:ad:18 type  806
     ff ff ff ff  ff ff 00 16  01 41 ad 18  08 06 00 01
     08 00 06 04  00 01 00 16  01 41 ad 18  c0 a8 02 65
     00 00 00 00  00 00 c0 a8  02 01 00 00  00 00 00 00
     00 00 00 00  00 00 00 00  00 00 00 00

I see various other mdns or cups browse packet.
I don't see any unicast packet.

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

Reply via email to