Skip to content

Commit

Permalink
libertas: Add reset_card() callback to hardware driver
Browse files Browse the repository at this point in the history
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
David Woodhouse authored and John W. Linville committed May 22, 2008
1 parent 15dbaac commit edf5dab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/wireless/libertas/dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 5 additions & 0 deletions drivers/net/wireless/libertas/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit edf5dab

Please sign in to comment.