Skip to content

Commit

Permalink
iwlwifi: clear iwl_cmd_meta structure before use
Browse files Browse the repository at this point in the history
Resolve an issue in which out-dated fields in iwl_cmd_meta
could be used for later hardware commands.

Signed-off-by: Daniel C Halperin <daniel.c.halperin@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Daniel C Halperin authored and John W. Linville committed Aug 4, 2009
1 parent 92ca8d4 commit 8ce73f3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/wireless/iwlwifi/iwl-tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,7 @@ int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
out_cmd = txq->cmd[idx];
out_meta = &txq->meta[idx];

memset(out_meta, 0, sizeof(*out_meta)); /* re-initialize to NULL */
out_meta->flags = cmd->flags;
if (cmd->flags & CMD_WANT_SKB)
out_meta->source = cmd;
Expand Down

0 comments on commit 8ce73f3

Please sign in to comment.