Skip to content

Commit

Permalink
iwlwifi: fix length check in multi-TB HCMD
Browse files Browse the repository at this point in the history
commit cc904c7 upstream.

As reported by Ben Hutchings, there was a harmless issue in
the checks being done on the lengths of the TBs while
building the TFD for a multi-TB host command.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
egrumbach authored and gregkh committed Apr 5, 2013
1 parent 8937760 commit 3d8e86b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/iwlwifi/pcie/tx.c
Expand Up @@ -1242,7 +1242,7 @@ static int iwl_pcie_enqueue_hcmd(struct iwl_trans *trans,
for (i = 0; i < IWL_MAX_CMD_TFDS; i++) {
int copy = 0;

if (!cmd->len)
if (!cmd->len[i])
continue;

/* need at least IWL_HCMD_MIN_COPY_SIZE copied */
Expand Down

0 comments on commit 3d8e86b

Please sign in to comment.