void _ps_open_RF23a(struct rtw_adapter *padapter);
-static int rtl8723au_hal_init(struct rtw_adapter *Adapter)
+int rtl8723au_hal_init(struct rtw_adapter *Adapter)
{
u8 val8 = 0;
u32 boundary;
unsigned long init_start_time = jiffies;
+ Adapter->hw_init_completed = false;
+
if (Adapter->pwrctrlpriv.bkeepfwalive) {
_ps_open_RF23a(Adapter);
rtl8723au_read32(Adapter, REG_FWHW_TXQ_CTRL)|BIT(12));
exit:
+ if (status == _SUCCESS) {
+ Adapter->hw_init_completed = true;
+
+ if (Adapter->registrypriv.notch_filter == 1)
+ rtl8723a_notch_filter(Adapter, 1);
+ }
+
DBG_8723A("%s in %dms\n", __func__,
jiffies_to_msecs(jiffies - init_start_time));
return status;
rtl8723au_write8(Adapter, REG_RSV_CTRL, 0x0e);
}
-static int rtl8723au_hal_deinit(struct rtw_adapter *padapter)
+int rtl8723au_hal_deinit(struct rtw_adapter *padapter)
{
DBG_8723A("==> %s\n", __func__);
/* IC. Accord to johnny's opinion, only RU need the support. */
CardDisableRTL8723U(padapter);
+ padapter->hw_init_completed = false;
+
return _SUCCESS;
}
/* set correct initial date rate for each mac_id */
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 pm_netdev_open23a(struct net_device *pnetdev, u8 bnormal);
int rtw_resume_process23a(struct rtw_adapter *padapter);
-int rtw_hal_init23a(struct rtw_adapter *padapter);
-int rtw_hal_deinit23a(struct rtw_adapter *padapter);
+int rtl8723au_hal_init(struct rtw_adapter *padapter);
+int rtl8723au_hal_deinit(struct rtw_adapter *padapter);
void rtw_hal_stop(struct rtw_adapter *padapter);
void rtw_hal_update_ra_mask23a(struct sta_info *psta, u8 rssi_level);
padapter->bSurpriseRemoved = false;
padapter->bCardDisableWOHSM = false;
- status = rtw_hal_init23a(padapter);
+ status = rtl8723au_hal_init(padapter);
if (status == _FAIL) {
RT_TRACE(_module_os_intfs_c_, _drv_err_,
("rtl871x_hal_init(): Can't init h/w!\n"));
padapter->bSurpriseRemoved = false;
padapter->bCardDisableWOHSM = false;
- status = rtw_hal_init23a(padapter);
+ status = rtl8723au_hal_init(padapter);
if (status == _FAIL) {
RT_TRACE(_module_os_intfs_c_, _drv_err_,
("ips_netdrv_open(): Can't init h/w!\n"));
/* s5. */
if (!padapter->bSurpriseRemoved)
- rtw_hal_deinit23a(padapter);
+ rtl8723au_hal_deinit(padapter);
}
int pm_netdev_open23a(struct net_device *pnetdev, u8 bnormal)