forked from Minki/linux
staging: rtl8188eu: remove unused rtw_hal_set_def_var
rtw_hal_set_def_var() is never referenced, so remove it. It used to be the only place where the SetHalDefVarHandler callback was called, so get rid of the function pointer as well. Also remove the callback itself, SetHalDefVar8188EUsb(), which was not called anywhere else. Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Greg Kroah-Hartman <gregkh@linux.com> Cc: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
42748bc905
commit
f83113d3e6
@ -131,14 +131,6 @@ void rtw_hal_get_hwreg(struct adapter *adapt, u8 variable, u8 *val)
|
||||
adapt->HalFunc.GetHwRegHandler(adapt, variable, val);
|
||||
}
|
||||
|
||||
u8 rtw_hal_set_def_var(struct adapter *adapt, enum hal_def_variable var,
|
||||
void *val)
|
||||
{
|
||||
if (adapt->HalFunc.SetHalDefVarHandler)
|
||||
return adapt->HalFunc.SetHalDefVarHandler(adapt, var, val);
|
||||
return _FAIL;
|
||||
}
|
||||
|
||||
u8 rtw_hal_get_def_var(struct adapter *adapt,
|
||||
enum hal_def_variable var, void *val)
|
||||
{
|
||||
|
@ -1961,75 +1961,6 @@ GetHalDefVar8188EUsb(
|
||||
return bResult;
|
||||
}
|
||||
|
||||
/* */
|
||||
/* Description: */
|
||||
/* Change default setting of specified variable. */
|
||||
/* */
|
||||
static u8 SetHalDefVar8188EUsb(struct adapter *Adapter, enum hal_def_variable eVariable, void *pValue)
|
||||
{
|
||||
struct hal_data_8188e *haldata = GET_HAL_DATA(Adapter);
|
||||
u8 bResult = _SUCCESS;
|
||||
|
||||
switch (eVariable) {
|
||||
case HAL_DEF_DBG_DM_FUNC:
|
||||
{
|
||||
u8 dm_func = *((u8 *)pValue);
|
||||
struct odm_dm_struct *podmpriv = &haldata->odmpriv;
|
||||
|
||||
if (dm_func == 0) { /* disable all dynamic func */
|
||||
podmpriv->SupportAbility = DYNAMIC_FUNC_DISABLE;
|
||||
DBG_88E("==> Disable all dynamic function...\n");
|
||||
} else if (dm_func == 1) {/* disable DIG */
|
||||
podmpriv->SupportAbility &= (~DYNAMIC_BB_DIG);
|
||||
DBG_88E("==> Disable DIG...\n");
|
||||
} else if (dm_func == 2) {/* disable High power */
|
||||
podmpriv->SupportAbility &= (~DYNAMIC_BB_DYNAMIC_TXPWR);
|
||||
} else if (dm_func == 3) {/* disable tx power tracking */
|
||||
podmpriv->SupportAbility &= (~DYNAMIC_RF_CALIBRATION);
|
||||
DBG_88E("==> Disable tx power tracking...\n");
|
||||
} else if (dm_func == 5) {/* disable antenna diversity */
|
||||
podmpriv->SupportAbility &= (~DYNAMIC_BB_ANT_DIV);
|
||||
} else if (dm_func == 6) {/* turn on all dynamic func */
|
||||
if (!(podmpriv->SupportAbility & DYNAMIC_BB_DIG)) {
|
||||
struct rtw_dig *pDigTable = &podmpriv->DM_DigTable;
|
||||
pDigTable->CurIGValue = usb_read8(Adapter, 0xc50);
|
||||
}
|
||||
podmpriv->SupportAbility = DYNAMIC_ALL_FUNC_ENABLE;
|
||||
DBG_88E("==> Turn on all dynamic function...\n");
|
||||
}
|
||||
}
|
||||
break;
|
||||
case HAL_DEF_DBG_DUMP_RXPKT:
|
||||
haldata->bDumpRxPkt = *((u8 *)pValue);
|
||||
break;
|
||||
case HAL_DEF_DBG_DUMP_TXPKT:
|
||||
haldata->bDumpTxPkt = *((u8 *)pValue);
|
||||
break;
|
||||
case HW_DEF_FA_CNT_DUMP:
|
||||
{
|
||||
u8 bRSSIDump = *((u8 *)pValue);
|
||||
struct odm_dm_struct *dm_ocm = &(haldata->odmpriv);
|
||||
if (bRSSIDump)
|
||||
dm_ocm->DebugComponents = ODM_COMP_DIG|ODM_COMP_FA_CNT;
|
||||
else
|
||||
dm_ocm->DebugComponents = 0;
|
||||
}
|
||||
break;
|
||||
case HW_DEF_ODM_DBG_FLAG:
|
||||
{
|
||||
u64 DebugComponents = *((u64 *)pValue);
|
||||
struct odm_dm_struct *dm_ocm = &(haldata->odmpriv);
|
||||
dm_ocm->DebugComponents = DebugComponents;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
bResult = _FAIL;
|
||||
break;
|
||||
}
|
||||
|
||||
return bResult;
|
||||
}
|
||||
|
||||
static void UpdateHalRAMask8188EUsb(struct adapter *adapt, u32 mac_id, u8 rssi_level)
|
||||
{
|
||||
u8 init_rate = 0;
|
||||
@ -2200,7 +2131,6 @@ void rtl8188eu_set_hal_ops(struct adapter *adapt)
|
||||
halfunc->SetHwRegHandler = &SetHwReg8188EU;
|
||||
halfunc->GetHwRegHandler = &GetHwReg8188EU;
|
||||
halfunc->GetHalDefVarHandler = &GetHalDefVar8188EUsb;
|
||||
halfunc->SetHalDefVarHandler = &SetHalDefVar8188EUsb;
|
||||
|
||||
halfunc->UpdateRAMaskHandler = &UpdateHalRAMask8188EUsb;
|
||||
halfunc->SetBeaconRelatedRegistersHandler = &SetBeaconRelatedRegisters8188EUsb;
|
||||
|
@ -188,9 +188,6 @@ struct hal_ops {
|
||||
u8 (*GetHalDefVarHandler)(struct adapter *padapter,
|
||||
enum hal_def_variable eVariable,
|
||||
void *pValue);
|
||||
u8 (*SetHalDefVarHandler)(struct adapter *padapter,
|
||||
enum hal_def_variable eVariable,
|
||||
void *pValue);
|
||||
|
||||
void (*SetHalODMVarHandler)(struct adapter *padapter,
|
||||
enum hal_odm_variable eVariable,
|
||||
@ -265,8 +262,6 @@ void rtw_hal_chip_configure(struct adapter *padapter);
|
||||
void rtw_hal_read_chip_info(struct adapter *padapter);
|
||||
void rtw_hal_read_chip_version(struct adapter *padapter);
|
||||
|
||||
u8 rtw_hal_set_def_var(struct adapter *padapter,
|
||||
enum hal_def_variable eVariable, void *pValue);
|
||||
u8 rtw_hal_get_def_var(struct adapter *padapter,
|
||||
enum hal_def_variable eVariable, void *pValue);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user