PRINT_MVM_REF(IWL_MVM_REF_EXIT_WORK);
PRINT_MVM_REF(IWL_MVM_REF_PROTECT_CSA);
PRINT_MVM_REF(IWL_MVM_REF_FW_DBG_COLLECT);
+ PRINT_MVM_REF(IWL_MVM_REF_INIT_UCODE);
return simple_read_from_buffer(user_buf, count, ppos, buf, pos);
}
goto out_free;
mutex_lock(&mvm->mutex);
+ iwl_mvm_ref(mvm, IWL_MVM_REF_INIT_UCODE);
err = iwl_run_init_mvm_ucode(mvm, true);
if (!err || !iwlmvm_mod_params.init_dbg)
iwl_trans_stop_device(trans);
+ iwl_mvm_unref(mvm, IWL_MVM_REF_INIT_UCODE);
mutex_unlock(&mvm->mutex);
/* returns 0 if successful, 1 if success but in rfkill */
if (err < 0 && !iwlmvm_mod_params.init_dbg) {
IWL_DEBUG_RPM(mvm, "MVM entering D0i3\n");
+ if (WARN_ON_ONCE(mvm->cur_ucode != IWL_UCODE_REGULAR))
+ return -EINVAL;
+
set_bit(IWL_MVM_STATUS_IN_D0I3, &mvm->status);
/*
IWL_DEBUG_RPM(mvm, "MVM exiting D0i3\n");
+ if (WARN_ON_ONCE(mvm->cur_ucode != IWL_UCODE_REGULAR))
+ return -EINVAL;
+
mutex_lock(&mvm->d0i3_suspend_mutex);
if (test_bit(D0I3_DEFER_WAKEUP, &mvm->d0i3_suspend_flags)) {
IWL_DEBUG_RPM(mvm, "Deferring d0i3 exit until resume\n");