iwlwifi: mvm: don't capture firmware coredump for D3->D0 reconfig
[linux-block.git] / drivers / net / wireless / iwlwifi / mvm / mac80211.c
index 4f9f77f1371de7edb134a120efbbe5a5e4689ac9..ed2c219cf5434225c69e180dc446a28759981504 100644 (file)
@@ -839,7 +839,12 @@ void iwl_mvm_fw_error_dump(struct iwl_mvm *mvm)
 
 static void iwl_mvm_restart_cleanup(struct iwl_mvm *mvm)
 {
-       iwl_mvm_fw_error_dump(mvm);
+       /* clear the D3 reconfig, we only need it to avoid dumping a
+        * firmware coredump on reconfiguration, we shouldn't do that
+        * on D3->D0 transition
+        */
+       if (!test_and_clear_bit(IWL_MVM_STATUS_D3_RECONFIG, &mvm->status))
+               iwl_mvm_fw_error_dump(mvm);
 
        iwl_trans_stop_device(mvm->trans);