Commit b7c19c27 authored by Jes Sorensen's avatar Jes Sorensen Committed by Greg Kroah-Hartman

staging: rtl8723au: Get rid of sreset related HAL clutter

Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8289d357
......@@ -1033,7 +1033,7 @@ static void dynamic_chk_wk_hdl(struct rtw_adapter *padapter, u8 *pbuf, int sz)
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);
......
......@@ -25,6 +25,7 @@
#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)
{
......@@ -808,7 +809,7 @@ rtw_surveydone_event_callback23a(struct rtw_adapter *adapter, const u8 *pbuf)
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);
}
......
......@@ -5555,10 +5555,9 @@ void linked_status_chk23a(struct rtw_adapter *padapter)
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;
......
......@@ -546,12 +546,12 @@ int _rtw_pwr_wakeup23a(struct rtw_adapter *padapter, u32 ips_deffer_ms, const ch
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
......
......@@ -13,9 +13,9 @@
*
******************************************************************************/
#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 sreset_priv *psrtpriv = &pHalData->srestpriv;
......@@ -26,7 +26,8 @@ void sreset_init_value23a(struct rtw_adapter *padapter)
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 sreset_priv *psrtpriv = &pHalData->srestpriv;
......@@ -37,7 +38,7 @@ void sreset_reset_value23a(struct rtw_adapter *padapter)
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 sreset_priv *psrtpriv = &pHalData->srestpriv;
......@@ -80,9 +81,10 @@ void sreset_set_trigger_point(struct rtw_adapter *padapter, s32 tgp)
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;
}
......@@ -227,8 +229,9 @@ static void sreset_start_adapter(struct rtw_adapter *padapter)
netif_tx_wake_all_queues(padapter->pnetdev);
}
void sreset_reset(struct rtw_adapter *padapter)
void rtw_sreset_reset(struct rtw_adapter *active_adapter)
{
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;
......
......@@ -268,54 +268,6 @@ void rtw_hal_bcn_related_reg_setting23a(struct rtw_adapter *padapter)
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)
......
......@@ -1746,14 +1746,6 @@ void rtl8723a_set_hal_ops(struct hal_ops *pHalFunc)
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;
......
......@@ -30,7 +30,7 @@ void rtl8723a_sreset_xmit_status_check(struct rtw_adapter *padapter)
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;
......@@ -47,7 +47,7 @@ void rtl8723a_sreset_xmit_status_check(struct rtw_adapter *padapter)
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);
}
}
}
......@@ -55,7 +55,7 @@ void rtl8723a_sreset_xmit_status_check(struct rtw_adapter *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;
}
}
......@@ -67,7 +67,7 @@ void rtl8723a_sreset_linked_status_check(struct rtw_adapter *padapter)
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;
}
}
......@@ -139,14 +139,6 @@ struct hal_ops {
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);
};
......@@ -255,14 +247,6 @@ void rtw_hal_set_bwmode23a(struct rtw_adapter *padapter,
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);
......
......@@ -45,12 +45,12 @@ struct sreset_priv {
#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
......@@ -449,7 +449,7 @@ u8 rtw_reset_drv_sw23a(struct rtw_adapter *padapter)
_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 */
......@@ -525,7 +525,7 @@ u8 rtw_init_drv_sw23a(struct rtw_adapter *padapter)
rtl8723a_init_dm_priv(padapter);
rtw_hal_sw_led_init23a(padapter);
rtw_hal_sreset_init23a(padapter);
rtw_sreset_init(padapter);
exit:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment