summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2008-05-20 16:43:31 +0100
committerJohn W. Linville <linville@tuxdriver.com>2008-05-21 21:47:40 -0400
commitedf5dabfa86163d589041cccf607b41a7033e9b0 (patch)
treeeede8c645f726374c512c9cbaadcf36148ae3adf /drivers/net/wireless/libertas
parent15dbaac03e862ee746310832c8d8d694dc0427ee (diff)
libertas: Add reset_card() callback to hardware driver
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas')
-rw-r--r--drivers/net/wireless/libertas/dev.h1
-rw-r--r--drivers/net/wireless/libertas/main.c5
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/libertas/dev.h b/drivers/net/wireless/libertas/dev.h
index e12ce650672..0a9fc513678 100644
--- a/drivers/net/wireless/libertas/dev.h
+++ b/drivers/net/wireless/libertas/dev.h
@@ -153,6 +153,7 @@ struct lbs_private {
/** Hardware access */
int (*hw_host_to_card) (struct lbs_private *priv, u8 type, u8 *payload, u16 nb);
+ void (*reset_card) (struct lbs_private *priv);
/* Wake On LAN */
uint32_t wol_criteria;
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
index db246d0a1ed..804da368416 100644
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -787,6 +787,11 @@ static int lbs_thread(void *data)
le16_to_cpu(cmdnode->cmdbuf->command));
lbs_complete_command(priv, cmdnode, -ETIMEDOUT);
priv->nr_retries = 0;
+ if (priv->reset_card) {
+ spin_unlock_irq(&priv->driver_lock);
+ priv->reset_card(priv);
+ spin_lock_irq(&priv->driver_lock);
+ }
} else {
priv->cur_cmd = NULL;
lbs_pr_info("requeueing command %x due to timeout (#%d)\n",