summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlwifi/mld/d3.c
diff options
context:
space:
mode:
authorMiri Korenblit <miriam.rachel.korenblit@intel.com>2025-08-26 18:55:01 +0300
committerMiri Korenblit <miriam.rachel.korenblit@intel.com>2025-08-28 09:56:42 +0300
commit49e58e9b0a4b4ddd42e8d0d341bb11d345cdce8f (patch)
tree3046c2c76900d7e4366fd8c1e5f58d152e2ffaf1 /drivers/net/wireless/intel/iwlwifi/mld/d3.c
parente769f6f27ffe41331e00b69a33aa8a34db4dd830 (diff)
wifi: iwlwifi: simplify iwl_trans_pcie_d3_resume
If iwl_trans_d3_resume succeeded but the hw requested a reset, this will be indicated to the opmode via the iwl_d3_status parameter while the return value will be 0. But the opmode doesn't really care if the resume failed or if a restart is required. It acts the same in both cases (beside different logs, but this can be done in iwl_trans_pcie_d3_resume) This complicates the code for no good reason. Change the iwl_trans_pcie_d3_resume to return an error value also in the case that everything went successfully but a restart is required, and add more logs so we can differentiate between the cases. This makes iwl_d3_status redundant. Remove it as well. Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250826184046.5fa2d909c75d.Ida19d8d8d73eddf12b30f1d473ea675f415778b2@changeid
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mld/d3.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mld/d3.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mld/d3.c b/drivers/net/wireless/intel/iwlwifi/mld/d3.c
index aad944f8ab02..5d24292c45a5 100644
--- a/drivers/net/wireless/intel/iwlwifi/mld/d3.c
+++ b/drivers/net/wireless/intel/iwlwifi/mld/d3.c
@@ -1195,7 +1195,6 @@ static int iwl_mld_wait_d3_notif(struct iwl_mld *mld,
WIDE_ID(PROT_OFFLOAD_GROUP, D3_END_NOTIFICATION)
};
struct iwl_notification_wait wait_d3_notif;
- enum iwl_d3_status d3_status;
int ret;
if (with_wowlan)
@@ -1211,14 +1210,8 @@ static int iwl_mld_wait_d3_notif(struct iwl_mld *mld,
iwl_mld_handle_d3_notif,
resume_data);
- ret = iwl_trans_d3_resume(mld->trans, &d3_status, false);
- if (ret || d3_status != IWL_D3_STATUS_ALIVE) {
- if (d3_status != IWL_D3_STATUS_ALIVE) {
- IWL_INFO(mld, "Device was reset during suspend\n");
- ret = -ENOENT;
- } else {
- IWL_ERR(mld, "Transport resume failed\n");
- }
+ ret = iwl_trans_d3_resume(mld->trans, false);
+ if (ret) {
iwl_remove_notification(&mld->notif_wait, &wait_d3_notif);
return ret;
}