Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp945272pxb; Fri, 14 Jan 2022 21:54:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJxEw4KfmypZoZeNZx8Ndy6GlZ/7X0atj1PGrekZA3Zwn4AUzMC9OJnl5WBuAq6s05QS9XK6 X-Received: by 2002:a05:6a00:c92:b0:4c3:d3e:3674 with SMTP id a18-20020a056a000c9200b004c30d3e3674mr3470768pfv.16.1642226092213; Fri, 14 Jan 2022 21:54:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642226092; cv=none; d=google.com; s=arc-20160816; b=TaCHLqfVWQqxzbzGJtSuc0WvjXJNQalZDzTJXgLWblxPsE9aUKHlgtxNL8SmY6gBzm 7G2dJgK+AIUigF3BN/rvjMya5P0Yu86KqEU3tNejxk0+TmQjFACUcHgcriWQoma1ok18 3cfwzCWdLmqKlVQSuxMEDMQK16e3WUHwT4oDNIvUnvWBp/EVax3IhFUD46K2wu+v7yt6 ZLQOAGRwLaAIDf03ZvIce8R18FotN/638pbZd35d64IongE4VNPNDChO+4loeyaCel5w w/5mZulrMjvbjSobPAywUIjFuTlX12MLnnisoBvmAYrTGu8XhKF2nFLAVYNfL8Ie2+io GgOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=AEZHZzaQHzaxC8oyrOdapUdQ44TkvGLFcurY7uXPigE=; b=s+fcwM0+IP7GMd/GVIKXn7mjArfIv47/6VKak7WuZL7PxxT5t5Qib2MtV5vtdQQg4i t9lTX/xUPN6Zw0itI788TusQ0BjAxyU7Bxd3KQp/09igFB1vck2Q61woagej/DsO1krA sMZxoREvGYj5oYL6iUxfeIQvgj8KOuSCy/dBT5J+tacjMQbY4zayXLV7/DxmCQzy/zID bYqjzDy11cREgw3cG9rP2oAtP5d5/grMI3/7eo4W+0KEWLM/1qkM3Ecrjou5yrp/Q2zI mX3hBOcXg4gmlRD/9jrESc6yJ5NOTMqSubC1SyBLDxbLvpAqOcTgRLV1fXWMM9dU4HWs jlAg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e7si3173066pfv.63.2022.01.14.21.54.30; Fri, 14 Jan 2022 21:54:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230304AbiANX4l (ORCPT + 70 others); Fri, 14 Jan 2022 18:56:41 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:48214 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S229779AbiANX4l (ORCPT ); Fri, 14 Jan 2022 18:56:41 -0500 X-UUID: d9a12d22399744fca8ff03313c4f6f0d-20220115 X-UUID: d9a12d22399744fca8ff03313c4f6f0d-20220115 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 809052308; Sat, 15 Jan 2022 07:56:38 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 15 Jan 2022 07:56:36 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Sat, 15 Jan 2022 07:56:36 +0800 From: To: , CC: , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v2 2/2] mt76: mt7921s: run sleep mode by default Date: Sat, 15 Jan 2022 07:56:33 +0800 Message-ID: X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Sean Wang Apply sleep mode by default to reduce power consumption as possible. Signed-off-by: Sean Wang --- v1 -> v2: rebase on the top of ("mt76: mt7921: toggle runtime-pm adding a monitor vif") --- drivers/net/wireless/mediatek/mt76/mt7921/init.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/init.c b/drivers/net/wireless/mediatek/mt76/mt7921/init.c index 6059d8a0f227..fa6af85bba7b 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7921/init.c +++ b/drivers/net/wireless/mediatek/mt76/mt7921/init.c @@ -226,14 +226,10 @@ int mt7921_register_device(struct mt7921_dev *dev) dev->pm.idle_timeout = MT7921_PM_TIMEOUT; dev->pm.stats.last_wake_event = jiffies; dev->pm.stats.last_doze_event = jiffies; - - /* TODO: mt7921s run sleep mode on default */ - if (mt76_is_mmio(&dev->mt76)) { - dev->pm.enable_user = true; - dev->pm.enable = true; - dev->pm.ds_enable_user = true; - dev->pm.ds_enable = true; - } + dev->pm.enable_user = true; + dev->pm.enable = true; + dev->pm.ds_enable_user = true; + dev->pm.ds_enable = true; if (mt76_is_sdio(&dev->mt76)) hw->extra_tx_headroom += MT_SDIO_TXD_SIZE + MT_SDIO_HDR_SIZE; -- 2.25.1