aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel
diff options
context:
space:
mode:
authorMatti Gottlieb <matti.gottlieb@intel.com>2016-03-15 07:46:47 -0400
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2016-03-20 17:01:54 -0400
commit7fdf9663261cc77a516396fec82cee8a8ea07e76 (patch)
treed9aacf39f20eb9ff65bf9366e6f185f5193aa6c1 /drivers/net/wireless/intel
parent9fc515bc9e735c10cd327f05c20f5ef69474188d (diff)
iwlwifi: mvm: fix memory leak in paging
Currently paging download buffer is freed during the the unloading of the opmode which happens when the driver is unloaded. This causes a memory leak since the paging download buffer is allocated every time we enable the interface, so the download buffer can be allocated many times, but only be freed once. Free paging download buffer during disabling of the interface. CC: stable@vger.kernel.org [4.3+] Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c2
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/ops.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
index 76e649c680a1..a50f4df7eae7 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
@@ -1147,6 +1147,8 @@ void __iwl_mvm_mac_stop(struct iwl_mvm *mvm)
1147 /* the fw is stopped, the aux sta is dead: clean up driver state */ 1147 /* the fw is stopped, the aux sta is dead: clean up driver state */
1148 iwl_mvm_del_aux_sta(mvm); 1148 iwl_mvm_del_aux_sta(mvm);
1149 1149
1150 iwl_free_fw_paging(mvm);
1151
1150 /* 1152 /*
1151 * Clear IN_HW_RESTART flag when stopping the hw (as restart_complete() 1153 * Clear IN_HW_RESTART flag when stopping the hw (as restart_complete()
1152 * won't be called in this case). 1154 * won't be called in this case).
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
index 5e8ab796d5bc..d278399097dc 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
@@ -761,8 +761,6 @@ static void iwl_op_mode_mvm_stop(struct iwl_op_mode *op_mode)
761 for (i = 0; i < NVM_MAX_NUM_SECTIONS; i++) 761 for (i = 0; i < NVM_MAX_NUM_SECTIONS; i++)
762 kfree(mvm->nvm_sections[i].data); 762 kfree(mvm->nvm_sections[i].data);
763 763
764 iwl_free_fw_paging(mvm);
765
766 iwl_mvm_tof_clean(mvm); 764 iwl_mvm_tof_clean(mvm);
767 765
768 ieee80211_free_hw(mvm->hw); 766 ieee80211_free_hw(mvm->hw);