Commit b59a4ca3 authored by Mateusz Kulikowski's avatar Mateusz Kulikowski Committed by Greg Kroah-Hartman

staging: rtl8192e: Rename read_nic_byte

Use naming schema found in other rtlwifi devices.
Rename read_nic_byte to rtl92e_readb.
Signed-off-by: default avatarMateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 502bd1d7
...@@ -63,7 +63,7 @@ static void rtl8192e_update_msr(struct net_device *dev) ...@@ -63,7 +63,7 @@ static void rtl8192e_update_msr(struct net_device *dev)
u8 msr; u8 msr;
enum led_ctl_mode LedAction = LED_CTL_NO_LINK; enum led_ctl_mode LedAction = LED_CTL_NO_LINK;
msr = read_nic_byte(dev, MSR); msr = rtl92e_readb(dev, MSR);
msr &= ~MSR_LINK_MASK; msr &= ~MSR_LINK_MASK;
switch (priv->rtllib->iw_mode) { switch (priv->rtllib->iw_mode) {
...@@ -109,7 +109,7 @@ void rtl92e_set_reg(struct net_device *dev, u8 variable, u8 *val) ...@@ -109,7 +109,7 @@ void rtl92e_set_reg(struct net_device *dev, u8 variable, u8 *val)
{ {
enum rt_op_mode OpMode = *((enum rt_op_mode *)(val)); enum rt_op_mode OpMode = *((enum rt_op_mode *)(val));
enum led_ctl_mode LedAction = LED_CTL_NO_LINK; enum led_ctl_mode LedAction = LED_CTL_NO_LINK;
u8 btMsr = read_nic_byte(dev, MSR); u8 btMsr = rtl92e_readb(dev, MSR);
btMsr &= 0xfc; btMsr &= 0xfc;
...@@ -241,7 +241,7 @@ void rtl92e_set_reg(struct net_device *dev, u8 variable, u8 *val) ...@@ -241,7 +241,7 @@ void rtl92e_set_reg(struct net_device *dev, u8 variable, u8 *val)
union aci_aifsn *pAciAifsn = (union aci_aifsn *) & union aci_aifsn *pAciAifsn = (union aci_aifsn *) &
(qos_parameters->aifs[0]); (qos_parameters->aifs[0]);
u8 acm = pAciAifsn->f.acm; u8 acm = pAciAifsn->f.acm;
u8 AcmCtrl = read_nic_byte(dev, AcmHwCtrl); u8 AcmCtrl = rtl92e_readb(dev, AcmHwCtrl);
RT_TRACE(COMP_DBG, "===========>%s():HW_VAR_ACM_CTRL:%x\n", RT_TRACE(COMP_DBG, "===========>%s():HW_VAR_ACM_CTRL:%x\n",
__func__, eACI); __func__, eACI);
...@@ -693,7 +693,7 @@ static void rtl8192_hwconfig(struct net_device *dev) ...@@ -693,7 +693,7 @@ static void rtl8192_hwconfig(struct net_device *dev)
write_nic_dword(dev, RATR0, ratr_value); write_nic_dword(dev, RATR0, ratr_value);
write_nic_byte(dev, UFWP, 1); write_nic_byte(dev, UFWP, 1);
} }
regTmp = read_nic_byte(dev, 0x313); regTmp = rtl92e_readb(dev, 0x313);
regRRSR = ((regTmp) << 24) | (regRRSR & 0x00ffffff); regRRSR = ((regTmp) << 24) | (regRRSR & 0x00ffffff);
write_nic_dword(dev, RRSR, regRRSR); write_nic_dword(dev, RRSR, regRRSR);
...@@ -740,9 +740,9 @@ bool rtl92e_start_adapter(struct net_device *dev) ...@@ -740,9 +740,9 @@ bool rtl92e_start_adapter(struct net_device *dev)
write_nic_dword(dev, CPU_GEN, ulRegRead); write_nic_dword(dev, CPU_GEN, ulRegRead);
ICVersion = read_nic_byte(dev, IC_VERRSION); ICVersion = rtl92e_readb(dev, IC_VERRSION);
if (ICVersion >= 0x4) { if (ICVersion >= 0x4) {
SwitchingRegulatorOutput = read_nic_byte(dev, SWREGULATOR); SwitchingRegulatorOutput = rtl92e_readb(dev, SWREGULATOR);
if (SwitchingRegulatorOutput != 0xb8) { if (SwitchingRegulatorOutput != 0xb8) {
write_nic_byte(dev, SWREGULATOR, 0xa8); write_nic_byte(dev, SWREGULATOR, 0xa8);
mdelay(1); mdelay(1);
...@@ -835,7 +835,7 @@ bool rtl92e_start_adapter(struct net_device *dev) ...@@ -835,7 +835,7 @@ bool rtl92e_start_adapter(struct net_device *dev)
rtl92e_set_tx_power(dev, priv->chan); rtl92e_set_tx_power(dev, priv->chan);
} }
tmpvalue = read_nic_byte(dev, IC_VERRSION); tmpvalue = rtl92e_readb(dev, IC_VERRSION);
priv->IC_Cut = tmpvalue; priv->IC_Cut = tmpvalue;
RT_TRACE(COMP_INIT, "priv->IC_Cut= 0x%x\n", priv->IC_Cut); RT_TRACE(COMP_INIT, "priv->IC_Cut= 0x%x\n", priv->IC_Cut);
if (priv->IC_Cut >= IC_VersionCut_D) { if (priv->IC_Cut >= IC_VersionCut_D) {
......
...@@ -552,7 +552,7 @@ static bool rtl8192_BB_Config_ParaFile(struct net_device *dev) ...@@ -552,7 +552,7 @@ static bool rtl8192_BB_Config_ParaFile(struct net_device *dev)
u8 bRegValue = 0, eCheckItem = 0; u8 bRegValue = 0, eCheckItem = 0;
u32 dwRegValue = 0; u32 dwRegValue = 0;
bRegValue = read_nic_byte(dev, BB_GLOBAL_RESET); bRegValue = rtl92e_readb(dev, BB_GLOBAL_RESET);
write_nic_byte(dev, BB_GLOBAL_RESET, (bRegValue|BB_GLOBAL_RESET_BIT)); write_nic_byte(dev, BB_GLOBAL_RESET, (bRegValue|BB_GLOBAL_RESET_BIT));
dwRegValue = read_nic_dword(dev, CPU_GEN); dwRegValue = read_nic_dword(dev, CPU_GEN);
...@@ -619,16 +619,16 @@ void rtl92e_get_tx_power(struct net_device *dev) ...@@ -619,16 +619,16 @@ void rtl92e_get_tx_power(struct net_device *dev)
priv->MCSTxPowerLevelOriginalOffset[5] = priv->MCSTxPowerLevelOriginalOffset[5] =
read_nic_dword(dev, rTxAGC_Mcs15_Mcs12); read_nic_dword(dev, rTxAGC_Mcs15_Mcs12);
priv->DefaultInitialGain[0] = read_nic_byte(dev, rOFDM0_XAAGCCore1); priv->DefaultInitialGain[0] = rtl92e_readb(dev, rOFDM0_XAAGCCore1);
priv->DefaultInitialGain[1] = read_nic_byte(dev, rOFDM0_XBAGCCore1); priv->DefaultInitialGain[1] = rtl92e_readb(dev, rOFDM0_XBAGCCore1);
priv->DefaultInitialGain[2] = read_nic_byte(dev, rOFDM0_XCAGCCore1); priv->DefaultInitialGain[2] = rtl92e_readb(dev, rOFDM0_XCAGCCore1);
priv->DefaultInitialGain[3] = read_nic_byte(dev, rOFDM0_XDAGCCore1); priv->DefaultInitialGain[3] = rtl92e_readb(dev, rOFDM0_XDAGCCore1);
RT_TRACE(COMP_INIT, RT_TRACE(COMP_INIT,
"Default initial gain (c50=0x%x, c58=0x%x, c60=0x%x, c68=0x%x)\n", "Default initial gain (c50=0x%x, c58=0x%x, c60=0x%x, c68=0x%x)\n",
priv->DefaultInitialGain[0], priv->DefaultInitialGain[1], priv->DefaultInitialGain[0], priv->DefaultInitialGain[1],
priv->DefaultInitialGain[2], priv->DefaultInitialGain[3]); priv->DefaultInitialGain[2], priv->DefaultInitialGain[3]);
priv->framesync = read_nic_byte(dev, rOFDM0_RxDetector3); priv->framesync = rtl92e_readb(dev, rOFDM0_RxDetector3);
priv->framesyncC34 = read_nic_dword(dev, rOFDM0_RxDetector2); priv->framesyncC34 = read_nic_dword(dev, rOFDM0_RxDetector2);
RT_TRACE(COMP_INIT, "Default framesync (0x%x) = 0x%x\n", RT_TRACE(COMP_INIT, "Default framesync (0x%x) = 0x%x\n",
rOFDM0_RxDetector3, priv->framesync); rOFDM0_RxDetector3, priv->framesync);
...@@ -1177,7 +1177,7 @@ static void rtl8192_SetBWModeWorkItem(struct net_device *dev) ...@@ -1177,7 +1177,7 @@ static void rtl8192_SetBWModeWorkItem(struct net_device *dev)
netdev_err(dev, "%s(): Driver is not initialized\n", __func__); netdev_err(dev, "%s(): Driver is not initialized\n", __func__);
return; return;
} }
regBwOpMode = read_nic_byte(dev, BW_OPMODE); regBwOpMode = rtl92e_readb(dev, BW_OPMODE);
switch (priv->CurrentChannelBW) { switch (priv->CurrentChannelBW) {
case HT_CHANNEL_WIDTH_20: case HT_CHANNEL_WIDTH_20:
......
...@@ -110,7 +110,7 @@ static void rtl8192_restart(void *data); ...@@ -110,7 +110,7 @@ static void rtl8192_restart(void *data);
-----------------------------IO STUFF------------------------- -----------------------------IO STUFF-------------------------
*****************************************************************************/ *****************************************************************************/
u8 read_nic_byte(struct net_device *dev, int x) u8 rtl92e_readb(struct net_device *dev, int x)
{ {
return 0xff & readb((u8 __iomem *)dev->mem_start + x); return 0xff & readb((u8 __iomem *)dev->mem_start + x);
} }
......
...@@ -578,7 +578,7 @@ struct r8192_priv { ...@@ -578,7 +578,7 @@ struct r8192_priv {
extern const struct ethtool_ops rtl819x_ethtool_ops; extern const struct ethtool_ops rtl819x_ethtool_ops;
u8 read_nic_byte(struct net_device *dev, int x); u8 rtl92e_readb(struct net_device *dev, int x);
u32 read_nic_dword(struct net_device *dev, int x); u32 read_nic_dword(struct net_device *dev, int x);
u16 read_nic_word(struct net_device *dev, int x); u16 read_nic_word(struct net_device *dev, int x);
void write_nic_byte(struct net_device *dev, int x, u8 y); void write_nic_byte(struct net_device *dev, int x, u8 y);
......
...@@ -675,7 +675,7 @@ static void dm_TXPowerTrackingCallback_TSSI(struct net_device *dev) ...@@ -675,7 +675,7 @@ static void dm_TXPowerTrackingCallback_TSSI(struct net_device *dev)
sizeof(struct dcmd_txcmd)); sizeof(struct dcmd_txcmd));
mdelay(1); mdelay(1);
for (i = 0; i <= 30; i++) { for (i = 0; i <= 30; i++) {
Pwr_Flag = read_nic_byte(dev, Pw_Track_Flag); Pwr_Flag = rtl92e_readb(dev, Pw_Track_Flag);
if (Pwr_Flag == 0) { if (Pwr_Flag == 0) {
mdelay(1); mdelay(1);
...@@ -708,10 +708,10 @@ static void dm_TXPowerTrackingCallback_TSSI(struct net_device *dev) ...@@ -708,10 +708,10 @@ static void dm_TXPowerTrackingCallback_TSSI(struct net_device *dev)
for (k = 0; k < 5; k++) { for (k = 0; k < 5; k++) {
if (k != 4) if (k != 4)
tmp_report[k] = read_nic_byte(dev, tmp_report[k] = rtl92e_readb(dev,
Tssi_Report_Value1+k); Tssi_Report_Value1+k);
else else
tmp_report[k] = read_nic_byte(dev, tmp_report[k] = rtl92e_readb(dev,
Tssi_Report_Value2); Tssi_Report_Value2);
RT_TRACE(COMP_POWER_TRACKING, RT_TRACE(COMP_POWER_TRACKING,
...@@ -1001,7 +1001,7 @@ static void dm_CheckTXPowerTracking_TSSI(struct net_device *dev) ...@@ -1001,7 +1001,7 @@ static void dm_CheckTXPowerTracking_TSSI(struct net_device *dev)
static u32 tx_power_track_counter; static u32 tx_power_track_counter;
RT_TRACE(COMP_POWER_TRACKING, "%s()\n", __func__); RT_TRACE(COMP_POWER_TRACKING, "%s()\n", __func__);
if (read_nic_byte(dev, 0x11e) == 1) if (rtl92e_readb(dev, 0x11e) == 1)
return; return;
if (!priv->btxpower_tracking) if (!priv->btxpower_tracking)
return; return;
...@@ -1564,7 +1564,7 @@ static void dm_initial_gain(struct net_device *dev) ...@@ -1564,7 +1564,7 @@ static void dm_initial_gain(struct net_device *dev)
reset_cnt = priv->reset_count; reset_cnt = priv->reset_count;
} }
if (dm_digtable.pre_ig_value != read_nic_byte(dev, rOFDM0_XAAGCCore1)) if (dm_digtable.pre_ig_value != rtl92e_readb(dev, rOFDM0_XAAGCCore1))
force_write = 1; force_write = 1;
if ((dm_digtable.pre_ig_value != dm_digtable.cur_ig_value) if ((dm_digtable.pre_ig_value != dm_digtable.cur_ig_value)
...@@ -1873,7 +1873,7 @@ static void dm_CheckRfCtrlGPIO(void *data) ...@@ -1873,7 +1873,7 @@ static void dm_CheckRfCtrlGPIO(void *data)
return; return;
} }
tmp1byte = read_nic_byte(dev, GPI); tmp1byte = rtl92e_readb(dev, GPI);
eRfPowerStateToSet = (tmp1byte&BIT1) ? eRfOn : eRfOff; eRfPowerStateToSet = (tmp1byte&BIT1) ? eRfOn : eRfOff;
...@@ -1913,7 +1913,7 @@ void dm_rf_pathcheck_workitemcallback(void *data) ...@@ -1913,7 +1913,7 @@ void dm_rf_pathcheck_workitemcallback(void *data)
struct net_device *dev = priv->rtllib->dev; struct net_device *dev = priv->rtllib->dev;
u8 rfpath = 0, i; u8 rfpath = 0, i;
rfpath = read_nic_byte(dev, 0xc04); rfpath = rtl92e_readb(dev, 0xc04);
for (i = 0; i < RF90_PATH_MAX; i++) { for (i = 0; i < RF90_PATH_MAX; i++) {
if (rfpath & (0x01<<i)) if (rfpath & (0x01<<i))
...@@ -1970,12 +1970,12 @@ static void dm_rxpath_sel_byrssi(struct net_device *dev) ...@@ -1970,12 +1970,12 @@ static void dm_rxpath_sel_byrssi(struct net_device *dev)
return; return;
if (!cck_Rx_Path_initialized) { if (!cck_Rx_Path_initialized) {
DM_RxPathSelTable.cck_Rx_path = (read_nic_byte(dev, 0xa07)&0xf); DM_RxPathSelTable.cck_Rx_path = (rtl92e_readb(dev, 0xa07)&0xf);
cck_Rx_Path_initialized = 1; cck_Rx_Path_initialized = 1;
} }
DM_RxPathSelTable.disabledRF = 0xf; DM_RxPathSelTable.disabledRF = 0xf;
DM_RxPathSelTable.disabledRF &= ~(read_nic_byte(dev, 0xc04)); DM_RxPathSelTable.disabledRF &= ~(rtl92e_readb(dev, 0xc04));
if (priv->rtllib->mode == WIRELESS_MODE_B) if (priv->rtllib->mode == WIRELESS_MODE_B)
DM_RxPathSelTable.cck_method = CCK_Rx_Version_2; DM_RxPathSelTable.cck_method = CCK_Rx_Version_2;
...@@ -2564,10 +2564,10 @@ static void dm_check_txrateandretrycount(struct net_device *dev) ...@@ -2564,10 +2564,10 @@ static void dm_check_txrateandretrycount(struct net_device *dev)
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
struct rtllib_device *ieee = priv->rtllib; struct rtllib_device *ieee = priv->rtllib;
ieee->softmac_stats.CurrentShowTxate = read_nic_byte(dev, ieee->softmac_stats.CurrentShowTxate = rtl92e_readb(dev,
Current_Tx_Rate_Reg); Current_Tx_Rate_Reg);
ieee->softmac_stats.last_packet_rate = read_nic_byte(dev, ieee->softmac_stats.last_packet_rate = rtl92e_readb(dev,
Initial_Tx_Rate_Reg); Initial_Tx_Rate_Reg);
ieee->softmac_stats.txretrycount = read_nic_dword(dev, ieee->softmac_stats.txretrycount = read_nic_dword(dev,
......
...@@ -30,9 +30,9 @@ static void eprom_cs(struct net_device *dev, short bit) ...@@ -30,9 +30,9 @@ static void eprom_cs(struct net_device *dev, short bit)
if (bit) if (bit)
write_nic_byte(dev, EPROM_CMD, write_nic_byte(dev, EPROM_CMD,
(1 << EPROM_CS_SHIFT) | (1 << EPROM_CS_SHIFT) |
read_nic_byte(dev, EPROM_CMD)); rtl92e_readb(dev, EPROM_CMD));
else else
write_nic_byte(dev, EPROM_CMD, read_nic_byte(dev, EPROM_CMD) write_nic_byte(dev, EPROM_CMD, rtl92e_readb(dev, EPROM_CMD)
& ~(1<<EPROM_CS_SHIFT)); & ~(1<<EPROM_CS_SHIFT));
udelay(EPROM_DELAY); udelay(EPROM_DELAY);
...@@ -42,10 +42,10 @@ static void eprom_cs(struct net_device *dev, short bit) ...@@ -42,10 +42,10 @@ static void eprom_cs(struct net_device *dev, short bit)
static void eprom_ck_cycle(struct net_device *dev) static void eprom_ck_cycle(struct net_device *dev)
{ {
write_nic_byte(dev, EPROM_CMD, write_nic_byte(dev, EPROM_CMD,
(1<<EPROM_CK_SHIFT) | read_nic_byte(dev, EPROM_CMD)); (1<<EPROM_CK_SHIFT) | rtl92e_readb(dev, EPROM_CMD));
udelay(EPROM_DELAY); udelay(EPROM_DELAY);
write_nic_byte(dev, EPROM_CMD, write_nic_byte(dev, EPROM_CMD,
read_nic_byte(dev, EPROM_CMD) & ~(1<<EPROM_CK_SHIFT)); rtl92e_readb(dev, EPROM_CMD) & ~(1<<EPROM_CK_SHIFT));
udelay(EPROM_DELAY); udelay(EPROM_DELAY);
} }
...@@ -54,9 +54,9 @@ static void eprom_w(struct net_device *dev, short bit) ...@@ -54,9 +54,9 @@ static void eprom_w(struct net_device *dev, short bit)
{ {
if (bit) if (bit)
write_nic_byte(dev, EPROM_CMD, (1<<EPROM_W_SHIFT) | write_nic_byte(dev, EPROM_CMD, (1<<EPROM_W_SHIFT) |
read_nic_byte(dev, EPROM_CMD)); rtl92e_readb(dev, EPROM_CMD));
else else
write_nic_byte(dev, EPROM_CMD, read_nic_byte(dev, EPROM_CMD) write_nic_byte(dev, EPROM_CMD, rtl92e_readb(dev, EPROM_CMD)
& ~(1<<EPROM_W_SHIFT)); & ~(1<<EPROM_W_SHIFT));
udelay(EPROM_DELAY); udelay(EPROM_DELAY);
...@@ -67,7 +67,7 @@ static short eprom_r(struct net_device *dev) ...@@ -67,7 +67,7 @@ static short eprom_r(struct net_device *dev)
{ {
short bit; short bit;
bit = (read_nic_byte(dev, EPROM_CMD) & (1<<EPROM_R_SHIFT)); bit = (rtl92e_readb(dev, EPROM_CMD) & (1<<EPROM_R_SHIFT));
udelay(EPROM_DELAY); udelay(EPROM_DELAY);
if (bit) if (bit)
......
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