summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mediatek/mt76
diff options
context:
space:
mode:
authorDeren Wu <deren.wu@mediatek.com>2023-01-14 12:56:47 +0800
committerFelix Fietkau <nbd@nbd.name>2023-02-03 14:47:17 +0100
commit09f4417a451be137a3e848b1888a1e32f8325046 (patch)
treef45dd3dae29e4692296327ad1ee90f69e9ea46b9 /drivers/net/wireless/mediatek/mt76
parent35effe6c0c24adcf0f732bb1c3d75573d4c88e63 (diff)
downloadlinux-stable-09f4417a451be137a3e848b1888a1e32f8325046.tar.gz
linux-stable-09f4417a451be137a3e848b1888a1e32f8325046.tar.bz2
linux-stable-09f4417a451be137a3e848b1888a1e32f8325046.zip
wifi: mt76: mt7921: reduce polling time in pmctrl
Due to the polling tick is 10ms, the wake up flow in the status waiting would cause more 10~20ms than the real HW response time. Reduce tick-interval from 10ms to 1ms to get better network performance, such as ping latency, in low power mode. Reviewed-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/mt76')
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt7921/pci_mcu.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/pci_mcu.c b/drivers/net/wireless/mediatek/mt76/mt7921/pci_mcu.c
index 0e7ea35efa8d..1aefbb6cf0ab 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/pci_mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/pci_mcu.c
@@ -68,8 +68,8 @@ int __mt7921e_mcu_drv_pmctrl(struct mt7921_dev *dev)
for (i = 0; i < MT7921_DRV_OWN_RETRY_COUNT; i++) {
mt76_wr(dev, MT_CONN_ON_LPCTL, PCIE_LPCR_HOST_CLR_OWN);
- if (mt76_poll_msec(dev, MT_CONN_ON_LPCTL,
- PCIE_LPCR_HOST_OWN_SYNC, 0, 50))
+ if (mt76_poll_msec_tick(dev, MT_CONN_ON_LPCTL,
+ PCIE_LPCR_HOST_OWN_SYNC, 0, 50, 1))
break;
}
@@ -109,8 +109,8 @@ int mt7921e_mcu_fw_pmctrl(struct mt7921_dev *dev)
for (i = 0; i < MT7921_DRV_OWN_RETRY_COUNT; i++) {
mt76_wr(dev, MT_CONN_ON_LPCTL, PCIE_LPCR_HOST_SET_OWN);
- if (mt76_poll_msec(dev, MT_CONN_ON_LPCTL,
- PCIE_LPCR_HOST_OWN_SYNC, 4, 50))
+ if (mt76_poll_msec_tick(dev, MT_CONN_ON_LPCTL,
+ PCIE_LPCR_HOST_OWN_SYNC, 4, 50, 1))
break;
}