Commit 177aa53a authored by Ivan Safonov's avatar Ivan Safonov Committed by Greg Kroah-Hartman

staging: r8188eu: remove GET_HAL_DATA macro

GET_HAL_DATA replaced by its definition.
Signed-off-by: default avatarIvan Safonov <insafonov@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bc15ada3
...@@ -18,16 +18,14 @@ ...@@ -18,16 +18,14 @@
void rtw_hal_sreset_init(struct adapter *padapter) void rtw_hal_sreset_init(struct adapter *padapter)
{ {
struct hal_data_8188e *pHalData = GET_HAL_DATA(padapter); struct sreset_priv *psrtpriv = &padapter->HalData->srestpriv;
struct sreset_priv *psrtpriv = &pHalData->srestpriv;
psrtpriv->Wifi_Error_Status = WIFI_STATUS_SUCCESS; psrtpriv->Wifi_Error_Status = WIFI_STATUS_SUCCESS;
} }
u8 sreset_get_wifi_status(struct adapter *padapter) u8 sreset_get_wifi_status(struct adapter *padapter)
{ {
struct hal_data_8188e *pHalData = GET_HAL_DATA(padapter); struct sreset_priv *psrtpriv = &padapter->HalData->srestpriv;
struct sreset_priv *psrtpriv = &pHalData->srestpriv;
u8 status = WIFI_STATUS_SUCCESS; u8 status = WIFI_STATUS_SUCCESS;
u32 val32 = 0; u32 val32 = 0;
...@@ -54,6 +52,5 @@ u8 sreset_get_wifi_status(struct adapter *padapter) ...@@ -54,6 +52,5 @@ u8 sreset_get_wifi_status(struct adapter *padapter)
void sreset_set_wifi_error_status(struct adapter *padapter, u32 status) void sreset_set_wifi_error_status(struct adapter *padapter, u32 status)
{ {
struct hal_data_8188e *pHalData = GET_HAL_DATA(padapter); padapter->HalData->srestpriv.Wifi_Error_Status = status;
pHalData->srestpriv.Wifi_Error_Status = status;
} }
...@@ -498,7 +498,7 @@ static u32 array_phy_reg_pg_8188e[] = { ...@@ -498,7 +498,7 @@ static u32 array_phy_reg_pg_8188e[] = {
static void store_pwrindex_offset(struct adapter *adapter, static void store_pwrindex_offset(struct adapter *adapter,
u32 regaddr, u32 bitmask, u32 data) u32 regaddr, u32 bitmask, u32 data)
{ {
struct hal_data_8188e *hal_data = GET_HAL_DATA(adapter); struct hal_data_8188e *hal_data = adapter->HalData;
u32 * const power_level_offset = u32 * const power_level_offset =
hal_data->MCSTxPowerLevelOriginalOffset[hal_data->pwrGroupCnt]; hal_data->MCSTxPowerLevelOriginalOffset[hal_data->pwrGroupCnt];
...@@ -588,11 +588,10 @@ static bool config_bb_with_pgheader(struct adapter *adapt) ...@@ -588,11 +588,10 @@ static bool config_bb_with_pgheader(struct adapter *adapt)
static void rtl88e_phy_init_bb_rf_register_definition(struct adapter *adapter) static void rtl88e_phy_init_bb_rf_register_definition(struct adapter *adapter)
{ {
struct hal_data_8188e *hal_data = GET_HAL_DATA(adapter);
struct bb_reg_def *reg[4]; struct bb_reg_def *reg[4];
reg[RF_PATH_A] = &hal_data->PHYRegDef[RF_PATH_A]; reg[RF_PATH_A] = &adapter->HalData->PHYRegDef[RF_PATH_A];
reg[RF_PATH_B] = &hal_data->PHYRegDef[RF_PATH_B]; reg[RF_PATH_B] = &adapter->HalData->PHYRegDef[RF_PATH_B];
reg[RF_PATH_A]->rfintfs = rFPGA0_XAB_RFInterfaceSW; reg[RF_PATH_A]->rfintfs = rFPGA0_XAB_RFInterfaceSW;
reg[RF_PATH_B]->rfintfs = rFPGA0_XAB_RFInterfaceSW; reg[RF_PATH_B]->rfintfs = rFPGA0_XAB_RFInterfaceSW;
...@@ -652,13 +651,12 @@ static void rtl88e_phy_init_bb_rf_register_definition(struct adapter *adapter) ...@@ -652,13 +651,12 @@ static void rtl88e_phy_init_bb_rf_register_definition(struct adapter *adapter)
static bool config_parafile(struct adapter *adapt) static bool config_parafile(struct adapter *adapt)
{ {
struct eeprom_priv *eeprom = GET_EEPROM_EFUSE_PRIV(adapt); struct eeprom_priv *eeprom = GET_EEPROM_EFUSE_PRIV(adapt);
struct hal_data_8188e *hal_data = GET_HAL_DATA(adapt);
set_baseband_phy_config(adapt); set_baseband_phy_config(adapt);
/* If EEPROM or EFUSE autoload OK, We must config by PHY_REG_PG.txt */ /* If EEPROM or EFUSE autoload OK, We must config by PHY_REG_PG.txt */
if (!eeprom->bautoload_fail_flag) { if (!eeprom->bautoload_fail_flag) {
hal_data->pwrGroupCnt = 0; adapt->HalData->pwrGroupCnt = 0;
config_bb_with_pgheader(adapt); config_bb_with_pgheader(adapt);
} }
set_baseband_agc_config(adapt); set_baseband_agc_config(adapt);
...@@ -668,7 +666,6 @@ static bool config_parafile(struct adapter *adapt) ...@@ -668,7 +666,6 @@ static bool config_parafile(struct adapter *adapt)
bool rtl88eu_phy_bb_config(struct adapter *adapt) bool rtl88eu_phy_bb_config(struct adapter *adapt)
{ {
int rtstatus = true; int rtstatus = true;
struct hal_data_8188e *hal_data = GET_HAL_DATA(adapt);
u32 regval; u32 regval;
u8 crystal_cap; u8 crystal_cap;
...@@ -688,7 +685,7 @@ bool rtl88eu_phy_bb_config(struct adapter *adapt) ...@@ -688,7 +685,7 @@ bool rtl88eu_phy_bb_config(struct adapter *adapt)
rtstatus = config_parafile(adapt); rtstatus = config_parafile(adapt);
/* write 0x24[16:11] = 0x24[22:17] = crystal_cap */ /* write 0x24[16:11] = 0x24[22:17] = crystal_cap */
crystal_cap = hal_data->CrystalCap & 0x3F; crystal_cap = adapt->HalData->CrystalCap & 0x3F;
phy_set_bb_reg(adapt, REG_AFE_XTAL_CTRL, 0x7ff800, phy_set_bb_reg(adapt, REG_AFE_XTAL_CTRL, 0x7ff800,
(crystal_cap | (crystal_cap << 6))); (crystal_cap | (crystal_cap << 6)));
......
...@@ -912,8 +912,7 @@ bool ODM_RAStateCheck(struct odm_dm_struct *pDM_Odm, s32 RSSI, bool bForceUpdate ...@@ -912,8 +912,7 @@ bool ODM_RAStateCheck(struct odm_dm_struct *pDM_Odm, s32 RSSI, bool bForceUpdate
void odm_DynamicTxPowerInit(struct odm_dm_struct *pDM_Odm) void odm_DynamicTxPowerInit(struct odm_dm_struct *pDM_Odm)
{ {
struct adapter *Adapter = pDM_Odm->Adapter; struct adapter *Adapter = pDM_Odm->Adapter;
struct hal_data_8188e *pHalData = GET_HAL_DATA(Adapter); struct dm_priv *pdmpriv = &Adapter->HalData->dmpriv;
struct dm_priv *pdmpriv = &pHalData->dmpriv;
pdmpriv->bDynamicTxPowerEnable = false; pdmpriv->bDynamicTxPowerEnable = false;
pdmpriv->LastDTPLvl = TxHighPwrLevel_Normal; pdmpriv->LastDTPLvl = TxHighPwrLevel_Normal;
pdmpriv->DynamicTxHighPowerLvl = TxHighPwrLevel_Normal; pdmpriv->DynamicTxHighPowerLvl = TxHighPwrLevel_Normal;
...@@ -938,8 +937,7 @@ void odm_RSSIMonitorCheck(struct odm_dm_struct *pDM_Odm) ...@@ -938,8 +937,7 @@ void odm_RSSIMonitorCheck(struct odm_dm_struct *pDM_Odm)
static void FindMinimumRSSI(struct adapter *pAdapter) static void FindMinimumRSSI(struct adapter *pAdapter)
{ {
struct hal_data_8188e *pHalData = GET_HAL_DATA(pAdapter); struct dm_priv *pdmpriv = &pAdapter->HalData->dmpriv;
struct dm_priv *pdmpriv = &pHalData->dmpriv;
/* 1 1.Unconditionally set RSSI */ /* 1 1.Unconditionally set RSSI */
pdmpriv->MinUndecoratedPWDBForDM = pdmpriv->EntryMinUndecoratedSmoothedPWDB; pdmpriv->MinUndecoratedPWDBForDM = pdmpriv->EntryMinUndecoratedSmoothedPWDB;
...@@ -948,8 +946,7 @@ static void FindMinimumRSSI(struct adapter *pAdapter) ...@@ -948,8 +946,7 @@ static void FindMinimumRSSI(struct adapter *pAdapter)
void odm_RSSIMonitorCheckCE(struct odm_dm_struct *pDM_Odm) void odm_RSSIMonitorCheckCE(struct odm_dm_struct *pDM_Odm)
{ {
struct adapter *Adapter = pDM_Odm->Adapter; struct adapter *Adapter = pDM_Odm->Adapter;
struct hal_data_8188e *pHalData = GET_HAL_DATA(Adapter); struct dm_priv *pdmpriv = &Adapter->HalData->dmpriv;
struct dm_priv *pdmpriv = &pHalData->dmpriv;
int i; int i;
int tmpEntryMaxPWDB = 0, tmpEntryMinPWDB = 0xff; int tmpEntryMaxPWDB = 0, tmpEntryMinPWDB = 0xff;
u8 sta_cnt = 0; u8 sta_cnt = 0;
...@@ -978,7 +975,7 @@ void odm_RSSIMonitorCheckCE(struct odm_dm_struct *pDM_Odm) ...@@ -978,7 +975,7 @@ void odm_RSSIMonitorCheckCE(struct odm_dm_struct *pDM_Odm)
for (i = 0; i < sta_cnt; i++) { for (i = 0; i < sta_cnt; i++) {
if (PWDB_rssi[i] != 0) { if (PWDB_rssi[i] != 0) {
ODM_RA_SetRSSI_8188E(&pHalData->odmpriv, ODM_RA_SetRSSI_8188E(&Adapter->HalData->odmpriv,
PWDB_rssi[i] & 0xFF, PWDB_rssi[i] & 0xFF,
(PWDB_rssi[i] >> 16) & 0xFF); (PWDB_rssi[i] >> 16) & 0xFF);
} }
...@@ -995,7 +992,7 @@ void odm_RSSIMonitorCheckCE(struct odm_dm_struct *pDM_Odm) ...@@ -995,7 +992,7 @@ void odm_RSSIMonitorCheckCE(struct odm_dm_struct *pDM_Odm)
pdmpriv->EntryMinUndecoratedSmoothedPWDB = 0; pdmpriv->EntryMinUndecoratedSmoothedPWDB = 0;
FindMinimumRSSI(Adapter); FindMinimumRSSI(Adapter);
pHalData->odmpriv.RSSI_Min = pdmpriv->MinUndecoratedPWDBForDM; Adapter->HalData->odmpriv.RSSI_Min = pdmpriv->MinUndecoratedPWDBForDM;
} }
/* 3============================================================ */ /* 3============================================================ */
...@@ -1105,7 +1102,6 @@ void odm_EdcaTurboCheckCE(struct odm_dm_struct *pDM_Odm) ...@@ -1105,7 +1102,6 @@ void odm_EdcaTurboCheckCE(struct odm_dm_struct *pDM_Odm)
u64 cur_tx_bytes = 0; u64 cur_tx_bytes = 0;
u64 cur_rx_bytes = 0; u64 cur_rx_bytes = 0;
u8 bbtchange = false; u8 bbtchange = false;
struct hal_data_8188e *pHalData = GET_HAL_DATA(Adapter);
struct xmit_priv *pxmitpriv = &(Adapter->xmitpriv); struct xmit_priv *pxmitpriv = &(Adapter->xmitpriv);
struct recv_priv *precvpriv = &(Adapter->recvpriv); struct recv_priv *precvpriv = &(Adapter->recvpriv);
struct registry_priv *pregpriv = &Adapter->registrypriv; struct registry_priv *pregpriv = &Adapter->registrypriv;
...@@ -1159,7 +1155,8 @@ void odm_EdcaTurboCheckCE(struct odm_dm_struct *pDM_Odm) ...@@ -1159,7 +1155,8 @@ void odm_EdcaTurboCheckCE(struct odm_dm_struct *pDM_Odm)
/* Turn Off EDCA turbo here. */ /* Turn Off EDCA turbo here. */
/* Restore original EDCA according to the declaration of AP. */ /* Restore original EDCA according to the declaration of AP. */
if (pDM_Odm->DM_EDCA_Table.bCurrentTurboEDCA) { if (pDM_Odm->DM_EDCA_Table.bCurrentTurboEDCA) {
usb_write32(Adapter, REG_EDCA_BE_PARAM, pHalData->AcParam_BE); usb_write32(Adapter, REG_EDCA_BE_PARAM,
Adapter->HalData->AcParam_BE);
pDM_Odm->DM_EDCA_Table.bCurrentTurboEDCA = false; pDM_Odm->DM_EDCA_Table.bCurrentTurboEDCA = false;
} }
} }
......
...@@ -65,8 +65,7 @@ static u32 rf_serial_read(struct adapter *adapt, ...@@ -65,8 +65,7 @@ static u32 rf_serial_read(struct adapter *adapt,
enum rf_radio_path rfpath, u32 offset) enum rf_radio_path rfpath, u32 offset)
{ {
u32 ret = 0; u32 ret = 0;
struct hal_data_8188e *hal_data = GET_HAL_DATA(adapt); struct bb_reg_def *phyreg = &adapt->HalData->PHYRegDef[rfpath];
struct bb_reg_def *phyreg = &hal_data->PHYRegDef[rfpath];
u32 tmplong, tmplong2; u32 tmplong, tmplong2;
u8 rfpi_enable = 0; u8 rfpi_enable = 0;
...@@ -110,8 +109,7 @@ static void rf_serial_write(struct adapter *adapt, ...@@ -110,8 +109,7 @@ static void rf_serial_write(struct adapter *adapt,
u32 data) u32 data)
{ {
u32 data_and_addr = 0; u32 data_and_addr = 0;
struct hal_data_8188e *hal_data = GET_HAL_DATA(adapt); struct bb_reg_def *phyreg = &adapt->HalData->PHYRegDef[rfpath];
struct bb_reg_def *phyreg = &hal_data->PHYRegDef[rfpath];
offset &= 0xff; offset &= 0xff;
data_and_addr = ((offset<<20) | (data&0x000fffff)) & 0x0fffffff; data_and_addr = ((offset<<20) | (data&0x000fffff)) & 0x0fffffff;
...@@ -147,7 +145,7 @@ void phy_set_rf_reg(struct adapter *adapt, enum rf_radio_path rf_path, ...@@ -147,7 +145,7 @@ void phy_set_rf_reg(struct adapter *adapt, enum rf_radio_path rf_path,
static void get_tx_power_index(struct adapter *adapt, u8 channel, u8 *cck_pwr, static void get_tx_power_index(struct adapter *adapt, u8 channel, u8 *cck_pwr,
u8 *ofdm_pwr, u8 *bw20_pwr, u8 *bw40_pwr) u8 *ofdm_pwr, u8 *bw20_pwr, u8 *bw40_pwr)
{ {
struct hal_data_8188e *hal_data = GET_HAL_DATA(adapt); struct hal_data_8188e *hal_data = adapt->HalData;
u8 index = (channel - 1); u8 index = (channel - 1);
u8 TxCount = 0, path_nums; u8 TxCount = 0, path_nums;
...@@ -183,7 +181,7 @@ static void phy_power_index_check(struct adapter *adapt, u8 channel, ...@@ -183,7 +181,7 @@ static void phy_power_index_check(struct adapter *adapt, u8 channel,
u8 *cck_pwr, u8 *ofdm_pwr, u8 *bw20_pwr, u8 *cck_pwr, u8 *ofdm_pwr, u8 *bw20_pwr,
u8 *bw40_pwr) u8 *bw40_pwr)
{ {
struct hal_data_8188e *hal_data = GET_HAL_DATA(adapt); struct hal_data_8188e *hal_data = adapt->HalData;
hal_data->CurrentCckTxPwrIdx = cck_pwr[0]; hal_data->CurrentCckTxPwrIdx = cck_pwr[0];
hal_data->CurrentOfdm24GTxPwrIdx = ofdm_pwr[0]; hal_data->CurrentOfdm24GTxPwrIdx = ofdm_pwr[0];
...@@ -211,7 +209,7 @@ void phy_set_tx_power_level(struct adapter *adapt, u8 channel) ...@@ -211,7 +209,7 @@ void phy_set_tx_power_level(struct adapter *adapt, u8 channel)
static void phy_set_bw_mode_callback(struct adapter *adapt) static void phy_set_bw_mode_callback(struct adapter *adapt)
{ {
struct hal_data_8188e *hal_data = GET_HAL_DATA(adapt); struct hal_data_8188e *hal_data = adapt->HalData;
u8 reg_bw_opmode; u8 reg_bw_opmode;
u8 reg_prsr_rsc; u8 reg_prsr_rsc;
...@@ -277,7 +275,7 @@ static void phy_set_bw_mode_callback(struct adapter *adapt) ...@@ -277,7 +275,7 @@ static void phy_set_bw_mode_callback(struct adapter *adapt)
void rtw_hal_set_bwmode(struct adapter *adapt, enum ht_channel_width bandwidth, void rtw_hal_set_bwmode(struct adapter *adapt, enum ht_channel_width bandwidth,
unsigned char offset) unsigned char offset)
{ {
struct hal_data_8188e *hal_data = GET_HAL_DATA(adapt); struct hal_data_8188e *hal_data = adapt->HalData;
enum ht_channel_width tmp_bw = hal_data->CurrentChannelBW; enum ht_channel_width tmp_bw = hal_data->CurrentChannelBW;
hal_data->CurrentChannelBW = bandwidth; hal_data->CurrentChannelBW = bandwidth;
...@@ -293,7 +291,7 @@ static void phy_sw_chnl_callback(struct adapter *adapt, u8 channel) ...@@ -293,7 +291,7 @@ static void phy_sw_chnl_callback(struct adapter *adapt, u8 channel)
{ {
u8 rf_path; u8 rf_path;
u32 param1, param2; u32 param1, param2;
struct hal_data_8188e *hal_data = GET_HAL_DATA(adapt); struct hal_data_8188e *hal_data = adapt->HalData;
phy_set_tx_power_level(adapt, channel); phy_set_tx_power_level(adapt, channel);
...@@ -309,7 +307,7 @@ static void phy_sw_chnl_callback(struct adapter *adapt, u8 channel) ...@@ -309,7 +307,7 @@ static void phy_sw_chnl_callback(struct adapter *adapt, u8 channel)
void rtw_hal_set_chan(struct adapter *adapt, u8 channel) void rtw_hal_set_chan(struct adapter *adapt, u8 channel)
{ {
struct hal_data_8188e *hal_data = GET_HAL_DATA(adapt); struct hal_data_8188e *hal_data = adapt->HalData;
u8 tmpchannel = hal_data->CurrentChannel; u8 tmpchannel = hal_data->CurrentChannel;
if (hal_data->rf_chip == RF_PSEUDO_11N) if (hal_data->rf_chip == RF_PSEUDO_11N)
...@@ -404,7 +402,7 @@ static void dm_txpwr_track_setpwr(struct odm_dm_struct *dm_odm) ...@@ -404,7 +402,7 @@ static void dm_txpwr_track_setpwr(struct odm_dm_struct *dm_odm)
void rtl88eu_dm_txpower_tracking_callback_thermalmeter(struct adapter *adapt) void rtl88eu_dm_txpower_tracking_callback_thermalmeter(struct adapter *adapt)
{ {
struct hal_data_8188e *hal_data = GET_HAL_DATA(adapt); struct hal_data_8188e *hal_data = adapt->HalData;
u8 thermal_val = 0, delta, delta_lck, delta_iqk, offset; u8 thermal_val = 0, delta, delta_lck, delta_iqk, offset;
u8 thermal_avg_count = 0; u8 thermal_avg_count = 0;
u32 thermal_avg = 0; u32 thermal_avg = 0;
...@@ -629,8 +627,7 @@ static u8 phy_path_a_rx_iqk(struct adapter *adapt, bool configPathB) ...@@ -629,8 +627,7 @@ static u8 phy_path_a_rx_iqk(struct adapter *adapt, bool configPathB)
{ {
u32 reg_eac, reg_e94, reg_e9c, reg_ea4, u4tmp; u32 reg_eac, reg_e94, reg_e9c, reg_ea4, u4tmp;
u8 result = 0x00; u8 result = 0x00;
struct hal_data_8188e *hal_data = GET_HAL_DATA(adapt); struct odm_dm_struct *dm_odm = &adapt->HalData->odmpriv;
struct odm_dm_struct *dm_odm = &hal_data->odmpriv;
/* 1 Get TXIMR setting */ /* 1 Get TXIMR setting */
/* modify RXIQK mode table */ /* modify RXIQK mode table */
...@@ -734,8 +731,7 @@ static u8 phy_path_b_iqk(struct adapter *adapt) ...@@ -734,8 +731,7 @@ static u8 phy_path_b_iqk(struct adapter *adapt)
{ {
u32 regeac, regeb4, regebc, regec4, regecc; u32 regeac, regeb4, regebc, regec4, regecc;
u8 result = 0x00; u8 result = 0x00;
struct hal_data_8188e *hal_data = GET_HAL_DATA(adapt); struct odm_dm_struct *dm_odm = &adapt->HalData->odmpriv;
struct odm_dm_struct *dm_odm = &hal_data->odmpriv;
/* One shot, path B LOK & IQK */ /* One shot, path B LOK & IQK */
phy_set_bb_reg(adapt, rIQK_AGC_Cont, bMaskDWord, 0x00000002); phy_set_bb_reg(adapt, rIQK_AGC_Cont, bMaskDWord, 0x00000002);
...@@ -951,8 +947,7 @@ static bool simularity_compare(struct adapter *adapt, s32 resulta[][8], ...@@ -951,8 +947,7 @@ static bool simularity_compare(struct adapter *adapt, s32 resulta[][8],
u8 c1, u8 c2) u8 c1, u8 c2)
{ {
u32 i, j, diff, sim_bitmap = 0, bound; u32 i, j, diff, sim_bitmap = 0, bound;
struct hal_data_8188e *hal_data = GET_HAL_DATA(adapt); struct odm_dm_struct *dm_odm = &adapt->HalData->odmpriv;
struct odm_dm_struct *dm_odm = &hal_data->odmpriv;
u8 final_candidate[2] = {0xFF, 0xFF}; /* for path A and path B */ u8 final_candidate[2] = {0xFF, 0xFF}; /* for path A and path B */
bool result = true; bool result = true;
s32 tmp1 = 0, tmp2 = 0; s32 tmp1 = 0, tmp2 = 0;
...@@ -1030,8 +1025,7 @@ static bool simularity_compare(struct adapter *adapt, s32 resulta[][8], ...@@ -1030,8 +1025,7 @@ static bool simularity_compare(struct adapter *adapt, s32 resulta[][8],
static void phy_iq_calibrate(struct adapter *adapt, s32 result[][8], static void phy_iq_calibrate(struct adapter *adapt, s32 result[][8],
u8 t, bool is2t) u8 t, bool is2t)
{ {
struct hal_data_8188e *hal_data = GET_HAL_DATA(adapt); struct odm_dm_struct *dm_odm = &adapt->HalData->odmpriv;
struct odm_dm_struct *dm_odm = &hal_data->odmpriv;
u32 i; u32 i;
u8 path_a_ok, path_b_ok; u8 path_a_ok, path_b_ok;
u32 adda_reg[IQK_ADDA_REG_NUM] = { u32 adda_reg[IQK_ADDA_REG_NUM] = {
...@@ -1276,8 +1270,7 @@ static void phy_lc_calibrate(struct adapter *adapt, bool is2t) ...@@ -1276,8 +1270,7 @@ static void phy_lc_calibrate(struct adapter *adapt, bool is2t)
void rtl88eu_phy_iq_calibrate(struct adapter *adapt, bool recovery) void rtl88eu_phy_iq_calibrate(struct adapter *adapt, bool recovery)
{ {
struct hal_data_8188e *hal_data = GET_HAL_DATA(adapt); struct odm_dm_struct *dm_odm = &adapt->HalData->odmpriv;
struct odm_dm_struct *dm_odm = &hal_data->odmpriv;
s32 result[4][8]; s32 result[4][8];
u8 i, final, chn_index; u8 i, final, chn_index;
bool pathaok, pathbok; bool pathaok, pathbok;
...@@ -1388,7 +1381,7 @@ void rtl88eu_phy_iq_calibrate(struct adapter *adapt, bool recovery) ...@@ -1388,7 +1381,7 @@ void rtl88eu_phy_iq_calibrate(struct adapter *adapt, bool recovery)
(reg_ec4 == 0)); (reg_ec4 == 0));
} }
chn_index = get_right_chnl_for_iqk(hal_data->CurrentChannel); chn_index = get_right_chnl_for_iqk(adapt->HalData->CurrentChannel);
if (final < 4) { if (final < 4) {
for (i = 0; i < IQK_Matrix_REG_NUM; i++) for (i = 0; i < IQK_Matrix_REG_NUM; i++)
...@@ -1404,8 +1397,7 @@ void rtl88eu_phy_lc_calibrate(struct adapter *adapt) ...@@ -1404,8 +1397,7 @@ void rtl88eu_phy_lc_calibrate(struct adapter *adapt)
{ {
bool singletone = false, carrier_sup = false; bool singletone = false, carrier_sup = false;
u32 timeout = 2000, timecount = 0; u32 timeout = 2000, timecount = 0;
struct hal_data_8188e *hal_data = GET_HAL_DATA(adapt); struct odm_dm_struct *dm_odm = &adapt->HalData->odmpriv;
struct odm_dm_struct *dm_odm = &hal_data->odmpriv;
if (!(dm_odm->SupportAbility & ODM_RF_CALIBRATION)) if (!(dm_odm->SupportAbility & ODM_RF_CALIBRATION))
return; return;
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
void rtl88eu_phy_rf6052_set_bandwidth(struct adapter *adapt, void rtl88eu_phy_rf6052_set_bandwidth(struct adapter *adapt,
enum ht_channel_width bandwidth) enum ht_channel_width bandwidth)
{ {
struct hal_data_8188e *hal_data = GET_HAL_DATA(adapt); struct hal_data_8188e *hal_data = adapt->HalData;
switch (bandwidth) { switch (bandwidth) {
case HT_CHANNEL_WIDTH_20: case HT_CHANNEL_WIDTH_20:
...@@ -44,7 +44,7 @@ void rtl88eu_phy_rf6052_set_bandwidth(struct adapter *adapt, ...@@ -44,7 +44,7 @@ void rtl88eu_phy_rf6052_set_bandwidth(struct adapter *adapt,
void rtl88eu_phy_rf6052_set_cck_txpower(struct adapter *adapt, u8 *powerlevel) void rtl88eu_phy_rf6052_set_cck_txpower(struct adapter *adapt, u8 *powerlevel)
{ {
struct hal_data_8188e *hal_data = GET_HAL_DATA(adapt); struct hal_data_8188e *hal_data = adapt->HalData;
struct dm_priv *pdmpriv = &hal_data->dmpriv; struct dm_priv *pdmpriv = &hal_data->dmpriv;
struct mlme_ext_priv *pmlmeext = &adapt->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &adapt->mlmeextpriv;
u32 tx_agc[2] = {0, 0}, tmpval = 0, pwrtrac_value; u32 tx_agc[2] = {0, 0}, tmpval = 0, pwrtrac_value;
...@@ -129,7 +129,6 @@ static void getpowerbase88e(struct adapter *adapt, u8 *pwr_level_ofdm, ...@@ -129,7 +129,6 @@ static void getpowerbase88e(struct adapter *adapt, u8 *pwr_level_ofdm,
u8 *pwr_level_bw20, u8 *pwr_level_bw40, u8 *pwr_level_bw20, u8 *pwr_level_bw40,
u8 channel, u32 *ofdmbase, u32 *mcs_base) u8 channel, u32 *ofdmbase, u32 *mcs_base)
{ {
struct hal_data_8188e *hal_data = GET_HAL_DATA(adapt);
u32 powerbase0, powerbase1; u32 powerbase0, powerbase1;
u8 i, powerlevel[2]; u8 i, powerlevel[2];
...@@ -140,9 +139,9 @@ static void getpowerbase88e(struct adapter *adapt, u8 *pwr_level_ofdm, ...@@ -140,9 +139,9 @@ static void getpowerbase88e(struct adapter *adapt, u8 *pwr_level_ofdm,
(powerbase0<<8) | powerbase0; (powerbase0<<8) | powerbase0;
*(ofdmbase+i) = powerbase0; *(ofdmbase+i) = powerbase0;
} }
for (i = 0; i < hal_data->NumTotalRFPath; i++) { for (i = 0; i < adapt->HalData->NumTotalRFPath; i++) {
/* Check HT20 to HT40 diff */ /* Check HT20 to HT40 diff */
if (hal_data->CurrentChannelBW == HT_CHANNEL_WIDTH_20) if (adapt->HalData->CurrentChannelBW == HT_CHANNEL_WIDTH_20)
powerlevel[i] = pwr_level_bw20[i]; powerlevel[i] = pwr_level_bw20[i];
else else
powerlevel[i] = pwr_level_bw40[i]; powerlevel[i] = pwr_level_bw40[i];
...@@ -156,7 +155,7 @@ static void get_rx_power_val_by_reg(struct adapter *adapt, u8 channel, ...@@ -156,7 +155,7 @@ static void get_rx_power_val_by_reg(struct adapter *adapt, u8 channel,
u8 index, u32 *powerbase0, u32 *powerbase1, u8 index, u32 *powerbase0, u32 *powerbase1,
u32 *out_val) u32 *out_val)
{ {
struct hal_data_8188e *hal_data = GET_HAL_DATA(adapt); struct hal_data_8188e *hal_data = adapt->HalData;
struct dm_priv *pdmpriv = &hal_data->dmpriv; struct dm_priv *pdmpriv = &hal_data->dmpriv;
u8 i, chnlGroup = 0, pwr_diff_limit[4], customer_pwr_limit; u8 i, chnlGroup = 0, pwr_diff_limit[4], customer_pwr_limit;
s8 pwr_diff = 0; s8 pwr_diff = 0;
...@@ -286,7 +285,6 @@ void rtl88eu_phy_rf6052_set_ofdm_txpower(struct adapter *adapt, ...@@ -286,7 +285,6 @@ void rtl88eu_phy_rf6052_set_ofdm_txpower(struct adapter *adapt,
u8 *pwr_level_bw20, u8 *pwr_level_bw20,
u8 *pwr_level_bw40, u8 channel) u8 *pwr_level_bw40, u8 channel)
{ {
struct hal_data_8188e *hal_data = GET_HAL_DATA(adapt);
u32 write_val[2], powerbase0[2], powerbase1[2], pwrtrac_value; u32 write_val[2], powerbase0[2], powerbase1[2], pwrtrac_value;
u8 direction; u8 direction;
u8 index = 0; u8 index = 0;
...@@ -294,8 +292,8 @@ void rtl88eu_phy_rf6052_set_ofdm_txpower(struct adapter *adapt, ...@@ -294,8 +292,8 @@ void rtl88eu_phy_rf6052_set_ofdm_txpower(struct adapter *adapt,
getpowerbase88e(adapt, pwr_level_ofdm, pwr_level_bw20, pwr_level_bw40, getpowerbase88e(adapt, pwr_level_ofdm, pwr_level_bw20, pwr_level_bw40,
channel, &powerbase0[0], &powerbase1[0]); channel, &powerbase0[0], &powerbase1[0]);
rtl88eu_dm_txpower_track_adjust(&hal_data->odmpriv, 0, &direction, rtl88eu_dm_txpower_track_adjust(&adapt->HalData->odmpriv, 0,
&pwrtrac_value); &direction, &pwrtrac_value);
for (index = 0; index < 6; index++) { for (index = 0; index < 6; index++) {
get_rx_power_val_by_reg(adapt, channel, index, get_rx_power_val_by_reg(adapt, channel, index,
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
static bool check_condition(struct adapter *adapt, const u32 condition) static bool check_condition(struct adapter *adapt, const u32 condition)
{ {
struct odm_dm_struct *odm = &GET_HAL_DATA(adapt)->odmpriv; struct odm_dm_struct *odm = &adapt->HalData->odmpriv;
u32 _board = odm->BoardType; u32 _board = odm->BoardType;
u32 _platform = odm->SupportPlatform; u32 _platform = odm->SupportPlatform;
u32 _interface = odm->SupportInterface; u32 _interface = odm->SupportInterface;
...@@ -228,7 +228,7 @@ static bool rtl88e_phy_config_rf_with_headerfile(struct adapter *adapt) ...@@ -228,7 +228,7 @@ static bool rtl88e_phy_config_rf_with_headerfile(struct adapter *adapt)
static bool rf6052_conf_para(struct adapter *adapt) static bool rf6052_conf_para(struct adapter *adapt)
{ {
struct hal_data_8188e *hal_data = GET_HAL_DATA(adapt); struct hal_data_8188e *hal_data = adapt->HalData;
u32 u4val = 0; u32 u4val = 0;
u8 rfpath; u8 rfpath;
bool rtstatus = true; bool rtstatus = true;
...@@ -299,7 +299,7 @@ static bool rf6052_conf_para(struct adapter *adapt) ...@@ -299,7 +299,7 @@ static bool rf6052_conf_para(struct adapter *adapt)
static bool rtl88e_phy_rf6052_config(struct adapter *adapt) static bool rtl88e_phy_rf6052_config(struct adapter *adapt)
{ {
struct hal_data_8188e *hal_data = GET_HAL_DATA(adapt); struct hal_data_8188e *hal_data = adapt->HalData;
if (hal_data->rf_type == RF_1T1R) if (hal_data->rf_type == RF_1T1R)
hal_data->NumTotalRFPath = 1; hal_data->NumTotalRFPath = 1;
......
...@@ -60,7 +60,6 @@ static s32 FillH2CCmd_88E(struct adapter *adapt, u8 ElementID, u32 CmdLen, u8 *p ...@@ -60,7 +60,6 @@ static s32 FillH2CCmd_88E(struct adapter *adapt, u8 ElementID, u32 CmdLen, u8 *p
u8 h2c_box_num; u8 h2c_box_num;
u32 msgbox_addr; u32 msgbox_addr;
u32 msgbox_ex_addr; u32 msgbox_ex_addr;
struct hal_data_8188e *haldata = GET_HAL_DATA(adapt);
u8 cmd_idx, ext_cmd_len; u8 cmd_idx, ext_cmd_len;
u32 h2c_cmd = 0; u32 h2c_cmd = 0;
u32 h2c_cmd_ex = 0; u32 h2c_cmd_ex = 0;
...@@ -81,7 +80,7 @@ static s32 FillH2CCmd_88E(struct adapter *adapt, u8 ElementID, u32 CmdLen, u8 *p ...@@ -81,7 +80,7 @@ static s32 FillH2CCmd_88E(struct adapter *adapt, u8 ElementID, u32 CmdLen, u8 *p
/* pay attention to if race condition happened in H2C cmd setting. */ /* pay attention to if race condition happened in H2C cmd setting. */
do { do {
h2c_box_num = haldata->LastHMEBoxNum; h2c_box_num = adapt->HalData->LastHMEBoxNum;
if (!_is_fw_read_cmd_down(adapt, h2c_box_num)) { if (!_is_fw_read_cmd_down(adapt, h2c_box_num)) {
DBG_88E(" fw read cmd failed...\n"); DBG_88E(" fw read cmd failed...\n");
...@@ -110,7 +109,8 @@ static s32 FillH2CCmd_88E(struct adapter *adapt, u8 ElementID, u32 CmdLen, u8 *p ...@@ -110,7 +109,8 @@ static s32 FillH2CCmd_88E(struct adapter *adapt, u8 ElementID, u32 CmdLen, u8 *p
} }
bcmd_down = true; bcmd_down = true;
haldata->LastHMEBoxNum = (h2c_box_num+1) % RTL88E_MAX_H2C_BOX_NUMS; adapt->HalData->LastHMEBoxNum =
(h2c_box_num+1) % RTL88E_MAX_H2C_BOX_NUMS;
} while ((!bcmd_down) && (retry_cnts--)); } while ((!bcmd_down) && (retry_cnts--));
...@@ -128,7 +128,7 @@ static s32 FillH2CCmd_88E(struct adapter *adapt, u8 ElementID, u32 CmdLen, u8 *p ...@@ -128,7 +128,7 @@ static s32 FillH2CCmd_88E(struct adapter *adapt, u8 ElementID, u32 CmdLen, u8 *p
/* arg[5] = Short GI */ /* arg[5] = Short GI */
void rtw_hal_add_ra_tid(struct adapter *pAdapter, u32 bitmap, u8 arg, u8 rssi_level) void rtw_hal_add_ra_tid(struct adapter *pAdapter, u32 bitmap, u8 arg, u8 rssi_level)
{ {
struct hal_data_8188e *haldata = GET_HAL_DATA(pAdapter); struct odm_dm_struct *odmpriv = &pAdapter->HalData->odmpriv;
u8 macid, init_rate, raid, shortGIrate = false; u8 macid, init_rate, raid, shortGIrate = false;
...@@ -138,7 +138,7 @@ void rtw_hal_add_ra_tid(struct adapter *pAdapter, u32 bitmap, u8 arg, u8 rssi_le ...@@ -138,7 +138,7 @@ void rtw_hal_add_ra_tid(struct adapter *pAdapter, u32 bitmap, u8 arg, u8 rssi_le
bitmap &= 0x0fffffff; bitmap &= 0x0fffffff;
if (rssi_level != DM_RATR_STA_INIT) if (rssi_level != DM_RATR_STA_INIT)
bitmap = ODM_Get_Rate_Bitmap(&haldata->odmpriv, macid, bitmap, rssi_level); bitmap = ODM_Get_Rate_Bitmap(odmpriv, macid, bitmap, rssi_level);
bitmap |= ((raid<<28)&0xf0000000); bitmap |= ((raid<<28)&0xf0000000);
...@@ -156,7 +156,7 @@ void rtw_hal_add_ra_tid(struct adapter *pAdapter, u32 bitmap, u8 arg, u8 rssi_le ...@@ -156,7 +156,7 @@ void rtw_hal_add_ra_tid(struct adapter *pAdapter, u32 bitmap, u8 arg, u8 rssi_le
DBG_88E("%s=> mac_id:%d, raid:%d, ra_bitmap=0x%x, shortGIrate=0x%02x\n", DBG_88E("%s=> mac_id:%d, raid:%d, ra_bitmap=0x%x, shortGIrate=0x%02x\n",
__func__, macid, raid, bitmap, shortGIrate); __func__, macid, raid, bitmap, shortGIrate);
ODM_RA_UpdateRateInfo_8188E(&(haldata->odmpriv), macid, raid, bitmap, shortGIrate); ODM_RA_UpdateRateInfo_8188E(odmpriv, macid, raid, bitmap, shortGIrate);
} }
void rtl8188e_set_FwPwrMode_cmd(struct adapter *adapt, u8 Mode) void rtl8188e_set_FwPwrMode_cmd(struct adapter *adapt, u8 Mode)
...@@ -445,7 +445,6 @@ static void ConstructProbeRsp(struct adapter *adapt, u8 *pframe, u32 *pLength, u ...@@ -445,7 +445,6 @@ static void ConstructProbeRsp(struct adapter *adapt, u8 *pframe, u32 *pLength, u
/* 2009.10.15 by tynli. */ /* 2009.10.15 by tynli. */
static void SetFwRsvdPagePkt(struct adapter *adapt, bool bDLFinished) static void SetFwRsvdPagePkt(struct adapter *adapt, bool bDLFinished)
{ {
struct hal_data_8188e *haldata;
struct xmit_frame *pmgntframe; struct xmit_frame *pmgntframe;
struct pkt_attrib *pattrib; struct pkt_attrib *pattrib;
struct xmit_priv *pxmitpriv; struct xmit_priv *pxmitpriv;
...@@ -467,7 +466,6 @@ static void SetFwRsvdPagePkt(struct adapter *adapt, bool bDLFinished) ...@@ -467,7 +466,6 @@ static void SetFwRsvdPagePkt(struct adapter *adapt, bool bDLFinished)
return; return;
} }
haldata = GET_HAL_DATA(adapt);
pxmitpriv = &adapt->xmitpriv; pxmitpriv = &adapt->xmitpriv;
pmlmeext = &adapt->mlmeextpriv; pmlmeext = &adapt->mlmeextpriv;
pmlmeinfo = &pmlmeext->mlmext_info; pmlmeinfo = &pmlmeext->mlmext_info;
...@@ -487,7 +485,7 @@ static void SetFwRsvdPagePkt(struct adapter *adapt, bool bDLFinished) ...@@ -487,7 +485,7 @@ static void SetFwRsvdPagePkt(struct adapter *adapt, bool bDLFinished)
if (PageNeed == 1) if (PageNeed == 1)
PageNeed += 1; PageNeed += 1;
PageNum += PageNeed; PageNum += PageNeed;
haldata->FwRsvdPageStartOffset = PageNum; adapt->HalData->FwRsvdPageStartOffset = PageNum;
BufIndex += PageNeed*128; BufIndex += PageNeed*128;
...@@ -554,7 +552,7 @@ static void SetFwRsvdPagePkt(struct adapter *adapt, bool bDLFinished) ...@@ -554,7 +552,7 @@ static void SetFwRsvdPagePkt(struct adapter *adapt, bool bDLFinished)
void rtl8188e_set_FwJoinBssReport_cmd(struct adapter *adapt, u8 mstatus) void rtl8188e_set_FwJoinBssReport_cmd(struct adapter *adapt, u8 mstatus)
{ {
struct hal_data_8188e *haldata = GET_HAL_DATA(adapt); struct hal_data_8188e *haldata = adapt->HalData;
struct mlme_ext_priv *pmlmeext = &(adapt->mlmeextpriv); struct mlme_ext_priv *pmlmeext = &(adapt->mlmeextpriv);
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
bool bSendBeacon = false; bool bSendBeacon = false;
......
...@@ -42,7 +42,7 @@ static void dm_InitGPIOSetting(struct adapter *Adapter) ...@@ -42,7 +42,7 @@ static void dm_InitGPIOSetting(struct adapter *Adapter)
/* */ /* */
static void Init_ODM_ComInfo_88E(struct adapter *Adapter) static void Init_ODM_ComInfo_88E(struct adapter *Adapter)
{ {
struct hal_data_8188e *hal_data = GET_HAL_DATA(Adapter); struct hal_data_8188e *hal_data = Adapter->HalData;
struct dm_priv *pdmpriv = &hal_data->dmpriv; struct dm_priv *pdmpriv = &hal_data->dmpriv;
struct odm_dm_struct *dm_odm = &(hal_data->odmpriv); struct odm_dm_struct *dm_odm = &(hal_data->odmpriv);
...@@ -83,7 +83,7 @@ static void Update_ODM_ComInfo_88E(struct adapter *Adapter) ...@@ -83,7 +83,7 @@ static void Update_ODM_ComInfo_88E(struct adapter *Adapter)
struct mlme_ext_priv *pmlmeext = &Adapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &Adapter->mlmeextpriv;
struct mlme_priv *pmlmepriv = &Adapter->mlmepriv; struct mlme_priv *pmlmepriv = &Adapter->mlmepriv;
struct pwrctrl_priv *pwrctrlpriv = &Adapter->pwrctrlpriv; struct pwrctrl_priv *pwrctrlpriv = &Adapter->pwrctrlpriv;
struct hal_data_8188e *hal_data = GET_HAL_DATA(Adapter); struct hal_data_8188e *hal_data = Adapter->HalData;
struct odm_dm_struct *dm_odm = &(hal_data->odmpriv); struct odm_dm_struct *dm_odm = &(hal_data->odmpriv);
struct dm_priv *pdmpriv = &hal_data->dmpriv; struct dm_priv *pdmpriv = &hal_data->dmpriv;
int i; int i;
...@@ -133,9 +133,8 @@ static void Update_ODM_ComInfo_88E(struct adapter *Adapter) ...@@ -133,9 +133,8 @@ static void Update_ODM_ComInfo_88E(struct adapter *Adapter)
void rtl8188e_InitHalDm(struct adapter *Adapter) void rtl8188e_InitHalDm(struct adapter *Adapter)
{ {
struct hal_data_8188e *hal_data = GET_HAL_DATA(Adapter); struct dm_priv *pdmpriv = &Adapter->HalData->dmpriv;
struct dm_priv *pdmpriv = &hal_data->dmpriv; struct odm_dm_struct *dm_odm = &(Adapter->HalData->odmpriv);
struct odm_dm_struct *dm_odm = &(hal_data->odmpriv);
dm_InitGPIOSetting(Adapter); dm_InitGPIOSetting(Adapter);
pdmpriv->DM_Type = DM_Type_ByDriver; pdmpriv->DM_Type = DM_Type_ByDriver;
...@@ -147,7 +146,6 @@ void rtl8188e_InitHalDm(struct adapter *Adapter) ...@@ -147,7 +146,6 @@ void rtl8188e_InitHalDm(struct adapter *Adapter)
void rtw_hal_dm_watchdog(struct adapter *Adapter) void rtw_hal_dm_watchdog(struct adapter *Adapter)
{ {
u8 hw_init_completed = false; u8 hw_init_completed = false;
struct hal_data_8188e *hal_data = GET_HAL_DATA(Adapter);
struct mlme_priv *pmlmepriv = NULL; struct mlme_priv *pmlmepriv = NULL;
u8 bLinked = false; u8 bLinked = false;
...@@ -169,8 +167,8 @@ void rtw_hal_dm_watchdog(struct adapter *Adapter) ...@@ -169,8 +167,8 @@ void rtw_hal_dm_watchdog(struct adapter *Adapter)
bLinked = true; bLinked = true;
} }
hal_data->odmpriv.bLinked = bLinked; Adapter->HalData->odmpriv.bLinked = bLinked;
ODM_DMWatchdog(&hal_data->odmpriv); ODM_DMWatchdog(&Adapter->HalData->odmpriv);
skip_dm: skip_dm:
/* Check GPIO to determine current RF on/off and Pbc status. */ /* Check GPIO to determine current RF on/off and Pbc status. */
/* Check Hardware Radio ON/OFF or not */ /* Check Hardware Radio ON/OFF or not */
...@@ -179,9 +177,8 @@ void rtw_hal_dm_watchdog(struct adapter *Adapter) ...@@ -179,9 +177,8 @@ void rtw_hal_dm_watchdog(struct adapter *Adapter)
void rtw_hal_dm_init(struct adapter *Adapter) void rtw_hal_dm_init(struct adapter *Adapter)
{ {
struct hal_data_8188e *hal_data = GET_HAL_DATA(Adapter); struct dm_priv *pdmpriv = &Adapter->HalData->dmpriv;
struct dm_priv *pdmpriv = &hal_data->dmpriv; struct odm_dm_struct *podmpriv = &Adapter->HalData->odmpriv;
struct odm_dm_struct *podmpriv = &hal_data->odmpriv;
memset(pdmpriv, 0, sizeof(struct dm_priv)); memset(pdmpriv, 0, sizeof(struct dm_priv));
Init_ODM_ComInfo_88E(Adapter); Init_ODM_ComInfo_88E(Adapter);
...@@ -192,9 +189,7 @@ void rtw_hal_dm_init(struct adapter *Adapter) ...@@ -192,9 +189,7 @@ void rtw_hal_dm_init(struct adapter *Adapter)
/* Compare RSSI for deciding antenna */ /* Compare RSSI for deciding antenna */
void rtw_hal_antdiv_rssi_compared(struct adapter *Adapter, struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src) void rtw_hal_antdiv_rssi_compared(struct adapter *Adapter, struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src)
{ {
struct hal_data_8188e *hal_data = GET_HAL_DATA(Adapter); if (0 != Adapter->HalData->AntDivCfg) {
if (0 != hal_data->AntDivCfg) {
/* select optimum_antenna for before linked =>For antenna diversity */ /* select optimum_antenna for before linked =>For antenna diversity */
if (dst->Rssi >= src->Rssi) {/* keep org parameter */ if (dst->Rssi >= src->Rssi) {/* keep org parameter */
src->Rssi = dst->Rssi; src->Rssi = dst->Rssi;
...@@ -206,13 +201,12 @@ void rtw_hal_antdiv_rssi_compared(struct adapter *Adapter, struct wlan_bssid_ex ...@@ -206,13 +201,12 @@ void rtw_hal_antdiv_rssi_compared(struct adapter *Adapter, struct wlan_bssid_ex
/* Add new function to reset the state of antenna diversity before link. */ /* Add new function to reset the state of antenna diversity before link. */
u8 rtw_hal_antdiv_before_linked(struct adapter *Adapter) u8 rtw_hal_antdiv_before_linked(struct adapter *Adapter)
{ {
struct hal_data_8188e *hal_data = GET_HAL_DATA(Adapter); struct odm_dm_struct *dm_odm = &Adapter->HalData->odmpriv;
struct odm_dm_struct *dm_odm = &hal_data->odmpriv;
struct sw_ant_switch *dm_swat_tbl = &dm_odm->DM_SWAT_Table; struct sw_ant_switch *dm_swat_tbl = &dm_odm->DM_SWAT_Table;
struct mlme_priv *pmlmepriv = &(Adapter->mlmepriv); struct mlme_priv *pmlmepriv = &(Adapter->mlmepriv);
/* Condition that does not need to use antenna diversity. */ /* Condition that does not need to use antenna diversity. */
if (hal_data->AntDivCfg == 0) if (Adapter->HalData->AntDivCfg == 0)
return false; return false;
if (check_fwstate(pmlmepriv, _FW_LINKED)) if (check_fwstate(pmlmepriv, _FW_LINKED))
......
...@@ -108,13 +108,11 @@ void _8051Reset88E(struct adapter *padapter) ...@@ -108,13 +108,11 @@ void _8051Reset88E(struct adapter *padapter)
void rtl8188e_InitializeFirmwareVars(struct adapter *padapter) void rtl8188e_InitializeFirmwareVars(struct adapter *padapter)
{ {
struct hal_data_8188e *pHalData = GET_HAL_DATA(padapter);
/* Init Fw LPS related. */ /* Init Fw LPS related. */
padapter->pwrctrlpriv.bFwCurrentInPSMode = false; padapter->pwrctrlpriv.bFwCurrentInPSMode = false;
/* Init H2C counter. by tynli. 2009.12.09. */ /* Init H2C counter. by tynli. 2009.12.09. */
pHalData->LastHMEBoxNum = 0; padapter->HalData->LastHMEBoxNum = 0;
} }
void rtw_hal_free_data(struct adapter *padapter) void rtw_hal_free_data(struct adapter *padapter)
...@@ -127,9 +125,7 @@ void rtw_hal_read_chip_version(struct adapter *padapter) ...@@ -127,9 +125,7 @@ void rtw_hal_read_chip_version(struct adapter *padapter)
{ {
u32 value32; u32 value32;
struct HAL_VERSION ChipVersion; struct HAL_VERSION ChipVersion;
struct hal_data_8188e *pHalData; struct hal_data_8188e *pHalData = padapter->HalData;
pHalData = GET_HAL_DATA(padapter);
value32 = usb_read32(padapter, REG_SYS_CFG); value32 = usb_read32(padapter, REG_SYS_CFG);
ChipVersion.ChipType = ((value32 & RTL_ID) ? TEST_CHIP : NORMAL_CHIP); ChipVersion.ChipType = ((value32 & RTL_ID) ? TEST_CHIP : NORMAL_CHIP);
...@@ -147,8 +143,8 @@ void rtw_hal_read_chip_version(struct adapter *padapter) ...@@ -147,8 +143,8 @@ void rtw_hal_read_chip_version(struct adapter *padapter)
void rtw_hal_set_odm_var(struct adapter *Adapter, enum hal_odm_variable eVariable, void *pValue1, bool bSet) void rtw_hal_set_odm_var(struct adapter *Adapter, enum hal_odm_variable eVariable, void *pValue1, bool bSet)
{ {
struct hal_data_8188e *pHalData = GET_HAL_DATA(Adapter); struct odm_dm_struct *podmpriv = &Adapter->HalData->odmpriv;
struct odm_dm_struct *podmpriv = &pHalData->odmpriv;
switch (eVariable) { switch (eVariable) {
case HAL_ODM_STA_INFO: case HAL_ODM_STA_INFO:
{ {
...@@ -475,7 +471,7 @@ void Hal_ReadPowerSavingMode88E(struct adapter *padapter, u8 *hwinfo, bool AutoL ...@@ -475,7 +471,7 @@ void Hal_ReadPowerSavingMode88E(struct adapter *padapter, u8 *hwinfo, bool AutoL
void Hal_ReadTxPowerInfo88E(struct adapter *padapter, u8 *PROMContent, bool AutoLoadFail) void Hal_ReadTxPowerInfo88E(struct adapter *padapter, u8 *PROMContent, bool AutoLoadFail)
{ {
struct hal_data_8188e *pHalData = GET_HAL_DATA(padapter); struct hal_data_8188e *pHalData = padapter->HalData;
struct txpowerinfo24g pwrInfo24G; struct txpowerinfo24g pwrInfo24G;
u8 rfPath, ch, group; u8 rfPath, ch, group;
u8 bIn24G, TxCount; u8 bIn24G, TxCount;
...@@ -527,7 +523,7 @@ void Hal_ReadTxPowerInfo88E(struct adapter *padapter, u8 *PROMContent, bool Auto ...@@ -527,7 +523,7 @@ void Hal_ReadTxPowerInfo88E(struct adapter *padapter, u8 *PROMContent, bool Auto
void Hal_EfuseParseXtal_8188E(struct adapter *pAdapter, u8 *hwinfo, bool AutoLoadFail) void Hal_EfuseParseXtal_8188E(struct adapter *pAdapter, u8 *hwinfo, bool AutoLoadFail)
{ {
struct hal_data_8188e *pHalData = GET_HAL_DATA(pAdapter); struct hal_data_8188e *pHalData = pAdapter->HalData;
if (!AutoLoadFail) { if (!AutoLoadFail) {
pHalData->CrystalCap = hwinfo[EEPROM_XTAL_88E]; pHalData->CrystalCap = hwinfo[EEPROM_XTAL_88E];
...@@ -541,7 +537,7 @@ void Hal_EfuseParseXtal_8188E(struct adapter *pAdapter, u8 *hwinfo, bool AutoLoa ...@@ -541,7 +537,7 @@ void Hal_EfuseParseXtal_8188E(struct adapter *pAdapter, u8 *hwinfo, bool AutoLoa
void Hal_EfuseParseBoardType88E(struct adapter *pAdapter, u8 *hwinfo, bool AutoLoadFail) void Hal_EfuseParseBoardType88E(struct adapter *pAdapter, u8 *hwinfo, bool AutoLoadFail)
{ {
struct hal_data_8188e *pHalData = GET_HAL_DATA(pAdapter); struct hal_data_8188e *pHalData = pAdapter->HalData;
if (!AutoLoadFail) if (!AutoLoadFail)
pHalData->BoardType = (hwinfo[EEPROM_RF_BOARD_OPTION_88E] pHalData->BoardType = (hwinfo[EEPROM_RF_BOARD_OPTION_88E]
...@@ -553,7 +549,7 @@ void Hal_EfuseParseBoardType88E(struct adapter *pAdapter, u8 *hwinfo, bool AutoL ...@@ -553,7 +549,7 @@ void Hal_EfuseParseBoardType88E(struct adapter *pAdapter, u8 *hwinfo, bool AutoL
void Hal_EfuseParseEEPROMVer88E(struct adapter *padapter, u8 *hwinfo, bool AutoLoadFail) void Hal_EfuseParseEEPROMVer88E(struct adapter *padapter, u8 *hwinfo, bool AutoLoadFail)
{ {
struct hal_data_8188e *pHalData = GET_HAL_DATA(padapter); struct hal_data_8188e *pHalData = padapter->HalData;
if (!AutoLoadFail) { if (!AutoLoadFail) {
pHalData->EEPROMVersion = hwinfo[EEPROM_VERSION_88E]; pHalData->EEPROMVersion = hwinfo[EEPROM_VERSION_88E];
...@@ -580,7 +576,7 @@ void rtl8188e_EfuseParseChnlPlan(struct adapter *padapter, u8 *hwinfo, bool Auto ...@@ -580,7 +576,7 @@ void rtl8188e_EfuseParseChnlPlan(struct adapter *padapter, u8 *hwinfo, bool Auto
void Hal_EfuseParseCustomerID88E(struct adapter *padapter, u8 *hwinfo, bool AutoLoadFail) void Hal_EfuseParseCustomerID88E(struct adapter *padapter, u8 *hwinfo, bool AutoLoadFail)
{ {
struct hal_data_8188e *pHalData = GET_HAL_DATA(padapter); struct hal_data_8188e *pHalData = padapter->HalData;
if (!AutoLoadFail) { if (!AutoLoadFail) {
pHalData->EEPROMCustomerID = hwinfo[EEPROM_CUSTOMERID_88E]; pHalData->EEPROMCustomerID = hwinfo[EEPROM_CUSTOMERID_88E];
...@@ -593,7 +589,7 @@ void Hal_EfuseParseCustomerID88E(struct adapter *padapter, u8 *hwinfo, bool Auto ...@@ -593,7 +589,7 @@ void Hal_EfuseParseCustomerID88E(struct adapter *padapter, u8 *hwinfo, bool Auto
void Hal_ReadAntennaDiversity88E(struct adapter *pAdapter, u8 *PROMContent, bool AutoLoadFail) void Hal_ReadAntennaDiversity88E(struct adapter *pAdapter, u8 *PROMContent, bool AutoLoadFail)
{ {
struct hal_data_8188e *pHalData = GET_HAL_DATA(pAdapter); struct hal_data_8188e *pHalData = pAdapter->HalData;
struct registry_priv *registry_par = &pAdapter->registrypriv; struct registry_priv *registry_par = &pAdapter->registrypriv;
if (!AutoLoadFail) { if (!AutoLoadFail) {
...@@ -626,7 +622,7 @@ void Hal_ReadAntennaDiversity88E(struct adapter *pAdapter, u8 *PROMContent, bool ...@@ -626,7 +622,7 @@ void Hal_ReadAntennaDiversity88E(struct adapter *pAdapter, u8 *PROMContent, bool
void Hal_ReadThermalMeter_88E(struct adapter *Adapter, u8 *PROMContent, bool AutoloadFail) void Hal_ReadThermalMeter_88E(struct adapter *Adapter, u8 *PROMContent, bool AutoloadFail)
{ {
struct hal_data_8188e *pHalData = GET_HAL_DATA(Adapter); struct hal_data_8188e *pHalData = Adapter->HalData;
/* ThermalMeter from EEPROM */ /* ThermalMeter from EEPROM */
if (!AutoloadFail) if (!AutoloadFail)
......
...@@ -140,7 +140,6 @@ void update_recvframe_phyinfo_88e(struct recv_frame *precvframe, ...@@ -140,7 +140,6 @@ void update_recvframe_phyinfo_88e(struct recv_frame *precvframe,
{ {
struct adapter *padapter = precvframe->adapter; struct adapter *padapter = precvframe->adapter;
struct rx_pkt_attrib *pattrib = &precvframe->attrib; struct rx_pkt_attrib *pattrib = &precvframe->attrib;
struct hal_data_8188e *pHalData = GET_HAL_DATA(padapter);
struct odm_phy_status_info *pPHYInfo = (struct odm_phy_status_info *)(&pattrib->phy_info); struct odm_phy_status_info *pPHYInfo = (struct odm_phy_status_info *)(&pattrib->phy_info);
u8 *wlanhdr; u8 *wlanhdr;
struct odm_per_pkt_info pkt_info; struct odm_per_pkt_info pkt_info;
...@@ -181,7 +180,8 @@ void update_recvframe_phyinfo_88e(struct recv_frame *precvframe, ...@@ -181,7 +180,8 @@ void update_recvframe_phyinfo_88e(struct recv_frame *precvframe,
pkt_info.StationID = psta->mac_id; pkt_info.StationID = psta->mac_id;
pkt_info.Rate = pattrib->mcs_rate; pkt_info.Rate = pattrib->mcs_rate;
ODM_PhyStatusQuery(&pHalData->odmpriv, pPHYInfo, (u8 *)pphy_status, &(pkt_info)); ODM_PhyStatusQuery(&padapter->HalData->odmpriv, pPHYInfo,
(u8 *)pphy_status, &(pkt_info));
precvframe->psta = NULL; precvframe->psta = NULL;
if (pkt_info.bPacketMatchBSSID && if (pkt_info.bPacketMatchBSSID &&
......
...@@ -40,14 +40,13 @@ void SwLedOn(struct adapter *padapter, struct LED_871x *pLed) ...@@ -40,14 +40,13 @@ void SwLedOn(struct adapter *padapter, struct LED_871x *pLed)
void SwLedOff(struct adapter *padapter, struct LED_871x *pLed) void SwLedOff(struct adapter *padapter, struct LED_871x *pLed)
{ {
u8 LedCfg; u8 LedCfg;
struct hal_data_8188e *pHalData = GET_HAL_DATA(padapter);
if (padapter->bSurpriseRemoved || padapter->bDriverStopped) if (padapter->bSurpriseRemoved || padapter->bDriverStopped)
goto exit; goto exit;
LedCfg = usb_read8(padapter, REG_LEDCFG2);/* 0x4E */ LedCfg = usb_read8(padapter, REG_LEDCFG2);/* 0x4E */
if (pHalData->bLedOpenDrain) { if (padapter->HalData->bLedOpenDrain) {
/* Open-drain arrangement for controlling the LED) */ /* Open-drain arrangement for controlling the LED) */
LedCfg &= 0x90; /* Set to software control. */ LedCfg &= 0x90; /* Set to software control. */
usb_write8(padapter, REG_LEDCFG2, (LedCfg | BIT(3))); usb_write8(padapter, REG_LEDCFG2, (LedCfg | BIT(3)));
...@@ -69,11 +68,10 @@ void SwLedOff(struct adapter *padapter, struct LED_871x *pLed) ...@@ -69,11 +68,10 @@ void SwLedOff(struct adapter *padapter, struct LED_871x *pLed)
void rtw_hal_sw_led_init(struct adapter *padapter) void rtw_hal_sw_led_init(struct adapter *padapter)
{ {
struct led_priv *pledpriv = &(padapter->ledpriv); struct led_priv *pledpriv = &(padapter->ledpriv);
struct hal_data_8188e *haldata = GET_HAL_DATA(padapter);
pledpriv->bRegUseLed = true; pledpriv->bRegUseLed = true;
pledpriv->LedControlHandler = LedControl8188eu; pledpriv->LedControlHandler = LedControl8188eu;
haldata->bLedOpenDrain = true; padapter->HalData->bLedOpenDrain = true;
InitLed871x(padapter, &(pledpriv->SwLed0)); InitLed871x(padapter, &(pledpriv->SwLed0));
} }
......
...@@ -33,11 +33,7 @@ s32 rtw_hal_init_xmit_priv(struct adapter *adapt) ...@@ -33,11 +33,7 @@ s32 rtw_hal_init_xmit_priv(struct adapter *adapt)
static u8 urb_zero_packet_chk(struct adapter *adapt, int sz) static u8 urb_zero_packet_chk(struct adapter *adapt, int sz)
{ {
u8 set_tx_desc_offset; return !((sz + TXDESC_SIZE) % adapt->HalData->UsbBulkOutSize);
struct hal_data_8188e *haldata = GET_HAL_DATA(adapt);
set_tx_desc_offset = (((sz + TXDESC_SIZE) % haldata->UsbBulkOutSize) == 0) ? 1 : 0;
return set_tx_desc_offset;
} }
static void rtl8188eu_cal_txdesc_chksum(struct tx_desc *ptxdesc) static void rtl8188eu_cal_txdesc_chksum(struct tx_desc *ptxdesc)
...@@ -175,7 +171,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz, u8 bag ...@@ -175,7 +171,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz, u8 bag
u8 data_rate, pwr_status, offset; u8 data_rate, pwr_status, offset;
struct adapter *adapt = pxmitframe->padapter; struct adapter *adapt = pxmitframe->padapter;
struct pkt_attrib *pattrib = &pxmitframe->attrib; struct pkt_attrib *pattrib = &pxmitframe->attrib;
struct hal_data_8188e *haldata = GET_HAL_DATA(adapt); struct odm_dm_struct *odmpriv = &adapt->HalData->odmpriv;
struct tx_desc *ptxdesc = (struct tx_desc *)pmem; struct tx_desc *ptxdesc = (struct tx_desc *)pmem;
struct mlme_ext_priv *pmlmeext = &adapt->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &adapt->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
...@@ -259,12 +255,12 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz, u8 bag ...@@ -259,12 +255,12 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz, u8 bag
ptxdesc->txdw5 |= cpu_to_le32(0x0001ff00);/* DATA/RTS Rate FB LMT */ ptxdesc->txdw5 |= cpu_to_le32(0x0001ff00);/* DATA/RTS Rate FB LMT */
if (pattrib->ht_en) { if (pattrib->ht_en) {
if (ODM_RA_GetShortGI_8188E(&haldata->odmpriv, pattrib->mac_id)) if (ODM_RA_GetShortGI_8188E(odmpriv, pattrib->mac_id))
ptxdesc->txdw5 |= cpu_to_le32(SGI);/* SGI */ ptxdesc->txdw5 |= cpu_to_le32(SGI);/* SGI */
} }
data_rate = ODM_RA_GetDecisionRate_8188E(&haldata->odmpriv, pattrib->mac_id); data_rate = ODM_RA_GetDecisionRate_8188E(odmpriv, pattrib->mac_id);
ptxdesc->txdw5 |= cpu_to_le32(data_rate & 0x3F); ptxdesc->txdw5 |= cpu_to_le32(data_rate & 0x3F);
pwr_status = ODM_RA_GetHwPwrStatus_8188E(&haldata->odmpriv, pattrib->mac_id); pwr_status = ODM_RA_GetHwPwrStatus_8188E(odmpriv, pattrib->mac_id);
ptxdesc->txdw4 |= cpu_to_le32((pwr_status & 0x7) << PWR_STATUS_SHT); ptxdesc->txdw4 |= cpu_to_le32((pwr_status & 0x7) << PWR_STATUS_SHT);
} else { } else {
/* EAP data packet and ARP packet and DHCP. */ /* EAP data packet and ARP packet and DHCP. */
...@@ -332,8 +328,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz, u8 bag ...@@ -332,8 +328,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz, u8 bag
ptxdesc->txdw4 |= cpu_to_le32(HW_SSN); /* Hw set sequence number */ ptxdesc->txdw4 |= cpu_to_le32(HW_SSN); /* Hw set sequence number */
} }
rtl88eu_dm_set_tx_ant_by_tx_info(&haldata->odmpriv, pmem, rtl88eu_dm_set_tx_ant_by_tx_info(odmpriv, pmem, pattrib->mac_id);
pattrib->mac_id);
rtl8188eu_cal_txdesc_chksum(ptxdesc); rtl8188eu_cal_txdesc_chksum(ptxdesc);
_dbg_dump_tx_info(adapt, pxmitframe->frame_tag, ptxdesc); _dbg_dump_tx_info(adapt, pxmitframe->frame_tag, ptxdesc);
...@@ -426,7 +421,6 @@ static u32 xmitframe_need_length(struct xmit_frame *pxmitframe) ...@@ -426,7 +421,6 @@ static u32 xmitframe_need_length(struct xmit_frame *pxmitframe)
s32 rtl8188eu_xmitframe_complete(struct adapter *adapt, struct xmit_priv *pxmitpriv) s32 rtl8188eu_xmitframe_complete(struct adapter *adapt, struct xmit_priv *pxmitpriv)
{ {
struct hal_data_8188e *haldata = GET_HAL_DATA(adapt);
struct xmit_frame *pxmitframe = NULL; struct xmit_frame *pxmitframe = NULL;
struct xmit_frame *pfirstframe = NULL; struct xmit_frame *pfirstframe = NULL;
struct xmit_buf *pxmitbuf; struct xmit_buf *pxmitbuf;
...@@ -442,7 +436,7 @@ s32 rtl8188eu_xmitframe_complete(struct adapter *adapt, struct xmit_priv *pxmitp ...@@ -442,7 +436,7 @@ s32 rtl8188eu_xmitframe_complete(struct adapter *adapt, struct xmit_priv *pxmitp
u32 pbuf_tail; /* last pkt tail */ u32 pbuf_tail; /* last pkt tail */
u32 len; /* packet length, except TXDESC_SIZE and PKT_OFFSET */ u32 len; /* packet length, except TXDESC_SIZE and PKT_OFFSET */
u32 bulksize = haldata->UsbBulkOutSize; u32 bulksize = adapt->HalData->UsbBulkOutSize;
u8 desc_cnt; u8 desc_cnt;
u32 bulkptr; u32 bulkptr;
...@@ -563,7 +557,7 @@ s32 rtl8188eu_xmitframe_complete(struct adapter *adapt, struct xmit_priv *pxmitp ...@@ -563,7 +557,7 @@ s32 rtl8188eu_xmitframe_complete(struct adapter *adapt, struct xmit_priv *pxmitp
if (pbuf < bulkptr) { if (pbuf < bulkptr) {
desc_cnt++; desc_cnt++;
if (desc_cnt == haldata->UsbTxAggDescNum) if (desc_cnt == adapt->HalData->UsbTxAggDescNum)
break; break;
} else { } else {
desc_cnt = 0; desc_cnt = 0;
......
This diff is collapsed.
...@@ -351,9 +351,6 @@ struct hal_data_8188e { ...@@ -351,9 +351,6 @@ struct hal_data_8188e {
u8 UsbRxAggPageTimeout; u8 UsbRxAggPageTimeout;
}; };
#define GET_HAL_DATA(__pAdapter) \
((struct hal_data_8188e *)((__pAdapter)->HalData))
/* rtl8188e_hal_init.c */ /* rtl8188e_hal_init.c */
void _8051Reset88E(struct adapter *padapter); void _8051Reset88E(struct adapter *padapter);
void rtl8188e_InitializeFirmwareVars(struct adapter *padapter); void rtl8188e_InitializeFirmwareVars(struct adapter *padapter);
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
static void interrupt_handler_8188eu(struct adapter *adapt, u16 pkt_len, u8 *pbuf) static void interrupt_handler_8188eu(struct adapter *adapt, u16 pkt_len, u8 *pbuf)
{ {
struct hal_data_8188e *haldata = GET_HAL_DATA(adapt); struct hal_data_8188e *haldata = adapt->HalData;
if (pkt_len != INTERRUPT_MSG_FORMAT_LEN) { if (pkt_len != INTERRUPT_MSG_FORMAT_LEN) {
DBG_88E("%s Invalid interrupt content length (%d)!\n", __func__, pkt_len); DBG_88E("%s Invalid interrupt content length (%d)!\n", __func__, pkt_len);
...@@ -48,7 +48,7 @@ static int recvbuf2recvframe(struct adapter *adapt, struct sk_buff *pskb) ...@@ -48,7 +48,7 @@ static int recvbuf2recvframe(struct adapter *adapt, struct sk_buff *pskb)
struct sk_buff *pkt_copy = NULL; struct sk_buff *pkt_copy = NULL;
struct recv_frame *precvframe = NULL; struct recv_frame *precvframe = NULL;
struct rx_pkt_attrib *pattrib = NULL; struct rx_pkt_attrib *pattrib = NULL;
struct hal_data_8188e *haldata = GET_HAL_DATA(adapt); struct hal_data_8188e *haldata = adapt->HalData;
struct recv_priv *precvpriv = &adapt->recvpriv; struct recv_priv *precvpriv = &adapt->recvpriv;
struct __queue *pfree_recv_queue = &precvpriv->free_recv_queue; struct __queue *pfree_recv_queue = &precvpriv->free_recv_queue;
...@@ -285,8 +285,7 @@ static int usbctrl_vendorreq(struct adapter *adapt, u8 request, u16 value, u16 i ...@@ -285,8 +285,7 @@ static int usbctrl_vendorreq(struct adapter *adapt, u8 request, u16 value, u16 i
if (status == (-ESHUTDOWN) || status == -ENODEV) { if (status == (-ESHUTDOWN) || status == -ENODEV) {
adapt->bSurpriseRemoved = true; adapt->bSurpriseRemoved = true;
} else { } else {
struct hal_data_8188e *haldata = GET_HAL_DATA(adapt); adapt->HalData->srestpriv.Wifi_Error_Status = USB_VEN_REQ_CMD_FAIL;
haldata->srestpriv.Wifi_Error_Status = USB_VEN_REQ_CMD_FAIL;
} }
} else { /* status != len && status >= 0 */ } else { /* status != len && status >= 0 */
if (status > 0) { if (status > 0) {
...@@ -436,10 +435,7 @@ static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs) ...@@ -436,10 +435,7 @@ static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs)
break; break;
case -EPROTO: case -EPROTO:
case -EOVERFLOW: case -EOVERFLOW:
{ adapt->HalData->srestpriv.Wifi_Error_Status = USB_READ_PORT_FAIL;
struct hal_data_8188e *haldata = GET_HAL_DATA(adapt);
haldata->srestpriv.Wifi_Error_Status = USB_READ_PORT_FAIL;
}
precvbuf->reuse = true; precvbuf->reuse = true;
usb_read_port(adapt, precvpriv->ff_hwaddr, 0, (unsigned char *)precvbuf); usb_read_port(adapt, precvpriv->ff_hwaddr, 0, (unsigned char *)precvbuf);
break; break;
......
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