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

staging: rtl8192e: Rename write_nic_word

Use naming schema found in other rtlwifi devices.
Rename write_nic_word to rtl92e_writew.
Signed-off-by: default avatarMateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8ea54100
......@@ -43,17 +43,17 @@ void rtl92e_start_beacon(struct net_device *dev)
rtl92e_irq_disable(dev);
write_nic_word(dev, ATIMWND, 2);
rtl92e_writew(dev, ATIMWND, 2);
write_nic_word(dev, BCN_INTERVAL, net->beacon_interval);
write_nic_word(dev, BCN_DRV_EARLY_INT, 10);
write_nic_word(dev, BCN_DMATIME, 256);
rtl92e_writew(dev, BCN_INTERVAL, net->beacon_interval);
rtl92e_writew(dev, BCN_DRV_EARLY_INT, 10);
rtl92e_writew(dev, BCN_DMATIME, 256);
rtl92e_writeb(dev, BCN_ERR_THRESH, 100);
BcnTimeCfg |= BcnCW<<BCN_TCFG_CW_SHIFT;
BcnTimeCfg |= BcnIFS<<BCN_TCFG_IFS;
write_nic_word(dev, BCN_TCFG, BcnTimeCfg);
rtl92e_writew(dev, BCN_TCFG, BcnTimeCfg);
rtl92e_irq_enable(dev);
}
......@@ -102,7 +102,7 @@ void rtl92e_set_reg(struct net_device *dev, u8 variable, u8 *val)
switch (variable) {
case HW_VAR_BSSID:
rtl92e_writel(dev, BSSIDR, ((u32 *)(val))[0]);
write_nic_word(dev, BSSIDR+2, ((u16 *)(val+2))[0]);
rtl92e_writew(dev, BSSIDR+2, ((u16 *)(val+2))[0]);
break;
case HW_VAR_MEDIA_STATUS:
......@@ -697,7 +697,7 @@ static void rtl8192_hwconfig(struct net_device *dev)
regRRSR = ((regTmp) << 24) | (regRRSR & 0x00ffffff);
rtl92e_writel(dev, RRSR, regRRSR);
write_nic_word(dev, RETRY_LIMIT,
rtl92e_writew(dev, RETRY_LIMIT,
priv->ShortRetryLimit << RETRY_LIMIT_SHORT_SHIFT |
priv->LongRetryLimit << RETRY_LIMIT_LONG_SHIFT);
}
......@@ -779,7 +779,7 @@ bool rtl92e_start_adapter(struct net_device *dev)
rtl92e_writeb(dev, PCIF, ((MXDMA2_NoLimit<<MXDMA2_RX_SHIFT) |
(MXDMA2_NoLimit<<MXDMA2_TX_SHIFT)));
rtl92e_writel(dev, MAC0, ((u32 *)dev->dev_addr)[0]);
write_nic_word(dev, MAC4, ((u16 *)(dev->dev_addr + 4))[0]);
rtl92e_writew(dev, MAC4, ((u16 *)(dev->dev_addr + 4))[0]);
rtl92e_writel(dev, RCR, priv->ReceiveConfig);
rtl92e_writel(dev, RQPN1, NUM_OF_PAGE_IN_FW_QUEUE_BK <<
......@@ -818,8 +818,8 @@ bool rtl92e_start_adapter(struct net_device *dev)
SECR_value |= SCR_NoSKMC;
rtl92e_writeb(dev, SECR, SECR_value);
}
write_nic_word(dev, ATIMWND, 2);
write_nic_word(dev, BCN_INTERVAL, 100);
rtl92e_writew(dev, ATIMWND, 2);
rtl92e_writew(dev, BCN_INTERVAL, 100);
{
int i;
......@@ -972,19 +972,19 @@ static void rtl8192_net_update(struct net_device *dev)
priv->dot11CurrentPreambleMode = PREAMBLE_AUTO;
priv->basic_rate = rate_config &= 0x15f;
rtl92e_writel(dev, BSSIDR, ((u32 *)net->bssid)[0]);
write_nic_word(dev, BSSIDR+4, ((u16 *)net->bssid)[2]);
rtl92e_writew(dev, BSSIDR+4, ((u16 *)net->bssid)[2]);
if (priv->rtllib->iw_mode == IW_MODE_ADHOC) {
write_nic_word(dev, ATIMWND, 2);
write_nic_word(dev, BCN_DMATIME, 256);
write_nic_word(dev, BCN_INTERVAL, net->beacon_interval);
write_nic_word(dev, BCN_DRV_EARLY_INT, 10);
rtl92e_writew(dev, ATIMWND, 2);
rtl92e_writew(dev, BCN_DMATIME, 256);
rtl92e_writew(dev, BCN_INTERVAL, net->beacon_interval);
rtl92e_writew(dev, BCN_DRV_EARLY_INT, 10);
rtl92e_writeb(dev, BCN_ERR_THRESH, 100);
BcnTimeCfg |= (BcnCW<<BCN_TCFG_CW_SHIFT);
BcnTimeCfg |= BcnIFS<<BCN_TCFG_IFS;
write_nic_word(dev, BCN_TCFG, BcnTimeCfg);
rtl92e_writew(dev, BCN_TCFG, BcnTimeCfg);
}
}
......
......@@ -939,7 +939,7 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel,
CurrentCmd->Para2);
break;
case CmdID_WritePortUshort:
write_nic_word(dev, CurrentCmd->Para1,
rtl92e_writew(dev, CurrentCmd->Para1,
(u16)CurrentCmd->Para2);
break;
case CmdID_WritePortUchar:
......
......@@ -139,7 +139,7 @@ void rtl92e_writel(struct net_device *dev, int x, u32 y)
udelay(20);
}
void write_nic_word(struct net_device *dev, int x, u16 y)
void rtl92e_writew(struct net_device *dev, int x, u16 y)
{
writew(y, (u8 __iomem *)dev->mem_start + x);
......@@ -1837,7 +1837,7 @@ static short rtl8192_tx(struct net_device *dev, struct sk_buff *skb)
spin_unlock_irqrestore(&priv->irq_th_lock, flags);
dev->trans_start = jiffies;
write_nic_word(dev, TPPoll, 0x01 << tcb_desc->queue_index);
rtl92e_writew(dev, TPPoll, 0x01 << tcb_desc->queue_index);
return 0;
}
......
......@@ -582,7 +582,7 @@ u8 rtl92e_readb(struct net_device *dev, int x);
u32 rtl92e_readl(struct net_device *dev, int x);
u16 rtl92e_readw(struct net_device *dev, int x);
void rtl92e_writeb(struct net_device *dev, int x, u8 y);
void write_nic_word(struct net_device *dev, int x, u16 y);
void rtl92e_writew(struct net_device *dev, int x, u16 y);
void rtl92e_writel(struct net_device *dev, int x, u32 y);
void force_pci_posting(struct net_device *dev);
......
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