forked from Minki/linux
staging: r8188eu: remove _linked_rx_signal_strength_display()
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@gmail.com> Link: https://lore.kernel.org/r/20220225174827.15927-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
50dc963bc1
commit
ed01d1b9bc
@ -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)) {
|
||||
|
@ -1396,16 +1396,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;
|
||||
@ -1415,9 +1405,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;
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user