• Bernd Edlinger's avatar
    rtl8723ae: Dont use old data for input gain control · 5bb5385f
    Bernd Edlinger authored
    When no beacon was received, the value in dm.undec_sm_pwdb is most
    likely out of date and should not be used to adjust the input path.
    Assume instead that the signal level is low.
    
    Fix the state machine in rtl8723e_dm_cck_packet_detection_thresh
    which did not clear pre_cck_fa_state when changing cur_cck_pd_state
    from CCK_PD_STAGE_LOWRSSI/CCK_FA_STAGE_LOW to CCK_PD_STAGE_HIGHRSSI
    and back again to CCK_PD_STAGE_LOWRSSI/CCK_FA_STAGE_LOW, the register
    RCCK0_CCA not written to 0x83 on the second change.
    
    Explicitly initialize pre_cck_fa_state/cur_cck_fa_state in
    rtl_dm_diginit.
    Signed-off-by: default avatarBernd Edlinger <bernd.edlinger@hotmail.de>
    Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
    5bb5385f
core.c 55.4 KB