]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
libertas: Add reset_card() callback to hardware driver
authorDavid Woodhouse <dwmw2@infradead.org>
Tue, 20 May 2008 15:43:31 +0000 (16:43 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 22 May 2008 01:47:40 +0000 (21:47 -0400)
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/libertas/dev.h
drivers/net/wireless/libertas/main.c

index e12ce65067295707df648b8f31c4dc8d6c8b00c7..0a9fc5136783a4e8f56864a8f8616a5921fb518d 100644 (file)
@@ -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;
index db246d0a1eda6608c9b46369c53b1bfe938bd606..804da368416fbfcab472085007bc736524a91c7c 100644 (file)
@@ -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",