X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/d86402b68f7e7b6ea9ded636a220ec0a055f9770..22d5936ba294088e5195003d76effaeb43952ca1:/target/linux/atheros/patches-2.6.33/110-ar2313_ethernet.patch diff --git a/target/linux/atheros/patches-2.6.33/110-ar2313_ethernet.patch b/target/linux/atheros/patches-2.6.33/110-ar2313_ethernet.patch index f24ee12b7..9732bc04f 100644 --- a/target/linux/atheros/patches-2.6.33/110-ar2313_ethernet.patch +++ b/target/linux/atheros/patches-2.6.33/110-ar2313_ethernet.patch @@ -25,7 +25,7 @@ obj-$(CONFIG_DECLANCE) += declance.o --- /dev/null +++ b/drivers/net/ar231x.c -@@ -0,0 +1,1263 @@ +@@ -0,0 +1,1278 @@ +/* + * ar231x.c: Linux driver for the Atheros AR231x Ethernet device. + * @@ -170,6 +170,7 @@ +static void rx_tasklet_func(unsigned long data); +static void rx_tasklet_cleanup(struct net_device *dev); +static void ar231x_multicast_list(struct net_device *dev); ++static void ar231x_tx_timeout(struct net_device *dev); + +static int ar231x_mdiobus_read(struct mii_bus *bus, int phy_addr, int regnum); +static int ar231x_mdiobus_write(struct mii_bus *bus, int phy_addr, int regnum, u16 value); @@ -182,11 +183,15 @@ +#endif + +static const struct net_device_ops ar231x_ops = { -+ .ndo_open = ar231x_open, -+ .ndo_stop = ar231x_close, -+ .ndo_start_xmit = ar231x_start_xmit, ++ .ndo_open = ar231x_open, ++ .ndo_stop = ar231x_close, ++ .ndo_start_xmit = ar231x_start_xmit, + .ndo_set_multicast_list = ar231x_multicast_list, -+ .ndo_do_ioctl = ar231x_ioctl, ++ .ndo_do_ioctl = ar231x_ioctl, ++ .ndo_change_mtu = eth_change_mtu, ++ .ndo_validate_addr = eth_validate_addr, ++ .ndo_set_mac_address = eth_mac_addr, ++ .ndo_tx_timeout = ar231x_tx_timeout, +}; + +int __init ar231x_probe(struct platform_device *pdev) @@ -355,7 +360,7 @@ + tasklet_kill(&sp->rx_tasklet); +} + -+static int __exit ar231x_remove(struct platform_device *pdev) ++static int __devexit ar231x_remove(struct platform_device *pdev) +{ + struct net_device *dev = platform_get_drvdata(pdev); + struct ar231x_private *sp = netdev_priv(dev); @@ -392,7 +397,7 @@ +static struct platform_driver ar231x_driver = { + .driver.name = "ar231x-eth", + .probe = ar231x_probe, -+ .remove = ar231x_remove, ++ .remove = __devexit_p(ar231x_remove), +}; + +int __init ar231x_module_init(void) @@ -1036,6 +1041,16 @@ + return 0; +} + ++static void ar231x_tx_timeout(struct net_device *dev) ++{ ++ struct ar231x_private *sp = netdev_priv(dev); ++ unsigned long flags; ++ ++ spin_lock_irqsave(&sp->lock, flags); ++ ar231x_restart(dev); ++ spin_unlock_irqrestore(&sp->lock, flags); ++} ++ +static void ar231x_halt(struct net_device *dev) +{ + struct ar231x_private *sp = netdev_priv(dev);