From: Shahar S Matityahu Date: Thu, 7 Feb 2019 07:07:16 +0000 (+0200) Subject: iwlwifi: dbg: use dump mask for tx command dumping length X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=8672aad310fcf8f1091f9f6e45299b84c51f3f56;p=openwrt%2Fstaging%2Fblogic.git 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: Shahar S Matityahu Signed-off-by: Luca Coelho --- diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c index fe8269d023de..424dfae05c17 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c @@ -3165,8 +3165,10 @@ static struct iwl_trans_dump_data len = sizeof(*dump_data); /* host commands */ - len += sizeof(*data) + - cmdq->n_window * (sizeof(*txcmd) + TFD_MAX_PAYLOAD_SIZE); + if (dump_mask & BIT(IWL_FW_ERROR_DUMP_TXCMD)) + len += sizeof(*data) + + cmdq->n_window * (sizeof(*txcmd) + + TFD_MAX_PAYLOAD_SIZE); /* FW monitor */ if (dump_mask & BIT(IWL_FW_ERROR_DUMP_FW_MONITOR))