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). So you should probably either see: [dst mac] [src mac] [0x80 0x0?] [first two bytes of content] or [ath header] [dst mac] [src mac] [0x81 0x00] I think the atheros header should look something like [0x10 0x8<src_port>]). Btw, you should have "ethX: AR8216 switch driver attached." line in your kernel log, do you see it? Regards Jonas _______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
