staging: rtl8188eu: Remove function _rtw_read32()
authornavin patidar <navin.patidar@gmail.com>
Wed, 11 Jun 2014 17:21:34 +0000 (22:51 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Jun 2014 22:34:02 +0000 (15:34 -0700)
_rtw_read32() is a wrapper function, being used to call usb_read32().
Call usb_read32() directly and drop _rtw_read32().

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16 files changed:
drivers/staging/rtl8188eu/core/rtw_debug.c
drivers/staging/rtl8188eu/core/rtw_efuse.c
drivers/staging/rtl8188eu/core/rtw_io.c
drivers/staging/rtl8188eu/core/rtw_mp.c
drivers/staging/rtl8188eu/core/rtw_mp_ioctl.c
drivers/staging/rtl8188eu/core/rtw_pwrctrl.c
drivers/staging/rtl8188eu/core/rtw_sreset.c
drivers/staging/rtl8188eu/hal/Hal8188ERateAdaptive.c
drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c
drivers/staging/rtl8188eu/hal/odm.c
drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c
drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c
drivers/staging/rtl8188eu/hal/usb_halinit.c
drivers/staging/rtl8188eu/hal/usb_ops_linux.c
drivers/staging/rtl8188eu/include/rtw_io.h
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c

index d2045377103cd39911ff0baa5659e5d2726ad630..615a090562c979dc9a748dc0b2c1f2a96be82a20 100644 (file)
@@ -104,7 +104,7 @@ int proc_get_read_reg(char *page, char **start,
                len += snprintf(page + len, count - len, "rtw_read16(0x%x)=0x%x\n", proc_get_read_addr, rtw_read16(padapter, proc_get_read_addr));
                break;
        case 4:
-               len += snprintf(page + len, count - len, "rtw_read32(0x%x)=0x%x\n", proc_get_read_addr, rtw_read32(padapter, proc_get_read_addr));
+               len += snprintf(page + len, count - len, "usb_read32(0x%x)=0x%x\n", proc_get_read_addr, usb_read32(padapter, proc_get_read_addr));
                break;
        default:
                len += snprintf(page + len, count - len, "error read length=%d\n", proc_get_read_len);
@@ -326,7 +326,7 @@ int proc_get_mac_reg_dump1(char *page, char **start,
        for (i = 0x0; i < 0x300; i += 4) {
                if (j%4 == 1)
                        len += snprintf(page + len, count - len, "0x%02x", i);
-               len += snprintf(page + len, count - len, " 0x%08x ", rtw_read32(padapter, i));
+               len += snprintf(page + len, count - len, " 0x%08x ", usb_read32(padapter, i));
                if ((j++)%4 == 0)
                        len += snprintf(page + len, count - len, "\n");
        }
@@ -349,7 +349,7 @@ int proc_get_mac_reg_dump2(char *page, char **start,
        for (i = 0x300; i < 0x600; i += 4) {
                if (j%4 == 1)
                        len += snprintf(page + len, count - len, "0x%02x", i);
-               len += snprintf(page + len, count - len, " 0x%08x ", rtw_read32(padapter, i));
+               len += snprintf(page + len, count - len, " 0x%08x ", usb_read32(padapter, i));
                if ((j++)%4 == 0)
                        len += snprintf(page + len, count - len, "\n");
        }
@@ -372,7 +372,7 @@ int proc_get_mac_reg_dump3(char *page, char **start,
        for (i = 0x600; i < 0x800; i += 4) {
                if (j%4 == 1)
                        len += snprintf(page + len, count - len, "0x%02x", i);
-               len += snprintf(page + len, count - len, " 0x%08x ", rtw_read32(padapter, i));
+               len += snprintf(page + len, count - len, " 0x%08x ", usb_read32(padapter, i));
                if ((j++)%4 == 0)
                        len += snprintf(page + len, count - len, "\n");
        }
@@ -394,7 +394,7 @@ int proc_get_bb_reg_dump1(char *page, char **start,
        for (i = 0x800; i < 0xB00; i += 4) {
                if (j%4 == 1)
                        len += snprintf(page + len, count - len, "0x%02x", i);
-               len += snprintf(page + len, count - len, " 0x%08x ", rtw_read32(padapter, i));
+               len += snprintf(page + len, count - len, " 0x%08x ", usb_read32(padapter, i));
                if ((j++)%4 == 0)
                        len += snprintf(page + len, count - len, "\n");
        }
@@ -415,7 +415,7 @@ int proc_get_bb_reg_dump2(char *page, char **start,
        for (i = 0xB00; i < 0xE00; i += 4) {
                if (j%4 == 1)
                        len += snprintf(page + len, count - len, "0x%02x", i);
-               len += snprintf(page + len, count - len, " 0x%08x ", rtw_read32(padapter, i));
+               len += snprintf(page + len, count - len, " 0x%08x ", usb_read32(padapter, i));
                if ((j++)%4 == 0)
                        len += snprintf(page + len, count - len, "\n");
        }
@@ -436,7 +436,7 @@ int proc_get_bb_reg_dump3(char *page, char **start,
        for (i = 0xE00; i < 0x1000; i += 4) {
                if (j%4 == 1)
                        len += snprintf(page + len, count - len, "0x%02x", i);
-               len += snprintf(page + len, count - len, " 0x%08x ", rtw_read32(padapter, i));
+               len += snprintf(page + len, count - len, " 0x%08x ", usb_read32(padapter, i));
                if ((j++)%4 == 0)
                        len += snprintf(page + len, count - len, "\n");
        }
index 513e9c67f747271c5d2c2af56cdd9aee514b4424..2a1b1795f62b8b1209e64633b1edbcd50e1cece3 100644 (file)
@@ -191,9 +191,9 @@ ReadEFuseByte(
 
        /* Check bit 32 read-ready */
        retry = 0;
-       value32 = rtw_read32(Adapter, EFUSE_CTRL);
+       value32 = usb_read32(Adapter, EFUSE_CTRL);
        while (!(((value32 >> 24) & 0xff) & 0x80)  && (retry < 10000)) {
-               value32 = rtw_read32(Adapter, EFUSE_CTRL);
+               value32 = usb_read32(Adapter, EFUSE_CTRL);
                retry++;
        }
 
@@ -202,7 +202,7 @@ ReadEFuseByte(
        /*  Designer says that there shall be some delay after ready bit is set, or the */
        /*  result will always stay on last data we read. */
        udelay(50);
-       value32 = rtw_read32(Adapter, EFUSE_CTRL);
+       value32 = usb_read32(Adapter, EFUSE_CTRL);
 
        *pbuf = (u8)(value32 & 0xff);
 }
index 1da09363a8c040cd6378cf77761fb0c2062d3f7d..9266d8fc37adc8ee2329a6b6cbd2b00367596f44 100644 (file)
@@ -76,18 +76,6 @@ u16 _rtw_read16(struct adapter *adapter, u32 addr)
        return r_val;
 }
 
-u32 _rtw_read32(struct adapter *adapter, u32 addr)
-{
-       u32 r_val;
-       struct io_priv *pio_priv = &adapter->iopriv;
-       struct  intf_hdl                *pintfhdl = &(pio_priv->intf);
-       u32     (*_read32)(struct adapter *pintfhdl, u32 addr);
-       _read32 = pintfhdl->io_ops._read32;
-
-       r_val = _read32(adapter, addr);
-       return r_val;
-}
-
 int rtw_init_io_priv(struct adapter *padapter, void (*set_intf_ops)(struct _io_ops *pops))
 {
        struct io_priv  *piopriv = &padapter->iopriv;
index c19926837ec7e8b15aa66c2d79d3871208f16f6a..77134bc7ff28a10e1ae94ebcdafc94d0f047e073 100644 (file)
@@ -36,7 +36,7 @@ u32 read_macreg(struct adapter *padapter, u32 addr, u32 sz)
                val = rtw_read16(padapter, addr);
                break;
        case 4:
-               val = rtw_read32(padapter, addr);
+               val = usb_read32(padapter, addr);
                break;
        default:
                val = 0xffffffff;
@@ -818,7 +818,7 @@ static u32 GetPhyRxPktCounts(struct adapter *pAdapter, u32 selbit)
        usb_write32(pAdapter, REG_RXERR_RPT, phyrx_set);
 
        /* Read packet count */
-       count = rtw_read32(pAdapter, REG_RXERR_RPT) & RXERR_COUNTER_MASK;
+       count = usb_read32(pAdapter, REG_RXERR_RPT) & RXERR_COUNTER_MASK;
 
        return count;
 }
@@ -853,7 +853,7 @@ static u32 rtw_GetPSDData(struct adapter *pAdapter, u32 point)
        int psd_val;
 
 
-       psd_val = rtw_read32(pAdapter, 0x808);
+       psd_val = usb_read32(pAdapter, 0x808);
        psd_val &= 0xFFBFFC00;
        psd_val |= point;
 
@@ -863,7 +863,7 @@ static u32 rtw_GetPSDData(struct adapter *pAdapter, u32 point)
 
        usb_write32(pAdapter, 0x808, psd_val);
        mdelay(1);
-       psd_val = rtw_read32(pAdapter, 0x8B4);
+       psd_val = usb_read32(pAdapter, 0x8B4);
 
        psd_val &= 0x0000FFFF;
 
index ebb97e829cfdd86d73684f936763946aa485855e..2ba92e613cd380c5caae7d2ef48ece2b9e8d0a04 100644 (file)
@@ -808,7 +808,7 @@ int rtl8188eu_oid_rt_pro_read_register_hdl(struct oid_par_priv *poid_par_priv)
                break;
        default:
                width = 4;
-               RegRWStruct->value = rtw_read32(Adapter, offset);
+               RegRWStruct->value = usb_read32(Adapter, offset);
                break;
        }
        RT_TRACE(_module_mp_, _drv_notice_,
index be4c0944f1060427b18ebcd052b0ed57e5b13d67..51b246892789ef2edffbede9e0d1b6002a5a79b4 100644 (file)
@@ -203,7 +203,7 @@ int ips_leave(struct adapter *padapter)
                        }
                }
 
-               DBG_88E("==> ips_leave.....LED(0x%08x)...\n", rtw_read32(padapter, 0x4c));
+               DBG_88E("==> ips_leave.....LED(0x%08x)...\n", usb_read32(padapter, 0x4c));
                pwrpriv->bips_processing = false;
 
                pwrpriv->bkeepfwalive = false;
index 3b846d3577c947c0b6e388e39431af3fffa79716..22a35121830b1e3fbe8827403d069116cb28f7a9 100644 (file)
@@ -36,7 +36,7 @@ u8 sreset_get_wifi_status(struct adapter *padapter)
        u8 status = WIFI_STATUS_SUCCESS;
        u32 val32 = 0;
 
-       val32 = rtw_read32(padapter, REG_TXDMA_STATUS);
+       val32 = usb_read32(padapter, REG_TXDMA_STATUS);
        if (val32 == 0xeaeaeaea) {
                psrtpriv->Wifi_Error_Status = WIFI_IF_NOT_EXIST;
        } else if (val32 != 0) {
index ea5ba280e3d0ee82cfbba8859c6ac7b68e617884..3c651d5c6824e19799f656a2add99b73a1dca9d7 100644 (file)
@@ -358,19 +358,19 @@ static int odm_ARFBRefresh_8188E(struct odm_dm_struct *dm_odm, struct odm_ra_inf
                pRaInfo->RAUseRate = (pRaInfo->RateMask)&0x0000000d;
                break;
        case 12:
-               MaskFromReg = rtw_read32(adapt, REG_ARFR0);
+               MaskFromReg = usb_read32(adapt, REG_ARFR0);
                pRaInfo->RAUseRate = (pRaInfo->RateMask)&MaskFromReg;
                break;
        case 13:
-               MaskFromReg = rtw_read32(adapt, REG_ARFR1);
+               MaskFromReg = usb_read32(adapt, REG_ARFR1);
                pRaInfo->RAUseRate = (pRaInfo->RateMask)&MaskFromReg;
                break;
        case 14:
-               MaskFromReg = rtw_read32(adapt, REG_ARFR2);
+               MaskFromReg = usb_read32(adapt, REG_ARFR2);
                pRaInfo->RAUseRate = (pRaInfo->RateMask)&MaskFromReg;
                break;
        case 15:
-               MaskFromReg = rtw_read32(adapt, REG_ARFR3);
+               MaskFromReg = usb_read32(adapt, REG_ARFR3);
                pRaInfo->RAUseRate = (pRaInfo->RateMask)&MaskFromReg;
                break;
        default:
index 514d325f159f4daab095cf91bc2ad5e87c8b5e0a..c4ee978d102a561ce5fa26e0bc873d41c798451f 100644 (file)
@@ -821,7 +821,7 @@ static void _PHY_SaveMACRegisters(
        for (i = 0; i < (IQK_MAC_REG_NUM - 1); i++) {
                MACBackup[i] = rtw_read8(adapt, MACReg[i]);
        }
-       MACBackup[i] = rtw_read32(adapt, MACReg[i]);
+       MACBackup[i] = usb_read32(adapt, MACReg[i]);
 }
 
 static void reload_adda_reg(struct adapter *adapt, u32 *ADDAReg, u32 *ADDABackup, u32 RegiesterNum)
index 11101f355569b30a5ed2ad611e7d7d04b529a16c..60dbde70fc4a7818e2ef2ab3b8c8fba5ff54a520 100644 (file)
@@ -1291,10 +1291,10 @@ void ODM_EdcaTurboInit(struct odm_dm_struct *pDM_Odm)
        pDM_Odm->DM_EDCA_Table.bIsCurRDLState = false;
        Adapter->recvpriv.bIsAnyNonBEPkts = false;
 
-       ODM_RT_TRACE(pDM_Odm, ODM_COMP_EDCA_TURBO, ODM_DBG_LOUD, ("Orginial VO PARAM: 0x%x\n", rtw_read32(Adapter, ODM_EDCA_VO_PARAM)));
-       ODM_RT_TRACE(pDM_Odm, ODM_COMP_EDCA_TURBO, ODM_DBG_LOUD, ("Orginial VI PARAM: 0x%x\n", rtw_read32(Adapter, ODM_EDCA_VI_PARAM)));
-       ODM_RT_TRACE(pDM_Odm, ODM_COMP_EDCA_TURBO, ODM_DBG_LOUD, ("Orginial BE PARAM: 0x%x\n", rtw_read32(Adapter, ODM_EDCA_BE_PARAM)));
-       ODM_RT_TRACE(pDM_Odm, ODM_COMP_EDCA_TURBO, ODM_DBG_LOUD, ("Orginial BK PARAM: 0x%x\n", rtw_read32(Adapter, ODM_EDCA_BK_PARAM)));
+       ODM_RT_TRACE(pDM_Odm, ODM_COMP_EDCA_TURBO, ODM_DBG_LOUD, ("Orginial VO PARAM: 0x%x\n", usb_read32(Adapter, ODM_EDCA_VO_PARAM)));
+       ODM_RT_TRACE(pDM_Odm, ODM_COMP_EDCA_TURBO, ODM_DBG_LOUD, ("Orginial VI PARAM: 0x%x\n", usb_read32(Adapter, ODM_EDCA_VI_PARAM)));
+       ODM_RT_TRACE(pDM_Odm, ODM_COMP_EDCA_TURBO, ODM_DBG_LOUD, ("Orginial BE PARAM: 0x%x\n", usb_read32(Adapter, ODM_EDCA_BE_PARAM)));
+       ODM_RT_TRACE(pDM_Odm, ODM_COMP_EDCA_TURBO, ODM_DBG_LOUD, ("Orginial BK PARAM: 0x%x\n", usb_read32(Adapter, ODM_EDCA_BK_PARAM)));
 }      /*  ODM_InitEdcaTurbo */
 
 void odm_EdcaTurboCheck(struct odm_dm_struct *pDM_Odm)
index 71a2417ca66413a979096ac7dd45b8462244e561..7a7d7043dda129d3b57c4c1ce7b1308f7e12531b 100644 (file)
@@ -246,8 +246,8 @@ static void efuse_read_phymap_from_txpktbuf(
                        msleep(1);
                }
 
-               lo32 = rtw_read32(adapter, REG_PKTBUF_DBG_DATA_L);
-               hi32 = rtw_read32(adapter, REG_PKTBUF_DBG_DATA_H);
+               lo32 = usb_read32(adapter, REG_PKTBUF_DBG_DATA_L);
+               hi32 = usb_read32(adapter, REG_PKTBUF_DBG_DATA_H);
 
                if (i == 0) {
                        u8 lenc[2];
@@ -376,12 +376,12 @@ void rtw_IOL_cmd_tx_pkt_buf_dump(struct adapter *Adapter, int data_len)
                        msleep(1);
                        loop = 0;
                        do {
-                               rstatus = (reg_140 = rtw_read32(Adapter, REG_PKTBUF_DBG_CTRL)&BIT24);
+                               rstatus = (reg_140 = usb_read32(Adapter, REG_PKTBUF_DBG_CTRL)&BIT24);
                                if (rstatus) {
-                                       fifo_data = rtw_read32(Adapter, REG_PKTBUF_DBG_DATA_L);
+                                       fifo_data = usb_read32(Adapter, REG_PKTBUF_DBG_DATA_L);
                                        memcpy(pbuf+(addr*8), &fifo_data, 4);
 
-                                       fifo_data = rtw_read32(Adapter, REG_PKTBUF_DBG_DATA_H);
+                                       fifo_data = usb_read32(Adapter, REG_PKTBUF_DBG_DATA_H);
                                        memcpy(pbuf+(addr*8+4), &fifo_data, 4);
                                }
                                msleep(1);
@@ -549,7 +549,7 @@ static s32 _FWFreeToGo(struct adapter *padapter)
 
        /*  polling CheckSum report */
        do {
-               value32 = rtw_read32(padapter, REG_MCUFWDL);
+               value32 = usb_read32(padapter, REG_MCUFWDL);
                if (value32 & FWDL_ChkSum_rpt)
                        break;
        } while (counter++ < POLLING_READY_TIMEOUT_COUNT);
@@ -560,7 +560,7 @@ static s32 _FWFreeToGo(struct adapter *padapter)
        }
        DBG_88E("%s: Checksum report OK! REG_MCUFWDL:0x%08x\n", __func__, value32);
 
-       value32 = rtw_read32(padapter, REG_MCUFWDL);
+       value32 = usb_read32(padapter, REG_MCUFWDL);
        value32 |= MCUFWDL_RDY;
        value32 &= ~WINTINI_RDY;
        usb_write32(padapter, REG_MCUFWDL, value32);
@@ -570,7 +570,7 @@ static s32 _FWFreeToGo(struct adapter *padapter)
        /*  polling for FW ready */
        counter = 0;
        do {
-               value32 = rtw_read32(padapter, REG_MCUFWDL);
+               value32 = usb_read32(padapter, REG_MCUFWDL);
                if (value32 & WINTINI_RDY) {
                        DBG_88E("%s: Polling FW ready success!! REG_MCUFWDL:0x%08x\n", __func__, value32);
                        return _SUCCESS;
@@ -1743,7 +1743,7 @@ static struct HAL_VERSION ReadChipVersion8188E(struct adapter *padapter)
 
        pHalData = GET_HAL_DATA(padapter);
 
-       value32 = rtw_read32(padapter, REG_SYS_CFG);
+       value32 = usb_read32(padapter, REG_SYS_CFG);
        ChipVersion.ICType = CHIP_8188E;
        ChipVersion.ChipType = ((value32 & RTL_ID) ? TEST_CHIP : NORMAL_CHIP);
 
@@ -1907,7 +1907,7 @@ static s32 _LLTWrite(struct adapter *padapter, u32 address, u32 data)
 
        /* polling */
        do {
-               value = rtw_read32(padapter, LLTReg);
+               value = usb_read32(padapter, LLTReg);
                if (_LLT_NO_ACTIVE == _LLT_OP_VALUE(value))
                        break;
 
index e18a0106c0999d97857d0842a6e42ffe39776cb8..2f53da85b24a3df5613a1864860a3a3c122ba91a 100644 (file)
@@ -94,7 +94,7 @@ rtl8188e_PHY_QueryBBReg(
 {
        u32 ReturnValue = 0, OriginalValue, BitShift;
 
-       OriginalValue = rtw_read32(Adapter, RegAddr);
+       OriginalValue = usb_read32(Adapter, RegAddr);
        BitShift = phy_CalculateBitShift(BitMask);
        ReturnValue = (OriginalValue & BitMask) >> BitShift;
        return ReturnValue;
@@ -124,7 +124,7 @@ void rtl8188e_PHY_SetBBReg(struct adapter *Adapter, u32 RegAddr, u32 BitMask, u3
        u32 OriginalValue, BitShift;
 
        if (BitMask != bMaskDWord) { /* if not "double word" write */
-               OriginalValue = rtw_read32(Adapter, RegAddr);
+               OriginalValue = usb_read32(Adapter, RegAddr);
                BitShift = phy_CalculateBitShift(BitMask);
                Data = ((OriginalValue & (~BitMask)) | (Data << BitShift));
        }
index ef458177dfd4d2732e0e5c5668634f778846e1bf..80600bd2d4294b01fbf1853680a64690fd9dc048 100644 (file)
@@ -341,7 +341,7 @@ static void _InitNetworkType(struct adapter *Adapter)
 {
        u32 value32;
 
-       value32 = rtw_read32(Adapter, REG_CR);
+       value32 = usb_read32(Adapter, REG_CR);
        /*  TODO: use the other function to set network type */
        value32 = (value32 & ~MASK_NETTYPE) | _NETTYPE(NT_LINK_AP);
 
@@ -385,7 +385,7 @@ static void _InitAdaptiveCtrl(struct adapter *Adapter)
        u32 value32;
 
        /*  Response Rate Set */
-       value32 = rtw_read32(Adapter, REG_RRSR);
+       value32 = usb_read32(Adapter, REG_RRSR);
        value32 &= ~RATE_BITMAP_ALL;
        value32 |= RATE_RRSR_CCK_ONLY_1M;
        usb_write32(Adapter, REG_RRSR, value32);
@@ -469,7 +469,7 @@ static void usb_AggSettingTxUpdate(struct adapter *Adapter)
                haldata->UsbTxAggMode = false;
 
        if (haldata->UsbTxAggMode) {
-               value32 = rtw_read32(Adapter, REG_TDECTRL);
+               value32 = usb_read32(Adapter, REG_TDECTRL);
                value32 = value32 & ~(BLK_DESC_NUM_MASK << BLK_DESC_NUM_SHIFT);
                value32 |= ((haldata->UsbTxAggDescNum & BLK_DESC_NUM_MASK) << BLK_DESC_NUM_SHIFT);
 
@@ -633,7 +633,7 @@ static void _InitAntenna_Selection(struct adapter *Adapter)
                return;
        DBG_88E("==>  %s ....\n", __func__);
 
-       usb_write32(Adapter, REG_LEDCFG0, rtw_read32(Adapter, REG_LEDCFG0)|BIT23);
+       usb_write32(Adapter, REG_LEDCFG0, usb_read32(Adapter, REG_LEDCFG0)|BIT23);
        PHY_SetBBReg(Adapter, rFPGA0_XAB_RFParameter, BIT13, 0x01);
 
        if (PHY_QueryBBReg(Adapter, rFPGA0_XA_RFInterfaceOE, 0x300) == Antenna_A)
@@ -931,7 +931,7 @@ HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_LCK);
        usb_write8(Adapter, REG_USB_HRPWM, 0);
 
        /* ack for xmit mgmt frames. */
-       usb_write32(Adapter, REG_FWHW_TXQ_CTRL, rtw_read32(Adapter, REG_FWHW_TXQ_CTRL)|BIT(12));
+       usb_write32(Adapter, REG_FWHW_TXQ_CTRL, usb_read32(Adapter, REG_FWHW_TXQ_CTRL)|BIT(12));
 
 exit:
 HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_END);
@@ -1421,11 +1421,11 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
                break;
        case HW_VAR_CHECK_BSSID:
                if (*((u8 *)val)) {
-                       usb_write32(Adapter, REG_RCR, rtw_read32(Adapter, REG_RCR)|RCR_CBSSID_DATA|RCR_CBSSID_BCN);
+                       usb_write32(Adapter, REG_RCR, usb_read32(Adapter, REG_RCR)|RCR_CBSSID_DATA|RCR_CBSSID_BCN);
                } else {
                        u32 val32;
 
-                       val32 = rtw_read32(Adapter, REG_RCR);
+                       val32 = usb_read32(Adapter, REG_RCR);
 
                        val32 &= ~(RCR_CBSSID_DATA | RCR_CBSSID_BCN);
 
@@ -1446,7 +1446,7 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
        case HW_VAR_MLME_SITESURVEY:
                if (*((u8 *)val)) { /* under sitesurvey */
                        /* config RCR to receive different BSSID & not to receive data frame */
-                       u32 v = rtw_read32(Adapter, REG_RCR);
+                       u32 v = usb_read32(Adapter, REG_RCR);
                        v &= ~(RCR_CBSSID_BCN);
                        usb_write32(Adapter, REG_RCR, v);
                        /* reject all data frame */
@@ -1471,14 +1471,14 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
                                usb_write8(Adapter, REG_BCN_CTRL, rtw_read8(Adapter, REG_BCN_CTRL)&(~BIT(4)));
                        }
                        if ((pmlmeinfo->state&0x03) == WIFI_FW_AP_STATE) {
-                               usb_write32(Adapter, REG_RCR, rtw_read32(Adapter, REG_RCR)|RCR_CBSSID_BCN);
+                               usb_write32(Adapter, REG_RCR, usb_read32(Adapter, REG_RCR)|RCR_CBSSID_BCN);
                        } else {
                                if (Adapter->in_cta_test) {
-                                       u32 v = rtw_read32(Adapter, REG_RCR);
+                                       u32 v = usb_read32(Adapter, REG_RCR);
                                        v &= ~(RCR_CBSSID_DATA | RCR_CBSSID_BCN);/*  RCR_ADF */
                                        usb_write32(Adapter, REG_RCR, v);
                                } else {
-                                       usb_write32(Adapter, REG_RCR, rtw_read32(Adapter, REG_RCR)|RCR_CBSSID_BCN);
+                                       usb_write32(Adapter, REG_RCR, usb_read32(Adapter, REG_RCR)|RCR_CBSSID_BCN);
                                }
                        }
                }
@@ -1494,11 +1494,11 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
                                usb_write16(Adapter, REG_RXFLTMAP2, 0xFFFF);
 
                                if (Adapter->in_cta_test) {
-                                       u32 v = rtw_read32(Adapter, REG_RCR);
+                                       u32 v = usb_read32(Adapter, REG_RCR);
                                        v &= ~(RCR_CBSSID_DATA | RCR_CBSSID_BCN);/*  RCR_ADF */
                                        usb_write32(Adapter, REG_RCR, v);
                                } else {
-                                       usb_write32(Adapter, REG_RCR, rtw_read32(Adapter, REG_RCR)|RCR_CBSSID_DATA|RCR_CBSSID_BCN);
+                                       usb_write32(Adapter, REG_RCR, usb_read32(Adapter, REG_RCR)|RCR_CBSSID_DATA|RCR_CBSSID_BCN);
                                }
 
                                if (check_fwstate(pmlmepriv, WIFI_STATION_STATE))
@@ -1805,9 +1805,9 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
 
                        if (!pwrpriv->bkeepfwalive) {
                                /* RX DMA stop */
-                               usb_write32(Adapter, REG_RXPKT_NUM, (rtw_read32(Adapter, REG_RXPKT_NUM)|RW_RELEASE_EN));
+                               usb_write32(Adapter, REG_RXPKT_NUM, (usb_read32(Adapter, REG_RXPKT_NUM)|RW_RELEASE_EN));
                                do {
-                                       if (!(rtw_read32(Adapter, REG_RXPKT_NUM)&RXDMA_IDLE))
+                                       if (!(usb_read32(Adapter, REG_RXPKT_NUM)&RXDMA_IDLE))
                                                break;
                                } while (trycnt--);
                                if (trycnt == 0)
@@ -1875,7 +1875,7 @@ static void GetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
                                val[0] = true;
                        } else {
                                u32 valRCR;
-                               valRCR = rtw_read32(Adapter, REG_RCR);
+                               valRCR = usb_read32(Adapter, REG_RCR);
                                valRCR &= 0x00070000;
                                if (valRCR)
                                        val[0] = false;
@@ -1894,7 +1894,7 @@ static void GetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
                *val = haldata->bMacPwrCtrlOn;
                break;
        case HW_VAR_CHK_HI_QUEUE_EMPTY:
-               *val = ((rtw_read32(Adapter, REG_HGQ_INFORMATION)&0x0000ff00) == 0) ? true : false;
+               *val = ((usb_read32(Adapter, REG_HGQ_INFORMATION)&0x0000ff00) == 0) ? true : false;
                break;
        default:
                break;
@@ -2169,7 +2169,7 @@ static void SetBeaconRelatedRegisters8188EUsb(struct adapter *adapt)
 
        usb_write8(adapt, REG_SLOT, 0x09);
 
-       value32 = rtw_read32(adapt, REG_TCR);
+       value32 = usb_read32(adapt, REG_TCR);
        value32 &= ~TSFRST;
        usb_write32(adapt,  REG_TCR, value32);
 
index c38cb1152838aa4d3e56d3cd229a5b5b7b56279e..9fd1c6630942c8fe317c42a7a818de7ca9271c95 100644 (file)
@@ -158,7 +158,7 @@ static u16 usb_read16(struct adapter *adapter, u32 addr)
        return (u16)(le32_to_cpu(data)&0xffff);
 }
 
-static u32 usb_read32(struct adapter *adapter, u32 addr)
+u32 usb_read32(struct adapter *adapter, u32 addr)
 {
        u8 request;
        u8 requesttype;
@@ -668,5 +668,4 @@ void rtl8188eu_set_intf_ops(struct _io_ops  *pops)
        _rtw_memset((u8 *)pops, 0, sizeof(struct _io_ops));
        pops->_read8 = &usb_read8;
        pops->_read16 = &usb_read16;
-       pops->_read32 = &usb_read32;
 }
index 6c956f4c30e793e1f6aad92b7b2b03c38829e1a7..a48c5f4bf06dfaca20a2b8459352c01a244cc2d9 100644 (file)
@@ -46,7 +46,6 @@ struct intf_hdl;
 struct _io_ops {
        u8 (*_read8)(struct adapter *pintfhdl, u32 addr);
        u16 (*_read16)(struct adapter *pintfhdl, u32 addr);
-       u32 (*_read32)(struct adapter *pintfhdl, u32 addr);
 };
 
 struct io_req {
@@ -80,7 +79,7 @@ struct io_priv {
 
 u8 _rtw_read8(struct adapter *adapter, u32 addr);
 u16 _rtw_read16(struct adapter *adapter, u32 addr);
-u32 _rtw_read32(struct adapter *adapter, u32 addr);
+u32 usb_read32(struct adapter *adapter, u32 addr);
 u32 usb_read_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
 void usb_read_port_cancel(struct adapter *adapter);
 
@@ -94,7 +93,6 @@ void usb_write_port_cancel(struct adapter *adapter);
 
 #define rtw_read8(adapter, addr) _rtw_read8((adapter), (addr))
 #define rtw_read16(adapter, addr) _rtw_read16((adapter), (addr))
-#define rtw_read32(adapter, addr) _rtw_read32((adapter), (addr))
 
 int rtw_init_io_priv(struct adapter *padapter,
                     void (*set_intf_ops)(struct _io_ops *pops));
index 92e07a5f4fdd96df37b39e30ef59a93ab4504407..5119da30a716510939d27ee8a0c695f623c09a0b 100644 (file)
@@ -2187,7 +2187,7 @@ static int rtw_wx_read32(struct net_device *dev,
                sprintf(extra, "0x%04X", data32);
                break;
        case 4:
-               data32 = rtw_read32(padapter, addr);
+               data32 = usb_read32(padapter, addr);
                sprintf(extra, "0x%08X", data32);
                break;
        default:
@@ -2359,7 +2359,7 @@ static void rtw_dbg_mode_hdl(struct adapter *padapter, u32 id, u8 *pdata, u32 le
                        RegRWStruct->value = rtw_read16(padapter, RegRWStruct->offset);
                        break;
                case 4:
-                       RegRWStruct->value = rtw_read32(padapter, RegRWStruct->offset);
+                       RegRWStruct->value = usb_read32(padapter, RegRWStruct->offset);
                        break;
                default:
                        break;
@@ -3946,12 +3946,12 @@ static int rtw_cta_test_start(struct net_device *dev,
                padapter->in_cta_test = 0;
 
        if (padapter->in_cta_test) {
-               u32 v = rtw_read32(padapter, REG_RCR);
+               u32 v = usb_read32(padapter, REG_RCR);
                v &= ~(RCR_CBSSID_DATA | RCR_CBSSID_BCN);/*  RCR_ADF */
                usb_write32(padapter, REG_RCR, v);
                DBG_88E("enable RCR_ADF\n");
        } else {
-               u32 v = rtw_read32(padapter, REG_RCR);
+               u32 v = usb_read32(padapter, REG_RCR);
                v |= RCR_CBSSID_DATA | RCR_CBSSID_BCN;/*  RCR_ADF */
                usb_write32(padapter, REG_RCR, v);
                DBG_88E("disable RCR_ADF\n");
@@ -4025,14 +4025,14 @@ static void mac_reg_dump(struct adapter *padapter)
        for (i = 0x0; i < 0x300; i += 4) {
                if (j%4 == 1)
                        pr_info("0x%02x", i);
-               pr_info(" 0x%08x ", rtw_read32(padapter, i));
+               pr_info(" 0x%08x ", usb_read32(padapter, i));
                if ((j++)%4 == 0)
                        pr_info("\n");
        }
        for (i = 0x400; i < 0x800; i += 4) {
                if (j%4 == 1)
                        pr_info("0x%02x", i);
-               pr_info(" 0x%08x ", rtw_read32(padapter, i));
+               pr_info(" 0x%08x ", usb_read32(padapter, i));
                if ((j++)%4 == 0)
                        pr_info("\n");
        }
@@ -4046,7 +4046,7 @@ static void bb_reg_dump(struct adapter *padapter)
                if (j%4 == 1)
                        pr_info("0x%02x", i);
 
-               pr_info(" 0x%08x ", rtw_read32(padapter, i));
+               pr_info(" 0x%08x ", usb_read32(padapter, i));
                if ((j++)%4 == 0)
                        pr_info("\n");
        }
@@ -4115,7 +4115,7 @@ static int rtw_dbg_port(struct net_device *dev,
                        DBG_88E("rtw_read16(0x%x) = 0x%04x\n", arg, rtw_read16(padapter, arg));
                        break;
                case 4:
-                       DBG_88E("rtw_read32(0x%x) = 0x%08x\n", arg, rtw_read32(padapter, arg));
+                       DBG_88E("usb_read32(0x%x) = 0x%08x\n", arg, usb_read32(padapter, arg));
                        break;
                }
                break;
@@ -4131,7 +4131,7 @@ static int rtw_dbg_port(struct net_device *dev,
                        break;
                case 4:
                        usb_write32(padapter, arg, extra_arg);
-                       DBG_88E("usb_write32(0x%x) = 0x%08x\n", arg, rtw_read32(padapter, arg));
+                       DBG_88E("usb_write32(0x%x) = 0x%08x\n", arg, usb_read32(padapter, arg));
                        break;
                }
                break;
@@ -4284,7 +4284,7 @@ static int rtw_dbg_port(struct net_device *dev,
                        if (_SUCCESS != rtw_IOL_exec_cmds_sync(padapter, xmit_frame, 5000, 0))
                                ret = -EPERM;
 
-                       final = rtw_read32(padapter, reg);
+                       final = usb_read32(padapter, reg);
                        if (start_value+write_num-1 == final)
                                DBG_88E("continuous IOL_CMD_WD_REG to 0x%x %u times Success, start:%u, final:%u\n",
                                        reg, write_num, start_value, final);
@@ -4586,30 +4586,30 @@ static int rtw_dbg_port(struct net_device *dev,
                        DBG_88E("rd(0xc58) = 0x%x\n", rtw_read8(padapter, 0xc58));
                        break;
                case 0xff:
-                       DBG_88E("dbg(0x210) = 0x%x\n", rtw_read32(padapter, 0x210));
-                       DBG_88E("dbg(0x608) = 0x%x\n", rtw_read32(padapter, 0x608));
-                       DBG_88E("dbg(0x280) = 0x%x\n", rtw_read32(padapter, 0x280));
-                       DBG_88E("dbg(0x284) = 0x%x\n", rtw_read32(padapter, 0x284));
-                       DBG_88E("dbg(0x288) = 0x%x\n", rtw_read32(padapter, 0x288));
+                       DBG_88E("dbg(0x210) = 0x%x\n", usb_read32(padapter, 0x210));
+                       DBG_88E("dbg(0x608) = 0x%x\n", usb_read32(padapter, 0x608));
+                       DBG_88E("dbg(0x280) = 0x%x\n", usb_read32(padapter, 0x280));
+                       DBG_88E("dbg(0x284) = 0x%x\n", usb_read32(padapter, 0x284));
+                       DBG_88E("dbg(0x288) = 0x%x\n", usb_read32(padapter, 0x288));
 
-                       DBG_88E("dbg(0x664) = 0x%x\n", rtw_read32(padapter, 0x664));
+                       DBG_88E("dbg(0x664) = 0x%x\n", usb_read32(padapter, 0x664));
 
                        DBG_88E("\n");
 
-                       DBG_88E("dbg(0x430) = 0x%x\n", rtw_read32(padapter, 0x430));
-                       DBG_88E("dbg(0x438) = 0x%x\n", rtw_read32(padapter, 0x438));
+                       DBG_88E("dbg(0x430) = 0x%x\n", usb_read32(padapter, 0x430));
+                       DBG_88E("dbg(0x438) = 0x%x\n", usb_read32(padapter, 0x438));
 
-                       DBG_88E("dbg(0x440) = 0x%x\n", rtw_read32(padapter, 0x440));
+                       DBG_88E("dbg(0x440) = 0x%x\n", usb_read32(padapter, 0x440));
 
-                       DBG_88E("dbg(0x458) = 0x%x\n", rtw_read32(padapter, 0x458));
+                       DBG_88E("dbg(0x458) = 0x%x\n", usb_read32(padapter, 0x458));
 
-                       DBG_88E("dbg(0x484) = 0x%x\n", rtw_read32(padapter, 0x484));
-                       DBG_88E("dbg(0x488) = 0x%x\n", rtw_read32(padapter, 0x488));
+                       DBG_88E("dbg(0x484) = 0x%x\n", usb_read32(padapter, 0x484));
+                       DBG_88E("dbg(0x488) = 0x%x\n", usb_read32(padapter, 0x488));
 
-                       DBG_88E("dbg(0x444) = 0x%x\n", rtw_read32(padapter, 0x444));
-                       DBG_88E("dbg(0x448) = 0x%x\n", rtw_read32(padapter, 0x448));
-                       DBG_88E("dbg(0x44c) = 0x%x\n", rtw_read32(padapter, 0x44c));
-                       DBG_88E("dbg(0x450) = 0x%x\n", rtw_read32(padapter, 0x450));
+                       DBG_88E("dbg(0x444) = 0x%x\n", usb_read32(padapter, 0x444));
+                       DBG_88E("dbg(0x448) = 0x%x\n", usb_read32(padapter, 0x448));
+                       DBG_88E("dbg(0x44c) = 0x%x\n", usb_read32(padapter, 0x44c));
+                       DBG_88E("dbg(0x450) = 0x%x\n", usb_read32(padapter, 0x450));
                        break;
                }
                break;
@@ -6530,7 +6530,7 @@ static int rtw_mp_read_reg(struct net_device *dev,
                break;
        case 'd':
                /*  4 bytes */
-               sprintf(data, "%08x", rtw_read32(padapter, addr));
+               sprintf(data, "%08x", usb_read32(padapter, addr));
                /* add read data format blank */
                for (i = 0; i <= strlen(data); i++) {
                        if (i%2 == 0) {
@@ -7253,14 +7253,14 @@ static int rtw_mp_dump(struct net_device *dev,
                for (i = 0x0; i < 0x300; i += 4) {
                        if (j%4 == 1)
                                DBG_88E("0x%02x", i);
-                       DBG_88E(" 0x%08x ", rtw_read32(padapter, i));
+                       DBG_88E(" 0x%08x ", usb_read32(padapter, i));
                        if ((j++)%4 == 0)
                                DBG_88E("\n");
                }
                for (i = 0x400; i < 0x1000; i += 4) {
                        if (j%4 == 1)
                                DBG_88E("0x%02x", i);
-                       DBG_88E(" 0x%08x ", rtw_read32(padapter, i));
+                       DBG_88E(" 0x%08x ", usb_read32(padapter, i));
                        if ((j++)%4 == 0)
                                DBG_88E("\n");
                }