atheros: fix ath5k support on ar2315/2317
[openwrt.git] / target / linux / atheros / patches-2.6.37 / 240-ar231x_netpoll.patch
1 --- a/drivers/net/ar231x.c
2 +++ b/drivers/net/ar231x.c
3 @@ -155,6 +155,18 @@
4  #define ERR(fmt, args...) printk("%s: " fmt, __func__, ##args)
5  #endif
6  
7 +#ifdef CONFIG_NET_POLL_CONTROLLER
8 +static void
9 +ar231x_netpoll(struct net_device *dev)
10 +{
11 +      unsigned long flags;
12 +
13 +      local_irq_save(flags);
14 +      ar231x_interrupt(dev->irq, dev);
15 +      local_irq_restore(flags);
16 +}
17 +#endif
18 +
19  static const struct net_device_ops ar231x_ops = {
20         .ndo_open               = ar231x_open,
21         .ndo_stop               = ar231x_close,
22 @@ -165,6 +177,9 @@
23         .ndo_validate_addr      = eth_validate_addr,
24         .ndo_set_mac_address    = eth_mac_addr,
25         .ndo_tx_timeout         = ar231x_tx_timeout,
26 +#ifdef CONFIG_NET_POLL_CONTROLLER
27 +       .ndo_poll_controller    = ar231x_netpoll,
28 +#endif
29  };
30  
31  int __init ar231x_probe(struct platform_device *pdev)