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

staging: rtl8192e: Rename eprom_read

Use naming schema found in other rtlwifi devices.
Rename eprom_read to rtl92e_eeprom_read.
Signed-off-by: default avatarMateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2e3ba83a
...@@ -323,7 +323,7 @@ static void rtl8192_read_eeprom_info(struct net_device *dev) ...@@ -323,7 +323,7 @@ static void rtl8192_read_eeprom_info(struct net_device *dev)
RT_TRACE(COMP_INIT, "====> rtl8192_read_eeprom_info\n"); RT_TRACE(COMP_INIT, "====> rtl8192_read_eeprom_info\n");
EEPROMId = eprom_read(dev, 0); EEPROMId = rtl92e_eeprom_read(dev, 0);
if (EEPROMId != RTL8190_EEPROM_ID) { if (EEPROMId != RTL8190_EEPROM_ID) {
netdev_err(dev, "%s(): Invalid EEPROM ID: %x\n", __func__, netdev_err(dev, "%s(): Invalid EEPROM ID: %x\n", __func__,
EEPROMId); EEPROMId);
...@@ -333,12 +333,14 @@ static void rtl8192_read_eeprom_info(struct net_device *dev) ...@@ -333,12 +333,14 @@ static void rtl8192_read_eeprom_info(struct net_device *dev)
} }
if (!priv->AutoloadFailFlag) { if (!priv->AutoloadFailFlag) {
priv->eeprom_vid = eprom_read(dev, EEPROM_VID >> 1); priv->eeprom_vid = rtl92e_eeprom_read(dev, EEPROM_VID >> 1);
priv->eeprom_did = eprom_read(dev, EEPROM_DID >> 1); priv->eeprom_did = rtl92e_eeprom_read(dev, EEPROM_DID >> 1);
usValue = eprom_read(dev, (u16)(EEPROM_Customer_ID>>1)) >> 8; usValue = rtl92e_eeprom_read(dev,
(u16)(EEPROM_Customer_ID>>1)) >> 8;
priv->eeprom_CustomerID = (u8)(usValue & 0xff); priv->eeprom_CustomerID = (u8)(usValue & 0xff);
usValue = eprom_read(dev, EEPROM_ICVersion_ChannelPlan>>1); usValue = rtl92e_eeprom_read(dev,
EEPROM_ICVersion_ChannelPlan>>1);
priv->eeprom_ChannelPlan = usValue&0xff; priv->eeprom_ChannelPlan = usValue&0xff;
IC_Version = (usValue & 0xff00)>>8; IC_Version = (usValue & 0xff00)>>8;
...@@ -376,7 +378,7 @@ static void rtl8192_read_eeprom_info(struct net_device *dev) ...@@ -376,7 +378,7 @@ static void rtl8192_read_eeprom_info(struct net_device *dev)
if (!priv->AutoloadFailFlag) { if (!priv->AutoloadFailFlag) {
for (i = 0; i < 6; i += 2) { for (i = 0; i < 6; i += 2) {
usValue = eprom_read(dev, usValue = rtl92e_eeprom_read(dev,
(u16)((EEPROM_NODE_ADDRESS_BYTE_0 + i) >> 1)); (u16)((EEPROM_NODE_ADDRESS_BYTE_0 + i) >> 1));
*(u16 *)(&dev->dev_addr[i]) = usValue; *(u16 *)(&dev->dev_addr[i]) = usValue;
} }
...@@ -396,8 +398,8 @@ static void rtl8192_read_eeprom_info(struct net_device *dev) ...@@ -396,8 +398,8 @@ static void rtl8192_read_eeprom_info(struct net_device *dev)
if (priv->card_8192_version > VERSION_8190_BD) { if (priv->card_8192_version > VERSION_8190_BD) {
if (!priv->AutoloadFailFlag) { if (!priv->AutoloadFailFlag) {
tempval = (eprom_read(dev, (EEPROM_RFInd_PowerDiff >> tempval = (rtl92e_eeprom_read(dev,
1))) & 0xff; (EEPROM_RFInd_PowerDiff >> 1))) & 0xff;
priv->EEPROMLegacyHTTxPowerDiff = tempval & 0xf; priv->EEPROMLegacyHTTxPowerDiff = tempval & 0xf;
if (tempval&0x80) if (tempval&0x80)
...@@ -411,7 +413,7 @@ static void rtl8192_read_eeprom_info(struct net_device *dev) ...@@ -411,7 +413,7 @@ static void rtl8192_read_eeprom_info(struct net_device *dev)
priv->EEPROMLegacyHTTxPowerDiff); priv->EEPROMLegacyHTTxPowerDiff);
if (!priv->AutoloadFailFlag) if (!priv->AutoloadFailFlag)
priv->EEPROMThermalMeter = (u8)(((eprom_read(dev, priv->EEPROMThermalMeter = (u8)(((rtl92e_eeprom_read(dev,
(EEPROM_ThermalMeter>>1))) & (EEPROM_ThermalMeter>>1))) &
0xff00)>>8); 0xff00)>>8);
else else
...@@ -422,7 +424,7 @@ static void rtl8192_read_eeprom_info(struct net_device *dev) ...@@ -422,7 +424,7 @@ static void rtl8192_read_eeprom_info(struct net_device *dev)
if (priv->epromtype == EEPROM_93C46) { if (priv->epromtype == EEPROM_93C46) {
if (!priv->AutoloadFailFlag) { if (!priv->AutoloadFailFlag) {
usValue = eprom_read(dev, usValue = rtl92e_eeprom_read(dev,
EEPROM_TxPwDiff_CrystalCap >> 1); EEPROM_TxPwDiff_CrystalCap >> 1);
priv->EEPROMAntPwDiff = (usValue&0x0fff); priv->EEPROMAntPwDiff = (usValue&0x0fff);
priv->EEPROMCrystalCap = (u8)((usValue & 0xf000) priv->EEPROMCrystalCap = (u8)((usValue & 0xf000)
...@@ -440,7 +442,7 @@ static void rtl8192_read_eeprom_info(struct net_device *dev) ...@@ -440,7 +442,7 @@ static void rtl8192_read_eeprom_info(struct net_device *dev)
for (i = 0; i < 14; i += 2) { for (i = 0; i < 14; i += 2) {
if (!priv->AutoloadFailFlag) if (!priv->AutoloadFailFlag)
usValue = eprom_read(dev, usValue = rtl92e_eeprom_read(dev,
(u16)((EEPROM_TxPwIndex_CCK + (u16)((EEPROM_TxPwIndex_CCK +
i) >> 1)); i) >> 1));
else else
...@@ -456,7 +458,7 @@ static void rtl8192_read_eeprom_info(struct net_device *dev) ...@@ -456,7 +458,7 @@ static void rtl8192_read_eeprom_info(struct net_device *dev)
} }
for (i = 0; i < 14; i += 2) { for (i = 0; i < 14; i += 2) {
if (!priv->AutoloadFailFlag) if (!priv->AutoloadFailFlag)
usValue = eprom_read(dev, usValue = rtl92e_eeprom_read(dev,
(u16)((EEPROM_TxPwIndex_OFDM_24G (u16)((EEPROM_TxPwIndex_OFDM_24G
+ i) >> 1)); + i) >> 1));
else else
......
...@@ -87,7 +87,7 @@ static void eprom_send_bits_string(struct net_device *dev, short b[], int len) ...@@ -87,7 +87,7 @@ static void eprom_send_bits_string(struct net_device *dev, short b[], int len)
} }
} }
u32 eprom_read(struct net_device *dev, u32 addr) u32 rtl92e_eeprom_read(struct net_device *dev, u32 addr)
{ {
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
short read_cmd[] = {1, 1, 0}; short read_cmd[] = {1, 1, 0};
......
...@@ -26,4 +26,4 @@ ...@@ -26,4 +26,4 @@
#define EPROM_DELAY 10 #define EPROM_DELAY 10
u32 eprom_read(struct net_device *dev, u32 addr); u32 rtl92e_eeprom_read(struct net_device *dev, u32 addr);
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