summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorEmmanuel Grumbach2013-03-14 07:35:06 +0100
committerJohannes Berg2013-03-20 12:07:07 +0100
commitcc904c7188c29847817f35e6966fec3014c7479b (patch)
treefb3dffc0a22dfdd8b58164246f231f2d5e62f47e /drivers/net
parentiwlwifi: mvm: don't warn on normal BAR sending (diff)
downloadkernel-qcow2-linux-cc904c7188c29847817f35e6966fec3014c7479b.tar.gz
kernel-qcow2-linux-cc904c7188c29847817f35e6966fec3014c7479b.tar.xz
kernel-qcow2-linux-cc904c7188c29847817f35e6966fec3014c7479b.zip
iwlwifi: fix length check in multi-TB HCMD
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>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/iwlwifi/pcie/tx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/pcie/tx.c b/drivers/net/wireless/iwlwifi/pcie/tx.c
index 8595c16f74de..cb5c6792e3a8 100644
--- a/drivers/net/wireless/iwlwifi/pcie/tx.c
+++ b/drivers/net/wireless/iwlwifi/pcie/tx.c
@@ -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 */