wifi: iwlwifi: mvm: replace CONFIG_PM by CONFIG_PM_SLEEP
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Sun, 25 Aug 2024 16:17:03 +0000 (19:17 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 6 Sep 2024 10:56:03 +0000 (12:56 +0200)
Replace the ifdef CONFIG_PM by CONFIG_PM_SLEEP. CONFIG_PM was useful
when we had CONFIG_PM_RUNTIME but that was removed long ago.
Use PM_SLEEP consistently across the driver.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20240825191257.44e47ba584de.I64f985d0405345252b76b7157291b79677abd64d@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/Makefile
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
drivers/net/wireless/intel/iwlwifi/mvm/ops.c

index 8873904f51ecb83bfd1399cc01fc6a632826ef23..59751f123571be7c39e90e89d9be260a0f0f644d 100644 (file)
@@ -13,7 +13,7 @@ iwlmvm-y += ptp.o
 iwlmvm-y += time-sync.o
 iwlmvm-$(CONFIG_IWLWIFI_DEBUGFS) += debugfs.o debugfs-vif.o
 iwlmvm-$(CONFIG_IWLWIFI_LEDS) += led.o
-iwlmvm-$(CONFIG_PM) += d3.o
+iwlmvm-$(CONFIG_PM_SLEEP) += d3.o
 iwlmvm-$(CONFIG_IWLMEI) += vendor-cmd.o
 
 subdir-ccflags-y += -I $(src)/../
index 6f5b16eb49022b55b67a43e0be0d9a454375215e..a327893c6dce4750e4e17e15209fd65876cb475f 100644 (file)
@@ -1232,7 +1232,7 @@ int __iwl_mvm_mac_start(struct iwl_mvm *mvm)
                mvm->nvm_data = NULL;
        }
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
        /* fast_resume will be cleared by iwl_mvm_fast_resume */
        fast_resume = mvm->fast_resume;
 
@@ -1254,7 +1254,7 @@ int __iwl_mvm_mac_start(struct iwl_mvm *mvm)
                        set_bit(IWL_MVM_STATUS_FIRMWARE_RUNNING, &mvm->status);
                }
        }
-#endif /* CONFIG_PM */
+#endif /* CONFIG_PM_SLEEP */
 
        if (test_bit(IWL_MVM_STATUS_HW_RESTART_REQUESTED, &mvm->status)) {
                /*
index c9b69c3a61fc9a0ad8e39891db399741d2f34f96..ef07cff203b0d43a8c19e2def20b06239db02cb6 100644 (file)
@@ -512,7 +512,7 @@ struct iwl_mvm_vif {
        bool bf_enabled;
        bool ba_enabled;
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
        /* WoWLAN GTK rekey data */
        struct {
                u8 kck[NL80211_KCK_EXT_LEN];
@@ -1178,7 +1178,7 @@ struct iwl_mvm {
 
        struct ieee80211_vif *p2p_device_vif;
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
        struct wiphy_wowlan_support wowlan;
        int gtk_ivlen, gtk_icvlen, ptk_ivlen, ptk_icvlen;
 
@@ -2306,7 +2306,7 @@ void iwl_mvm_ipv6_addr_change(struct ieee80211_hw *hw,
 void iwl_mvm_set_default_unicast_key(struct ieee80211_hw *hw,
                                     struct ieee80211_vif *vif, int idx);
 extern const struct file_operations iwl_dbgfs_d3_test_ops;
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 void iwl_mvm_set_last_nonqos_seq(struct iwl_mvm *mvm,
                                 struct ieee80211_vif *vif);
 void iwl_mvm_fast_suspend(struct iwl_mvm *mvm);
index 2cd89ccaef9a9a131fc9e517665723de51b2eeb6..4dd4a9d5c71fc7d567e929828cec358071611022 100644 (file)
@@ -2155,6 +2155,7 @@ static void iwl_op_mode_mvm_time_point(struct iwl_op_mode *op_mode,
        iwl_dbg_tlv_time_point(&mvm->fwrt, tp_id, tp_data);
 }
 
+#ifdef CONFIG_PM_SLEEP
 static void iwl_op_mode_mvm_device_powered_off(struct iwl_op_mode *op_mode)
 {
        struct iwl_mvm *mvm = IWL_OP_MODE_GET_MVM(op_mode);
@@ -2163,11 +2164,13 @@ static void iwl_op_mode_mvm_device_powered_off(struct iwl_op_mode *op_mode)
        clear_bit(IWL_MVM_STATUS_IN_D3, &mvm->status);
        mvm->trans->system_pm_mode = IWL_PLAT_PM_MODE_DISABLED;
        iwl_mvm_stop_device(mvm);
-#ifdef CONFIG_PM
        mvm->fast_resume = false;
-#endif
        mutex_unlock(&mvm->mutex);
 }
+#else
+static void iwl_op_mode_mvm_device_powered_off(struct iwl_op_mode *op_mode)
+{}
+#endif
 
 #define IWL_MVM_COMMON_OPS                                     \
        /* these could be differentiated */                     \