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

staging: rtl8723au: Make direct calls to GetHalDefVar8192CUsb()

Remove another round of HAL wrapping, and remove unused
SetHalDefVar8192CUsb().
Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ac4cbc68
......@@ -2270,12 +2270,12 @@ 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,
GetHalDefVar8192CUsb(padapter, HAL_DEF_RX_PACKET_OFFSET,
&rx_packet_offset);
rtw_hal_get_def_var23a(padapter, HAL_DEF_MAX_RECVBUF_SZ,
GetHalDefVar8192CUsb(padapter, HAL_DEF_MAX_RECVBUF_SZ,
&max_recvbuf_sz);
rtw_hal_get_def_var23a(padapter, HW_VAR_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;
......
......@@ -4084,7 +4084,7 @@ 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,
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 */
......
......@@ -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);
......
......@@ -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)
......
......@@ -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,
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;
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;
}
......@@ -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__ */
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