Commit 9764ed04 authored by navin patidar's avatar navin patidar Committed by Greg Kroah-Hartman

staging: rtl8188eu: Remove function _rtw_write16()

_rtw_write16() is a wrapper function, being used to call usb_write16().
Call usb_write16() directly and drop _rtw_write16().
Signed-off-by: default avatarnavin patidar <navin.patidar@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fc158079
......@@ -66,7 +66,7 @@ int proc_set_write_reg(struct file *file, const char __user *buffer,
rtw_write8(padapter, addr, (u8)val);
break;
case 2:
rtw_write16(padapter, addr, (u16)val);
usb_write16(padapter, addr, (u16)val);
break;
case 4:
usb_write32(padapter, addr, val);
......
......@@ -101,19 +101,6 @@ int _rtw_write8(struct adapter *adapter, u32 addr, u8 val)
return RTW_STATUS_CODE(ret);
}
int _rtw_write16(struct adapter *adapter, u32 addr, u16 val)
{
struct io_priv *pio_priv = &adapter->iopriv;
struct intf_hdl *pintfhdl = &(pio_priv->intf);
int (*_write16)(struct adapter *pintfhdl, u32 addr, u16 val);
int ret;
_write16 = pintfhdl->io_ops._write16;
ret = _write16(adapter, addr, val);
return RTW_STATUS_CODE(ret);
}
int rtw_init_io_priv(struct adapter *padapter, void (*set_intf_ops)(struct _io_ops *pops))
{
struct io_priv *piopriv = &padapter->iopriv;
......
......@@ -53,7 +53,7 @@ void write_macreg(struct adapter *padapter, u32 addr, u32 val, u32 sz)
rtw_write8(padapter, addr, (u8)val);
break;
case 2:
rtw_write16(padapter, addr, (u16)val);
usb_write16(padapter, addr, (u16)val);
break;
case 4:
usb_write32(padapter, addr, val);
......@@ -234,8 +234,8 @@ s32 MPT_InitializeAdapter(struct adapter *pAdapter, u8 Channel)
pMptCtx->backup0x52_RF_B = (u8)PHY_QueryRFReg(pAdapter, RF_PATH_A, RF_0x52, 0x000F0);
/* set ant to wifi side in mp mode */
rtw_write16(pAdapter, 0x870, 0x300);
rtw_write16(pAdapter, 0x860, 0x110);
usb_write16(pAdapter, 0x870, 0x300);
usb_write16(pAdapter, 0x860, 0x110);
if (pAdapter->registrypriv.mp_mode == 1)
pmlmepriv->fw_state = WIFI_MP_STATE;
......@@ -791,7 +791,7 @@ void SetPacketRx(struct adapter *pAdapter, u8 bStartRx)
usb_write32(pAdapter, REG_RCR, pHalData->ReceiveConfig);
/* Accept all data frames */
rtw_write16(pAdapter, REG_RXFLTMAP2, 0xFFFF);
usb_write16(pAdapter, REG_RXFLTMAP2, 0xFFFF);
} else {
usb_write32(pAdapter, REG_RCR, 0);
}
......
......@@ -860,7 +860,7 @@ int rtl8188eu_oid_rt_pro_write_register_hdl(struct oid_par_priv *poid_par_priv)
status = NDIS_STATUS_NOT_ACCEPTED;
break;
}
rtw_write16(padapter, offset, (u16)value);
usb_write16(padapter, offset, (u16)value);
break;
case 4:
usb_write32(padapter, offset, value);
......
......@@ -670,7 +670,7 @@ void ODM_RA_Set_TxRPT_Time(struct odm_dm_struct *dm_odm, u16 minRptTime)
{
struct adapter *adapt = dm_odm->Adapter;
rtw_write16(adapt, REG_TX_RPT_TIME, minRptTime);
usb_write16(adapt, REG_TX_RPT_TIME, minRptTime);
}
void ODM_RA_TxRPT2Handle_8188E(struct odm_dm_struct *dm_odm, u8 *TxRPT_Buf, u16 TxRPT_Len, u32 macid_entry0, u32 macid_entry1)
......
......@@ -615,7 +615,7 @@ void rtl8188e_set_FwJoinBssReport_cmd(struct adapter *adapt, u8 mstatus)
if (mstatus == 1) {
/* We should set AID, correct TSF, HW seq enable before set JoinBssReport to Fw in 88/92C. */
/* Suggested by filen. Added by tynli. */
rtw_write16(adapt, REG_BCN_PSR_RPT, (0xC000|pmlmeinfo->aid));
usb_write16(adapt, REG_BCN_PSR_RPT, (0xC000|pmlmeinfo->aid));
/* Do not set TSF again here or vWiFi beacon DMA INT will not work. */
/* Set REG_CR bit 8. DMA beacon by SW. */
......
......@@ -236,7 +236,7 @@ static void efuse_read_phymap_from_txpktbuf(
dbg_addr = bcnhead*128/8; /* 8-bytes addressing */
while (1) {
rtw_write16(adapter, REG_PKTBUF_DBG_ADDR, dbg_addr+i);
usb_write16(adapter, REG_PKTBUF_DBG_ADDR, dbg_addr+i);
rtw_write8(adapter, REG_TXPKTBUF_DBG, 0);
start = jiffies;
......@@ -766,20 +766,20 @@ hal_EfusePowerSwitch_RTL8188E(
tmpV16 = rtw_read16(pAdapter, REG_SYS_ISO_CTRL);
if (!(tmpV16 & PWC_EV12V)) {
tmpV16 |= PWC_EV12V;
rtw_write16(pAdapter, REG_SYS_ISO_CTRL, tmpV16);
usb_write16(pAdapter, REG_SYS_ISO_CTRL, tmpV16);
}
/* Reset: 0x0000h[28], default valid */
tmpV16 = rtw_read16(pAdapter, REG_SYS_FUNC_EN);
if (!(tmpV16 & FEN_ELDR)) {
tmpV16 |= FEN_ELDR;
rtw_write16(pAdapter, REG_SYS_FUNC_EN, tmpV16);
usb_write16(pAdapter, REG_SYS_FUNC_EN, tmpV16);
}
/* Clock: Gated(0x0008h[5]) 8M(0x0008h[1]) clock from ANA, default valid */
tmpV16 = rtw_read16(pAdapter, REG_SYS_CLKR);
if ((!(tmpV16 & LOADER_CLK_EN)) || (!(tmpV16 & ANA8M))) {
tmpV16 |= (LOADER_CLK_EN | ANA8M);
rtw_write16(pAdapter, REG_SYS_CLKR, tmpV16);
usb_write16(pAdapter, REG_SYS_CLKR, tmpV16);
}
if (bWrite) {
......
......@@ -386,7 +386,7 @@ s32 PHY_MACConfig8188E(struct adapter *Adapter)
rtStatus = _FAIL;
/* 2010.07.13 AMPDU aggregation number B */
rtw_write16(Adapter, REG_MAX_AGGR_NUM, MAX_AGGR_NUM);
usb_write16(Adapter, REG_MAX_AGGR_NUM, MAX_AGGR_NUM);
return rtStatus;
}
......@@ -604,7 +604,7 @@ PHY_BBConfig8188E(
/* Enable BB and RF */
RegVal = rtw_read16(Adapter, REG_SYS_FUNC_EN);
rtw_write16(Adapter, REG_SYS_FUNC_EN, (u16)(RegVal|BIT13|BIT0|BIT1));
usb_write16(Adapter, REG_SYS_FUNC_EN, (u16)(RegVal|BIT13|BIT0|BIT1));
/* 20090923 Joseph: Advised by Steven and Jenyu. Power sequence before init RF. */
......
This diff is collapsed.
......@@ -201,7 +201,7 @@ static int usb_write8(struct adapter *adapter, u32 addr, u8 val)
return ret;
}
static int usb_write16(struct adapter *adapter, u32 addr, u16 val)
int usb_write16(struct adapter *adapter, u32 addr, u16 val)
{
u8 request;
u8 requesttype;
......@@ -670,5 +670,4 @@ void rtl8188eu_set_intf_ops(struct _io_ops *pops)
pops->_read16 = &usb_read16;
pops->_read32 = &usb_read32;
pops->_write8 = &usb_write8;
pops->_write16 = &usb_write16;
}
......@@ -48,7 +48,6 @@ struct _io_ops {
u16 (*_read16)(struct adapter *pintfhdl, u32 addr);
u32 (*_read32)(struct adapter *pintfhdl, u32 addr);
int (*_write8)(struct adapter *pintfhdl, u32 addr, u8 val);
int (*_write16)(struct adapter *pintfhdl, u32 addr, u16 val);
};
struct io_req {
......@@ -87,7 +86,7 @@ u32 usb_read_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
void usb_read_port_cancel(struct adapter *adapter);
int _rtw_write8(struct adapter *adapter, u32 addr, u8 val);
int _rtw_write16(struct adapter *adapter, u32 addr, u16 val);
int usb_write16(struct adapter *adapter, u32 addr, u16 val);
int usb_write32(struct adapter *adapter, u32 addr, u32 val);
int usb_writeN(struct adapter *adapter, u32 addr, u32 length, u8 *pdata);
......@@ -100,8 +99,6 @@ void usb_write_port_cancel(struct adapter *adapter);
#define rtw_write8(adapter, addr, val) \
_rtw_write8((adapter), (addr), (val))
#define rtw_write16(adapter, addr, val) \
_rtw_write16((adapter), (addr), (val))
int rtw_init_io_priv(struct adapter *padapter,
void (*set_intf_ops)(struct _io_ops *pops));
......
......@@ -2226,7 +2226,7 @@ static int rtw_wx_write32(struct net_device *dev,
DBG_88E(KERN_INFO "%s: addr = 0x%08X data = 0x%02X\n", __func__, addr, (u8)data32);
break;
case 2:
rtw_write16(padapter, addr, (u16)data32);
usb_write16(padapter, addr, (u16)data32);
DBG_88E(KERN_INFO "%s: addr = 0x%08X data = 0x%04X\n", __func__, addr, (u16)data32);
break;
case 4:
......@@ -2373,7 +2373,7 @@ static void rtw_dbg_mode_hdl(struct adapter *padapter, u32 id, u8 *pdata, u32 le
rtw_write8(padapter, RegRWStruct->offset, (u8)RegRWStruct->value);
break;
case 2:
rtw_write16(padapter, RegRWStruct->offset, (u16)RegRWStruct->value);
usb_write16(padapter, RegRWStruct->offset, (u16)RegRWStruct->value);
break;
case 4:
usb_write32(padapter, RegRWStruct->offset, (u32)RegRWStruct->value);
......@@ -4126,8 +4126,8 @@ static int rtw_dbg_port(struct net_device *dev,
DBG_88E("rtw_write8(0x%x) = 0x%02x\n", arg, rtw_read8(padapter, arg));
break;
case 2:
rtw_write16(padapter, arg, extra_arg);
DBG_88E("rtw_write16(0x%x) = 0x%04x\n", arg, rtw_read16(padapter, arg));
usb_write16(padapter, arg, extra_arg);
DBG_88E("usb_write16(0x%x) = 0x%04x\n", arg, rtw_read16(padapter, arg));
break;
case 4:
usb_write32(padapter, arg, extra_arg);
......@@ -4311,7 +4311,7 @@ static int rtw_dbg_port(struct net_device *dev,
value = value | 0x10;
write_value = value | (value << 5);
rtw_write16(padapter, 0x6d9, write_value);
usb_write16(padapter, 0x6d9, write_value);
}
break;
case 0x7a:
......@@ -6422,7 +6422,7 @@ static int rtw_mp_write_reg(struct net_device *dev,
ret = -EINVAL;
break;
}
rtw_write16(padapter, addr, data);
usb_write16(padapter, addr, data);
break;
case 'd':
/* 4 bytes */
......
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