wifi: iwlwifi: trans: remove d3 test code

This is no longer needed. Remove it.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250826184046.4742846b17ed.I08c70ac544364d68baae03f830b1e01ce702b06d@changeid
This commit is contained in:
Miri Korenblit 2025-08-26 18:54:59 +03:00
parent 6504e3f4c0
commit b2e4bccc55
7 changed files with 25 additions and 42 deletions

View File

@ -378,7 +378,7 @@ static int iwlagn_mac_suspend(struct ieee80211_hw *hw,
iwl_write32(priv->trans, CSR_UCODE_DRV_GP1_SET,
CSR_UCODE_DRV_GP1_BIT_D3_CFG_COMPLETE);
iwl_trans_d3_suspend(priv->trans, false, true);
iwl_trans_d3_suspend(priv->trans, true);
goto out;
@ -451,7 +451,7 @@ static int iwlagn_mac_resume(struct ieee80211_hw *hw)
/* we'll clear ctx->vif during iwlagn_prepare_restart() */
vif = ctx->vif;
ret = iwl_trans_d3_resume(priv->trans, &d3_status, false, true);
ret = iwl_trans_d3_resume(priv->trans, &d3_status, true);
if (ret)
goto out_unlock;

View File

@ -507,13 +507,13 @@ iwl_trans_dump_data(struct iwl_trans *trans, u32 dump_mask,
sanitize_ops, sanitize_ctx);
}
int iwl_trans_d3_suspend(struct iwl_trans *trans, bool test, bool reset)
int iwl_trans_d3_suspend(struct iwl_trans *trans, bool reset)
{
int err;
might_sleep();
err = iwl_trans_pcie_d3_suspend(trans, test, reset);
err = iwl_trans_pcie_d3_suspend(trans, reset);
if (!err)
set_bit(STATUS_SUSPENDED, &trans->status);
@ -523,13 +523,13 @@ int iwl_trans_d3_suspend(struct iwl_trans *trans, bool test, bool reset)
IWL_EXPORT_SYMBOL(iwl_trans_d3_suspend);
int iwl_trans_d3_resume(struct iwl_trans *trans, enum iwl_d3_status *status,
bool test, bool reset)
bool reset)
{
int err;
might_sleep();
err = iwl_trans_pcie_d3_resume(trans, status, test, reset);
err = iwl_trans_pcie_d3_resume(trans, status, reset);
clear_bit(STATUS_SUSPENDED, &trans->status);

View File

@ -952,10 +952,10 @@ int iwl_trans_start_fw(struct iwl_trans *trans, const struct iwl_fw *fw,
void iwl_trans_stop_device(struct iwl_trans *trans);
int iwl_trans_d3_suspend(struct iwl_trans *trans, bool test, bool reset);
int iwl_trans_d3_suspend(struct iwl_trans *trans, bool reset);
int iwl_trans_d3_resume(struct iwl_trans *trans, enum iwl_d3_status *status,
bool test, bool reset);
bool reset);
struct iwl_trans_dump_data *
iwl_trans_dump_data(struct iwl_trans *trans, u32 dump_mask,

View File

@ -1211,7 +1211,7 @@ 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, false);
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");
@ -1272,7 +1272,7 @@ int iwl_mld_no_wowlan_suspend(struct iwl_mld *mld)
goto out;
}
ret = iwl_trans_d3_suspend(mld->trans, false, false);
ret = iwl_trans_d3_suspend(mld->trans, false);
if (ret) {
IWL_ERR(mld, "d3 suspend: trans_d3_suspend failed %d\n", ret);
} else {

View File

@ -1361,7 +1361,7 @@ static int __iwl_mvm_suspend(struct ieee80211_hw *hw,
clear_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status);
ret = iwl_trans_d3_suspend(mvm->trans, false, !unified_image);
ret = iwl_trans_d3_suspend(mvm->trans, !unified_image);
out:
if (ret < 0) {
iwl_mvm_free_nd(mvm);
@ -2992,7 +2992,7 @@ static int iwl_mvm_resume_firmware(struct iwl_mvm *mvm)
bool reset = fw_has_capa(&mvm->fw->ucode_capa,
IWL_UCODE_TLV_CAPA_CNSLDTD_D3_D0_IMG);
ret = iwl_trans_d3_resume(mvm->trans, &d3_status, false, !reset);
ret = iwl_trans_d3_resume(mvm->trans, &d3_status, !reset);
if (ret)
return ret;
@ -3255,7 +3255,7 @@ void iwl_mvm_fast_suspend(struct iwl_mvm *mvm)
IWL_ERR(mvm,
"fast suspend: couldn't send D3_CONFIG_CMD %d\n", ret);
ret = iwl_trans_d3_suspend(mvm->trans, false, false);
ret = iwl_trans_d3_suspend(mvm->trans, false);
if (ret)
IWL_ERR(mvm, "fast suspend: trans_d3_suspend failed %d\n", ret);
}

View File

@ -1065,8 +1065,8 @@ iwl_trans_pcie_dump_data(struct iwl_trans *trans, u32 dump_mask,
void *sanitize_ctx);
int iwl_trans_pcie_d3_resume(struct iwl_trans *trans,
enum iwl_d3_status *status,
bool test, bool reset);
int iwl_trans_pcie_d3_suspend(struct iwl_trans *trans, bool test, bool reset);
bool reset);
int iwl_trans_pcie_d3_suspend(struct iwl_trans *trans, bool reset);
void iwl_trans_pci_interrupts(struct iwl_trans *trans, bool enable);
void iwl_trans_pcie_sync_nmi(struct iwl_trans *trans);
void iwl_trans_pcie_set_bits_mask(struct iwl_trans *trans, u32 reg,

View File

@ -1437,17 +1437,10 @@ void iwl_trans_pcie_rf_kill(struct iwl_trans *trans, bool state, bool from_irq)
}
static void iwl_pcie_d3_complete_suspend(struct iwl_trans *trans,
bool test, bool reset)
bool reset)
{
iwl_disable_interrupts(trans);
/*
* in testing mode, the host stays awake and the
* hardware won't be reset (not even partially)
*/
if (test)
return;
iwl_pcie_disable_ict(trans);
iwl_pcie_synchronize_irqs(trans);
@ -1518,7 +1511,7 @@ static int iwl_pcie_d3_handshake(struct iwl_trans *trans, bool suspend)
return ret;
}
int iwl_trans_pcie_d3_suspend(struct iwl_trans *trans, bool test, bool reset)
int iwl_trans_pcie_d3_suspend(struct iwl_trans *trans, bool reset)
{
int ret;
@ -1531,26 +1524,19 @@ int iwl_trans_pcie_d3_suspend(struct iwl_trans *trans, bool test, bool reset)
if (ret)
return ret;
iwl_pcie_d3_complete_suspend(trans, test, reset);
iwl_pcie_d3_complete_suspend(trans, reset);
return 0;
}
int iwl_trans_pcie_d3_resume(struct iwl_trans *trans,
enum iwl_d3_status *status,
bool test, bool reset)
bool reset)
{
struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
u32 val;
int ret;
if (test) {
iwl_enable_interrupts(trans);
*status = IWL_D3_STATUS_ALIVE;
ret = 0;
goto out;
}
if (trans->mac_cfg->device_family >= IWL_DEVICE_FAMILY_BZ)
iwl_set_bit(trans, CSR_GP_CNTRL,
CSR_GP_CNTRL_REG_FLAG_BZ_MAC_ACCESS_REQ);
@ -1594,18 +1580,15 @@ int iwl_trans_pcie_d3_resume(struct iwl_trans *trans,
iwl_read_umac_prph(trans, WFPM_GP2));
val = iwl_read32(trans, CSR_RESET);
if (val & CSR_RESET_REG_FLAG_NEVO_RESET)
if (val & CSR_RESET_REG_FLAG_NEVO_RESET) {
*status = IWL_D3_STATUS_RESET;
else
*status = IWL_D3_STATUS_ALIVE;
out:
if (*status == IWL_D3_STATUS_ALIVE)
ret = iwl_pcie_d3_handshake(trans, false);
else
trans->state = IWL_TRANS_NO_FW;
} else {
*status = IWL_D3_STATUS_ALIVE;
return iwl_pcie_d3_handshake(trans, false);
}
return ret;
return 0;
}
static void