From: Jes Sorensen Date: Fri, 16 May 2014 08:04:13 +0000 (+0200) Subject: staging: rtl8723au: Disentangle set_odm_var() from the HAL wrappers X-Git-Tag: v4.14-rc1~7083^2~39^2~811 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dbe9849cd41dfc66921fb18e9334f78f440b9221;p=platform%2Fkernel%2Flinux-rpi.git staging: rtl8723au: Disentangle set_odm_var() from the HAL wrappers Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723au/core/rtw_ap.c b/drivers/staging/rtl8723au/core/rtw_ap.c index 4b23948..0b7a4a6 100644 --- a/drivers/staging/rtl8723au/core/rtw_ap.c +++ b/drivers/staging/rtl8723au/core/rtw_ap.c @@ -19,6 +19,7 @@ #include #include #include +#include #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; diff --git a/drivers/staging/rtl8723au/core/rtw_mlme.c b/drivers/staging/rtl8723au/core/rtw_mlme.c index b1f1fd6..b675673 100644 --- a/drivers/staging/rtl8723au/core/rtw_mlme.c +++ b/drivers/staging/rtl8723au/core/rtw_mlme.c @@ -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 = diff --git a/drivers/staging/rtl8723au/core/rtw_sta_mgt.c b/drivers/staging/rtl8723au/core/rtw_sta_mgt.c index 7f1f66c..148bb4a 100644 --- a/drivers/staging/rtl8723au/core/rtw_sta_mgt.c +++ b/drivers/staging/rtl8723au/core/rtw_sta_mgt.c @@ -20,6 +20,7 @@ #include #include #include +#include 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)) { diff --git a/drivers/staging/rtl8723au/hal/hal_intf.c b/drivers/staging/rtl8723au/hal/hal_intf.c index 1bdebef..2a5c9cc 100644 --- a/drivers/staging/rtl8723au/hal/hal_intf.c +++ b/drivers/staging/rtl8723au/hal/hal_intf.c @@ -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) diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c index 971826a..5ee4923 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c @@ -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) diff --git a/drivers/staging/rtl8723au/include/hal_intf.h b/drivers/staging/rtl8723au/include/hal_intf.h index 5186899..9ffcbb8 100644 --- a/drivers/staging/rtl8723au/include/hal_intf.h +++ b/drivers/staging/rtl8723au/include/hal_intf.h @@ -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); diff --git a/drivers/staging/rtl8723au/include/rtl8723a_hal.h b/drivers/staging/rtl8723au/include/rtl8723a_hal.h index 5ee9fb7..da1a882 100644 --- a/drivers/staging/rtl8723au/include/rtl8723a_hal.h +++ b/drivers/staging/rtl8723au/include/rtl8723a_hal.h @@ -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