Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79233
b: refs/heads/master
c: ae125bf
h: refs/heads/master
i:
  79231: f1a3189
v: v3
  • Loading branch information
David Woodhouse authored and David S. Miller committed Jan 28, 2008
1 parent 3120ecf commit af9c2e7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 75567670c66329a111c2b4f12d6c1fc02b3b14d2
refs/heads/master: ae125bf8278249b8c44168c5183f551c3ed28b84
12 changes: 6 additions & 6 deletions trunk/drivers/net/wireless/libertas/cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1173,6 +1173,7 @@ void lbs_queue_cmd(struct lbs_private *priv,
lbs_deb_host("DNLD_CMD: cmd size is zero\n");
goto done;
}
cmdnode->result = 0;

/* Exit_PS command needs to be queued in the header always. */
if (le16_to_cpu(cmdnode->cmdbuf->command) == CMD_802_11_PS_MODE) {
Expand Down Expand Up @@ -1306,6 +1307,7 @@ void lbs_complete_command(struct lbs_private *priv, struct cmd_ctrl_node *cmd,
if (cmd == priv->cur_cmd)
priv->cur_cmd_retcode = result;

cmd->result = result;
cmd->cmdwaitqwoken = 1;
wake_up_interruptible(&cmd->cmdwait_q);

Expand Down Expand Up @@ -2212,12 +2214,10 @@ int __lbs_cmd(struct lbs_private *priv, uint16_t command,
wait_event_interruptible(cmdnode->cmdwait_q, cmdnode->cmdwaitqwoken);

spin_lock_irqsave(&priv->driver_lock, flags);
if (priv->cur_cmd_retcode) {
lbs_deb_host("PREP_CMD: command failed with return code %d\n",
priv->cur_cmd_retcode);
priv->cur_cmd_retcode = 0;
ret = -1;
}
ret = cmdnode->result;
if (ret)
lbs_pr_info("PREP_CMD: command 0x%04x failed: %d\n",
command, ret);
__lbs_cleanup_and_insert_cmd(priv, cmdnode);
spin_unlock_irqrestore(&priv->driver_lock, flags);

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/libertas/hostcmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ struct cmd_header {

struct cmd_ctrl_node {
struct list_head list;
int result;
/* command response */
int (*callback)(struct lbs_private *, unsigned long, struct cmd_header *);
unsigned long callback_arg;
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/libertas/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1237,6 +1237,7 @@ int lbs_stop_card(struct lbs_private *priv)
/* Flush pending command nodes */
spin_lock_irqsave(&priv->driver_lock, flags);
list_for_each_entry(cmdnode, &priv->cmdpendingq, list) {
cmdnode->result = -ENOENT;
cmdnode->cmdwaitqwoken = 1;
wake_up_interruptible(&cmdnode->cmdwait_q);
}
Expand Down

0 comments on commit af9c2e7

Please sign in to comment.