]> www.infradead.org Git - users/hch/misc.git/commitdiff
wifi: iwlwifi: trans: remove STATUS_SUSPENDED
authorMiri Korenblit <miriam.rachel.korenblit@intel.com>
Tue, 26 Aug 2025 15:55:00 +0000 (18:55 +0300)
committerMiri Korenblit <miriam.rachel.korenblit@intel.com>
Thu, 28 Aug 2025 06:56:42 +0000 (09:56 +0300)
We needed this bit to prevent sending host commands when suspended in
pseudo mode (in real suspension we can't send commands anyway).
Now as pseudo mode is removed, we no longer need it.
Remove.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250826184046.2642406f0e9f.Ic530fa7901bd6bd9df805c8f892357078377ac8b@changeid
drivers/net/wireless/intel/iwlwifi/iwl-trans.c
drivers/net/wireless/intel/iwlwifi/iwl-trans.h

index c5944e9fa6c3d77a7dc7174410ae7e3459da0813..d68a820c3d4873e0e18dfea16b55e0719e19d404 100644 (file)
@@ -318,9 +318,6 @@ int iwl_trans_send_cmd(struct iwl_trans *trans, struct iwl_host_cmd *cmd)
                     test_bit(STATUS_RFKILL_OPMODE, &trans->status)))
                return -ERFKILL;
 
-       if (unlikely(test_bit(STATUS_SUSPENDED, &trans->status)))
-               return -EHOSTDOWN;
-
        if (unlikely(test_bit(STATUS_FW_ERROR, &trans->status)))
                return -EIO;
 
@@ -408,8 +405,6 @@ int iwl_trans_start_hw(struct iwl_trans *trans)
        might_sleep();
 
        clear_bit(STATUS_TRANS_RESET_IN_PROGRESS, &trans->status);
-       /* opmode may not resume if it detects errors */
-       clear_bit(STATUS_SUSPENDED, &trans->status);
 
        return iwl_trans_pcie_start_hw(trans);
 }
@@ -509,31 +504,18 @@ iwl_trans_dump_data(struct iwl_trans *trans, u32 dump_mask,
 
 int iwl_trans_d3_suspend(struct iwl_trans *trans, bool reset)
 {
-       int err;
-
        might_sleep();
 
-       err = iwl_trans_pcie_d3_suspend(trans, reset);
-
-       if (!err)
-               set_bit(STATUS_SUSPENDED, &trans->status);
-
-       return err;
+       return iwl_trans_pcie_d3_suspend(trans, reset);
 }
 IWL_EXPORT_SYMBOL(iwl_trans_d3_suspend);
 
 int iwl_trans_d3_resume(struct iwl_trans *trans, enum iwl_d3_status *status,
                        bool reset)
 {
-       int err;
-
        might_sleep();
 
-       err = iwl_trans_pcie_d3_resume(trans, status, reset);
-
-       clear_bit(STATUS_SUSPENDED, &trans->status);
-
-       return err;
+       return iwl_trans_pcie_d3_resume(trans, status, reset);
 }
 IWL_EXPORT_SYMBOL(iwl_trans_d3_resume);
 
index b7e2355ece30d281252d9b15fd3086e93ebc23f4..0fca6992ec5b0cf4c55cee5ec734da516773892c 100644 (file)
@@ -302,8 +302,6 @@ enum iwl_d3_status {
  *     the firmware state yet
  * @STATUS_TRANS_RESET_IN_PROGRESS: reset is still in progress, don't
  *     attempt another reset yet
- * @STATUS_SUSPENDED: device is suspended, don't send commands that
- *     aren't marked accordingly
  */
 enum iwl_trans_status {
        STATUS_SYNC_HCMD_ACTIVE,
@@ -318,7 +316,6 @@ enum iwl_trans_status {
        STATUS_IN_SW_RESET,
        STATUS_RESET_PENDING,
        STATUS_TRANS_RESET_IN_PROGRESS,
-       STATUS_SUSPENDED,
 };
 
 static inline int