Permalink
Browse files

iwlwifi: fix length check in multi-TB HCMD

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...
1 parent 8937760 commit 3d8e86bcaa87d05c3d7ffe428f54feacf24d11f8 Emmanuel Grumbach committed with gregkh Mar 14, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 drivers/net/wireless/iwlwifi/pcie/tx.c
View
2 drivers/net/wireless/iwlwifi/pcie/tx.c
@@ -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 */

0 comments on commit 3d8e86b

Please sign in to comment.