mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-26 06:23:38 +00:00
rtl8188eu: Fix checkpatch errors and warnings in hal/hal_intf.c
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
e0542cf999
commit
574e5bb72b
1 changed files with 237 additions and 204 deletions
441
hal/hal_intf.c
441
hal/hal_intf.c
|
@ -24,394 +24,426 @@
|
||||||
#include <hal_intf.h>
|
#include <hal_intf.h>
|
||||||
#include <usb_hal.h>
|
#include <usb_hal.h>
|
||||||
|
|
||||||
void rtw_hal_chip_configure(struct adapter *padapter)
|
void rtw_hal_chip_configure(struct adapter *adapt)
|
||||||
{
|
{
|
||||||
if (padapter->HalFunc.intf_chip_configure)
|
if (adapt->HalFunc.intf_chip_configure)
|
||||||
padapter->HalFunc.intf_chip_configure(padapter);
|
adapt->HalFunc.intf_chip_configure(adapt);
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtw_hal_read_chip_info(struct adapter *padapter)
|
void rtw_hal_read_chip_info(struct adapter *adapt)
|
||||||
{
|
{
|
||||||
if (padapter->HalFunc.read_adapter_info)
|
if (adapt->HalFunc.read_adapter_info)
|
||||||
padapter->HalFunc.read_adapter_info(padapter);
|
adapt->HalFunc.read_adapter_info(adapt);
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtw_hal_read_chip_version(struct adapter *padapter)
|
void rtw_hal_read_chip_version(struct adapter *adapt)
|
||||||
{
|
{
|
||||||
if (padapter->HalFunc.read_chip_version)
|
if (adapt->HalFunc.read_chip_version)
|
||||||
padapter->HalFunc.read_chip_version(padapter);
|
adapt->HalFunc.read_chip_version(adapt);
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtw_hal_def_value_init(struct adapter *padapter)
|
void rtw_hal_def_value_init(struct adapter *adapt)
|
||||||
{
|
{
|
||||||
if (padapter->HalFunc.init_default_value)
|
if (adapt->HalFunc.init_default_value)
|
||||||
padapter->HalFunc.init_default_value(padapter);
|
adapt->HalFunc.init_default_value(adapt);
|
||||||
}
|
}
|
||||||
void rtw_hal_free_data(struct adapter *padapter)
|
|
||||||
|
void rtw_hal_free_data(struct adapter *adapt)
|
||||||
{
|
{
|
||||||
if (padapter->HalFunc.free_hal_data)
|
if (adapt->HalFunc.free_hal_data)
|
||||||
padapter->HalFunc.free_hal_data(padapter);
|
adapt->HalFunc.free_hal_data(adapt);
|
||||||
}
|
}
|
||||||
void rtw_hal_dm_init(struct adapter *padapter)
|
|
||||||
|
void rtw_hal_dm_init(struct adapter *adapt)
|
||||||
{
|
{
|
||||||
if (padapter->HalFunc.dm_init)
|
if (adapt->HalFunc.dm_init)
|
||||||
padapter->HalFunc.dm_init(padapter);
|
adapt->HalFunc.dm_init(adapt);
|
||||||
}
|
}
|
||||||
void rtw_hal_dm_deinit(struct adapter *padapter)
|
|
||||||
|
void rtw_hal_dm_deinit(struct adapter *adapt)
|
||||||
{
|
{
|
||||||
/* cancel dm timer */
|
/* cancel dm timer */
|
||||||
if (padapter->HalFunc.dm_deinit)
|
if (adapt->HalFunc.dm_deinit)
|
||||||
padapter->HalFunc.dm_deinit(padapter);
|
adapt->HalFunc.dm_deinit(adapt);
|
||||||
}
|
|
||||||
void rtw_hal_sw_led_init(struct adapter *padapter)
|
|
||||||
{
|
|
||||||
if (padapter->HalFunc.InitSwLeds)
|
|
||||||
padapter->HalFunc.InitSwLeds(padapter);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtw_hal_sw_led_deinit(struct adapter *padapter)
|
void rtw_hal_sw_led_init(struct adapter *adapt)
|
||||||
{
|
{
|
||||||
if (padapter->HalFunc.DeInitSwLeds)
|
if (adapt->HalFunc.InitSwLeds)
|
||||||
padapter->HalFunc.DeInitSwLeds(padapter);
|
adapt->HalFunc.InitSwLeds(adapt);
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 rtw_hal_power_on(struct adapter *padapter)
|
void rtw_hal_sw_led_deinit(struct adapter *adapt)
|
||||||
{
|
{
|
||||||
if (padapter->HalFunc.hal_power_on)
|
if (adapt->HalFunc.DeInitSwLeds)
|
||||||
return padapter->HalFunc.hal_power_on(padapter);
|
adapt->HalFunc.DeInitSwLeds(adapt);
|
||||||
|
}
|
||||||
|
|
||||||
|
u32 rtw_hal_power_on(struct adapter *adapt)
|
||||||
|
{
|
||||||
|
if (adapt->HalFunc.hal_power_on)
|
||||||
|
return adapt->HalFunc.hal_power_on(adapt);
|
||||||
return _FAIL;
|
return _FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint rtw_hal_init(struct adapter *adapt)
|
||||||
uint rtw_hal_init(struct adapter *padapter)
|
|
||||||
{
|
{
|
||||||
uint status = _SUCCESS;
|
uint status = _SUCCESS;
|
||||||
|
|
||||||
padapter->hw_init_completed=false;
|
adapt->hw_init_completed = false;
|
||||||
|
|
||||||
status = padapter->HalFunc.hal_init(padapter);
|
status = adapt->HalFunc.hal_init(adapt);
|
||||||
|
|
||||||
if (status == _SUCCESS){
|
if (status == _SUCCESS) {
|
||||||
padapter->hw_init_completed = true;
|
adapt->hw_init_completed = true;
|
||||||
|
|
||||||
if (padapter->registrypriv.notch_filter == 1)
|
if (adapt->registrypriv.notch_filter == 1)
|
||||||
rtw_hal_notch_filter(padapter, 1);
|
rtw_hal_notch_filter(adapt, 1);
|
||||||
|
|
||||||
rtw_hal_reset_security_engine(padapter);
|
rtw_hal_reset_security_engine(adapt);
|
||||||
}
|
} else {
|
||||||
else{
|
adapt->hw_init_completed = false;
|
||||||
padapter->hw_init_completed = false;
|
|
||||||
DBG_88E("rtw_hal_init: hal__init fail\n");
|
DBG_88E("rtw_hal_init: hal__init fail\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_TRACE(_module_hal_init_c_,_drv_err_,("-rtl871x_hal_init:status=0x%x\n",status));
|
RT_TRACE(_module_hal_init_c_, _drv_err_,
|
||||||
|
("-rtl871x_hal_init:status=0x%x\n", status));
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint rtw_hal_deinit(struct adapter *padapter)
|
uint rtw_hal_deinit(struct adapter *adapt)
|
||||||
{
|
{
|
||||||
uint status = _SUCCESS;
|
uint status = _SUCCESS;
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
status = padapter->HalFunc.hal_deinit(padapter);
|
status = adapt->HalFunc.hal_deinit(adapt);
|
||||||
|
|
||||||
if (status == _SUCCESS){
|
if (status == _SUCCESS)
|
||||||
padapter->hw_init_completed = false;
|
adapt->hw_init_completed = false;
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
DBG_88E("\n rtw_hal_deinit: hal_init fail\n");
|
DBG_88E("\n rtw_hal_deinit: hal_init fail\n");
|
||||||
}
|
|
||||||
|
|
||||||
_func_exit_;
|
_func_exit_;
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtw_hal_set_hwreg(struct adapter *padapter, u8 variable, u8 *val)
|
void rtw_hal_set_hwreg(struct adapter *adapt, u8 variable, u8 *val)
|
||||||
{
|
{
|
||||||
if (padapter->HalFunc.SetHwRegHandler)
|
if (adapt->HalFunc.SetHwRegHandler)
|
||||||
padapter->HalFunc.SetHwRegHandler(padapter, variable, val);
|
adapt->HalFunc.SetHwRegHandler(adapt, variable, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtw_hal_get_hwreg(struct adapter *padapter, u8 variable, u8 *val)
|
void rtw_hal_get_hwreg(struct adapter *adapt, u8 variable, u8 *val)
|
||||||
{
|
{
|
||||||
if (padapter->HalFunc.GetHwRegHandler)
|
if (adapt->HalFunc.GetHwRegHandler)
|
||||||
padapter->HalFunc.GetHwRegHandler(padapter, variable, val);
|
adapt->HalFunc.GetHwRegHandler(adapt, variable, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 rtw_hal_set_def_var(struct adapter *padapter, enum hal_def_variable eVariable, void * pValue)
|
u8 rtw_hal_set_def_var(struct adapter *adapt, enum hal_def_variable var,
|
||||||
|
void *val)
|
||||||
{
|
{
|
||||||
if (padapter->HalFunc.SetHalDefVarHandler)
|
if (adapt->HalFunc.SetHalDefVarHandler)
|
||||||
return padapter->HalFunc.SetHalDefVarHandler(padapter,eVariable,pValue);
|
return adapt->HalFunc.SetHalDefVarHandler(adapt, var, val);
|
||||||
return _FAIL;
|
|
||||||
}
|
|
||||||
u8 rtw_hal_get_def_var(struct adapter *padapter, enum hal_def_variable eVariable, void * pValue)
|
|
||||||
{
|
|
||||||
if (padapter->HalFunc.GetHalDefVarHandler)
|
|
||||||
return padapter->HalFunc.GetHalDefVarHandler(padapter,eVariable,pValue);
|
|
||||||
return _FAIL;
|
return _FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtw_hal_set_odm_var(struct adapter *padapter, enum hal_odm_variable eVariable, void * pValue1,bool bSet)
|
u8 rtw_hal_get_def_var(struct adapter *adapt,
|
||||||
|
enum hal_def_variable var, void *val)
|
||||||
{
|
{
|
||||||
if (padapter->HalFunc.SetHalODMVarHandler)
|
if (adapt->HalFunc.GetHalDefVarHandler)
|
||||||
padapter->HalFunc.SetHalODMVarHandler(padapter,eVariable,pValue1,bSet);
|
return adapt->HalFunc.GetHalDefVarHandler(adapt, var, val);
|
||||||
}
|
return _FAIL;
|
||||||
void rtw_hal_get_odm_var(struct adapter *padapter, enum hal_odm_variable eVariable, void * pValue1,bool bSet)
|
|
||||||
{
|
|
||||||
if (padapter->HalFunc.GetHalODMVarHandler)
|
|
||||||
padapter->HalFunc.GetHalODMVarHandler(padapter,eVariable,pValue1,bSet);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtw_hal_enable_interrupt(struct adapter *padapter)
|
void rtw_hal_set_odm_var(struct adapter *adapt,
|
||||||
|
enum hal_odm_variable var, void *val1,
|
||||||
|
bool set)
|
||||||
{
|
{
|
||||||
if (padapter->HalFunc.enable_interrupt)
|
if (adapt->HalFunc.SetHalODMVarHandler)
|
||||||
padapter->HalFunc.enable_interrupt(padapter);
|
adapt->HalFunc.SetHalODMVarHandler(adapt, var,
|
||||||
|
val1, set);
|
||||||
|
}
|
||||||
|
|
||||||
|
void rtw_hal_get_odm_var(struct adapter *adapt,
|
||||||
|
enum hal_odm_variable var, void *val1,
|
||||||
|
bool set)
|
||||||
|
{
|
||||||
|
if (adapt->HalFunc.GetHalODMVarHandler)
|
||||||
|
adapt->HalFunc.GetHalODMVarHandler(adapt, var,
|
||||||
|
val1, set);
|
||||||
|
}
|
||||||
|
|
||||||
|
void rtw_hal_enable_interrupt(struct adapter *adapt)
|
||||||
|
{
|
||||||
|
if (adapt->HalFunc.enable_interrupt)
|
||||||
|
adapt->HalFunc.enable_interrupt(adapt);
|
||||||
else
|
else
|
||||||
DBG_88E("%s: HalFunc.enable_interrupt is NULL!\n", __func__);
|
DBG_88E("%s: HalFunc.enable_interrupt is NULL!\n", __func__);
|
||||||
|
|
||||||
}
|
}
|
||||||
void rtw_hal_disable_interrupt(struct adapter *padapter)
|
|
||||||
|
void rtw_hal_disable_interrupt(struct adapter *adapt)
|
||||||
{
|
{
|
||||||
if (padapter->HalFunc.disable_interrupt)
|
if (adapt->HalFunc.disable_interrupt)
|
||||||
padapter->HalFunc.disable_interrupt(padapter);
|
adapt->HalFunc.disable_interrupt(adapt);
|
||||||
else
|
else
|
||||||
DBG_88E("%s: HalFunc.disable_interrupt is NULL!\n", __func__);
|
DBG_88E("%s: HalFunc.disable_interrupt is NULL!\n", __func__);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
u32 rtw_hal_inirp_init(struct adapter *adapt)
|
||||||
u32 rtw_hal_inirp_init(struct adapter *padapter)
|
|
||||||
{
|
{
|
||||||
u32 rst = _FAIL;
|
u32 rst = _FAIL;
|
||||||
if (padapter->HalFunc.inirp_init)
|
|
||||||
rst = padapter->HalFunc.inirp_init(padapter);
|
if (adapt->HalFunc.inirp_init)
|
||||||
|
rst = adapt->HalFunc.inirp_init(adapt);
|
||||||
else
|
else
|
||||||
DBG_88E(" %s HalFunc.inirp_init is NULL!!!\n",__func__);
|
DBG_88E(" %s HalFunc.inirp_init is NULL!!!\n", __func__);
|
||||||
return rst;
|
return rst;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 rtw_hal_inirp_deinit(struct adapter *padapter)
|
u32 rtw_hal_inirp_deinit(struct adapter *adapt)
|
||||||
{
|
{
|
||||||
|
if (adapt->HalFunc.inirp_deinit)
|
||||||
|
return adapt->HalFunc.inirp_deinit(adapt);
|
||||||
|
|
||||||
if (padapter->HalFunc.inirp_deinit)
|
|
||||||
return padapter->HalFunc.inirp_deinit(padapter);
|
|
||||||
|
|
||||||
return _FAIL;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
u8 rtw_hal_intf_ps_func(struct adapter *padapter,enum hal_intf_ps_func efunc_id, u8* val)
|
|
||||||
{
|
|
||||||
if (padapter->HalFunc.interface_ps_func)
|
|
||||||
return padapter->HalFunc.interface_ps_func(padapter,efunc_id,val);
|
|
||||||
return _FAIL;
|
return _FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 rtw_hal_xmit(struct adapter *padapter, struct xmit_frame *pxmitframe)
|
u8 rtw_hal_intf_ps_func(struct adapter *adapt,
|
||||||
|
enum hal_intf_ps_func efunc_id, u8 *val)
|
||||||
{
|
{
|
||||||
if (padapter->HalFunc.hal_xmit)
|
if (adapt->HalFunc.interface_ps_func)
|
||||||
return padapter->HalFunc.hal_xmit(padapter, pxmitframe);
|
return adapt->HalFunc.interface_ps_func(adapt, efunc_id,
|
||||||
|
val);
|
||||||
|
return _FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 rtw_hal_xmit(struct adapter *adapt, struct xmit_frame *pxmitframe)
|
||||||
|
{
|
||||||
|
if (adapt->HalFunc.hal_xmit)
|
||||||
|
return adapt->HalFunc.hal_xmit(adapt, pxmitframe);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 rtw_hal_mgnt_xmit(struct adapter *padapter, struct xmit_frame *pmgntframe)
|
s32 rtw_hal_mgnt_xmit(struct adapter *adapt, struct xmit_frame *pmgntframe)
|
||||||
{
|
{
|
||||||
s32 ret = _FAIL;
|
s32 ret = _FAIL;
|
||||||
if (padapter->HalFunc.mgnt_xmit)
|
if (adapt->HalFunc.mgnt_xmit)
|
||||||
ret = padapter->HalFunc.mgnt_xmit(padapter, pmgntframe);
|
ret = adapt->HalFunc.mgnt_xmit(adapt, pmgntframe);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 rtw_hal_init_xmit_priv(struct adapter *padapter)
|
s32 rtw_hal_init_xmit_priv(struct adapter *adapt)
|
||||||
{
|
{
|
||||||
if (padapter->HalFunc.init_xmit_priv != NULL)
|
if (adapt->HalFunc.init_xmit_priv != NULL)
|
||||||
return padapter->HalFunc.init_xmit_priv(padapter);
|
return adapt->HalFunc.init_xmit_priv(adapt);
|
||||||
return _FAIL;
|
return _FAIL;
|
||||||
}
|
}
|
||||||
void rtw_hal_free_xmit_priv(struct adapter *padapter)
|
|
||||||
|
void rtw_hal_free_xmit_priv(struct adapter *adapt)
|
||||||
{
|
{
|
||||||
if (padapter->HalFunc.free_xmit_priv != NULL)
|
if (adapt->HalFunc.free_xmit_priv != NULL)
|
||||||
padapter->HalFunc.free_xmit_priv(padapter);
|
adapt->HalFunc.free_xmit_priv(adapt);
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 rtw_hal_init_recv_priv(struct adapter *padapter)
|
s32 rtw_hal_init_recv_priv(struct adapter *adapt)
|
||||||
{
|
{
|
||||||
if (padapter->HalFunc.init_recv_priv)
|
if (adapt->HalFunc.init_recv_priv)
|
||||||
return padapter->HalFunc.init_recv_priv(padapter);
|
return adapt->HalFunc.init_recv_priv(adapt);
|
||||||
|
|
||||||
return _FAIL;
|
return _FAIL;
|
||||||
}
|
}
|
||||||
void rtw_hal_free_recv_priv(struct adapter *padapter)
|
|
||||||
|
void rtw_hal_free_recv_priv(struct adapter *adapt)
|
||||||
{
|
{
|
||||||
if (padapter->HalFunc.free_recv_priv)
|
if (adapt->HalFunc.free_recv_priv)
|
||||||
padapter->HalFunc.free_recv_priv(padapter);
|
adapt->HalFunc.free_recv_priv(adapt);
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtw_hal_update_ra_mask(struct adapter *padapter, u32 mac_id, u8 rssi_level)
|
void rtw_hal_update_ra_mask(struct adapter *adapt, u32 mac_id, u8 rssi_level)
|
||||||
{
|
{
|
||||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
struct mlme_priv *pmlmepriv = &(adapt->mlmepriv);
|
||||||
|
|
||||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)
|
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) {
|
||||||
{
|
|
||||||
struct sta_info *psta = NULL;
|
struct sta_info *psta = NULL;
|
||||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
struct sta_priv *pstapriv = &adapt->stapriv;
|
||||||
#ifdef CONFIG_AP_MODE
|
#ifdef CONFIG_AP_MODE
|
||||||
if ((mac_id-1)>0)
|
if ((mac_id-1) > 0)
|
||||||
psta = pstapriv->sta_aid[(mac_id-1) - 1];
|
psta = pstapriv->sta_aid[(mac_id-1) - 1];
|
||||||
#endif
|
#endif
|
||||||
if (psta)
|
if (psta)
|
||||||
add_RATid(padapter, psta, 0);/* todo: based on rssi_level */
|
add_RATid(adapt, psta, 0);/* todo: based on rssi_level*/
|
||||||
}
|
} else {
|
||||||
else
|
if (adapt->HalFunc.UpdateRAMaskHandler)
|
||||||
{
|
adapt->HalFunc.UpdateRAMaskHandler(adapt, mac_id,
|
||||||
if (padapter->HalFunc.UpdateRAMaskHandler)
|
rssi_level);
|
||||||
padapter->HalFunc.UpdateRAMaskHandler(padapter,mac_id,rssi_level);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtw_hal_add_ra_tid(struct adapter *padapter, u32 bitmap, u8 arg, u8 rssi_level)
|
void rtw_hal_add_ra_tid(struct adapter *adapt, u32 bitmap, u8 arg,
|
||||||
|
u8 rssi_level)
|
||||||
{
|
{
|
||||||
if (padapter->HalFunc.Add_RateATid)
|
if (adapt->HalFunc.Add_RateATid)
|
||||||
padapter->HalFunc.Add_RateATid(padapter, bitmap, arg, rssi_level);
|
adapt->HalFunc.Add_RateATid(adapt, bitmap, arg,
|
||||||
}
|
rssi_level);
|
||||||
/* Start specifical interface thread */
|
|
||||||
void rtw_hal_start_thread(struct adapter *padapter)
|
|
||||||
{
|
|
||||||
if (padapter->HalFunc.run_thread)
|
|
||||||
padapter->HalFunc.run_thread(padapter);
|
|
||||||
}
|
|
||||||
/* Start specifical interface thread */
|
|
||||||
void rtw_hal_stop_thread(struct adapter *padapter)
|
|
||||||
{
|
|
||||||
if (padapter->HalFunc.cancel_thread)
|
|
||||||
padapter->HalFunc.cancel_thread(padapter);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 rtw_hal_read_bbreg(struct adapter *padapter, u32 RegAddr, u32 BitMask)
|
/* Start specifical interface thread */
|
||||||
|
void rtw_hal_start_thread(struct adapter *adapt)
|
||||||
|
{
|
||||||
|
if (adapt->HalFunc.run_thread)
|
||||||
|
adapt->HalFunc.run_thread(adapt);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Start specifical interface thread */
|
||||||
|
void rtw_hal_stop_thread(struct adapter *adapt)
|
||||||
|
{
|
||||||
|
if (adapt->HalFunc.cancel_thread)
|
||||||
|
adapt->HalFunc.cancel_thread(adapt);
|
||||||
|
}
|
||||||
|
|
||||||
|
u32 rtw_hal_read_bbreg(struct adapter *adapt, u32 regaddr, u32 bitmask)
|
||||||
{
|
{
|
||||||
u32 data = 0;
|
u32 data = 0;
|
||||||
if (padapter->HalFunc.read_bbreg)
|
|
||||||
data = padapter->HalFunc.read_bbreg(padapter, RegAddr, BitMask);
|
if (adapt->HalFunc.read_bbreg)
|
||||||
|
data = adapt->HalFunc.read_bbreg(adapt, regaddr, bitmask);
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
void rtw_hal_write_bbreg(struct adapter *padapter, u32 RegAddr, u32 BitMask, u32 Data)
|
|
||||||
|
void rtw_hal_write_bbreg(struct adapter *adapt, u32 regaddr, u32 bitmask,
|
||||||
|
u32 data)
|
||||||
{
|
{
|
||||||
if (padapter->HalFunc.write_bbreg)
|
if (adapt->HalFunc.write_bbreg)
|
||||||
padapter->HalFunc.write_bbreg(padapter, RegAddr, BitMask, Data);
|
adapt->HalFunc.write_bbreg(adapt, regaddr, bitmask, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 rtw_hal_read_rfreg(struct adapter *padapter, enum rf_radio_path rfpath, u32 RegAddr, u32 BitMask)
|
u32 rtw_hal_read_rfreg(struct adapter *adapt, enum rf_radio_path rfpath,
|
||||||
|
u32 regaddr, u32 bitmask)
|
||||||
{
|
{
|
||||||
u32 data = 0;
|
u32 data = 0;
|
||||||
if ( padapter->HalFunc.read_rfreg)
|
|
||||||
data = padapter->HalFunc.read_rfreg(padapter, rfpath, RegAddr, BitMask);
|
if (adapt->HalFunc.read_rfreg)
|
||||||
|
data = adapt->HalFunc.read_rfreg(adapt, rfpath, regaddr,
|
||||||
|
bitmask);
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
void rtw_hal_write_rfreg(struct adapter *padapter, enum rf_radio_path rfpath, u32 RegAddr, u32 BitMask, u32 Data)
|
|
||||||
|
void rtw_hal_write_rfreg(struct adapter *adapt, enum rf_radio_path rfpath,
|
||||||
|
u32 regaddr, u32 bitmask, u32 data)
|
||||||
{
|
{
|
||||||
if (padapter->HalFunc.write_rfreg)
|
if (adapt->HalFunc.write_rfreg)
|
||||||
padapter->HalFunc.write_rfreg(padapter, rfpath, RegAddr, BitMask, Data);
|
adapt->HalFunc.write_rfreg(adapt, rfpath, regaddr,
|
||||||
|
bitmask, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 rtw_hal_interrupt_handler(struct adapter *padapter)
|
s32 rtw_hal_interrupt_handler(struct adapter *adapt)
|
||||||
{
|
{
|
||||||
if (padapter->HalFunc.interrupt_handler)
|
if (adapt->HalFunc.interrupt_handler)
|
||||||
return padapter->HalFunc.interrupt_handler(padapter);
|
return adapt->HalFunc.interrupt_handler(adapt);
|
||||||
return _FAIL;
|
return _FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtw_hal_set_bwmode(struct adapter *padapter, enum ht_channel_width Bandwidth, u8 Offset)
|
void rtw_hal_set_bwmode(struct adapter *adapt,
|
||||||
|
enum ht_channel_width bandwidth, u8 offset)
|
||||||
{
|
{
|
||||||
if (padapter->HalFunc.set_bwmode_handler)
|
if (adapt->HalFunc.set_bwmode_handler)
|
||||||
padapter->HalFunc.set_bwmode_handler(padapter, Bandwidth, Offset);
|
adapt->HalFunc.set_bwmode_handler(adapt, bandwidth,
|
||||||
|
offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtw_hal_set_chan(struct adapter *padapter, u8 channel)
|
void rtw_hal_set_chan(struct adapter *adapt, u8 channel)
|
||||||
{
|
{
|
||||||
if (padapter->HalFunc.set_channel_handler)
|
if (adapt->HalFunc.set_channel_handler)
|
||||||
padapter->HalFunc.set_channel_handler(padapter, channel);
|
adapt->HalFunc.set_channel_handler(adapt, channel);
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtw_hal_dm_watchdog(struct adapter *padapter)
|
void rtw_hal_dm_watchdog(struct adapter *adapt)
|
||||||
{
|
{
|
||||||
if (padapter->HalFunc.hal_dm_watchdog)
|
if (adapt->HalFunc.hal_dm_watchdog)
|
||||||
padapter->HalFunc.hal_dm_watchdog(padapter);
|
adapt->HalFunc.hal_dm_watchdog(adapt);
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtw_hal_bcn_related_reg_setting(struct adapter *padapter)
|
void rtw_hal_bcn_related_reg_setting(struct adapter *adapt)
|
||||||
{
|
{
|
||||||
if (padapter->HalFunc.SetBeaconRelatedRegistersHandler)
|
if (adapt->HalFunc.SetBeaconRelatedRegistersHandler)
|
||||||
padapter->HalFunc.SetBeaconRelatedRegistersHandler(padapter);
|
adapt->HalFunc.SetBeaconRelatedRegistersHandler(adapt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
u8 rtw_hal_antdiv_before_linked(struct adapter *adapt)
|
||||||
u8 rtw_hal_antdiv_before_linked(struct adapter *padapter)
|
|
||||||
{
|
{
|
||||||
if (padapter->HalFunc.AntDivBeforeLinkHandler)
|
if (adapt->HalFunc.AntDivBeforeLinkHandler)
|
||||||
return padapter->HalFunc.AntDivBeforeLinkHandler(padapter);
|
return adapt->HalFunc.AntDivBeforeLinkHandler(adapt);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
void rtw_hal_antdiv_rssi_compared(struct adapter *padapter, struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src)
|
|
||||||
|
void rtw_hal_antdiv_rssi_compared(struct adapter *adapt,
|
||||||
|
struct wlan_bssid_ex *dst,
|
||||||
|
struct wlan_bssid_ex *src)
|
||||||
{
|
{
|
||||||
if (padapter->HalFunc.AntDivCompareHandler)
|
if (adapt->HalFunc.AntDivCompareHandler)
|
||||||
padapter->HalFunc.AntDivCompareHandler(padapter, dst, src);
|
adapt->HalFunc.AntDivCompareHandler(adapt, dst, src);
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtw_hal_sreset_init(struct adapter *padapter)
|
void rtw_hal_sreset_init(struct adapter *adapt)
|
||||||
{
|
{
|
||||||
if (padapter->HalFunc.sreset_init_value)
|
if (adapt->HalFunc.sreset_init_value)
|
||||||
padapter->HalFunc.sreset_init_value(padapter);
|
adapt->HalFunc.sreset_init_value(adapt);
|
||||||
}
|
|
||||||
void rtw_hal_sreset_reset(struct adapter *padapter)
|
|
||||||
{
|
|
||||||
if (padapter->HalFunc.silentreset)
|
|
||||||
padapter->HalFunc.silentreset(padapter);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtw_hal_sreset_reset_value(struct adapter *padapter)
|
void rtw_hal_sreset_reset(struct adapter *adapt)
|
||||||
{
|
{
|
||||||
if (padapter->HalFunc.sreset_reset_value)
|
if (adapt->HalFunc.silentreset)
|
||||||
padapter->HalFunc.sreset_reset_value(padapter);
|
adapt->HalFunc.silentreset(adapt);
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtw_hal_sreset_xmit_status_check(struct adapter *padapter)
|
void rtw_hal_sreset_reset_value(struct adapter *adapt)
|
||||||
{
|
{
|
||||||
if (padapter->HalFunc.sreset_xmit_status_check)
|
if (adapt->HalFunc.sreset_reset_value)
|
||||||
padapter->HalFunc.sreset_xmit_status_check(padapter);
|
adapt->HalFunc.sreset_reset_value(adapt);
|
||||||
}
|
}
|
||||||
void rtw_hal_sreset_linked_status_check(struct adapter *padapter)
|
|
||||||
|
void rtw_hal_sreset_xmit_status_check(struct adapter *adapt)
|
||||||
{
|
{
|
||||||
if (padapter->HalFunc.sreset_linked_status_check)
|
if (adapt->HalFunc.sreset_xmit_status_check)
|
||||||
padapter->HalFunc.sreset_linked_status_check(padapter);
|
adapt->HalFunc.sreset_xmit_status_check(adapt);
|
||||||
}
|
}
|
||||||
u8 rtw_hal_sreset_get_wifi_status(struct adapter *padapter)
|
|
||||||
|
void rtw_hal_sreset_linked_status_check(struct adapter *adapt)
|
||||||
|
{
|
||||||
|
if (adapt->HalFunc.sreset_linked_status_check)
|
||||||
|
adapt->HalFunc.sreset_linked_status_check(adapt);
|
||||||
|
}
|
||||||
|
|
||||||
|
u8 rtw_hal_sreset_get_wifi_status(struct adapter *adapt)
|
||||||
{
|
{
|
||||||
u8 status = 0;
|
u8 status = 0;
|
||||||
if (padapter->HalFunc.sreset_get_wifi_status)
|
|
||||||
status = padapter->HalFunc.sreset_get_wifi_status(padapter);
|
if (adapt->HalFunc.sreset_get_wifi_status)
|
||||||
|
status = adapt->HalFunc.sreset_get_wifi_status(adapt);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
int rtw_hal_iol_cmd(struct adapter *adapter, struct xmit_frame *xmit_frame, u32 max_wating_ms, u32 bndy_cnt)
|
int rtw_hal_iol_cmd(struct adapter *adapter, struct xmit_frame *xmit_frame,
|
||||||
|
u32 max_wating_ms, u32 bndy_cnt)
|
||||||
{
|
{
|
||||||
if (adapter->HalFunc.IOL_exec_cmds_sync)
|
if (adapter->HalFunc.IOL_exec_cmds_sync)
|
||||||
return adapter->HalFunc.IOL_exec_cmds_sync(adapter, xmit_frame, max_wating_ms,bndy_cnt);
|
return adapter->HalFunc.IOL_exec_cmds_sync(adapter, xmit_frame,
|
||||||
|
max_wating_ms,
|
||||||
|
bndy_cnt);
|
||||||
return _FAIL;
|
return _FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtw_hal_notch_filter(struct adapter *adapter, bool enable)
|
void rtw_hal_notch_filter(struct adapter *adapter, bool enable)
|
||||||
{
|
{
|
||||||
if (adapter->HalFunc.hal_notch_filter)
|
if (adapter->HalFunc.hal_notch_filter)
|
||||||
adapter->HalFunc.hal_notch_filter(adapter,enable);
|
adapter->HalFunc.hal_notch_filter(adapter, enable);
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtw_hal_reset_security_engine(struct adapter * adapter)
|
void rtw_hal_reset_security_engine(struct adapter *adapter)
|
||||||
{
|
{
|
||||||
if (adapter->HalFunc.hal_reset_security_engine)
|
if (adapter->HalFunc.hal_reset_security_engine)
|
||||||
adapter->HalFunc.hal_reset_security_engine(adapter);
|
adapter->HalFunc.hal_reset_security_engine(adapter);
|
||||||
|
@ -420,6 +452,7 @@ void rtw_hal_reset_security_engine(struct adapter * adapter)
|
||||||
s32 rtw_hal_c2h_handler(struct adapter *adapter, struct c2h_evt_hdr *c2h_evt)
|
s32 rtw_hal_c2h_handler(struct adapter *adapter, struct c2h_evt_hdr *c2h_evt)
|
||||||
{
|
{
|
||||||
s32 ret = _FAIL;
|
s32 ret = _FAIL;
|
||||||
|
|
||||||
if (adapter->HalFunc.c2h_handler)
|
if (adapter->HalFunc.c2h_handler)
|
||||||
ret = adapter->HalFunc.c2h_handler(adapter, c2h_evt);
|
ret = adapter->HalFunc.c2h_handler(adapter, c2h_evt);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in a new issue