summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2021-06-18 11:01:17 +0300
committerLuca Coelho <luciano.coelho@intel.com>2021-06-22 16:57:56 +0300
commit26d18c75a7496c4c52b0b6789e713dc76ebfbc87 (patch)
tree0083267b09c8809235ccca3849cbd7bf1cc9b74a /drivers/net/wireless
parent310f60f53a86eba680d9bc20a371e13b06a5f903 (diff)
downloadlinux-stable-26d18c75a7496c4c52b0b6789e713dc76ebfbc87.tar.gz
linux-stable-26d18c75a7496c4c52b0b6789e713dc76ebfbc87.tar.bz2
linux-stable-26d18c75a7496c4c52b0b6789e713dc76ebfbc87.zip
iwlwifi: pcie: fix context info freeing
After firmware alive, iwl_trans_pcie_gen2_fw_alive() is called to free the context info. However, on gen3 that will then free the context info with the wrong size. Since we free this allocation later, let it stick around until the device is stopped for now, freeing some of it earlier is a separate change. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210618105614.afb63fb8cbc1.If4968db8e09f4ce2a1d27a6d750bca3d132d7d70@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c
index 56162c4500d7..93b957866beb 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c
@@ -323,7 +323,8 @@ void iwl_trans_pcie_gen2_fw_alive(struct iwl_trans *trans, u32 scd_addr)
/* now that we got alive we can free the fw image & the context info.
* paging memory cannot be freed included since FW will still use it
*/
- iwl_pcie_ctxt_info_free(trans);
+ if (trans->trans_cfg->device_family < IWL_DEVICE_FAMILY_AX210)
+ iwl_pcie_ctxt_info_free(trans);
/*
* Re-enable all the interrupts, including the RF-Kill one, now that