obj-$(CONFIG_DECLANCE) += declance.o
--- /dev/null
+++ b/drivers/net/ar231x.c
-@@ -0,0 +1,1278 @@
+@@ -0,0 +1,1293 @@
+/*
+ * ar231x.c: Linux driver for the Atheros AR231x Ethernet device.
+ *
+#define ERR(fmt, args...) printk("%s: " fmt, __func__, ##args)
+#endif
+
++#ifdef CONFIG_NET_POLL_CONTROLLER
++static void
++ar231x_netpoll(struct net_device *dev)
++{
++ unsigned long flags;
++
++ local_irq_save(flags);
++ ar231x_interrupt(dev->irq, dev);
++ local_irq_restore(flags);
++}
++#endif
++
+static const struct net_device_ops ar231x_ops = {
+ .ndo_open = ar231x_open,
+ .ndo_stop = ar231x_close,
+ .ndo_validate_addr = eth_validate_addr,
+ .ndo_set_mac_address = eth_mac_addr,
+ .ndo_tx_timeout = ar231x_tx_timeout,
++#ifdef CONFIG_NET_POLL_CONTROLLER
++ .ndo_poll_controller = ar231x_netpoll,
++#endif
+};
+
+int __init ar231x_probe(struct platform_device *pdev)
--- a/drivers/net/ar231x.c
+++ b/drivers/net/ar231x.c
-@@ -740,6 +740,7 @@ static void ar231x_load_rx_ring(struct n
+@@ -755,6 +755,7 @@ static void ar231x_load_rx_ring(struct n
for (i = 0; i < nr_bufs; i++) {
struct sk_buff *skb;
ar231x_descr_t *rd;
if (sp->rx_skb[idx])
break;
-@@ -755,7 +756,9 @@ static void ar231x_load_rx_ring(struct n
+@@ -770,7 +771,9 @@ static void ar231x_load_rx_ring(struct n
* Make sure IP header starts on a fresh cache line.
*/
skb->dev = dev;
sp->rx_skb[idx] = skb;
rd = (ar231x_descr_t *) & sp->rx_ring[idx];
-@@ -829,20 +832,23 @@ static int ar231x_rx_int(struct net_devi
+@@ -844,20 +847,23 @@ static int ar231x_rx_int(struct net_devi
/* alloc new buffer. */
skb_new = netdev_alloc_skb(dev, AR2313_BUFSIZE + RX_OFFSET);
if (skb_new != NULL) {
/* reset descriptor's curr_addr */
rxdesc->addr = virt_to_phys(skb_new->data);
-@@ -1254,6 +1260,8 @@ static int ar231x_mdiobus_probe (struct
+@@ -1269,6 +1275,8 @@ static int ar231x_mdiobus_probe (struct
return PTR_ERR(phydev);
}
--- /dev/null
+++ b/arch/mips/ar231x/reset.c
-@@ -0,0 +1,160 @@
+@@ -0,0 +1,161 @@
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/timer.h>
+static struct timer_list rst_button_timer;
+static unsigned long seen;
+
-+extern struct sock *uevent_sock;
++struct sock *uevent_sock = NULL;
++EXPORT_SYMBOL_GPL(uevent_sock);
+extern u64 uevent_next_seqnum(void);
+
+static int no_release_workaround = 1;
+++ /dev/null
---- a/arch/mips/ar231x/reset.c
-+++ b/arch/mips/ar231x/reset.c
-@@ -24,7 +24,8 @@ struct event_t {
- static struct timer_list rst_button_timer;
- static unsigned long seen;
-
--extern struct sock *uevent_sock;
-+struct sock *uevent_sock = NULL;
-+EXPORT_SYMBOL_GPL(uevent_sock);
- extern u64 uevent_next_seqnum(void);
-
- static int no_release_workaround = 1;
#ifndef ERR
#define ERR(fmt, args...) printk("%s: " fmt, __func__, ##args)
-@@ -283,6 +284,21 @@ int __init ar231x_probe(struct platform_
+@@ -298,6 +299,21 @@ int __init ar231x_probe(struct platform_
mdiobus_register(sp->mii_bus);
if (ar231x_mdiobus_probe(dev) != 0) {
printk(KERN_ERR "%s: mdiobus_probe failed\n", dev->name);
rx_tasklet_cleanup(dev);
-@@ -339,8 +355,10 @@ static int __devexit ar231x_remove(struc
+@@ -354,8 +370,10 @@ static int __devexit ar231x_remove(struc
rx_tasklet_cleanup(dev);
ar231x_init_cleanup(dev);
unregister_netdev(dev);
kfree(dev);
return 0;
}
-@@ -841,7 +859,12 @@ static int ar231x_rx_int(struct net_devi
+@@ -856,7 +874,12 @@ static int ar231x_rx_int(struct net_devi
dev->stats.rx_bytes += skb->len;
/* pass the packet to upper layers */
skb_new->dev = dev;
/* 16 bit align */
-@@ -1138,6 +1161,9 @@ static int ar231x_ioctl(struct net_devic
+@@ -1153,6 +1176,9 @@ static int ar231x_ioctl(struct net_devic
struct ar231x_private *sp = netdev_priv(dev);
int ret;
+++ /dev/null
---- a/drivers/net/ar231x.c
-+++ b/drivers/net/ar231x.c
-@@ -155,6 +155,18 @@
- #define ERR(fmt, args...) printk("%s: " fmt, __func__, ##args)
- #endif
-
-+#ifdef CONFIG_NET_POLL_CONTROLLER
-+static void
-+ar231x_netpoll(struct net_device *dev)
-+{
-+ unsigned long flags;
-+
-+ local_irq_save(flags);
-+ ar231x_interrupt(dev->irq, dev);
-+ local_irq_restore(flags);
-+}
-+#endif
-+
- static const struct net_device_ops ar231x_ops = {
- .ndo_open = ar231x_open,
- .ndo_stop = ar231x_close,
-@@ -165,6 +177,9 @@
- .ndo_validate_addr = eth_validate_addr,
- .ndo_set_mac_address = eth_mac_addr,
- .ndo_tx_timeout = ar231x_tx_timeout,
-+#ifdef CONFIG_NET_POLL_CONTROLLER
-+ .ndo_poll_controller = ar231x_netpoll,
-+#endif
- };
-
- int __init ar231x_probe(struct platform_device *pdev)