diff options
author | Lorenzo Bianconi <lorenzo@kernel.org> | 2023-06-28 15:07:22 +0800 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2023-07-26 11:36:16 +0200 |
commit | 7d403f3a19c6687f51c5e7423e28ddfd00983477 (patch) | |
tree | fcfeb6b92206a3d3447d3dd2b958a3fb847bfee3 /drivers/net/wireless/mediatek | |
parent | 81d4c943a168fc32eeb77e9b97ffd650db932ded (diff) |
wifi: mt76: mt792x: move MT7921_PM_TIMEOUT and MT7921_HW_SCAN_TIMEOUT in common code
MT7921_PM_TIMEOUT is shared between mt7925 and mt7921 so move it in
mt792x module.
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Deren Wu <deren.wu@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7921/init.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt792x.h | 3 |
4 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/init.c b/drivers/net/wireless/mediatek/mt76/mt7921/init.c index 7b8876bf8fc8..ff63f37f67d9 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7921/init.c +++ b/drivers/net/wireless/mediatek/mt76/mt7921/init.c @@ -217,7 +217,7 @@ int mt7921_register_device(struct mt792x_dev *dev) timer_setup(&dev->phy.roc_timer, mt792x_roc_timer, 0); init_waitqueue_head(&dev->phy.roc_wait); - dev->pm.idle_timeout = MT7921_PM_TIMEOUT; + dev->pm.idle_timeout = MT792x_PM_TIMEOUT; dev->pm.stats.last_wake_event = jiffies; dev->pm.stats.last_doze_event = jiffies; if (!mt76_is_usb(&dev->mt76)) { diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c index 4b77d95af958..90c93970acab 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c @@ -167,7 +167,7 @@ mt7921_mcu_scan_event(struct mt792x_dev *dev, struct sk_buff *skb) spin_unlock_bh(&dev->mt76.lock); ieee80211_queue_delayed_work(mphy->hw, &phy->scan_work, - MT7921_HW_SCAN_TIMEOUT); + MT792x_HW_SCAN_TIMEOUT); } static void diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h b/drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h index e458ddb7d99a..0f8b93a2be3a 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h +++ b/drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h @@ -7,9 +7,6 @@ #include "../mt792x.h" #include "regs.h" -#define MT7921_PM_TIMEOUT (HZ / 12) -#define MT7921_HW_SCAN_TIMEOUT (HZ / 10) - #define MT7921_TX_RING_SIZE 2048 #define MT7921_TX_MCU_RING_SIZE 256 #define MT7921_TX_FWDL_RING_SIZE 128 diff --git a/drivers/net/wireless/mediatek/mt76/mt792x.h b/drivers/net/wireless/mediatek/mt76/mt792x.h index 700cd0ccc5d3..d80f80bc7656 100644 --- a/drivers/net/wireless/mediatek/mt76/mt792x.h +++ b/drivers/net/wireless/mediatek/mt76/mt792x.h @@ -11,6 +11,9 @@ #include "mt792x_regs.h" #include "mt792x_acpi_sar.h" +#define MT792x_PM_TIMEOUT (HZ / 12) +#define MT792x_HW_SCAN_TIMEOUT (HZ / 10) + #define MT792x_MAX_INTERFACES 4 #define MT792x_WTBL_SIZE 20 #define MT792x_WTBL_RESERVED (MT792x_WTBL_SIZE - 1) |