iwlwifi: clear iwl_cmd_meta structure before use
authorDaniel C Halperin <daniel.c.halperin@intel.com>
Fri, 31 Jul 2009 21:28:06 +0000 (14:28 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 4 Aug 2009 20:44:22 +0000 (16:44 -0400)
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>
drivers/net/wireless/iwlwifi/iwl-tx.c

index 6bb9602f3477f3d5240d00969796239dc9533c1c..288b871e974b5e1e305a37bf38aa172e64e34f3c 100644 (file)
@@ -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;