mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-04 02:34:10 -04:00
staging: rtl8723au: Pull hal_init/deinit out of HAL wrapper layer
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a4f6eb1e8e
commit
c77726971e
@@ -41,42 +41,6 @@ u32 rtw_hal_power_on23a(struct rtw_adapter *padapter)
|
||||
return _FAIL;
|
||||
}
|
||||
|
||||
uint rtw_hal_init23a(struct rtw_adapter *padapter)
|
||||
{
|
||||
uint status = _SUCCESS;
|
||||
|
||||
padapter->hw_init_completed = false;
|
||||
|
||||
status = padapter->HalFunc.hal_init(padapter);
|
||||
|
||||
if (status == _SUCCESS) {
|
||||
padapter->hw_init_completed = true;
|
||||
|
||||
if (padapter->registrypriv.notch_filter == 1)
|
||||
rtl8723a_notch_filter(padapter, 1);
|
||||
} else {
|
||||
padapter->hw_init_completed = false;
|
||||
DBG_8723A("rtw_hal_init23a: hal__init fail\n");
|
||||
}
|
||||
|
||||
RT_TRACE(_module_hal_init_c_, _drv_err_, ("-rtl871x_hal_init:status = 0x%x\n", status));
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
uint rtw_hal_deinit23a(struct rtw_adapter *padapter)
|
||||
{
|
||||
uint status = _SUCCESS;
|
||||
|
||||
status = padapter->HalFunc.hal_deinit(padapter);
|
||||
|
||||
if (status == _SUCCESS)
|
||||
padapter->hw_init_completed = false;
|
||||
else
|
||||
DBG_8723A("\n rtw_hal_deinit23a: hal_init fail\n");
|
||||
return status;
|
||||
}
|
||||
|
||||
u8 rtw_hal_set_def_var23a(struct rtw_adapter *padapter, enum hal_def_variable eVariable, void *pValue)
|
||||
{
|
||||
if (padapter->HalFunc.SetHalDefVarHandler)
|
||||
|
||||
@@ -614,10 +614,11 @@ enum rt_rf_power_state RfOnOffDetect23a(struct rtw_adapter *pAdapter)
|
||||
|
||||
void _ps_open_RF23a(struct rtw_adapter *padapter);
|
||||
|
||||
static u32 rtl8723au_hal_init(struct rtw_adapter *Adapter)
|
||||
static int rtl8723au_hal_init(struct rtw_adapter *Adapter)
|
||||
{
|
||||
u8 val8 = 0;
|
||||
u32 boundary, status = _SUCCESS;
|
||||
u8 val8 = 0;
|
||||
u32 boundary;
|
||||
int status = _SUCCESS;
|
||||
struct hal_data_8723a *pHalData = GET_HAL_DATA(Adapter);
|
||||
struct pwrctrl_priv *pwrctrlpriv = &Adapter->pwrctrlpriv;
|
||||
struct registry_priv *pregistrypriv = &Adapter->registrypriv;
|
||||
@@ -1206,7 +1207,7 @@ static void CardDisableRTL8723U(struct rtw_adapter *Adapter)
|
||||
rtw_write8(Adapter, REG_RSV_CTRL, 0x0e);
|
||||
}
|
||||
|
||||
static u32 rtl8723au_hal_deinit(struct rtw_adapter *padapter)
|
||||
static int rtl8723au_hal_deinit(struct rtw_adapter *padapter)
|
||||
{
|
||||
DBG_8723A("==> %s\n", __func__);
|
||||
|
||||
@@ -1725,6 +1726,43 @@ static void UpdateHalRAMask8192CUsb(struct rtw_adapter *padapter,
|
||||
pdmpriv->INIDATA_RATE[mac_id] = init_rate;
|
||||
}
|
||||
|
||||
int rtw_hal_init23a(struct rtw_adapter *padapter)
|
||||
{
|
||||
int status;
|
||||
|
||||
padapter->hw_init_completed = false;
|
||||
|
||||
status = rtl8723au_hal_init(padapter);
|
||||
|
||||
if (status == _SUCCESS) {
|
||||
padapter->hw_init_completed = true;
|
||||
|
||||
if (padapter->registrypriv.notch_filter == 1)
|
||||
rtl8723a_notch_filter(padapter, 1);
|
||||
} else {
|
||||
padapter->hw_init_completed = false;
|
||||
DBG_8723A("rtw_hal_init23a: hal__init fail\n");
|
||||
}
|
||||
|
||||
RT_TRACE(_module_hal_init_c_, _drv_err_,
|
||||
("-rtl871x_hal_init:status = 0x%x\n", status));
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
int rtw_hal_deinit23a(struct rtw_adapter *padapter)
|
||||
{
|
||||
int status;
|
||||
|
||||
status = rtl8723au_hal_deinit(padapter);
|
||||
|
||||
if (status == _SUCCESS)
|
||||
padapter->hw_init_completed = false;
|
||||
else
|
||||
DBG_8723A("\n rtw_hal_deinit23a: hal_init fail\n");
|
||||
return status;
|
||||
}
|
||||
|
||||
int rtl8723au_set_hal_ops(struct rtw_adapter *padapter)
|
||||
{
|
||||
struct hal_ops *pHalFunc = &padapter->HalFunc;
|
||||
@@ -1735,9 +1773,6 @@ int rtl8723au_set_hal_ops(struct rtw_adapter *padapter)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
pHalFunc->hal_init = &rtl8723au_hal_init;
|
||||
pHalFunc->hal_deinit = &rtl8723au_hal_deinit;
|
||||
|
||||
pHalFunc->init_xmit_priv = &rtl8723au_init_xmit_priv;
|
||||
|
||||
pHalFunc->init_recv_priv = &rtl8723au_init_recv_priv;
|
||||
|
||||
@@ -62,8 +62,6 @@ enum hal_odm_variable {
|
||||
|
||||
struct hal_ops {
|
||||
u32 (*hal_power_on)(struct rtw_adapter *padapter);
|
||||
u32 (*hal_init)(struct rtw_adapter *padapter);
|
||||
u32 (*hal_deinit)(struct rtw_adapter *padapter);
|
||||
|
||||
s32 (*init_xmit_priv)(struct rtw_adapter *padapter);
|
||||
|
||||
@@ -142,8 +140,8 @@ void rtw_hal_sw_led_init23a(struct rtw_adapter *padapter);
|
||||
void rtw_hal_sw_led_deinit23a(struct rtw_adapter *padapter);
|
||||
|
||||
u32 rtw_hal_power_on23a(struct rtw_adapter *padapter);
|
||||
uint rtw_hal_init23a(struct rtw_adapter *padapter);
|
||||
uint rtw_hal_deinit23a(struct rtw_adapter *padapter);
|
||||
int rtw_hal_init23a(struct rtw_adapter *padapter);
|
||||
int rtw_hal_deinit23a(struct rtw_adapter *padapter);
|
||||
void rtw_hal_stop(struct rtw_adapter *padapter);
|
||||
|
||||
u8 rtw_hal_set_def_var23a(struct rtw_adapter *padapter,
|
||||
|
||||
Reference in New Issue
Block a user