The function _linked_rx_signal_strength_display() only sets two local variables that are not used after setting. Remove the function and remove resulting dead code. The HW_DEF_RA_INFO_DUMP case in GetHalDefVar8188EUsb() does not set the passed variable. It just calls check_fwstate() which does nothing than return true or false. So it is safe to remove this call to GetHalDefVar8188EUsb(). The HAL_DEF_UNDERCORATEDSMOOTHEDPWDB case in GetHalDefVar8188EUsb() does nothing than set the passed variable and it is safe to remove this call to GetHalDefVar8188EUsb() as well. Signed-off-by: Michael Straube <straube.linux@xxxxxxxxx> --- Tested on x86_64 with Inter-Tech DMG-02. drivers/staging/r8188eu/core/rtw_mlme_ext.c | 20 -------------------- drivers/staging/r8188eu/hal/usb_halinit.c | 13 ------------- drivers/staging/r8188eu/include/hal_intf.h | 2 -- 3 files changed, 35 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c index 0b77ddde6ce2..580d0c15b958 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -6834,23 +6834,6 @@ void mlmeext_sta_del_event_callback(struct adapter *padapter) Following are the functions for the timer handlers *****************************************************************************/ -static void _linked_rx_signal_strength_display(struct adapter *padapter) -{ - struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; - u8 mac_id; - int UndecoratedSmoothedPWDB; - - if ((pmlmeinfo->state & 0x03) == WIFI_FW_STATION_STATE) - mac_id = 0; - else if ((pmlmeinfo->state & 0x03) == _HW_STATE_AP_) - mac_id = 2; - - GetHalDefVar8188EUsb(padapter, HW_DEF_RA_INFO_DUMP, &mac_id); - - GetHalDefVar8188EUsb(padapter, HAL_DEF_UNDERCORATEDSMOOTHEDPWDB, &UndecoratedSmoothedPWDB); -} - static u8 chk_ap_is_alive(struct sta_info *psta) { u8 ret = false; @@ -6886,9 +6869,6 @@ void linked_status_chk(struct adapter *padapter) struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; struct sta_priv *pstapriv = &padapter->stapriv; - if (padapter->bRxRSSIDisplay) - _linked_rx_signal_strength_display(padapter); - rtl8188e_sreset_linked_status_check(padapter); if (is_client_associated_to_ap(padapter)) { diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c index 0704fa3156af..3eafc298f3e1 100644 --- a/drivers/staging/r8188eu/hal/usb_halinit.c +++ b/drivers/staging/r8188eu/hal/usb_halinit.c @@ -1399,16 +1399,6 @@ void GetHalDefVar8188EUsb(struct adapter *Adapter, enum hal_def_variable eVariab struct hal_data_8188e *haldata = &Adapter->haldata; switch (eVariable) { - case HAL_DEF_UNDERCORATEDSMOOTHEDPWDB: - { - struct mlme_priv *pmlmepriv = &Adapter->mlmepriv; - struct sta_priv *pstapriv = &Adapter->stapriv; - struct sta_info *psta; - psta = rtw_get_stainfo(pstapriv, pmlmepriv->cur_network.network.MacAddress); - if (psta) - *((int *)pValue) = psta->rssi_stat.UndecoratedSmoothedPWDB; - } - break; case HAL_DEF_IS_SUPPORT_ANT_DIV: *((u8 *)pValue) = (haldata->AntDivCfg == 0) ? false : true; break; @@ -1418,9 +1408,6 @@ void GetHalDefVar8188EUsb(struct adapter *Adapter, enum hal_def_variable eVariab case HAL_DEF_DBG_DM_FUNC: *((u32 *)pValue) = haldata->odmpriv.SupportAbility; break; - case HW_DEF_RA_INFO_DUMP: - check_fwstate(&Adapter->mlmepriv, _FW_LINKED); - break; case HAL_DEF_DBG_DUMP_RXPKT: *((u8 *)pValue) = haldata->bDumpRxPkt; break; diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h index 8e204d61cc53..3cededa4dcfc 100644 --- a/drivers/staging/r8188eu/include/hal_intf.h +++ b/drivers/staging/r8188eu/include/hal_intf.h @@ -43,12 +43,10 @@ enum hw_variables { }; enum hal_def_variable { - HAL_DEF_UNDERCORATEDSMOOTHEDPWDB, HAL_DEF_IS_SUPPORT_ANT_DIV, HAL_DEF_CURRENT_ANTENNA, HAL_DEF_DBG_DUMP_RXPKT,/* for dbg */ HAL_DEF_DBG_DM_FUNC,/* for dbg */ - HW_DEF_RA_INFO_DUMP, HAL_DEF_DBG_DUMP_TXPKT, }; -- 2.35.1