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

staging: rtl8723au: Disentangle set_odm_var() from the HAL wrappers

Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent de9a5f01
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <linux/ieee80211.h> #include <linux/ieee80211.h>
#include <wifi.h> #include <wifi.h>
#include <rtl8723a_cmd.h> #include <rtl8723a_cmd.h>
#include <rtl8723a_hal.h>
#ifdef CONFIG_8723AU_AP_MODE #ifdef CONFIG_8723AU_AP_MODE
...@@ -497,7 +498,7 @@ static void update_bmc_sta(struct rtw_adapter *padapter) ...@@ -497,7 +498,7 @@ static void update_bmc_sta(struct rtw_adapter *padapter)
init_rate = get_highest_rate_idx23a(tx_ra_bitmap&0x0fffffff)&0x3f; init_rate = get_highest_rate_idx23a(tx_ra_bitmap&0x0fffffff)&0x3f;
/* ap mode */ /* 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; u8 arg = 0;
...@@ -552,7 +553,7 @@ void update_sta_info23a_apmode23a(struct rtw_adapter *padapter, struct sta_info ...@@ -552,7 +553,7 @@ void update_sta_info23a_apmode23a(struct rtw_adapter *padapter, struct sta_info
DBG_8723A("%s\n", __func__); DBG_8723A("%s\n", __func__);
/* ap mode */ /* 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) if (psecuritypriv->dot11AuthAlgrthm == dot11AuthAlgrthm_8021X)
psta->ieee8021x_blocked = true; psta->ieee8021x_blocked = true;
......
...@@ -1020,10 +1020,10 @@ rtw_joinbss_update_stainfo(struct rtw_adapter *padapter, ...@@ -1020,10 +1020,10 @@ rtw_joinbss_update_stainfo(struct rtw_adapter *padapter,
DBG_8723A("%s\n", __func__); DBG_8723A("%s\n", __func__);
psta->aid = pnetwork->join_res; psta->aid = pnetwork->join_res;
psta->mac_id = 0; psta->mac_id = 0;
/* sta mode */ /* 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 */ /* security related */
if (padapter->securitypriv.dot11AuthAlgrthm == if (padapter->securitypriv.dot11AuthAlgrthm ==
...@@ -1394,7 +1394,7 @@ void rtw_stassoc_event_callback23a(struct rtw_adapter *adapter, const u8 *pbuf) ...@@ -1394,7 +1394,7 @@ void rtw_stassoc_event_callback23a(struct rtw_adapter *adapter, const u8 *pbuf)
/* psta->aid = (uint)pstassoc->cam_id; */ /* psta->aid = (uint)pstassoc->cam_id; */
DBG_8723A("%s\n",__func__); DBG_8723A("%s\n",__func__);
/* for ad-hoc mode */ /* 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) if (adapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X)
psta->dot118021XPrivacy = psta->dot118021XPrivacy =
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <xmit_osdep.h> #include <xmit_osdep.h>
#include <mlme_osdep.h> #include <mlme_osdep.h>
#include <sta_info.h> #include <sta_info.h>
#include <rtl8723a_hal.h>
static void _rtw_init_stainfo(struct sta_info *psta) 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) ...@@ -273,7 +274,7 @@ u32 rtw_free_stainfo23a(struct rtw_adapter *padapter, struct sta_info *psta)
spin_unlock_bh(&ppending_recvframe_queue->lock); spin_unlock_bh(&ppending_recvframe_queue->lock);
} }
if (!(psta->state & WIFI_AP_STATE)) 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 #ifdef CONFIG_8723AU_AP_MODE
spin_lock_bh(&pstapriv->auth_list_lock); spin_lock_bh(&pstapriv->auth_list_lock);
if (!list_empty(&psta->auth_list)) { if (!list_empty(&psta->auth_list)) {
......
...@@ -90,12 +90,6 @@ u8 rtw_hal_get_def_var23a(struct rtw_adapter *padapter, enum hal_def_variable eV ...@@ -90,12 +90,6 @@ u8 rtw_hal_get_def_var23a(struct rtw_adapter *padapter, enum hal_def_variable eV
return _FAIL; 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) void rtw_hal_enable_interrupt23a(struct rtw_adapter *padapter)
{ {
if (padapter->HalFunc.enable_interrupt) if (padapter->HalFunc.enable_interrupt)
......
...@@ -1577,9 +1577,9 @@ void rtl8723a_SetBeaconRelatedRegisters(struct rtw_adapter *padapter) ...@@ -1577,9 +1577,9 @@ void rtl8723a_SetBeaconRelatedRegisters(struct rtw_adapter *padapter)
SetBcnCtrlReg23a(padapter, DIS_BCNQ_SUB, 0); SetBcnCtrlReg23a(padapter, DIS_BCNQ_SUB, 0);
} }
static void rtl8723a_SetHalODMVar(struct rtw_adapter *Adapter, void rtl8723a_SetHalODMVar(struct rtw_adapter *Adapter,
enum hal_odm_variable eVariable, enum hal_odm_variable eVariable,
void *pValue1, bool bSet) void *pValue1, bool bSet)
{ {
struct hal_data_8723a *pHalData = GET_HAL_DATA(Adapter); struct hal_data_8723a *pHalData = GET_HAL_DATA(Adapter);
struct dm_odm_t *podmpriv = &pHalData->odmpriv; struct dm_odm_t *podmpriv = &pHalData->odmpriv;
...@@ -1703,8 +1703,6 @@ void rtl8723a_set_hal_ops(struct hal_ops *pHalFunc) ...@@ -1703,8 +1703,6 @@ void rtl8723a_set_hal_ops(struct hal_ops *pHalFunc)
pHalFunc->Efuse_PgPacketWrite23a = &Hal_EfusePgPacketWrite; pHalFunc->Efuse_PgPacketWrite23a = &Hal_EfusePgPacketWrite;
pHalFunc->Efuse_WordEnableDataWrite23a = &Hal_EfuseWordEnableDataWrite; pHalFunc->Efuse_WordEnableDataWrite23a = &Hal_EfuseWordEnableDataWrite;
pHalFunc->Efuse_PgPacketWrite23a_BT = &Hal_EfusePgPacketWrite_BT; pHalFunc->Efuse_PgPacketWrite23a_BT = &Hal_EfusePgPacketWrite_BT;
pHalFunc->SetHalODMVarHandler = &rtl8723a_SetHalODMVar;
} }
void rtl8723a_InitAntenna_Selection(struct rtw_adapter *padapter) void rtl8723a_InitAntenna_Selection(struct rtw_adapter *padapter)
......
...@@ -84,10 +84,6 @@ struct hal_ops { ...@@ -84,10 +84,6 @@ struct hal_ops {
enum hal_def_variable eVariable, enum hal_def_variable eVariable,
void *pValue); void *pValue);
void (*SetHalODMVarHandler)(struct rtw_adapter *padapter,
enum hal_odm_variable eVariable,
void *pValue1, bool bSet);
void (*UpdateRAMaskHandler)(struct rtw_adapter *padapter, void (*UpdateRAMaskHandler)(struct rtw_adapter *padapter,
u32 mac_id, u8 rssi_level); u32 mac_id, u8 rssi_level);
...@@ -174,10 +170,6 @@ u8 rtw_hal_get_def_var23a(struct rtw_adapter *padapter, ...@@ -174,10 +170,6 @@ u8 rtw_hal_get_def_var23a(struct rtw_adapter *padapter,
enum hal_def_variable eVariable, enum hal_def_variable eVariable,
void *pValue); 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_enable_interrupt23a(struct rtw_adapter *padapter);
void rtw_hal_disable_interrupt23a(struct rtw_adapter *padapter); void rtw_hal_disable_interrupt23a(struct rtw_adapter *padapter);
......
...@@ -550,5 +550,8 @@ void rtl8723a_read_adapter_info(struct rtw_adapter *Adapter); ...@@ -550,5 +550,8 @@ void rtl8723a_read_adapter_info(struct rtw_adapter *Adapter);
void rtl8723a_read_chip_version(struct rtw_adapter *padapter); void rtl8723a_read_chip_version(struct rtw_adapter *padapter);
void rtl8723a_notch_filter(struct rtw_adapter *adapter, bool enable); void rtl8723a_notch_filter(struct rtw_adapter *adapter, bool enable);
void rtl8723a_SetBeaconRelatedRegisters(struct rtw_adapter *padapter); void rtl8723a_SetBeaconRelatedRegisters(struct rtw_adapter *padapter);
void rtl8723a_SetHalODMVar(struct rtw_adapter *Adapter,
enum hal_odm_variable eVariable,
void *pValue1, bool bSet);
#endif #endif
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