From patchwork Wed Apr 21 10:43:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 426160 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BEBB8C433B4 for ; Wed, 21 Apr 2021 10:44:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8B93E61447 for ; Wed, 21 Apr 2021 10:44:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234927AbhDUKoe (ORCPT ); Wed, 21 Apr 2021 06:44:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:42342 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234175AbhDUKoe (ORCPT ); Wed, 21 Apr 2021 06:44:34 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8AD616144D; Wed, 21 Apr 2021 10:43:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1619001840; bh=2QYi1iu7sq/QBDrVawnEK6+7Hw1UaxORFE3L6tcR5cI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YMEvvI7pdeFyqX8kZzSSYFN+tZccN1bxOcJnhD03sPvDLy6mEeQr6PLtO+R7K95tX NBPXjru4hXq4C/pUfk2stwCqlqwG+7iCvcTiEmwHuWRE9QHRn9jeBLPD7JzKFvvfw8 prGFhuCw1ciqk6lySwaySRcq/rBURn9V+mfEo2hKf8id+rS9JjOUFntoaItcWSVpCC wMCTe+GYzdKFXwa0fCxvYyu0DhcE74WlAuHB0RxXd4tOuW0RVYgiAWuIVBZ4DHpZs9 VB3bFjY/zfrA+goPdJpjbkE+6+nAohwYqfUZBfVqyVdCfV6W0iekZkfgqC2T/C7f7P F7Htd2XHD/Sew== From: Lorenzo Bianconi To: nbd@nbd.name Cc: linux-wireless@vger.kernel.org, lorenzo.bianconi@redhat.com, sean.wang@mediatek.com Subject: [PATCH 1/4] mt76: mt7921: improve doze opportunity Date: Wed, 21 Apr 2021 12:43:48 +0200 Message-Id: <799cbf719cd5418237afa413e097388a3b00d3ad.1619001617.git.lorenzo@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Increase mt7921 mac work timeout in oder to have move sleep opportunities Signed-off-by: Lorenzo Bianconi --- drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 4 ++-- drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mac.c b/drivers/net/wireless/mediatek/mt76/mt7921/mac.c index 1233e5410ee7..72d04b229e6b 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7921/mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7921/mac.c @@ -1461,12 +1461,12 @@ void mt7921_mac_work(struct work_struct *work) mt7921_mutex_acquire(phy->dev); mt76_update_survey(mphy->dev); - if (++mphy->mac_work_count == 5) { + if (++mphy->mac_work_count == 2) { mphy->mac_work_count = 0; mt7921_mac_update_mib_stats(phy); } - if (++phy->sta_work_count == 10) { + if (++phy->sta_work_count == 4) { phy->sta_work_count = 0; mt7921_mac_sta_stats_work(phy); } diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h b/drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h index c6e112e47cfd..e72397c6e2ba 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h +++ b/drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h @@ -18,7 +18,7 @@ #define MT7921_PM_TIMEOUT (HZ / 12) #define MT7921_HW_SCAN_TIMEOUT (HZ / 10) -#define MT7921_WATCHDOG_TIME (HZ / 10) +#define MT7921_WATCHDOG_TIME (HZ / 4) #define MT7921_RESET_TIMEOUT (30 * HZ) #define MT7921_TX_RING_SIZE 2048 From patchwork Wed Apr 21 10:43:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 425717 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 188F6C433ED for ; Wed, 21 Apr 2021 10:44:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D517A61440 for ; Wed, 21 Apr 2021 10:44:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234980AbhDUKof (ORCPT ); Wed, 21 Apr 2021 06:44:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:42360 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234175AbhDUKof (ORCPT ); Wed, 21 Apr 2021 06:44:35 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 702086144E; Wed, 21 Apr 2021 10:44:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1619001842; bh=YowQMm/ScGUPTMfKlC8NZzEN5xZiYLvlxS5mfG1BTnI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Sw9L0vsaOnX6QU3QfHBo54eqrIYCIlv/OsFcc3lNvePyYydrB4XLOpJaVBRYZorwa 1aZT6FOV2GtUGOVpqLRP9mleiIzqQOkhcpyu4qF5IqcUrKRmwXVDcIpCSrRUIz55BS lhOcW+noO7Yle3DHxZYd61erDB9JTP7YVsO5K3JJd648hONQHs6gE46gfPJBWXhOqc vDUiyQ7Ca0uH53TPo05pBV8ynECh1yDqppfWClLm/tldbsuJgKiT3BJ6CFg6MdY4kI FUnlG6a5CsAzU+FO6i2gQbV1ixx7zGxWAwiRMNDAp49Tfkk8URRhcZB8MUOF0cGQTh FY3RXG8tDy2AQ== From: Lorenzo Bianconi To: nbd@nbd.name Cc: linux-wireless@vger.kernel.org, lorenzo.bianconi@redhat.com, sean.wang@mediatek.com Subject: [PATCH 2/4] mt76: mt7663: add awake and doze time accounting Date: Wed, 21 Apr 2021 12:43:49 +0200 Message-Id: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Similar to mt7921, introduce awake and doze time accounting for runtime pm. Signed-off-by: Lorenzo Bianconi --- .../wireless/mediatek/mt76/mt7615/debugfs.c | 32 ++++++++++++++++++- .../net/wireless/mediatek/mt76/mt7615/init.c | 2 ++ .../net/wireless/mediatek/mt76/mt7615/mcu.c | 24 +++++++++++--- 3 files changed, 52 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/debugfs.c b/drivers/net/wireless/mediatek/mt76/mt7615/debugfs.c index 1b414220521a..676bb22726d6 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/debugfs.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/debugfs.c @@ -69,6 +69,7 @@ static int mt7615_pm_set(void *data, u64 val) { struct mt7615_dev *dev = data; + struct mt76_connac_pm *pm = &dev->pm; int ret = 0; if (!mt7615_wait_for_mcu_init(dev)) @@ -77,6 +78,9 @@ mt7615_pm_set(void *data, u64 val) if (!mt7615_firmware_offload(dev) || !mt76_is_mmio(&dev->mt76)) return -EOPNOTSUPP; + if (val == pm->enable) + return 0; + mt7615_mutex_acquire(dev); if (dev->phy.n_beacon_vif) { @@ -84,7 +88,11 @@ mt7615_pm_set(void *data, u64 val) goto out; } - dev->pm.enable = val; + if (!pm->enable) { + pm->stats.last_wake_event = jiffies; + pm->stats.last_doze_event = jiffies; + } + pm->enable = val; out: mt7615_mutex_release(dev); @@ -103,6 +111,26 @@ mt7615_pm_get(void *data, u64 *val) DEFINE_DEBUGFS_ATTRIBUTE(fops_pm, mt7615_pm_get, mt7615_pm_set, "%lld\n"); +static int +mt7615_pm_stats(struct seq_file *s, void *data) +{ + struct mt7615_dev *dev = dev_get_drvdata(s->private); + struct mt76_connac_pm *pm = &dev->pm; + unsigned long awake_time = pm->stats.awake_time; + unsigned long doze_time = pm->stats.doze_time; + + if (!test_bit(MT76_STATE_PM, &dev->mphy.state)) + awake_time += jiffies - pm->stats.last_wake_event; + else + doze_time += jiffies - pm->stats.last_doze_event; + + seq_printf(s, "awake time: %14u\ndoze time: %15u\n", + jiffies_to_msecs(awake_time), + jiffies_to_msecs(doze_time)); + + return 0; +} + static int mt7615_pm_idle_timeout_set(void *data, u64 val) { @@ -515,6 +543,8 @@ int mt7615_init_debugfs(struct mt7615_dev *dev) debugfs_create_file("runtime-pm", 0600, dir, dev, &fops_pm); debugfs_create_file("idle-timeout", 0600, dir, dev, &fops_pm_idle_timeout); + debugfs_create_devm_seqfile(dev->mt76.dev, "runtime_pm_stats", dir, + mt7615_pm_stats); debugfs_create_devm_seqfile(dev->mt76.dev, "radio", dir, mt7615_radio_read); diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/init.c b/drivers/net/wireless/mediatek/mt76/mt7615/init.c index 894b2588e075..86341d1f82f3 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/init.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/init.c @@ -526,6 +526,8 @@ void mt7615_init_device(struct mt7615_dev *dev) mt7615_init_wiphy(hw); dev->pm.idle_timeout = MT7615_PM_TIMEOUT; + dev->pm.stats.last_wake_event = jiffies; + dev->pm.stats.last_doze_event = jiffies; mt7615_cap_dbdc_disable(dev); dev->phy.dfs_state = -1; diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c index 45c6fb5832b8..3c1528ed2110 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c @@ -288,6 +288,7 @@ EXPORT_SYMBOL_GPL(mt7622_trigger_hif_int); static int mt7615_mcu_drv_pmctrl(struct mt7615_dev *dev) { struct mt76_phy *mphy = &dev->mt76.phy; + struct mt76_connac_pm *pm = &dev->pm; struct mt76_dev *mdev = &dev->mt76; u32 addr; int err; @@ -317,15 +318,20 @@ static int mt7615_mcu_drv_pmctrl(struct mt7615_dev *dev) clear_bit(MT76_STATE_PM, &mphy->state); + pm->stats.last_wake_event = jiffies; + pm->stats.doze_time += pm->stats.last_wake_event - + pm->stats.last_doze_event; + return 0; } static int mt7615_mcu_lp_drv_pmctrl(struct mt7615_dev *dev) { struct mt76_phy *mphy = &dev->mt76.phy; + struct mt76_connac_pm *pm = &dev->pm; int i, err = 0; - mutex_lock(&dev->pm.mutex); + mutex_lock(&pm->mutex); if (!test_bit(MT76_STATE_PM, &mphy->state)) goto out; @@ -344,8 +350,11 @@ static int mt7615_mcu_lp_drv_pmctrl(struct mt7615_dev *dev) } clear_bit(MT76_STATE_PM, &mphy->state); + pm->stats.last_wake_event = jiffies; + pm->stats.doze_time += pm->stats.last_wake_event - + pm->stats.last_doze_event; out: - mutex_unlock(&dev->pm.mutex); + mutex_unlock(&pm->mutex); return err; } @@ -353,12 +362,13 @@ static int mt7615_mcu_lp_drv_pmctrl(struct mt7615_dev *dev) static int mt7615_mcu_fw_pmctrl(struct mt7615_dev *dev) { struct mt76_phy *mphy = &dev->mt76.phy; + struct mt76_connac_pm *pm = &dev->pm; int err = 0; u32 addr; - mutex_lock(&dev->pm.mutex); + mutex_lock(&pm->mutex); - if (mt76_connac_skip_fw_pmctrl(mphy, &dev->pm)) + if (mt76_connac_skip_fw_pmctrl(mphy, pm)) goto out; mt7622_trigger_hif_int(dev, true); @@ -375,8 +385,12 @@ static int mt7615_mcu_fw_pmctrl(struct mt7615_dev *dev) } mt7622_trigger_hif_int(dev, false); + + pm->stats.last_doze_event = jiffies; + pm->stats.awake_time += pm->stats.last_doze_event - + pm->stats.last_wake_event; out: - mutex_unlock(&dev->pm.mutex); + mutex_unlock(&pm->mutex); return err; } From patchwork Wed Apr 21 10:43:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 426159 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DAF77C433B4 for ; Wed, 21 Apr 2021 10:44:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AA3AA61440 for ; Wed, 21 Apr 2021 10:44:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235062AbhDUKoh (ORCPT ); Wed, 21 Apr 2021 06:44:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:42394 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234175AbhDUKoh (ORCPT ); Wed, 21 Apr 2021 06:44:37 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4885961447; Wed, 21 Apr 2021 10:44:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1619001844; bh=4F/mdA+8KiAVNOjwmzy4t0tGyd6Otl8pt7KMdgaZ5D8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fhvs+Q8H9wOv9aq2XTZuwiogfW6IVzlrQTKTN0jMcWtGpPVrLFxBliJWg8IZJyBzl Wkhz8RVW/9Xz4EUzs1AOszI2rKY/QMkO1vtsXQJgEwKbYqWBl7ptc7LHXnC8bp4k95 Ulik+o0fjDPn0qumvj5tkDJ69xNV+rcMAcQKUE19zh7DT7117sdnF6AyE0u/BIWl2m Al6cmUtotP/MHugvueBTUohEOPvoCeTu19Kn9mB5Ro7YSW/X7CBPZVi78SFg2myv+4 Pn2LKnYrxMRD4zPU6ilFwUvi/Ms6EpFAeX0UlZtcigCUqvuixXadLU2KeqYprjKqYj aruAj6qPCdU7Q== From: Lorenzo Bianconi To: nbd@nbd.name Cc: linux-wireless@vger.kernel.org, lorenzo.bianconi@redhat.com, sean.wang@mediatek.com Subject: [PATCH 3/4] mt76: connac: unschedule mac_work before going to sleep Date: Wed, 21 Apr 2021 12:43:50 +0200 Message-Id: <18ad0bd853e0ff135d5eef10e4e9fd192d5535bf.1619001617.git.lorenzo@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org In order to wake the device less frequently and so reduce power consumpation, unschedule mac_work before going to sleep Signed-off-by: Lorenzo Bianconi --- drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 2 ++ drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c | 4 +++- drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c index d11375661875..f81a17d56008 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c @@ -1912,6 +1912,8 @@ void mt7615_pm_wake_work(struct work_struct *work) napi_schedule(&dev->mt76.napi[i]); mt76_connac_pm_dequeue_skbs(mphy, &dev->pm); mt76_queue_tx_cleanup(dev, dev->mt76.q_mcu[MT_MCUQ_WM], false); + ieee80211_queue_delayed_work(mphy->hw, &mphy->mac_work, + MT7615_WATCHDOG_TIME); } ieee80211_wake_queues(mphy->hw); diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c b/drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c index 66f1667481e6..b32f26c1f8b3 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c @@ -42,8 +42,10 @@ void mt76_connac_power_save_sched(struct mt76_phy *phy, pm->last_activity = jiffies; - if (!test_bit(MT76_STATE_PM, &phy->state)) + if (!test_bit(MT76_STATE_PM, &phy->state)) { + cancel_delayed_work(&phy->mac_work); queue_delayed_work(dev->wq, &pm->ps_work, pm->idle_timeout); + } } EXPORT_SYMBOL_GPL(mt76_connac_power_save_sched); diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mac.c b/drivers/net/wireless/mediatek/mt76/mt7921/mac.c index 72d04b229e6b..09f60a68ac73 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7921/mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7921/mac.c @@ -1492,6 +1492,8 @@ void mt7921_pm_wake_work(struct work_struct *work) napi_schedule(&dev->mt76.napi[i]); mt76_connac_pm_dequeue_skbs(mphy, &dev->pm); mt7921_tx_cleanup(dev); + ieee80211_queue_delayed_work(mphy->hw, &mphy->mac_work, + MT7921_WATCHDOG_TIME); } ieee80211_wake_queues(mphy->hw); From patchwork Wed Apr 21 10:43:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 425716 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C89A9C433B4 for ; Wed, 21 Apr 2021 10:44:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 94D6461450 for ; Wed, 21 Apr 2021 10:44:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235133AbhDUKoj (ORCPT ); Wed, 21 Apr 2021 06:44:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:42416 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235065AbhDUKoj (ORCPT ); Wed, 21 Apr 2021 06:44:39 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3EBA56144F; Wed, 21 Apr 2021 10:44:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1619001846; bh=3i8i+YuxFykd/N2sZYPpwKkoKgZ1UmdF2KcGhGOEZHQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K9yaMuGBb8bHT78iMcOvDMhSiFJ26K/uDKsr2oKVgLPBLY164TwXXzEc1j5ZoJhDW FQb2LglLQqwTU/9Gn+kcKeIT/jIlRFieUORBPrBn4PT5p3jIu3xSZsAjtMeTtZ2Rev UrKKIEbIIRI+AYJ7fHVByQ6H/7fksP1GXbMEzo5j4h39drAztBR6v+dBLdYKt96v/Y mLiOg9+DQVrtlBm8fQyAuHGid9yzRkcEUXqXLg2UP7M7Y82gUx4VOYguSp0wOeO1Fz CpzO4PGmVTIPwuM7OqUoIoKOdmEr8i+fdb4yEsJlr1jOQJkY7r0G1tHGbkZf++E7hX iHCrrsU8z2rIA== From: Lorenzo Bianconi To: nbd@nbd.name Cc: linux-wireless@vger.kernel.org, lorenzo.bianconi@redhat.com, sean.wang@mediatek.com Subject: [PATCH 4/4] mt76: mt7921: mt7921_stop should put device in fw_own state Date: Wed, 21 Apr 2021 12:43:51 +0200 Message-Id: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Sean Wang mt7921_stop should put device in fw_own state to reduce power consumption. Signed-off-by: Sean Wang Signed-off-by: Lorenzo Bianconi --- drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c b/drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c index b32f26c1f8b3..6f180c92d413 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c @@ -37,7 +37,7 @@ void mt76_connac_power_save_sched(struct mt76_phy *phy, if (!mt76_is_mmio(dev)) return; - if (!pm->enable || !test_bit(MT76_STATE_RUNNING, &phy->state)) + if (!pm->enable) return; pm->last_activity = jiffies;