staging: rtl8723au: Eliminate HW_VAR_FWLPS_RF_ON usage
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
c2370e83ab
commit
0cee8101d8
|
@ -386,12 +386,11 @@ s32 LPS_RF_ON_check23a(struct rtw_adapter *padapter, u32 delay_ms)
|
|||
|
||||
while (1)
|
||||
{
|
||||
rtw23a_hal_get_hwreg(padapter, HW_VAR_FWLPS_RF_ON, &bAwake);
|
||||
if (true == bAwake)
|
||||
bAwake = rtl8723a_get_fwlps_rf_on(padapter);
|
||||
if (bAwake == true)
|
||||
break;
|
||||
|
||||
if (true == padapter->bSurpriseRemoved)
|
||||
{
|
||||
if (padapter->bSurpriseRemoved == true) {
|
||||
err = -2;
|
||||
DBG_8723A("%s: device surprise removed!!\n", __func__);
|
||||
break;
|
||||
|
|
|
@ -896,3 +896,26 @@ u8 rtl8723a_get_rf_type(struct rtw_adapter *padapter)
|
|||
|
||||
return pHalData->rf_type;
|
||||
}
|
||||
|
||||
bool rtl8723a_get_fwlps_rf_on(struct rtw_adapter *padapter)
|
||||
{
|
||||
bool retval;
|
||||
u32 valRCR;
|
||||
|
||||
/* When we halt NIC, we should check if FW LPS is leave. */
|
||||
|
||||
if ((padapter->bSurpriseRemoved == true) ||
|
||||
(padapter->pwrctrlpriv.rf_pwrstate == rf_off)) {
|
||||
/* If it is in HW/SW Radio OFF or IPS state, we do
|
||||
not check Fw LPS Leave, because Fw is unload. */
|
||||
retval = true;
|
||||
} else {
|
||||
valRCR = rtw_read32(padapter, REG_RCR);
|
||||
if (valRCR & 0x00070000)
|
||||
retval = false;
|
||||
else
|
||||
retval = true;
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
|
|
@ -217,7 +217,7 @@ rtl8723a_HalDmWatchDog(
|
|||
goto skip_dm;
|
||||
|
||||
bFwCurrentInPSMode = Adapter->pwrctrlpriv.bFwCurrentInPSMode;
|
||||
rtw23a_hal_get_hwreg(Adapter, HW_VAR_FWLPS_RF_ON, (u8 *)(&bFwPSAwake));
|
||||
bFwPSAwake = rtl8723a_get_fwlps_rf_on(Adapter);
|
||||
|
||||
#ifdef CONFIG_8723AU_P2P
|
||||
/* Fw is under p2p powersaving mode, driver should stop dynamic mechanism. */
|
||||
|
|
|
@ -3135,27 +3135,6 @@ void hw_var_set_mlme_join(struct rtw_adapter *padapter, u8 type)
|
|||
void GetHwReg8723A(struct rtw_adapter *padapter, u8 variable, u8 *val)
|
||||
{
|
||||
switch (variable) {
|
||||
case HW_VAR_FWLPS_RF_ON:
|
||||
{
|
||||
/* When we halt NIC, we should check if FW LPS is leave. */
|
||||
u32 valRCR;
|
||||
|
||||
if ((padapter->bSurpriseRemoved == true) ||
|
||||
(padapter->pwrctrlpriv.rf_pwrstate == rf_off)) {
|
||||
/* If it is in HW/SW Radio OFF or IPS state, we do
|
||||
not check Fw LPS Leave, because Fw is unload. */
|
||||
*val = true;
|
||||
} else {
|
||||
valRCR = rtw_read32(padapter, REG_RCR);
|
||||
valRCR &= 0x00070000;
|
||||
if (valRCR)
|
||||
*val = false;
|
||||
else
|
||||
*val = true;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case HW_VAR_CHK_HI_QUEUE_EMPTY:
|
||||
*val =
|
||||
((rtw_read32(padapter, REG_HGQ_INFORMATION) & 0x0000ff00) ==
|
||||
|
|
|
@ -208,5 +208,6 @@ void rtl8723a_odm_support_ability_clr(struct rtw_adapter *padapter, u32 val);
|
|||
|
||||
void rtl8723a_set_rpwm(struct rtw_adapter *padapter, u8 val);
|
||||
u8 rtl8723a_get_rf_type(struct rtw_adapter *padapter);
|
||||
bool rtl8723a_get_fwlps_rf_on(struct rtw_adapter *padapter);
|
||||
|
||||
#endif /* __HAL_COMMON_H__ */
|
||||
|
|
|
@ -38,7 +38,6 @@ enum _CHIP_TYPE {
|
|||
enum HW_VARIABLES {
|
||||
HW_VAR_INIT_RTS_RATE,
|
||||
HW_VAR_CAM_READ,
|
||||
HW_VAR_FWLPS_RF_ON,
|
||||
HW_VAR_TDLS_WRCR,
|
||||
HW_VAR_TDLS_INIT_CH_SEN,
|
||||
HW_VAR_TDLS_RS_RCR,
|
||||
|
|
Loading…
Reference in a new issue