staging: r8188eu: simplify rtl8188e_HalDmWatchDog

Now that we don't call dm_CheckStatistics any more, we don't need
fw_cur_in_ps and fw_ps_awake.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211011201159.10252-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Martin Kaiser 2021-10-11 22:11:53 +02:00 коммит произвёл Greg Kroah-Hartman
Родитель bb88fab13d
Коммит 97045088d8
1 изменённых файлов: 13 добавлений и 30 удалений

Просмотреть файл

@ -113,42 +113,25 @@ void rtl8188e_InitHalDm(struct adapter *Adapter)
void rtl8188e_HalDmWatchDog(struct adapter *Adapter) void rtl8188e_HalDmWatchDog(struct adapter *Adapter)
{ {
bool fw_cur_in_ps = false; u8 hw_init_completed = Adapter->hw_init_completed;
bool fw_ps_awake = true;
u8 hw_init_completed = false;
struct hal_data_8188e *hal_data = GET_HAL_DATA(Adapter); struct hal_data_8188e *hal_data = GET_HAL_DATA(Adapter);
struct mlme_priv *pmlmepriv = &Adapter->mlmepriv;
u8 bLinked = false;
hw_init_completed = Adapter->hw_init_completed;
if (!hw_init_completed) if (!hw_init_completed)
return; return;
fw_cur_in_ps = Adapter->pwrctrlpriv.bFwCurrentInPSMode; if ((check_fwstate(pmlmepriv, WIFI_AP_STATE)) ||
GetHwReg8188EU(Adapter, HW_VAR_FWLPS_RF_ON, (u8 *)(&fw_ps_awake)); (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE | WIFI_ADHOC_MASTER_STATE))) {
if (Adapter->stapriv.asoc_sta_count > 2)
/* Fw is under p2p powersaving mode, driver should stop dynamic mechanism. */ bLinked = true;
/* modifed by thomas. 2011.06.11. */ } else {/* Station mode */
if (Adapter->wdinfo.p2p_ps_mode) if (check_fwstate(pmlmepriv, _FW_LINKED))
fw_ps_awake = false; bLinked = true;
/* ODM */
if (hw_init_completed) {
struct mlme_priv *pmlmepriv = &Adapter->mlmepriv;
u8 bLinked = false;
if ((check_fwstate(pmlmepriv, WIFI_AP_STATE)) ||
(check_fwstate(pmlmepriv, WIFI_ADHOC_STATE | WIFI_ADHOC_MASTER_STATE))) {
if (Adapter->stapriv.asoc_sta_count > 2)
bLinked = true;
} else {/* Station mode */
if (check_fwstate(pmlmepriv, _FW_LINKED))
bLinked = true;
}
ODM_CmnInfoUpdate(&hal_data->odmpriv, ODM_CMNINFO_LINK, bLinked);
ODM_DMWatchdog(&hal_data->odmpriv);
} }
ODM_CmnInfoUpdate(&hal_data->odmpriv, ODM_CMNINFO_LINK, bLinked);
ODM_DMWatchdog(&hal_data->odmpriv);
} }
void rtl8188e_init_dm_priv(struct adapter *Adapter) void rtl8188e_init_dm_priv(struct adapter *Adapter)