staging: rtl8192e: Rename write_nic_word
authorMateusz Kulikowski <mateusz.kulikowski@gmail.com>
Sun, 19 Jul 2015 17:28:28 +0000 (19:28 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Jul 2015 04:26:22 +0000 (21:26 -0700)
Use naming schema found in other rtlwifi devices.
Rename write_nic_word to rtl92e_writew.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
drivers/staging/rtl8192e/rtl8192e/rtl_core.c
drivers/staging/rtl8192e/rtl8192e/rtl_core.h

index 896d2ab07f16684c975b51376db704e9a7206df0..c7ffe9760c37cb5fe894f0d4aa96646e3d8f376b 100644 (file)
@@ -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,9 +697,9 @@ static void rtl8192_hwconfig(struct net_device *dev)
        regRRSR = ((regTmp) << 24) | (regRRSR & 0x00ffffff);
        rtl92e_writel(dev, RRSR, regRRSR);
 
-       write_nic_word(dev, RETRY_LIMIT,
-                       priv->ShortRetryLimit << RETRY_LIMIT_SHORT_SHIFT |
-                       priv->LongRetryLimit << RETRY_LIMIT_LONG_SHIFT);
+       rtl92e_writew(dev, RETRY_LIMIT,
+                     priv->ShortRetryLimit << RETRY_LIMIT_SHORT_SHIFT |
+                     priv->LongRetryLimit << RETRY_LIMIT_LONG_SHIFT);
 }
 
 bool rtl92e_start_adapter(struct net_device *dev)
@@ -779,7 +779,7 @@ start:
        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 @@ start:
                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);
        }
 }
 
index fde03472933cec1d520d56c9654ca641b2a550a6..674c529df4a4d96c073dedab61612d43c409c819 100644 (file)
@@ -939,8 +939,8 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel,
                                              CurrentCmd->Para2);
                                break;
                        case CmdID_WritePortUshort:
-                               write_nic_word(dev, CurrentCmd->Para1,
-                                              (u16)CurrentCmd->Para2);
+                               rtl92e_writew(dev, CurrentCmd->Para1,
+                                             (u16)CurrentCmd->Para2);
                                break;
                        case CmdID_WritePortUchar:
                                rtl92e_writeb(dev, CurrentCmd->Para1,
index ef1ea4acc72a1d6862189ce6366a685f7809d321..85def08be69a306ec32db773f2553440094826c4 100644 (file)
@@ -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;
 }
 
index 9792445405de709ba1ac6af0f4fb9de04287cc83..4938be77c7b1a347a589884cc6e28036a87d380b 100644 (file)
@@ -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);