summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/realtek/rtw88/hci.h
diff options
context:
space:
mode:
authorYan-Hsuan Chuang <yhchuang@realtek.com>2019-11-18 12:54:32 +0300
committerKalle Valo <kvalo@codeaurora.org>2019-11-20 10:44:51 +0300
commit3dff7c6e37499c87a7ba3f728b2ad1775cbbf725 (patch)
treed5b1b286cf0b0af3b1c8831efe2e4436876e6e9f /drivers/net/wireless/realtek/rtw88/hci.h
parentd2e2c47e65af7310ad7d40ebf4cbb1d898719ec2 (diff)
downloadlinux-3dff7c6e37499c87a7ba3f728b2ad1775cbbf725.tar.xz
rtw88: allows to enable/disable HCI link PS mechanism
Different interfaces have its own link-related power save mechanism. Such as PCI can enter L1 state based on the traffic on the link, and sometimes driver needs to enable/disable it to avoid some issues, like throughput degrade when PCI trying to enter L1 state even if driver is having heavy traffic. For now, rtw88 only supports PCIE chips, and they just need to disable ASPM L1 when driver is not in power save mode, such as IPS and LPS. Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/realtek/rtw88/hci.h')
-rw-r--r--drivers/net/wireless/realtek/rtw88/hci.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/realtek/rtw88/hci.h b/drivers/net/wireless/realtek/rtw88/hci.h
index 4afbf0d163d1..3d91aea942c3 100644
--- a/drivers/net/wireless/realtek/rtw88/hci.h
+++ b/drivers/net/wireless/realtek/rtw88/hci.h
@@ -14,6 +14,7 @@ struct rtw_hci_ops {
int (*start)(struct rtw_dev *rtwdev);
void (*stop)(struct rtw_dev *rtwdev);
void (*deep_ps)(struct rtw_dev *rtwdev, bool enter);
+ void (*link_ps)(struct rtw_dev *rtwdev, bool enter);
int (*write_data_rsvd_page)(struct rtw_dev *rtwdev, u8 *buf, u32 size);
int (*write_data_h2c)(struct rtw_dev *rtwdev, u8 *buf, u32 size);
@@ -53,6 +54,11 @@ static inline void rtw_hci_deep_ps(struct rtw_dev *rtwdev, bool enter)
rtwdev->hci.ops->deep_ps(rtwdev, enter);
}
+static inline void rtw_hci_link_ps(struct rtw_dev *rtwdev, bool enter)
+{
+ rtwdev->hci.ops->link_ps(rtwdev, enter);
+}
+
static inline int
rtw_hci_write_data_rsvd_page(struct rtw_dev *rtwdev, u8 *buf, u32 size)
{