• Chin-Yen Lee's avatar
    rtw88: check firmware leave lps successfully · 3a2dd6b7
    Chin-Yen Lee authored
    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: default avatarChin-Yen Lee <timlee@realtek.com>
    Signed-off-by: default avatarYan-Hsuan Chuang <yhchuang@realtek.com>
    Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
    3a2dd6b7
ps.h 608 Bytes