wifi: iwlwifi: mld: fix build with CONFIG_PM_SLEEP undefined
authorMiri Korenblit <miriam.rachel.korenblit@intel.com>
Sun, 9 Mar 2025 05:36:39 +0000 (07:36 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 11 Mar 2025 15:29:24 +0000 (16:29 +0100)
fw_status.in_d3 is only defined under CONFIG_PM_SLEEP.

Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Link: https://patch.msgid.link/20250309073442.6f7e44a27b87.I78b9311019b59477a1961cddc4640b255ceda651@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/mld/hcmd.h
drivers/net/wireless/intel/iwlwifi/mld/mld.h

index 773bc1b093921f902d5594758bd9e88df12b0057..64a8d424832410ce1361cf351139adf17057c54a 100644 (file)
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
 /*
- * Copyright (C) 2024 Intel Corporation
+ * Copyright (C) 2024-2025 Intel Corporation
  */
 #ifndef __iwl_mld_hcmd_h__
 #define __iwl_mld_hcmd_h__
@@ -10,8 +10,10 @@ static inline int iwl_mld_send_cmd(struct iwl_mld *mld, struct iwl_host_cmd *cmd
        /* No commands, including the d3 related commands, should be sent
         * after entering d3
         */
+#ifdef CONFIG_PM_SLEEP
        if (WARN_ON(mld->fw_status.in_d3))
                return -EIO;
+#endif
 
        if (!(cmd->flags & CMD_ASYNC))
                lockdep_assert_wiphy(mld->wiphy);
index 6eda6081c8b41588919868dcfd99b927b85cbe34..1ab98ba42c760f269843dccc9cae350e5e0de615 100644 (file)
@@ -296,7 +296,9 @@ iwl_cleanup_mld(struct iwl_mld *mld)
        CLEANUP_STRUCT(mld);
        CLEANUP_STRUCT(&mld->scan);
 
+#ifdef CONFIG_PM_SLEEP
        mld->fw_status.in_d3 = false;
+#endif
 
        iwl_mld_low_latency_restart_cleanup(mld);