From: Jes Sorensen Date: Fri, 16 May 2014 08:04:20 +0000 (+0200) Subject: staging: rtl8723au: Make direct calls to GetHalDefVar8192CUsb() X-Git-Tag: next-20140519~19^2~122 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=39f1a8ebbacfee86c53f7b6b1dda8e9c14e9772b;p=karo-tx-linux.git staging: rtl8723au: Make direct calls to GetHalDefVar8192CUsb() Remove another round of HAL wrapping, and remove unused SetHalDefVar8192CUsb(). Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723au/core/rtw_mlme.c b/drivers/staging/rtl8723au/core/rtw_mlme.c index b675673dd995..a7371a874573 100644 --- a/drivers/staging/rtl8723au/core/rtw_mlme.c +++ b/drivers/staging/rtl8723au/core/rtw_mlme.c @@ -2270,13 +2270,13 @@ unsigned int rtw_restructure_ht_ie23a(struct rtw_adapter *padapter, u8 *in_ie, IEEE80211_HT_CAP_SGI_20 | IEEE80211_HT_CAP_SGI_40 | IEEE80211_HT_CAP_TX_STBC | IEEE80211_HT_CAP_DSSSCCK40; - rtw_hal_get_def_var23a(padapter, HAL_DEF_RX_PACKET_OFFSET, - &rx_packet_offset); - rtw_hal_get_def_var23a(padapter, HAL_DEF_MAX_RECVBUF_SZ, - &max_recvbuf_sz); + GetHalDefVar8192CUsb(padapter, HAL_DEF_RX_PACKET_OFFSET, + &rx_packet_offset); + GetHalDefVar8192CUsb(padapter, HAL_DEF_MAX_RECVBUF_SZ, + &max_recvbuf_sz); - rtw_hal_get_def_var23a(padapter, HW_VAR_MAX_RX_AMPDU_FACTOR, - &max_rx_ampdu_factor); + GetHalDefVar8192CUsb(padapter, HW_VAR_MAX_RX_AMPDU_FACTOR, + &max_rx_ampdu_factor); ht_capie.ampdu_params_info = max_rx_ampdu_factor & 0x03; if (padapter->securitypriv.dot11PrivacyAlgrthm == _AES_) diff --git a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c index 3a9e1354b214..a769d92e4f00 100644 --- a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c @@ -4084,8 +4084,8 @@ void issue_action_BA23a(struct rtw_adapter *padapter, pframe = rtw_set_fixed_ie23a(pframe, 2, (unsigned char *)&status, &pattrib->pktlen); - rtw_hal_get_def_var23a(padapter, HW_VAR_MAX_RX_AMPDU_FACTOR, - &max_rx_ampdu_factor); + GetHalDefVar8192CUsb(padapter, HW_VAR_MAX_RX_AMPDU_FACTOR, + &max_rx_ampdu_factor); if (max_rx_ampdu_factor == IEEE80211_HT_MAX_AMPDU_64K) BA_para_set = ((le16_to_cpu(pmlmeinfo->ADDBA_req.BA_para_set) & 0x3f) | 0x1000); /* 64 buffer size */ else if (max_rx_ampdu_factor == IEEE80211_HT_MAX_AMPDU_32K) diff --git a/drivers/staging/rtl8723au/core/rtw_recv.c b/drivers/staging/rtl8723au/core/rtw_recv.c index 79a76d692df3..19b58cae8c42 100644 --- a/drivers/staging/rtl8723au/core/rtw_recv.c +++ b/drivers/staging/rtl8723au/core/rtw_recv.c @@ -1506,7 +1506,7 @@ static int validate_recv_frame(struct rtw_adapter *adapter, pattrib->privacy = ieee80211_has_protected(hdr->frame_control); pattrib->order = ieee80211_has_order(hdr->frame_control); - rtw_hal_get_def_var23a(adapter, HAL_DEF_DBG_DUMP_RXPKT, &bDumpRxPkt); + GetHalDefVar8192CUsb(adapter, HAL_DEF_DBG_DUMP_RXPKT, &bDumpRxPkt); if (unlikely(bDumpRxPkt == 1)) dump_rx_pkt(skb, type, bDumpRxPkt); diff --git a/drivers/staging/rtl8723au/hal/hal_intf.c b/drivers/staging/rtl8723au/hal/hal_intf.c index 75ddf5d5f809..1904582d3ec0 100644 --- a/drivers/staging/rtl8723au/hal/hal_intf.c +++ b/drivers/staging/rtl8723au/hal/hal_intf.c @@ -41,19 +41,6 @@ u32 rtw_hal_power_on23a(struct rtw_adapter *padapter) return _FAIL; } -u8 rtw_hal_set_def_var23a(struct rtw_adapter *padapter, enum hal_def_variable eVariable, void *pValue) -{ - if (padapter->HalFunc.SetHalDefVarHandler) - return padapter->HalFunc.SetHalDefVarHandler(padapter, eVariable, pValue); - return _FAIL; -} -u8 rtw_hal_get_def_var23a(struct rtw_adapter *padapter, enum hal_def_variable eVariable, void *pValue) -{ - if (padapter->HalFunc.GetHalDefVarHandler) - return padapter->HalFunc.GetHalDefVarHandler(padapter, eVariable, pValue); - return _FAIL; -} - void rtw_hal_enable_interrupt23a(struct rtw_adapter *padapter) { if (padapter->HalFunc.enable_interrupt) diff --git a/drivers/staging/rtl8723au/hal/usb_halinit.c b/drivers/staging/rtl8723au/hal/usb_halinit.c index db94b0c3d973..be98560f1e4f 100644 --- a/drivers/staging/rtl8723au/hal/usb_halinit.c +++ b/drivers/staging/rtl8723au/hal/usb_halinit.c @@ -1492,11 +1492,11 @@ void rtl8723a_read_adapter_info(struct rtw_adapter *Adapter) /* Description: */ /* Query setting of specified variable. */ /* */ -static u8 GetHalDefVar8192CUsb(struct rtw_adapter *Adapter, - enum hal_def_variable eVariable, void *pValue) +int GetHalDefVar8192CUsb(struct rtw_adapter *Adapter, + enum hal_def_variable eVariable, void *pValue) { - struct hal_data_8723a *pHalData = GET_HAL_DATA(Adapter); - u8 bResult = _SUCCESS; + struct hal_data_8723a *pHalData = GET_HAL_DATA(Adapter); + int bResult = _SUCCESS; switch (eVariable) { case HAL_DEF_UNDERCORATEDSMOOTHEDPWDB: @@ -1541,77 +1541,6 @@ static u8 GetHalDefVar8192CUsb(struct rtw_adapter *Adapter, return bResult; } -/* Change default setting of specified variable. */ -static u8 SetHalDefVar8192CUsb(struct rtw_adapter *Adapter, - enum hal_def_variable eVariable, void *pValue) -{ - struct hal_data_8723a *pHalData = GET_HAL_DATA(Adapter); - u8 bResult = _SUCCESS; - - switch (eVariable) { - case HAL_DEF_DBG_DUMP_RXPKT: - pHalData->bDumpRxPkt = *((u8 *)pValue); - break; - case HAL_DEF_DBG_DM_FUNC: - { - u8 dm_func = *((u8 *)pValue); - struct dm_priv *pdmpriv = &pHalData->dmpriv; - struct dm_odm_t *podmpriv = &pHalData->odmpriv; - - if (dm_func == 0) { /* disable all dynamic func */ - podmpriv->SupportAbility = DYNAMIC_FUNC_DISABLE; - DBG_8723A("==> Disable all dynamic function...\n"); - } else if (dm_func == 1) {/* disable DIG */ - podmpriv->SupportAbility &= (~DYNAMIC_BB_DIG); - DBG_8723A("==> Disable DIG...\n"); - } else if (dm_func == 2) {/* disable High power */ - podmpriv->SupportAbility &= (~DYNAMIC_BB_DYNAMIC_TXPWR); - } else if (dm_func == 3) {/* disable tx power tracking */ - podmpriv->SupportAbility &= (~DYNAMIC_RF_CALIBRATION); - DBG_8723A("==> Disable tx power tracking...\n"); - } else if (dm_func == 4) {/* disable BT coexistence */ - pdmpriv->DMFlag &= (~DYNAMIC_FUNC_BT); - } else if (dm_func == 5) {/* disable antenna diversity */ - podmpriv->SupportAbility &= (~DYNAMIC_BB_ANT_DIV); - } else if (dm_func == 6) {/* turn on all dynamic func */ - if (!(podmpriv->SupportAbility & DYNAMIC_BB_DIG)) { - struct dig_t *pDigTable = - &podmpriv->DM_DigTable; - pDigTable->CurIGValue = rtw_read8(Adapter, 0xc50); - } - pdmpriv->DMFlag |= DYNAMIC_FUNC_BT; - podmpriv->SupportAbility = DYNAMIC_ALL_FUNC_ENABLE; - DBG_8723A("==> Turn on all dynamic function...\n"); - } - } - break; - case HW_DEF_FA_CNT_DUMP: - { - u8 bRSSIDump = *((u8 *)pValue); - struct dm_odm_t *pDM_Odm = &pHalData->odmpriv; - if (bRSSIDump) - pDM_Odm->DebugComponents = ODM_COMP_DIG|ODM_COMP_FA_CNT; - else - pDM_Odm->DebugComponents = 0; - } - break; - case HW_DEF_ODM_DBG_FLAG: - { - u64 DebugComponents = *((u64 *)pValue); - struct dm_odm_t *pDM_Odm = &pHalData->odmpriv; - pDM_Odm->DebugComponents = DebugComponents; - } - break; - default: - /* RT_TRACE(COMP_INIT, DBG_TRACE, ("SetHalDefVar819xUsb(): " - "Unkown variable: %d!\n", eVariable)); */ - bResult = _FAIL; - break; - } - - return bResult; -} - void rtl8723a_update_ramask(struct rtw_adapter *padapter, u32 mac_id, u8 rssi_level) { @@ -1776,7 +1705,5 @@ int rtl8723au_set_hal_ops(struct rtw_adapter *padapter) pHalFunc->InitSwLeds = NULL; pHalFunc->DeInitSwLeds = NULL; - pHalFunc->GetHalDefVarHandler = &GetHalDefVar8192CUsb; - pHalFunc->SetHalDefVarHandler = &SetHalDefVar8192CUsb; return 0; } diff --git a/drivers/staging/rtl8723au/include/hal_intf.h b/drivers/staging/rtl8723au/include/hal_intf.h index 56629f5dd57e..f69e9339fac3 100644 --- a/drivers/staging/rtl8723au/include/hal_intf.h +++ b/drivers/staging/rtl8723au/include/hal_intf.h @@ -69,13 +69,6 @@ struct hal_ops { void (*enable_interrupt)(struct rtw_adapter *padapter); void (*disable_interrupt)(struct rtw_adapter *padapter); s32 (*interrupt_handler)(struct rtw_adapter *padapter); - - u8 (*GetHalDefVarHandler)(struct rtw_adapter *padapter, - enum hal_def_variable eVariable, - void *pValue); - u8 (*SetHalDefVarHandler)(struct rtw_adapter *padapter, - enum hal_def_variable eVariable, - void *pValue); }; enum rt_eeprom_type { @@ -129,13 +122,6 @@ int rtw_hal_init23a(struct rtw_adapter *padapter); int rtw_hal_deinit23a(struct rtw_adapter *padapter); void rtw_hal_stop(struct rtw_adapter *padapter); -u8 rtw_hal_set_def_var23a(struct rtw_adapter *padapter, - enum hal_def_variable eVariable, - void *pValue); -u8 rtw_hal_get_def_var23a(struct rtw_adapter *padapter, - enum hal_def_variable eVariable, - void *pValue); - void rtw_hal_enable_interrupt23a(struct rtw_adapter *padapter); void rtw_hal_disable_interrupt23a(struct rtw_adapter *padapter); @@ -151,4 +137,7 @@ void hw_var_set_macaddr(struct rtw_adapter *padapter, u8 *val); void hw_var_set_bssid(struct rtw_adapter *padapter, u8 *val); void hw_var_set_mlme_join(struct rtw_adapter *padapter, u8 type); +int GetHalDefVar8192CUsb(struct rtw_adapter *Adapter, + enum hal_def_variable eVariable, void *pValue); + #endif /* __HAL_INTF_H__ */