]> www.infradead.org Git - users/hch/misc.git/commitdiff
wifi: iwlwifi: trans: remove d3 test code
authorMiri Korenblit <miriam.rachel.korenblit@intel.com>
Tue, 26 Aug 2025 15:54:59 +0000 (18:54 +0300)
committerMiri Korenblit <miriam.rachel.korenblit@intel.com>
Thu, 28 Aug 2025 06:56:42 +0000 (09:56 +0300)
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
drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c
drivers/net/wireless/intel/iwlwifi/iwl-trans.c
drivers/net/wireless/intel/iwlwifi/iwl-trans.h
drivers/net/wireless/intel/iwlwifi/mld/d3.c
drivers/net/wireless/intel/iwlwifi/mvm/d3.c
drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/internal.h
drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/trans.c

index 0771a46bd55206f39c286fa147e6a39ff04ef7cf..f1a39169eb4d65dce247cfd7d1525c8af4dc78a6 100644 (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;
 
index 3694b41d6621f4cb960bd6e95972b457ab687bab..c5944e9fa6c3d77a7dc7174410ae7e3459da0813 100644 (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);
 
index 52f4a09c740f5eb45834ec901b61b654a81a04af..b7e2355ece30d281252d9b15fd3086e93ebc23f4 100644 (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,
index dd8764029581066705e70addc9b630029ca933ac..aad944f8ab026c1282702c703091135e99d13f31 100644 (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 {
index 9b1e96f1767f898196d92adcaf63c7cce90e224b..d22ee06ff2c98bbe97f0b0643d516cd33e92e93a 100644 (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);
 }
index eca524c6a9f3a18c815d7c9047f7ed5ca0893ce2..b6ff9d62fab7c6d9a4087e64813b2c0b6694f730 100644 (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,
index 3e50a935e1d039ddb2e170d01c165875a491a9f5..ff0979d0b8b061bac26d862271ff8ebc8b1590b5 100644 (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