staging: rtl8723au: Disentangle set_odm_var() from the HAL wrappers
authorJes Sorensen <Jes.Sorensen@redhat.com>
Fri, 16 May 2014 08:04:13 +0000 (10:04 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 May 2014 18:34:25 +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_ap.c
drivers/staging/rtl8723au/core/rtw_mlme.c
drivers/staging/rtl8723au/core/rtw_sta_mgt.c
drivers/staging/rtl8723au/hal/hal_intf.c
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
drivers/staging/rtl8723au/include/hal_intf.h
drivers/staging/rtl8723au/include/rtl8723a_hal.h

index 4b239480350465de76f61b09dd95ec8a88b45905..0b7a4a68b5f49b40c72605a8b9672555286c4333 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/ieee80211.h>
 #include <wifi.h>
 #include <rtl8723a_cmd.h>
+#include <rtl8723a_hal.h>
 
 #ifdef CONFIG_8723AU_AP_MODE
 
@@ -497,7 +498,7 @@ static void update_bmc_sta(struct rtw_adapter *padapter)
                init_rate = get_highest_rate_idx23a(tx_ra_bitmap&0x0fffffff)&0x3f;
 
                /* ap mode */
-               rtw_hal_set_odm_var23a(padapter, HAL_ODM_STA_INFO, psta, true);
+               rtl8723a_SetHalODMVar(padapter, HAL_ODM_STA_INFO, psta, true);
 
                {
                        u8 arg = 0;
@@ -552,7 +553,7 @@ void update_sta_info23a_apmode23a(struct rtw_adapter *padapter, struct sta_info
        DBG_8723A("%s\n", __func__);
 
        /* ap mode */
-       rtw_hal_set_odm_var23a(padapter, HAL_ODM_STA_INFO, psta, true);
+       rtl8723a_SetHalODMVar(padapter, HAL_ODM_STA_INFO, psta, true);
 
        if (psecuritypriv->dot11AuthAlgrthm == dot11AuthAlgrthm_8021X)
                psta->ieee8021x_blocked = true;
index b1f1fd6e6c9f27193a7d722fed6de0ab0788f0ce..b675673dd99513741083489c812062c38c0f2fb0 100644 (file)
@@ -1020,10 +1020,10 @@ rtw_joinbss_update_stainfo(struct rtw_adapter *padapter,
                DBG_8723A("%s\n", __func__);
 
                psta->aid  = pnetwork->join_res;
-                       psta->mac_id = 0;
+               psta->mac_id = 0;
 
                /* sta mode */
-               rtw_hal_set_odm_var23a(padapter, HAL_ODM_STA_INFO, psta, true);
+               rtl8723a_SetHalODMVar(padapter, HAL_ODM_STA_INFO, psta, true);
 
                /* security related */
                if (padapter->securitypriv.dot11AuthAlgrthm ==
@@ -1394,7 +1394,7 @@ void rtw_stassoc_event_callback23a(struct rtw_adapter *adapter, const u8 *pbuf)
        /* psta->aid = (uint)pstassoc->cam_id; */
        DBG_8723A("%s\n",__func__);
        /* for ad-hoc mode */
-       rtw_hal_set_odm_var23a(adapter, HAL_ODM_STA_INFO, psta, true);
+       rtl8723a_SetHalODMVar(adapter, HAL_ODM_STA_INFO, psta, true);
 
        if (adapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X)
                psta->dot118021XPrivacy =
index 7f1f66c6709bc364ca5060d5432f4729c7e8c29e..148bb4a2de2fbbd2101349dc84360215788ab71e 100644 (file)
@@ -20,6 +20,7 @@
 #include <xmit_osdep.h>
 #include <mlme_osdep.h>
 #include <sta_info.h>
+#include <rtl8723a_hal.h>
 
 static void _rtw_init_stainfo(struct sta_info *psta)
 {
@@ -273,7 +274,7 @@ u32 rtw_free_stainfo23a(struct rtw_adapter *padapter, struct sta_info *psta)
                spin_unlock_bh(&ppending_recvframe_queue->lock);
        }
        if (!(psta->state & WIFI_AP_STATE))
-               rtw_hal_set_odm_var23a(padapter, HAL_ODM_STA_INFO, psta, false);
+               rtl8723a_SetHalODMVar(padapter, HAL_ODM_STA_INFO, psta, false);
 #ifdef CONFIG_8723AU_AP_MODE
        spin_lock_bh(&pstapriv->auth_list_lock);
        if (!list_empty(&psta->auth_list)) {
index 1bdebefb18b35a0c6c180cb6a2dcbbdf3465f948..2a5c9cc4f048810487ca4faa243a8ad4bdb34213 100644 (file)
@@ -90,12 +90,6 @@ u8 rtw_hal_get_def_var23a(struct rtw_adapter *padapter, enum hal_def_variable eV
        return _FAIL;
 }
 
-void rtw_hal_set_odm_var23a(struct rtw_adapter *padapter, enum hal_odm_variable eVariable, void *pValue1, bool bSet)
-{
-       if (padapter->HalFunc.SetHalODMVarHandler)
-               padapter->HalFunc.SetHalODMVarHandler(padapter, eVariable, pValue1, bSet);
-}
-
 void rtw_hal_enable_interrupt23a(struct rtw_adapter *padapter)
 {
        if (padapter->HalFunc.enable_interrupt)
index 971826a12e0a0a4cdeba5536c9c7c517f6c1c4d3..5ee4923ab06a315f079ed3e0fd3631462cf5f92d 100644 (file)
@@ -1577,9 +1577,9 @@ void rtl8723a_SetBeaconRelatedRegisters(struct rtw_adapter *padapter)
        SetBcnCtrlReg23a(padapter, DIS_BCNQ_SUB, 0);
 }
 
-static void rtl8723a_SetHalODMVar(struct rtw_adapter *Adapter,
-                                 enum hal_odm_variable eVariable,
-                                 void *pValue1, bool bSet)
+void rtl8723a_SetHalODMVar(struct rtw_adapter *Adapter,
+                          enum hal_odm_variable eVariable,
+                          void *pValue1, bool bSet)
 {
        struct hal_data_8723a *pHalData = GET_HAL_DATA(Adapter);
        struct dm_odm_t *podmpriv = &pHalData->odmpriv;
@@ -1703,8 +1703,6 @@ void rtl8723a_set_hal_ops(struct hal_ops *pHalFunc)
        pHalFunc->Efuse_PgPacketWrite23a = &Hal_EfusePgPacketWrite;
        pHalFunc->Efuse_WordEnableDataWrite23a = &Hal_EfuseWordEnableDataWrite;
        pHalFunc->Efuse_PgPacketWrite23a_BT = &Hal_EfusePgPacketWrite_BT;
-
-       pHalFunc->SetHalODMVarHandler = &rtl8723a_SetHalODMVar;
 }
 
 void rtl8723a_InitAntenna_Selection(struct rtw_adapter *padapter)
index 5186899f5b83f28e63acb30697d5ed9519a48660..9ffcbb806cdfe194174478bbbda967c21e396696 100644 (file)
@@ -84,10 +84,6 @@ struct hal_ops {
                                  enum hal_def_variable eVariable,
                                  void *pValue);
 
-       void (*SetHalODMVarHandler)(struct rtw_adapter *padapter,
-                                   enum hal_odm_variable eVariable,
-                                   void *pValue1, bool bSet);
-
        void (*UpdateRAMaskHandler)(struct rtw_adapter *padapter,
                                    u32 mac_id, u8 rssi_level);
 
@@ -174,10 +170,6 @@ u8 rtw_hal_get_def_var23a(struct rtw_adapter *padapter,
                          enum hal_def_variable eVariable,
                          void *pValue);
 
-void rtw_hal_set_odm_var23a(struct rtw_adapter *padapter,
-                           enum hal_odm_variable eVariable,
-                           void *pValue1, bool bSet);
-
 void rtw_hal_enable_interrupt23a(struct rtw_adapter *padapter);
 void rtw_hal_disable_interrupt23a(struct rtw_adapter *padapter);
 
index 5ee9fb711630b3fbe877eb87aba2512845af22a9..da1a8822080370af56472c624dfba627ade00a24 100644 (file)
@@ -550,5 +550,8 @@ void rtl8723a_read_adapter_info(struct rtw_adapter *Adapter);
 void rtl8723a_read_chip_version(struct rtw_adapter *padapter);
 void rtl8723a_notch_filter(struct rtw_adapter *adapter, bool enable);
 void rtl8723a_SetBeaconRelatedRegisters(struct rtw_adapter *padapter);
+void rtl8723a_SetHalODMVar(struct rtw_adapter *Adapter,
+                          enum hal_odm_variable eVariable,
+                          void *pValue1, bool bSet);
 
 #endif