]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
iwlwifi: fix length check in multi-TB HCMD
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Thu, 14 Mar 2013 06:35:06 +0000 (08:35 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Apr 2013 16:25:48 +0000 (09:25 -0700)
commit cc904c7188c29847817f35e6966fec3014c7479b 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>
drivers/net/wireless/iwlwifi/pcie/tx.c

index c6cd9221e71aeed9fe4aac61d0217759c9034f0f..d760da9e6a1e496df032546a1808b4da40a640a9 100644 (file)
@@ -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 */