staging: rtl8723au: Get rid of sreset related HAL clutter
authorJes Sorensen <Jes.Sorensen@redhat.com>
Fri, 16 May 2014 08:04:00 +0000 (10:04 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 May 2014 18:34:22 +0000 (11:34 -0700)
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/core/rtw_cmd.c
drivers/staging/rtl8723au/core/rtw_mlme.c
drivers/staging/rtl8723au/core/rtw_mlme_ext.c
drivers/staging/rtl8723au/core/rtw_pwrctrl.c
drivers/staging/rtl8723au/core/rtw_sreset.c
drivers/staging/rtl8723au/hal/hal_intf.c
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
drivers/staging/rtl8723au/hal/rtl8723a_sreset.c
drivers/staging/rtl8723au/include/hal_intf.h
drivers/staging/rtl8723au/include/rtw_sreset.h
drivers/staging/rtl8723au/os_dep/os_intfs.c

index 32c5f72c9a4456358463b41aad8520f749910754..356bfcc9744acf827658f877c57a7dfafc288a41 100644 (file)
@@ -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);
index a5fca8141e323688c37a30472a0134ea3d300986..b1f1fd6e6c9f27193a7d722fed6de0ab0788f0ce 100644 (file)
@@ -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);
 }
index 1789822e785af0f6dfec1467eed3813b5966de44..9d40b08dd19fcf6001114c1e9ad63d3568d813c4 100644 (file)
@@ -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;
index 993504dd7eda6ec24990b63e561f9cf7ae4bef66..b36c12b842c068a35cb7dd3f32aa9b9149a216f5 100644 (file)
@@ -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
index 0e1ea31420064207e6a30d5001f59447d103ffaa..4938af70cc0296129529ec0f5cba0e506429ec4c 100644 (file)
  *
  ******************************************************************************/
 
-#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);
@@ -26,9 +26,10 @@ 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 hal_data_8723a *pHalData = GET_HAL_DATA(padapter);
        struct sreset_priv *psrtpriv = &pHalData->srestpriv;
 
        psrtpriv->silent_reset_inprogress = false;
@@ -37,9 +38,9 @@ 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 hal_data_8723a *pHalData = GET_HAL_DATA(padapter);
        struct sreset_priv *psrtpriv = &pHalData->srestpriv;
        u8 status = WIFI_STATUS_SUCCESS;
        u32 val32 = 0;
@@ -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,9 +229,10 @@ 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 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;
index 1e42a33e6967ee376cc3eeb77bd2c1187815e6bf..d08e805bb023dacae32b0fa268a9e00028f98098 100644 (file)
@@ -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)
index 5e272624457635252cf6ea1585848202c7e2bd15..71cf143209565c7001480e4542411ee82e927c1e 100644 (file)
@@ -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;
 
index c0218e734b9e8203dcf9fa8fbeea7de0eedf66a9..54b0dfb6eebf754725bc1487c2d941eed96c87a8 100644 (file)
@@ -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;
        }
 }
index 959105e34a667b48de29276928ad38f67f3fbff5..2fdc02afb53d445c4faa9f4ee8171331aab6bbba 100644 (file)
@@ -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);
 
index 91d57e2791d917b7ae934b76bfbc05e24c069d49..77cc7941b546ba5c8fbe8339b96524d01b6fcc71 100644 (file)
@@ -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
index 6273497aa61e86a40a7c121aa9f38c48321f305d..38ad4ab45206cc08f094659860d1b2949b6dc39f 100644 (file)
@@ -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: