diff options
author | Shahar S Matityahu <shahar.s.matityahu@intel.com> | 2019-04-08 16:59:53 +0300 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2019-04-29 18:42:47 +0300 |
commit | 0aade8f4846a6fdacbbd6bbe092d0edb2dfa0d0f (patch) | |
tree | 716e05c9ad7d0cf06cb328372891dfe3d746a610 /drivers/net/wireless/intel | |
parent | 391481ad26904e055298eb4e41fbdba7d20e6526 (diff) | |
download | linux-0aade8f4846a6fdacbbd6bbe092d0edb2dfa0d0f.tar.xz |
iwlwifi: avoid allocating memory for region with disabled domain
In iwl_fw_ini_get_trigger_len the driver allocates space for memory
regions regardless of their domain and in iwl_fw_ini_dump_trigger the
driver aborts trigger collection of disabled domain. This diff causes
unneeded memory allocation and traling zeros in the dump file.
Solve this behavior by enforcing domain checking in
iwl_fw_ini_get_trigger_len
Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c index 4ef447480aaf..62fd346ccb77 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c +++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c @@ -1751,6 +1751,10 @@ static int iwl_fw_ini_get_trigger_len(struct iwl_fw_runtime *fwrt, continue; } + /* currently the driver supports always on domain only */ + if (le32_to_cpu(reg->domain) != IWL_FW_INI_DBG_DOMAIN_ALWAYS_ON) + continue; + switch (le32_to_cpu(reg->region_type)) { case IWL_FW_INI_REGION_DEVICE_MEMORY: case IWL_FW_INI_REGION_PERIPHERY_MAC: |