Skip to content

Commit

Permalink
iwlwifi: fix length check in multi-TB HCMD
Browse files Browse the repository at this point in the history
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.

Cc: stable@vger@kernel.org
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Emmanuel Grumbach authored and Johannes Berg committed Mar 20, 2013
1 parent 2470b36 commit cc904c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/iwlwifi/pcie/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1264,7 +1264,7 @@ static int iwl_pcie_enqueue_hcmd(struct iwl_trans *trans,
for (i = 0; i < IWL_MAX_CMD_TBS_PER_TFD; i++) {
int copy = 0;

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

/* need at least IWL_HCMD_SCRATCHBUF_SIZE copied */
Expand Down

0 comments on commit cc904c7

Please sign in to comment.