Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 246900
b: refs/heads/master
c: 7b21f00
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and Wey-Yi Guy committed Apr 18, 2011
1 parent 35f0f26 commit eb64b8a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3e41ace5deef7af16dd277d9d17f9d36dca0a10e
refs/heads/master: 7b21f00ee6073909c01adeba317af3d78c3b9d0a
8 changes: 8 additions & 0 deletions trunk/drivers/net/wireless/iwlwifi/iwl-tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,14 @@ int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
return -EIO;
}

/*
* As we only have a single huge buffer, check that the command
* is synchronous (otherwise buffers could end up being reused).
*/

if (WARN_ON((cmd->flags & CMD_ASYNC) && (cmd->flags & CMD_SIZE_HUGE)))
return -EINVAL;

spin_lock_irqsave(&priv->hcmd_lock, flags);

if (iwl_queue_space(q) < ((cmd->flags & CMD_ASYNC) ? 2 : 1)) {
Expand Down

0 comments on commit eb64b8a

Please sign in to comment.