diff options
author | Chin-Yen Lee <timlee@realtek.com> | 2019-10-02 14:35:18 +0800 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2019-10-04 16:44:54 +0300 |
commit | 3a2dd6b7cadfc627378d2c3af065f82ebb1d4cbf (patch) | |
tree | 4d87fe1bcc6445564f2319fe5485e41ed4ccc587 /drivers/net/wireless/realtek/rtw88/ps.h | |
parent | 97ef12263fce2835dfbc01d1d86b8c5fd711712f (diff) |
rtw88: check firmware leave lps successfully
Driver needs to wait for firmware to restore hardware setting
to active mode after leaving lps.
After getting H2C from driver for leaving lps, firmware will
issue null packet without PS bit to inform AP driver is active,
and then restore REG_TCR Register if AP has receiced null packet.
But the transmission of null packet may cost much more time
in noisy environment. If driver does not wait for firmware,
null packet with PS bit could be sent due to incorrect REG_TCR setting.
And AP will be confused.
In our test, 100ms is enough for firmware to send null packet
to AP. If REG_TCR Register is still wrong after 100ms, we will
modify it directly, force the PS bit to be cleared
Signed-off-by: Chin-Yen Lee <timlee@realtek.com>
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.h')
-rw-r--r-- | drivers/net/wireless/realtek/rtw88/ps.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/realtek/rtw88/ps.h b/drivers/net/wireless/realtek/rtw88/ps.h index 18f687cfe211..25925eedbad4 100644 --- a/drivers/net/wireless/realtek/rtw88/ps.h +++ b/drivers/net/wireless/realtek/rtw88/ps.h @@ -11,6 +11,8 @@ #define POWER_MODE_PG BIT(4) #define POWER_MODE_LCLK BIT(0) +#define LEAVE_LPS_TRY_CNT 5 + int rtw_enter_ips(struct rtw_dev *rtwdev); int rtw_leave_ips(struct rtw_dev *rtwdev); |