wifi: iwlwifi: mvm: enable resume based on notifications
authorHaim Dreyfuss <haim.dreyfuss@intel.com>
Tue, 6 Sep 2022 13:42:15 +0000 (16:42 +0300)
committerGregory Greenman <gregory.greenman@intel.com>
Sun, 18 Sep 2022 11:40:16 +0000 (14:40 +0300)
We have recently added support for resume based on notifications.
Enable it.

Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20220906161827.a6344ba23df5.I09fce8cf5aac1d46b40ae81b1abcf7a0e54af196@changeid
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/d3.c

index 3a593f6..90871f3 100644 (file)
@@ -2725,6 +2725,16 @@ static int iwl_mvm_d3_notif_wait(struct iwl_mvm *mvm,
                                     IWL_MVM_D3_NOTIF_TIMEOUT);
 }
 
+static inline bool iwl_mvm_d3_resume_notif_based(struct iwl_mvm *mvm)
+{
+       return iwl_fw_lookup_notif_ver(mvm->fw, PROT_OFFLOAD_GROUP,
+                                      WOWLAN_INFO_NOTIFICATION, 0) &&
+               iwl_fw_lookup_notif_ver(mvm->fw, PROT_OFFLOAD_GROUP,
+                                       WOWLAN_WAKE_PKT_NOTIFICATION, 0) &&
+               iwl_fw_lookup_notif_ver(mvm->fw, PROT_OFFLOAD_GROUP,
+                                       D3_END_NOTIFICATION, 0);
+}
+
 static int __iwl_mvm_resume(struct iwl_mvm *mvm, bool test)
 {
        struct ieee80211_vif *vif = NULL;
@@ -2740,8 +2750,7 @@ static int __iwl_mvm_resume(struct iwl_mvm *mvm, bool test)
                                         IWL_UCODE_TLV_CAPA_CNSLDTD_D3_D0_IMG);
        bool d0i3_first = fw_has_capa(&mvm->fw->ucode_capa,
                                      IWL_UCODE_TLV_CAPA_D0I3_END_FIRST);
-       /* currently disabled */
-       bool resume_notif_based = false;
+       bool resume_notif_based = iwl_mvm_d3_resume_notif_based(mvm);
 
        mutex_lock(&mvm->mutex);