expire_timeout_chk23a(padapter);
#endif
- rtw_hal_sreset_xmit_status_check23a(padapter);
+ rtl8723a_sreset_xmit_status_check(padapter);
linked_status_chk23a(padapter);
traffic_status_watchdog(padapter);
#include <wifi.h>
#include <wlan_bssdef.h>
#include <rtw_ioctl_set.h>
+#include <rtw_sreset.h>
static void rtw_init_mlme_timer(struct rtw_adapter *padapter)
{
rtw_os_xmit_schedule23a(adapter);
if (pmlmeext->sitesurvey_res.bss_cnt == 0)
- rtw_hal_sreset_reset23a(adapter);
+ rtw_sreset_reset(adapter);
rtw_cfg80211_surveydone_event_callback(adapter);
}
struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
struct sta_priv *pstapriv = &padapter->stapriv;
- rtw_hal_sreset_linked_status_check23a(padapter);
+ rtl8723a_sreset_linked_status_check(padapter);
- if (is_client_associated_to_ap23a(padapter))
- {
+ if (is_client_associated_to_ap23a(padapter)) {
/* linked infrastructure client mode */
int tx_chk = _SUCCESS, rx_chk = _SUCCESS;
DBG_8723A("%s wait ps_processing done\n", __func__);
}
- if (rtw_hal_sreset_inprogress(padapter)) {
+ if (rtw_sreset_inprogress(padapter)) {
DBG_8723A("%s wait sreset_inprogress...\n", __func__);
- while (rtw_hal_sreset_inprogress(padapter) &&
+ while (rtw_sreset_inprogress(padapter) &&
jiffies_to_msecs(jiffies - start) <= 4000)
msleep(10);
- if (rtw_hal_sreset_inprogress(padapter))
+ if (rtw_sreset_inprogress(padapter))
DBG_8723A("%s wait sreset_inprogress timeout\n",
__func__);
else
*
******************************************************************************/
-#include<rtw_sreset.h>
+#include <rtw_sreset.h>
-void sreset_init_value23a(struct rtw_adapter *padapter)
+void rtw_sreset_init(struct rtw_adapter *padapter)
{
- struct hal_data_8723a *pHalData = GET_HAL_DATA(padapter);
+ struct hal_data_8723a *pHalData = GET_HAL_DATA(padapter);
struct sreset_priv *psrtpriv = &pHalData->srestpriv;
mutex_init(&psrtpriv->silentreset_mutex);
psrtpriv->last_tx_time = 0;
psrtpriv->last_tx_complete_time = 0;
}
-void sreset_reset_value23a(struct rtw_adapter *padapter)
+
+void rtw_sreset_reset_value(struct rtw_adapter *padapter)
{
- struct hal_data_8723a *pHalData = GET_HAL_DATA(padapter);
+ struct hal_data_8723a *pHalData = GET_HAL_DATA(padapter);
struct sreset_priv *psrtpriv = &pHalData->srestpriv;
psrtpriv->silent_reset_inprogress = false;
psrtpriv->last_tx_complete_time = 0;
}
-u8 sreset_get_wifi_status23a(struct rtw_adapter *padapter)
+u8 rtw_sreset_get_wifi_status(struct rtw_adapter *padapter)
{
- struct hal_data_8723a *pHalData = GET_HAL_DATA(padapter);
+ struct hal_data_8723a *pHalData = GET_HAL_DATA(padapter);
struct sreset_priv *psrtpriv = &pHalData->srestpriv;
u8 status = WIFI_STATUS_SUCCESS;
u32 val32 = 0;
pHalData->srestpriv.dbg_trigger_point = tgp;
}
-bool sreset_inprogress(struct rtw_adapter *padapter)
+bool rtw_sreset_inprogress(struct rtw_adapter *padapter)
{
- struct hal_data_8723a *pHalData = GET_HAL_DATA(padapter);
+ struct rtw_adapter *primary_adapter = GET_PRIMARY_ADAPTER(padapter);
+ struct hal_data_8723a *pHalData = GET_HAL_DATA(primary_adapter);
return pHalData->srestpriv.silent_reset_inprogress;
}
netif_tx_wake_all_queues(padapter->pnetdev);
}
-void sreset_reset(struct rtw_adapter *padapter)
+void rtw_sreset_reset(struct rtw_adapter *active_adapter)
{
- struct hal_data_8723a *pHalData = GET_HAL_DATA(padapter);
+ struct rtw_adapter *padapter = GET_PRIMARY_ADAPTER(active_adapter);
+ struct hal_data_8723a *pHalData = GET_HAL_DATA(padapter);
struct sreset_priv *psrtpriv = &pHalData->srestpriv;
struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
unsigned long start = jiffies;
padapter->HalFunc.SetBeaconRelatedRegistersHandler(padapter);
}
-void rtw_hal_sreset_init23a(struct rtw_adapter *padapter)
-{
- if (padapter->HalFunc.sreset_init_value23a)
- padapter->HalFunc.sreset_init_value23a(padapter);
-}
-void rtw_hal_sreset_reset23a(struct rtw_adapter *padapter)
-{
- padapter = GET_PRIMARY_ADAPTER(padapter);
-
- if (padapter->HalFunc.silentreset)
- padapter->HalFunc.silentreset(padapter);
-}
-
-void rtw_hal_sreset_reset23a_value23a(struct rtw_adapter *padapter)
-{
- if (padapter->HalFunc.sreset_reset_value23a)
- padapter->HalFunc.sreset_reset_value23a(padapter);
-}
-
-void rtw_hal_sreset_xmit_status_check23a(struct rtw_adapter *padapter)
-{
- if (padapter->HalFunc.sreset_xmit_status_check)
- padapter->HalFunc.sreset_xmit_status_check(padapter);
-}
-void rtw_hal_sreset_linked_status_check23a(struct rtw_adapter *padapter)
-{
- if (padapter->HalFunc.sreset_linked_status_check)
- padapter->HalFunc.sreset_linked_status_check(padapter);
-}
-u8 rtw_hal_sreset_get_wifi_status23a(struct rtw_adapter *padapter)
-{
- u8 status = 0;
- if (padapter->HalFunc.sreset_get_wifi_status23a)
- status = padapter->HalFunc.sreset_get_wifi_status23a(padapter);
- return status;
-}
-
-bool rtw_hal_sreset_inprogress(struct rtw_adapter *padapter)
-{
- bool inprogress = false;
-
- padapter = GET_PRIMARY_ADAPTER(padapter);
-
- if (padapter->HalFunc.sreset_inprogress)
- inprogress = padapter->HalFunc.sreset_inprogress(padapter);
- return inprogress;
-}
-
void rtw_hal_notch_filter23a(struct rtw_adapter *adapter, bool enable)
{
if (adapter->HalFunc.hal_notch_filter)
pHalFunc->Efuse_WordEnableDataWrite23a = &Hal_EfuseWordEnableDataWrite;
pHalFunc->Efuse_PgPacketWrite23a_BT = &Hal_EfusePgPacketWrite_BT;
- pHalFunc->sreset_init_value23a = &sreset_init_value23a;
- pHalFunc->sreset_reset_value23a = &sreset_reset_value23a;
- pHalFunc->silentreset = &sreset_reset;
- pHalFunc->sreset_xmit_status_check = &rtl8723a_sreset_xmit_status_check;
- pHalFunc->sreset_linked_status_check =
- &rtl8723a_sreset_linked_status_check;
- pHalFunc->sreset_get_wifi_status23a = &sreset_get_wifi_status23a;
- pHalFunc->sreset_inprogress = &sreset_inprogress;
pHalFunc->GetHalODMVarHandler = &rtl8723a_GetHalODMVar;
pHalFunc->SetHalODMVarHandler = &rtl8723a_SetHalODMVar;
txdma_status = rtw_read32(padapter, REG_TXDMA_STATUS);
if (txdma_status != 0) {
DBG_8723A("%s REG_TXDMA_STATUS:0x%08x\n", __func__, txdma_status);
- rtw_hal_sreset_reset23a(padapter);
+ rtw_sreset_reset(padapter);
}
current_time = jiffies;
if (diff_time > 4000) {
/* padapter->Wifi_Error_Status = WIFI_TX_HANG; */
DBG_8723A("%s tx hang\n", __func__);
- rtw_hal_sreset_reset23a(padapter);
+ rtw_sreset_reset(padapter);
}
}
}
if (psrtpriv->dbg_trigger_point == SRESET_TGP_XMIT_STATUS) {
psrtpriv->dbg_trigger_point = SRESET_TGP_NULL;
- rtw_hal_sreset_reset23a(padapter);
+ rtw_sreset_reset(padapter);
return;
}
}
if (psrtpriv->dbg_trigger_point == SRESET_TGP_LINK_STATUS) {
psrtpriv->dbg_trigger_point = SRESET_TGP_NULL;
- rtw_hal_sreset_reset23a(padapter);
+ rtw_sreset_reset(padapter);
return;
}
}
bool (*Efuse_PgPacketWrite23a_BT)(struct rtw_adapter *padapter,
u8 offset, u8 word_en, u8 *data);
- void (*sreset_init_value23a)(struct rtw_adapter *padapter);
- void (*sreset_reset_value23a)(struct rtw_adapter *padapter);
- void (*silentreset)(struct rtw_adapter *padapter);
- void (*sreset_xmit_status_check)(struct rtw_adapter *padapter);
- void (*sreset_linked_status_check) (struct rtw_adapter *padapter);
- u8 (*sreset_get_wifi_status23a)(struct rtw_adapter *padapter);
- bool (*sreset_inprogress)(struct rtw_adapter *padapter);
-
void (*hal_notch_filter)(struct rtw_adapter *adapter, bool enable);
void (*hal_reset_security_engine)(struct rtw_adapter *adapter);
};
enum ht_channel_width Bandwidth, u8 Offset);
void rtw_hal_set_chan23a(struct rtw_adapter *padapter, u8 channel);
-void rtw_hal_sreset_init23a(struct rtw_adapter *padapter);
-void rtw_hal_sreset_reset23a(struct rtw_adapter *padapter);
-void rtw_hal_sreset_reset23a_value23a(struct rtw_adapter *padapter);
-void rtw_hal_sreset_xmit_status_check23a(struct rtw_adapter *padapter);
-void rtw_hal_sreset_linked_status_check23a (struct rtw_adapter *padapter);
-u8 rtw_hal_sreset_get_wifi_status23a(struct rtw_adapter *padapter);
-bool rtw_hal_sreset_inprogress(struct rtw_adapter *padapter);
-
void rtw_hal_notch_filter23a(struct rtw_adapter *adapter, bool enable);
void rtw_hal_reset_security_engine23a(struct rtw_adapter *adapter);
#define WIFI_RX_HANG BIT(5)
#define WIFI_IF_NOT_EXIST BIT(6)
-void sreset_init_value23a(struct rtw_adapter *padapter);
-void sreset_reset_value23a(struct rtw_adapter *padapter);
-u8 sreset_get_wifi_status23a(struct rtw_adapter *padapter);
+void rtw_sreset_init(struct rtw_adapter *padapter);
+void rtw_sreset_reset_value(struct rtw_adapter *padapter);
+u8 rtw_sreset_get_wifi_status(struct rtw_adapter *padapter);
+bool rtw_sreset_inprogress(struct rtw_adapter *padapter);
void sreset_set_wifi_error_status23a(struct rtw_adapter *padapter, u32 status);
void sreset_set_trigger_point(struct rtw_adapter *padapter, s32 tgp);
-bool sreset_inprogress(struct rtw_adapter *padapter);
-void sreset_reset(struct rtw_adapter *padapter);
+void rtw_sreset_reset(struct rtw_adapter *active_adapter);
#endif
_clr_fwstate_(pmlmepriv, _FW_UNDER_SURVEY | _FW_UNDER_LINKING);
- rtw_hal_sreset_reset23a_value23a(padapter);
+ rtw_sreset_reset_value(padapter);
pwrctrlpriv->pwr_state_check_cnts = 0;
/* mlmeextpriv */
rtl8723a_init_dm_priv(padapter);
rtw_hal_sw_led_init23a(padapter);
- rtw_hal_sreset_init23a(padapter);
+ rtw_sreset_init(padapter);
exit: