Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 73444
b: refs/heads/master
c: 29f5f2a
h: refs/heads/master
v: v3
  • Loading branch information
Marcelo Tosatti authored and Jeff Garzik committed Nov 10, 2007
1 parent 3931dd7 commit 800096c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 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: 51e6b712b5960cc7d086c3f856434ccd096c63a7
refs/heads/master: 29f5f2a19b055feabfcc6f92e1d40ec092c373ea
10 changes: 7 additions & 3 deletions trunk/drivers/net/wireless/libertas/cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -912,6 +912,10 @@ static int wlan_cmd_set_boot2_ver(wlan_private * priv,
return 0;
}

/*
* Note: NEVER use libertas_queue_cmd() with addtail==0 other than for
* the command timer, because it does not account for queued commands.
*/
void libertas_queue_cmd(wlan_adapter * adapter, struct cmd_ctrl_node *cmdnode, u8 addtail)
{
unsigned long flags;
Expand Down Expand Up @@ -941,10 +945,11 @@ void libertas_queue_cmd(wlan_adapter * adapter, struct cmd_ctrl_node *cmdnode, u

spin_lock_irqsave(&adapter->driver_lock, flags);

if (addtail)
if (addtail) {
list_add_tail((struct list_head *)cmdnode,
&adapter->cmdpendingq);
else
adapter->nr_cmd_pending++;
} else
list_add((struct list_head *)cmdnode, &adapter->cmdpendingq);

spin_unlock_irqrestore(&adapter->driver_lock, flags);
Expand Down Expand Up @@ -1412,7 +1417,6 @@ int libertas_prepare_and_send_command(wlan_private * priv,
cmdnode->cmdwaitqwoken = 0;

libertas_queue_cmd(adapter, cmdnode, 1);
adapter->nr_cmd_pending++;
wake_up_interruptible(&priv->waitq);

if (wait_option & CMD_OPTION_WAITFORRSP) {
Expand Down

0 comments on commit 800096c

Please sign in to comment.