summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/realtek/rtw88/main.c
diff options
context:
space:
mode:
authorYan-Hsuan Chuang <yhchuang@realtek.com>2019-10-02 05:31:19 +0300
committerKalle Valo <kvalo@codeaurora.org>2019-10-02 07:33:41 +0300
commit61d7309562b51e9600f69ca70f9edf71f841fee7 (patch)
treeaf1a1b96e2fc190f6347f98d46973958ca3d7980 /drivers/net/wireless/realtek/rtw88/main.c
parent6f0b0d28fde849a404f4b307887405e326866e11 (diff)
downloadlinux-61d7309562b51e9600f69ca70f9edf71f841fee7.tar.xz
rtw88: not to enter or leave PS under IRQ
Remove PS related *_irqsafe functions to avoid entering/leaving PS under interrupt context. Instead, make PS decision in watch_dog. This could simplify the logic and make the code look clean. But it could have a little side-effect that if the driver is having heavy traffic before the every-2-second watch_dog detect the traffic and decide to leave PS, the thoughput will be lower. Once traffic is detected by watch_dog and left PS state, the throughput will resume to the peak the hardware ought to have again. 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/main.c')
-rw-r--r--drivers/net/wireless/realtek/rtw88/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c
index 36ba2211faaf..22fc5d6f6b62 100644
--- a/drivers/net/wireless/realtek/rtw88/main.c
+++ b/drivers/net/wireless/realtek/rtw88/main.c
@@ -182,6 +182,8 @@ static void rtw_watch_dog_work(struct work_struct *work)
if (rtw_fw_support_lps &&
data.rtwvif && !data.active && data.assoc_cnt == 1)
rtw_enter_lps(rtwdev, data.rtwvif);
+ else
+ rtw_leave_lps(rtwdev, rtwdev->lps_conf.rtwvif);
if (test_bit(RTW_FLAG_SCANNING, rtwdev->flags))
return;
@@ -1152,7 +1154,6 @@ int rtw_core_init(struct rtw_dev *rtwdev)
rtw_tx_report_purge_timer, 0);
INIT_DELAYED_WORK(&rtwdev->watch_dog_work, rtw_watch_dog_work);
- INIT_DELAYED_WORK(&rtwdev->lps_work, rtw_lps_work);
INIT_DELAYED_WORK(&coex->bt_relink_work, rtw_coex_bt_relink_work);
INIT_DELAYED_WORK(&coex->bt_reenable_work, rtw_coex_bt_reenable_work);
INIT_DELAYED_WORK(&coex->defreeze_work, rtw_coex_defreeze_work);