Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp7565201rwd; Tue, 20 Jun 2023 03:08:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4pavZx6c1a9WLaSmGpmZHKrXIVLws6t7bSzLwUfzRu3qKoDB7Th+H6SdvO0kZraCE9wnPJ X-Received: by 2002:a17:902:f691:b0:1b5:1e24:8a6e with SMTP id l17-20020a170902f69100b001b51e248a6emr10792026plg.60.1687255701366; Tue, 20 Jun 2023 03:08:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687255701; cv=none; d=google.com; s=arc-20160816; b=w+b7qXmPFmURDnL9diAPx1TwdHshCrIjd0gKIme+R1apgIf2QSBEYDYyVADGVduNRZ oUNABQcMrkL0F1lixuf5PntttZNEaBxtC38lcxu5osaKg34oHkHT+9NESOxYvtJct/9o NeWjYEBdsc4xyKy7N/02K9R0f34eEWGfDcfq3v2GnI3D2y7EnMbdT56A42gmkEr5c2Il BvfG/Hop9dop9IP9oSHPG1ceXH6Hyuxr6VHMp4icTnKg/6YfeS1+JL1dtC6UcXaCZeiD cajc09n8UDfIuqlz1ZJiv29nt2K5W9RLINoDR+QXwt+qv1K6Z0Cv2oGmUFSN8194b8ZQ Qu6g== 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=fjLrBZV2YNuVQa+aM/1Rau0hHjAhYHZIQnjH0VSe3t0=; b=iqEFnpw9YC+ZJfvkJEpuhVEJaK5ifMyZsTiqVcQjR5n6Mtr9eVWlnps9ztI9o2/HJ3 dWGdFayZ5c54gnVPQKAoSBtV7hLi7gyHwRpOiWLJ/V/kgz1PuBhDcF1TnCFd9g+FaLYc qD8UsiQzg7I9MhwVJjXsMRGbRQd2arjEWMUYHIDdfpTTU6pteLoIzRmY9oJxZcniOsJQ hSgNw6bZ+5yme5qbGKkrbMBT7Hcvc87gQZ/7ZPMFkq/yoTd0VuQYPTx6bcoeVO7cv+te V5axNWdYjKl+6dNYw60plcMBaO7q0AVRfwokw9rdEMqnsJrshknoZMvfTANSZ/sIS4+G ddhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=RByzsHEW; 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 t4-20020a170902e84400b001b1a240b107si1679765plg.221.2023.06.20.03.08.12; Tue, 20 Jun 2023 03:08:21 -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=RByzsHEW; 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 S231544AbjFTKF0 (ORCPT + 59 others); Tue, 20 Jun 2023 06:05:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231425AbjFTKFD (ORCPT ); Tue, 20 Jun 2023 06:05:03 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C324AFC for ; Tue, 20 Jun 2023 03:05:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687255502; x=1718791502; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=KdS3BSvrC78Kiq9y11Yq6Qqn3cNHk8MO3fJN/GEvEXM=; b=RByzsHEW16jTmXtCrNk3gEfoyxq+ztzTkYaIVMsXnOn8FFW8DHBHiqEt LDS4vkSr9x/xAsIQoE6KY3Bp+hGSBPwM9EH5bWxOilC9E5UTDPMkPbEgk zPz8Il9wYamZjOBK4kuvq3vSMYRZb1Z6WwJvSN2iRpg3qEE3MLvY/Ce8y FvrpW657E131D+X5KrwO27nM5CR0CdIYtw9aZcEk1xUoNTIMgc11KX1kQ 1eMpFaAX9DswZXvH6cD0UX7zlS4jSxsfUQaaPfRy4PnyNylfEl/X8dnxp 2iHDFzwTdqrb00yP7OCEN00K+kaY0JD4xxKo23g9Uz3eoGMOyjOHT38rA g==; X-IronPort-AV: E=McAfee;i="6600,9927,10746"; a="359819673" X-IronPort-AV: E=Sophos;i="6.00,256,1681196400"; d="scan'208";a="359819673" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jun 2023 03:05:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10746"; a="838143607" X-IronPort-AV: E=Sophos;i="6.00,256,1681196400"; d="scan'208";a="838143607" Received: from rafist-mobl.ger.corp.intel.com (HELO ggreenma-mobl2.intel.com) ([10.214.208.68]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jun 2023 03:05:00 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg , Gregory Greenman Subject: [PATCH 18/19] wifi: iwlwifi: mvm: adjust skip-over-dtim in D3 Date: Tue, 20 Jun 2023 13:04:04 +0300 Message-Id: <20230620125813.32406b6828ae.I88c315b85f7c56ac6109f84580b95a3dd104ff6c@changeid> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230620100405.45117-1-gregory.greenman@intel.com> References: <20230620100405.45117-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,URIBL_BLOCKED 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: Johannes Berg The current formula can skip both too much and not enough time, given the +1 (where the comment about firmware is wrong). Adjust the formula accordingly. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman --- drivers/net/wireless/intel/iwlwifi/mvm/power.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/power.c b/drivers/net/wireless/intel/iwlwifi/mvm/power.c index 34d4b7a94d82..9131b5f1bc76 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/power.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/power.c @@ -327,12 +327,11 @@ static void iwl_mvm_power_config_skip_dtim(struct iwl_mvm *mvm, if (WARN_ON(!dtimper_tu)) return; - /* configure skip over dtim up to 306TU - 314 msec */ - skip = max_t(u8, 1, 306 / dtimper_tu); + /* configure skip over dtim up to 900 TU DTIM interval */ + skip = max_t(u8, 1, 900 / dtimper_tu); } - /* the firmware really expects "look at every X DTIMs", so add 1 */ - cmd->skip_dtim_periods = 1 + skip; + cmd->skip_dtim_periods = skip; cmd->flags |= cpu_to_le16(POWER_FLAGS_SKIP_OVER_DTIM_MSK); } -- 2.38.1