From: Mateusz Kulikowski Date: Sun, 19 Jul 2015 17:28:09 +0000 (+0200) Subject: staging: rtl8192e: Rename read_nic_byte X-Git-Tag: v4.3-rc1~158^2~433 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b59a4ca3d4421866cc7f49135ab6f7b7c84fdb48;p=karo-tx-linux.git staging: rtl8192e: Rename read_nic_byte Use naming schema found in other rtlwifi devices. Rename read_nic_byte to rtl92e_readb. Signed-off-by: Mateusz Kulikowski Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c index 38c3ed6165de..93c44b160b3e 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c @@ -63,7 +63,7 @@ static void rtl8192e_update_msr(struct net_device *dev) u8 msr; enum led_ctl_mode LedAction = LED_CTL_NO_LINK; - msr = read_nic_byte(dev, MSR); + msr = rtl92e_readb(dev, MSR); msr &= ~MSR_LINK_MASK; switch (priv->rtllib->iw_mode) { @@ -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 led_ctl_mode LedAction = LED_CTL_NO_LINK; - u8 btMsr = read_nic_byte(dev, MSR); + u8 btMsr = rtl92e_readb(dev, MSR); btMsr &= 0xfc; @@ -241,7 +241,7 @@ void rtl92e_set_reg(struct net_device *dev, u8 variable, u8 *val) union aci_aifsn *pAciAifsn = (union aci_aifsn *) & (qos_parameters->aifs[0]); 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", __func__, eACI); @@ -693,7 +693,7 @@ static void rtl8192_hwconfig(struct net_device *dev) write_nic_dword(dev, RATR0, ratr_value); write_nic_byte(dev, UFWP, 1); } - regTmp = read_nic_byte(dev, 0x313); + regTmp = rtl92e_readb(dev, 0x313); regRRSR = ((regTmp) << 24) | (regRRSR & 0x00ffffff); write_nic_dword(dev, RRSR, regRRSR); @@ -740,9 +740,9 @@ start: write_nic_dword(dev, CPU_GEN, ulRegRead); - ICVersion = read_nic_byte(dev, IC_VERRSION); + ICVersion = rtl92e_readb(dev, IC_VERRSION); if (ICVersion >= 0x4) { - SwitchingRegulatorOutput = read_nic_byte(dev, SWREGULATOR); + SwitchingRegulatorOutput = rtl92e_readb(dev, SWREGULATOR); if (SwitchingRegulatorOutput != 0xb8) { write_nic_byte(dev, SWREGULATOR, 0xa8); mdelay(1); @@ -835,7 +835,7 @@ start: rtl92e_set_tx_power(dev, priv->chan); } - tmpvalue = read_nic_byte(dev, IC_VERRSION); + tmpvalue = rtl92e_readb(dev, IC_VERRSION); priv->IC_Cut = tmpvalue; RT_TRACE(COMP_INIT, "priv->IC_Cut= 0x%x\n", priv->IC_Cut); if (priv->IC_Cut >= IC_VersionCut_D) { diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c index 3efa84d89955..74c06929118e 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c @@ -552,7 +552,7 @@ static bool rtl8192_BB_Config_ParaFile(struct net_device *dev) u8 bRegValue = 0, eCheckItem = 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)); dwRegValue = read_nic_dword(dev, CPU_GEN); @@ -619,16 +619,16 @@ void rtl92e_get_tx_power(struct net_device *dev) priv->MCSTxPowerLevelOriginalOffset[5] = read_nic_dword(dev, rTxAGC_Mcs15_Mcs12); - priv->DefaultInitialGain[0] = read_nic_byte(dev, rOFDM0_XAAGCCore1); - priv->DefaultInitialGain[1] = read_nic_byte(dev, rOFDM0_XBAGCCore1); - priv->DefaultInitialGain[2] = read_nic_byte(dev, rOFDM0_XCAGCCore1); - priv->DefaultInitialGain[3] = read_nic_byte(dev, rOFDM0_XDAGCCore1); + priv->DefaultInitialGain[0] = rtl92e_readb(dev, rOFDM0_XAAGCCore1); + priv->DefaultInitialGain[1] = rtl92e_readb(dev, rOFDM0_XBAGCCore1); + priv->DefaultInitialGain[2] = rtl92e_readb(dev, rOFDM0_XCAGCCore1); + priv->DefaultInitialGain[3] = rtl92e_readb(dev, rOFDM0_XDAGCCore1); RT_TRACE(COMP_INIT, "Default initial gain (c50=0x%x, c58=0x%x, c60=0x%x, c68=0x%x)\n", priv->DefaultInitialGain[0], priv->DefaultInitialGain[1], 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); RT_TRACE(COMP_INIT, "Default framesync (0x%x) = 0x%x\n", rOFDM0_RxDetector3, priv->framesync); @@ -1177,7 +1177,7 @@ static void rtl8192_SetBWModeWorkItem(struct net_device *dev) netdev_err(dev, "%s(): Driver is not initialized\n", __func__); return; } - regBwOpMode = read_nic_byte(dev, BW_OPMODE); + regBwOpMode = rtl92e_readb(dev, BW_OPMODE); switch (priv->CurrentChannelBW) { case HT_CHANNEL_WIDTH_20: diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index a1b6e1db4dd7..6460402fa98a 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -110,7 +110,7 @@ static void rtl8192_restart(void *data); -----------------------------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); } diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h index ce71270a62d4..3e6d0a5e9155 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h @@ -578,7 +578,7 @@ struct r8192_priv { 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); u16 read_nic_word(struct net_device *dev, int x); void write_nic_byte(struct net_device *dev, int x, u8 y); diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c index d993ec7a51de..08af7f621930 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c @@ -675,7 +675,7 @@ static void dm_TXPowerTrackingCallback_TSSI(struct net_device *dev) sizeof(struct dcmd_txcmd)); mdelay(1); 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) { mdelay(1); @@ -708,10 +708,10 @@ static void dm_TXPowerTrackingCallback_TSSI(struct net_device *dev) for (k = 0; k < 5; k++) { if (k != 4) - tmp_report[k] = read_nic_byte(dev, + tmp_report[k] = rtl92e_readb(dev, Tssi_Report_Value1+k); else - tmp_report[k] = read_nic_byte(dev, + tmp_report[k] = rtl92e_readb(dev, Tssi_Report_Value2); RT_TRACE(COMP_POWER_TRACKING, @@ -1001,7 +1001,7 @@ static void dm_CheckTXPowerTracking_TSSI(struct net_device *dev) static u32 tx_power_track_counter; RT_TRACE(COMP_POWER_TRACKING, "%s()\n", __func__); - if (read_nic_byte(dev, 0x11e) == 1) + if (rtl92e_readb(dev, 0x11e) == 1) return; if (!priv->btxpower_tracking) return; @@ -1564,7 +1564,7 @@ static void dm_initial_gain(struct net_device *dev) 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; if ((dm_digtable.pre_ig_value != dm_digtable.cur_ig_value) @@ -1873,7 +1873,7 @@ static void dm_CheckRfCtrlGPIO(void *data) return; } - tmp1byte = read_nic_byte(dev, GPI); + tmp1byte = rtl92e_readb(dev, GPI); eRfPowerStateToSet = (tmp1byte&BIT1) ? eRfOn : eRfOff; @@ -1913,7 +1913,7 @@ void dm_rf_pathcheck_workitemcallback(void *data) struct net_device *dev = priv->rtllib->dev; u8 rfpath = 0, i; - rfpath = read_nic_byte(dev, 0xc04); + rfpath = rtl92e_readb(dev, 0xc04); for (i = 0; i < RF90_PATH_MAX; i++) { if (rfpath & (0x01<rtllib->mode == WIRELESS_MODE_B) DM_RxPathSelTable.cck_method = CCK_Rx_Version_2; @@ -2564,10 +2564,10 @@ static void dm_check_txrateandretrycount(struct net_device *dev) struct r8192_priv *priv = rtllib_priv(dev); 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); - ieee->softmac_stats.last_packet_rate = read_nic_byte(dev, + ieee->softmac_stats.last_packet_rate = rtl92e_readb(dev, Initial_Tx_Rate_Reg); ieee->softmac_stats.txretrycount = read_nic_dword(dev, diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_eeprom.c b/drivers/staging/rtl8192e/rtl8192e/rtl_eeprom.c index a6778e0853c7..61d462063fa7 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_eeprom.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_eeprom.c @@ -30,9 +30,9 @@ static void eprom_cs(struct net_device *dev, short bit) if (bit) write_nic_byte(dev, EPROM_CMD, (1 << EPROM_CS_SHIFT) | - read_nic_byte(dev, EPROM_CMD)); + rtl92e_readb(dev, EPROM_CMD)); 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<