Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp4409768rwb; Tue, 6 Sep 2022 07:11:35 -0700 (PDT) X-Google-Smtp-Source: AA6agR5nBpwYXLrt6YQmdHmXhr4l1oSCIvtbqs6f7e9Rwo3/5IBK5+nZkzFqEFlQyDT20Z6vRp8+ X-Received: by 2002:a17:906:3a15:b0:73d:80bf:542c with SMTP id z21-20020a1709063a1500b0073d80bf542cmr39638287eje.633.1662473495396; Tue, 06 Sep 2022 07:11:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662473495; cv=none; d=google.com; s=arc-20160816; b=r5a4oE1JczzDyA3PlTF4iwzyyivqNTvCPBedvBREdUihMVDefX/whO2DWme3yy686p yoiAZXTnd9lLfi7HQSwVHf1gEKWc75WnkAkGML6WhN/WswQ3dRWQ8Yv7tSSCVcSuXeDn XwCBmZC20Pzw7Mk3hK/LGEKavlgLoiuzRCH/N0TOwUwhAKpIftKI/hpxWMoQcQKJX+Rr LsN5j+B0DFYO00vvWDTl1XhT+n/InCleZfbmdnn1H4NGG2ZPMCnqDFHmE/XbXj2tza1F u6RTriSPmUpVLaRV1dG8imM7O28jh0cSXd1zL0qyptM0dnr/vu08g96cazpFnYeYnKdr ZbrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=CSDzsCrtErRVj47Bq+xpSKhysX7qMpweftDS/dqCm30=; b=KRvFjTfzu8sWhlLkBsLG9XRjgumGdQmA7zh3m/Z2aJWZeWbTvKjYMEu+Kvwq0dOijo J2VH/Dhp77Uyi6olr1cBdpOJXFFO8ycgNBLZDEKxL8ZC1F95fnNgCrtFV5u9a2FLdmtu DilxZWVMhD9ZoZhrYFF1alBx9PKq0ZtTKj16DzNUsS2MTvzvgJ1ua9yQv/Z6crpqLNGw 3O7bt8GzLosqjsNQqkRBGC/5FhNmfFljL7sfJcRtPwBsx9vYwqqOOJZt2rUi/imk5kaC i4mSpwHynU+xmJJpfuwene0zYMPEDtK13uHdENEpIgAXmjnmuzL7xZoIRAxwfKxnKl/S h7FA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=mYmtu2+B; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gs12-20020a170906f18c00b0073da663ed6bsi8433357ejb.218.2022.09.06.07.11.09; Tue, 06 Sep 2022 07:11:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=mYmtu2+B; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240861AbiIFOK4 (ORCPT + 64 others); Tue, 6 Sep 2022 10:10:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241273AbiIFOJV (ORCPT ); Tue, 6 Sep 2022 10:09:21 -0400 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8C1D7E321 for ; Tue, 6 Sep 2022 06:46:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662471989; x=1694007989; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Bmt+8Xkm4Lsqx2EPIpivvCH7Yqisx486Dbb78u3vDcI=; b=mYmtu2+BZJqWPLSf+empyNPe3WL5Ntw2qtaE9ZYjKc0k0ccpehqep63m nxtZIiaaiYGMA6Ej52w1Jk0d9IB36isUf7oSfEG+ke1+p/x114qsK/iPA 0yqO+4qEy2lcB4I/Ye9/dhiFNt9r0wmi4rYUyrggmlqh3AMLulRtU9m0g JSIAQM2XJElNpsU5SG1XYQL4Ew6aMpypKR7XbtvBeOrZRgwMqpg5V9YWY wETvxlpXv+vGUFRju9xQVQE8tCa9KD1xOqckHAHLH5xXt92QgLbWyk1Oh E5DIqPCOSx2uXIz5WH5NDAF7qJaDmr9VUAQe/4cc5qZ2LB9NLABSwT+i7 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10462"; a="276989048" X-IronPort-AV: E=Sophos;i="5.93,294,1654585200"; d="scan'208";a="276989048" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Sep 2022 06:44:52 -0700 X-IronPort-AV: E=Sophos;i="5.93,294,1654585200"; d="scan'208";a="942459919" Received: from ygueta-mobl2.ger.corp.intel.com (HELO ggreenma-mobl2.lan) ([10.249.82.178]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Sep 2022 06:44:51 -0700 From: gregory.greenman@intel.com To: kvalo@kernel.org, johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Haim Dreyfuss , Gregory Greenman Subject: [PATCH 11/15] wifi: iwlwifi: mvm: enable resume based on notifications Date: Tue, 6 Sep 2022 16:42:15 +0300 Message-Id: <20220906161827.a6344ba23df5.I09fce8cf5aac1d46b40ae81b1abcf7a0e54af196@changeid> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220906134219.365090-1-gregory.greenman@intel.com> References: <20220906134219.365090-1-gregory.greenman@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Haim Dreyfuss We have recently added support for resume based on notifications. Enable it. Signed-off-by: Haim Dreyfuss Signed-off-by: Gregory Greenman --- drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c index 3a593f6175fd..90871f3603de 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c @@ -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); -- 2.35.3