iwlwifi: pcie: fix prph dump length
authorLiad Kaufman <liad.kaufman@intel.com>
Mon, 10 Nov 2014 17:25:22 +0000 (19:25 +0200)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Tue, 11 Nov 2014 05:24:57 +0000 (07:24 +0200)
The length counting previously done had an error in it, causing
the length down the data dumping function to be shorter than it
should be, causing the end of the data to get truncated off and
lost.

Cc: <stable@vger.kernel.org> [3.17+]
Fixes: 67c65f2cf710 ("iwlwifi: dump periphery registers to fw-error-dump")
Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
drivers/net/wireless/iwlwifi/pcie/trans.c

index 160c3ebc48d0b2c938c04718f5709407c7a2bc16..dd2f3f8baa9dbea639005b3b65dbbbda9109408f 100644 (file)
@@ -1894,8 +1894,7 @@ static u32 iwl_trans_pcie_dump_prph(struct iwl_trans *trans,
                int reg;
                __le32 *val;
 
-               prph_len += sizeof(*data) + sizeof(*prph) +
-                       num_bytes_in_chunk;
+               prph_len += sizeof(**data) + sizeof(*prph) + num_bytes_in_chunk;
 
                (*data)->type = cpu_to_le32(IWL_FW_ERROR_DUMP_PRPH);
                (*data)->len = cpu_to_le32(sizeof(*prph) +