Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8672aad3 authored by Shahar S Matityahu's avatar Shahar S Matityahu Committed by Luca Coelho
Browse files

iwlwifi: dbg: use dump mask for tx command dumping length



Only add the size of the tx command to the dump file size if it is set
in the dump_mask.

Signed-off-by: default avatarShahar S Matityahu <shahar.s.matityahu@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent e4fe5d4b
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -3165,8 +3165,10 @@ static struct iwl_trans_dump_data
	len = sizeof(*dump_data);

	/* host commands */
	if (dump_mask & BIT(IWL_FW_ERROR_DUMP_TXCMD))
		len += sizeof(*data) +
		cmdq->n_window * (sizeof(*txcmd) + TFD_MAX_PAYLOAD_SIZE);
			cmdq->n_window * (sizeof(*txcmd) +
					  TFD_MAX_PAYLOAD_SIZE);

	/* FW monitor */
	if (dump_mask & BIT(IWL_FW_ERROR_DUMP_FW_MONITOR))