diff options
author | Yan-Hsuan Chuang <yhchuang@realtek.com> | 2019-10-02 10:31:27 +0800 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2019-10-02 07:33:49 +0300 |
commit | 04b786e00987c5495dd9a374deb9c9d7f650a9da (patch) | |
tree | 92a710a04a1a369a3075689eb673a5721203a74d /drivers/net/wireless/realtek/rtw88/ps.c | |
parent | d3be4d115be05b1b4323286bc69de9e577fc9a0f (diff) |
rtw88: add deep PS PG mode for 8822c
Compare with LCLK mode, PG mode saves more power, by turning
off more circuits. Therefore, to recover from PG mode, driver
needs to backup some information into rsvd page. Such as CAM
entries, DPK results.
As CAM entries can change, it is required to re-download CAM
entries after set_key.
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/ps.c')
-rw-r--r-- | drivers/net/wireless/realtek/rtw88/ps.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/wireless/realtek/rtw88/ps.c b/drivers/net/wireless/realtek/rtw88/ps.c index 02e104ac7b9e..83db6cf6a219 100644 --- a/drivers/net/wireless/realtek/rtw88/ps.c +++ b/drivers/net/wireless/realtek/rtw88/ps.c @@ -74,10 +74,13 @@ retry: /* toggle to request power mode, others remain 0 */ request ^= request | BIT_RPWM_TOGGLE; - if (!enter) + if (!enter) { request |= POWER_MODE_ACK; - else + } else { request |= POWER_MODE_LCLK; + if (rtw_fw_lps_deep_mode == LPS_DEEP_MODE_PG) + request |= POWER_MODE_PG; + } rtw_write8(rtwdev, rtwdev->hci.rpwm_addr, request); @@ -141,6 +144,9 @@ static void __rtw_enter_lps_deep(struct rtw_dev *rtwdev) return; } + if (rtw_fw_lps_deep_mode == LPS_DEEP_MODE_PG) + rtw_fw_set_pg_info(rtwdev); + rtw_hci_deep_ps(rtwdev, true); } |