prevent ar6000 from being deactivated in a inappropriate way
[openwrt/staging/dedeckeh.git] / target / linux / s3c24xx / patches-2.6.29 / 060-patch-ar6000.patch
1 diff -ruN linux-2.6.29.orig/drivers/ar6000/ar6000/ar6000_drv.c linux-2.6.29/drivers/ar6000/ar6000/ar6000_drv.c
2 --- linux-2.6.29.orig/drivers/ar6000/ar6000/ar6000_drv.c 2009-06-23 11:24:09.000000000 +0200
3 +++ linux-2.6.29/drivers/ar6000/ar6000/ar6000_drv.c 2009-06-23 12:09:00.000000000 +0200
4 @@ -213,6 +213,7 @@
5 int ar6000_init(struct net_device *dev);
6 static int ar6000_open(struct net_device *dev);
7 static int ar6000_close(struct net_device *dev);
8 +static int ar6000_cleanup(struct net_device *dev);
9 static void ar6000_init_control_info(AR_SOFTC_T *ar);
10 static int ar6000_data_tx(struct sk_buff *skb, struct net_device *dev);
11
12 @@ -984,6 +985,7 @@
13 unregister_netdev(dev);
14 } else {
15 ar6000_close(dev);
16 + ar6000_cleanup(dev);
17 }
18
19 free_raw_buffers(ar);
20 @@ -1090,8 +1092,15 @@
21 static int
22 ar6000_close(struct net_device *dev)
23 {
24 - AR_SOFTC_T *ar = netdev_priv(dev);
25 + /* Stop the transmit queues */
26 + netif_stop_queue(dev);
27 + return 0;
28 +}
29
30 +static int
31 +ar6000_cleanup(struct net_device *dev)
32 +{
33 + AR_SOFTC_T *ar = netdev_priv(dev);
34 /* Stop the transmit queues */
35 netif_stop_queue(dev);
36