summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath5k/base.h
diff options
context:
space:
mode:
authorBob Copeland <me@bobcopeland.com>2010-07-13 11:32:40 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-07-14 13:52:46 -0400
commit5faaff747710dfb79d5aa72b9faface94ad4b3f3 (patch)
treefaddf5250f62abfe8d9b9f96a53712ca3db3e737 /drivers/net/wireless/ath/ath5k/base.h
parentda5747eb89eb1511dcfc1d8b32c70370616eac92 (diff)
ath5k: move reset to mac80211 workqueue
We currently trigger a reset via a tasklet when certain error conditions are detected so that the card will (eventually) restart. Unfortunately this makes locking complicated since reset can also be called in process context (e.g. for channel change). Currently nothing protects against concurrent resets, which can be the source of corruption bugs. Reset takes too long to spinlock the whole thing, so this patch moves deferred resets into the mac80211 workqueue to enable use of sc->lock mutex. Signed-off-by: Bob Copeland <me@bobcopeland.com> Acked-by: Bruno Randolf <br1@einfach.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/base.h')
-rw-r--r--drivers/net/wireless/ath/ath5k/base.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath5k/base.h b/drivers/net/wireless/ath/ath5k/base.h
index 56221bc7c8cd..86c90f471b74 100644
--- a/drivers/net/wireless/ath/ath5k/base.h
+++ b/drivers/net/wireless/ath/ath5k/base.h
@@ -47,6 +47,7 @@
#include <linux/if_ether.h>
#include <linux/leds.h>
#include <linux/rfkill.h>
+#include <linux/workqueue.h>
#include "ath5k.h"
#include "debug.h"
@@ -189,7 +190,7 @@ struct ath5k_softc {
unsigned int led_pin, /* GPIO pin for driving LED */
led_on; /* pin setting for LED on */
- struct tasklet_struct restq; /* reset tasklet */
+ struct work_struct reset_work; /* deferred chip reset */
unsigned int rxbufsize; /* rx size based on mtu */
struct list_head rxbuf; /* receive buffer */