diff options
author | Eliad Peller <eliad@wizery.com> | 2014-12-10 11:44:13 -0500 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2014-12-28 13:00:23 -0500 |
commit | 744cb695643ac111c422e4c517961646561b6895 (patch) | |
tree | b887d024685c41ffac7e695a74f704c643888dbb /drivers/net | |
parent | bd9c504bfd659e58d3537123e6798a9b83a2263d (diff) |
iwlwifi: mvm: clean refs before stop_device()
Some implementations (i.e. mini_rpm) assume the references
are managed only while the device is started.
Move the stale reference cleanup before stopping the
device in order to make them happy.
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/mac80211.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c index 4db051d84f1c..084689b9b93c 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c | |||
@@ -903,6 +903,11 @@ static void iwl_mvm_restart_cleanup(struct iwl_mvm *mvm) | |||
903 | if (!test_and_clear_bit(IWL_MVM_STATUS_D3_RECONFIG, &mvm->status)) | 903 | if (!test_and_clear_bit(IWL_MVM_STATUS_D3_RECONFIG, &mvm->status)) |
904 | iwl_mvm_fw_error_dump(mvm); | 904 | iwl_mvm_fw_error_dump(mvm); |
905 | 905 | ||
906 | /* cleanup all stale references (scan, roc), but keep the | ||
907 | * ucode_down ref until reconfig is complete | ||
908 | */ | ||
909 | iwl_mvm_unref_all_except(mvm, IWL_MVM_REF_UCODE_DOWN); | ||
910 | |||
906 | iwl_trans_stop_device(mvm->trans); | 911 | iwl_trans_stop_device(mvm->trans); |
907 | 912 | ||
908 | mvm->scan_status = IWL_MVM_SCAN_NONE; | 913 | mvm->scan_status = IWL_MVM_SCAN_NONE; |
@@ -932,10 +937,6 @@ static void iwl_mvm_restart_cleanup(struct iwl_mvm *mvm) | |||
932 | 937 | ||
933 | ieee80211_wake_queues(mvm->hw); | 938 | ieee80211_wake_queues(mvm->hw); |
934 | 939 | ||
935 | /* cleanup all stale references (scan, roc), but keep the | ||
936 | * ucode_down ref until reconfig is complete */ | ||
937 | iwl_mvm_unref_all_except(mvm, IWL_MVM_REF_UCODE_DOWN); | ||
938 | |||
939 | /* clear any stale d0i3 state */ | 940 | /* clear any stale d0i3 state */ |
940 | clear_bit(IWL_MVM_STATUS_IN_D0I3, &mvm->status); | 941 | clear_bit(IWL_MVM_STATUS_IN_D0I3, &mvm->status); |
941 | 942 | ||