Skip to content

Commit 834bfc6

Browse files
Miriam-Racheljmberg-intel
authored andcommitted
wifi: iwlwifi: mld: fix build with CONFIG_PM_SLEEP undefined
fw_status.in_d3 is only defined under CONFIG_PM_SLEEP. Signed-off-by: Miri Korenblit <[email protected]> Reviewed-by: Emmanuel Grumbach <[email protected]> Link: https://patch.msgid.link/20250309073442.6f7e44a27b87.I78b9311019b59477a1961cddc4640b255ceda651@changeid Signed-off-by: Johannes Berg <[email protected]>
1 parent 3ad6197 commit 834bfc6

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

drivers/net/wireless/intel/iwlwifi/mld/hcmd.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
22
/*
3-
* Copyright (C) 2024 Intel Corporation
3+
* Copyright (C) 2024-2025 Intel Corporation
44
*/
55
#ifndef __iwl_mld_hcmd_h__
66
#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
1010
/* No commands, including the d3 related commands, should be sent
1111
* after entering d3
1212
*/
13+
#ifdef CONFIG_PM_SLEEP
1314
if (WARN_ON(mld->fw_status.in_d3))
1415
return -EIO;
16+
#endif
1517

1618
if (!(cmd->flags & CMD_ASYNC))
1719
lockdep_assert_wiphy(mld->wiphy);

drivers/net/wireless/intel/iwlwifi/mld/mld.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,9 @@ iwl_cleanup_mld(struct iwl_mld *mld)
296296
CLEANUP_STRUCT(mld);
297297
CLEANUP_STRUCT(&mld->scan);
298298

299+
#ifdef CONFIG_PM_SLEEP
299300
mld->fw_status.in_d3 = false;
301+
#endif
300302

301303
iwl_mld_low_latency_restart_cleanup(mld);
302304

0 commit comments

Comments
 (0)