From patchwork Thu Jan 13 08:23:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Wang X-Patchwork-Id: 12712398 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 69834C433FE for ; Thu, 13 Jan 2022 08:24:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=EP8IwXzX+nYQcI8F5ZWatX6PbWhN8B07D20tXZpH9To=; b=NldyBU0kwFcCcR Fm+Gm1/lBs+xVwGiInOiZQWWZvm3oC8cJbCFr8lMBNVk8QeFbxUIBJOpuJUIjm2gN8fIeZJudskt1 k2vKzWKhPPR/RxZRnw49Iti8chVNAHAfuU8PZ+KodzWaoe/xz5CGRKpe/BEBKlROSgB2SWA8IpkRe pIGjlP5fIlseSdxqmVIZ2XnRw6RQZoXCe8Cx5a5MRU7STrWxjkduLET3LsdJWlXm0DLZfUNdn7Lj7 xRgF3Y4/JunaOxKEzxXzKWJfZJed/hqUd7nXwGmJPKfmD3Txlc99+/u3imyxYU0e2dN+RivazlH+s Ru0/OGcs0OqA26RYbxiA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n7vOu-0056FC-VK; Thu, 13 Jan 2022 08:24:04 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n7vOp-0056B7-1Q for linux-mediatek@lists.infradead.org; Thu, 13 Jan 2022 08:24:01 +0000 X-UUID: c220d5225e3f400884cb19ccf2144981-20220113 X-UUID: c220d5225e3f400884cb19ccf2144981-20220113 Received: from mtkcas68.mediatek.inc [(172.29.94.19)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 403934236; Thu, 13 Jan 2022 01:23:56 -0700 Received: from mtkmbs10n2.mediatek.inc (172.21.101.183) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 13 Jan 2022 00:23:54 -0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.3; Thu, 13 Jan 2022 16:23:53 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 13 Jan 2022 16:23:52 +0800 From: To: , CC: , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH 3/3] mt76: mt7921s: run sleep mode by default Date: Thu, 13 Jan 2022 16:23:48 +0800 Message-ID: <9025e5bd5212cab4bd72fd76d35b205980499056.1642061035.git.objelf@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <651a010d8ff888909b5b8363fa4b243aadc62d45.1642061035.git.objelf@gmail.com> References: <651a010d8ff888909b5b8363fa4b243aadc62d45.1642061035.git.objelf@gmail.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220113_002359_114512_A84D5B77 X-CRM114-Status: UNSURE ( 9.74 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Sean Wang Apply sleep mode by default to reduce power consumption as possible. Signed-off-by: Sean Wang --- drivers/net/wireless/mediatek/mt76/mt7921/init.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/init.c b/drivers/net/wireless/mediatek/mt76/mt7921/init.c index ad59ef9839dc..0166a5503aef 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7921/init.c +++ b/drivers/net/wireless/mediatek/mt76/mt7921/init.c @@ -226,12 +226,8 @@ 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 = true; - dev->pm.ds_enable = true; - } + dev->pm.enable = true; + dev->pm.ds_enable = true; if (mt76_is_sdio(&dev->mt76)) hw->extra_tx_headroom += MT_SDIO_TXD_SIZE + MT_SDIO_HDR_SIZE;