staging: r8188eu: remove SetHalDefVar8188EUsb()
In SetHalDefVar8188EUsb() there is only the case HAL_DEF_DBG_DM_FUNC. Move its functionality to a new static function in ioctl_linux.c and remove SetHalDefVar8188EUsb(). This is part of the ongoing effort to get rid of the unwanted hal layer. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220408124615.3687-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
f90613bb2c
commit
6b58692032
|
@ -1194,35 +1194,6 @@ void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
|
|||
|
||||
}
|
||||
|
||||
/* Change default setting of specified variable. */
|
||||
void SetHalDefVar8188EUsb(struct adapter *Adapter, enum hal_def_variable eVariable, void *pValue)
|
||||
{
|
||||
struct hal_data_8188e *haldata = &Adapter->haldata;
|
||||
|
||||
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;
|
||||
} else if (dm_func == 1) {/* disable DIG */
|
||||
podmpriv->SupportAbility &= (~DYNAMIC_BB_DIG);
|
||||
} 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 = rtw_read8(Adapter, 0xc50);
|
||||
}
|
||||
podmpriv->SupportAbility = DYNAMIC_ALL_FUNC_ENABLE;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateHalRAMask8188EUsb(struct adapter *adapt, u32 mac_id, u8 rssi_level)
|
||||
{
|
||||
u8 init_rate = 0;
|
||||
|
|
|
@ -27,10 +27,6 @@ enum hw_variables {
|
|||
HW_VAR_H2C_MEDIA_STATUS_RPT,
|
||||
};
|
||||
|
||||
enum hal_def_variable {
|
||||
HAL_DEF_DBG_DM_FUNC,/* for dbg */
|
||||
};
|
||||
|
||||
typedef s32 (*c2h_id_filter)(u8 id);
|
||||
|
||||
#define is_boot_from_eeprom(adapter) (adapter->eeprompriv.EepromOrEfuse)
|
||||
|
@ -51,8 +47,6 @@ void UpdateHalRAMask8188EUsb(struct adapter *adapt, u32 mac_id, u8 rssi_level);
|
|||
int rtl8188e_IOL_exec_cmds_sync(struct adapter *adapter,
|
||||
struct xmit_frame *xmit_frame, u32 max_wating_ms, u32 bndy_cnt);
|
||||
|
||||
void SetHalDefVar8188EUsb(struct adapter *Adapter, enum hal_def_variable eVariable, void *pValue);
|
||||
|
||||
unsigned int rtl8188eu_inirp_init(struct adapter *Adapter);
|
||||
|
||||
void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val);
|
||||
|
|
|
@ -3389,6 +3389,34 @@ static void rf_reg_dump(struct adapter *padapter)
|
|||
}
|
||||
}
|
||||
|
||||
static void rtw_set_dynamic_functions(struct adapter *adapter, u8 dm_func)
|
||||
{
|
||||
struct hal_data_8188e *haldata = &adapter->haldata;
|
||||
struct odm_dm_struct *odmpriv = &haldata->odmpriv;
|
||||
|
||||
switch (dm_func) {
|
||||
case 0:
|
||||
/* disable all dynamic func */
|
||||
odmpriv->SupportAbility = DYNAMIC_FUNC_DISABLE;
|
||||
break;
|
||||
case 1:
|
||||
/* disable DIG */
|
||||
odmpriv->SupportAbility &= (~DYNAMIC_BB_DIG);
|
||||
break;
|
||||
case 6:
|
||||
/* turn on all dynamic func */
|
||||
if (!(odmpriv->SupportAbility & DYNAMIC_BB_DIG)) {
|
||||
struct rtw_dig *digtable = &odmpriv->DM_DigTable;
|
||||
|
||||
digtable->CurIGValue = rtw_read8(adapter, 0xc50);
|
||||
}
|
||||
odmpriv->SupportAbility = DYNAMIC_ALL_FUNC_ENABLE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static int rtw_dbg_port(struct net_device *dev,
|
||||
struct iw_request_info *info,
|
||||
union iwreq_data *wrqu, char *extra)
|
||||
|
@ -3674,15 +3702,12 @@ static int rtw_dbg_port(struct net_device *dev,
|
|||
rf_reg_dump(padapter);
|
||||
break;
|
||||
case 0xee:/* turn on/off dynamic funcs */
|
||||
{
|
||||
if (extra_arg != 0xf) {
|
||||
/* extra_arg = 0 - disable all dynamic func
|
||||
extra_arg = 1 - disable DIG
|
||||
extra_arg = 2 - disable tx power tracking
|
||||
extra_arg = 3 - turn on all dynamic func
|
||||
*/
|
||||
SetHalDefVar8188EUsb(padapter, HAL_DEF_DBG_DM_FUNC, &extra_arg);
|
||||
}
|
||||
if (extra_arg != 0xf) {
|
||||
/* extra_arg = 0 - disable all dynamic func
|
||||
* extra_arg = 1 - disable DIG
|
||||
* extra_arg = 6 - turn on all dynamic func
|
||||
*/
|
||||
rtw_set_dynamic_functions(padapter, extra_arg);
|
||||
}
|
||||
break;
|
||||
case 0xfd:
|
||||
|
|
Loading…
Reference in New Issue