u8 _rtw_read823a(struct rtw_adapter *adapter, u32 addr)
{
u8 r_val;
- struct intf_hdl *pintfhdl = &adapter->intf;
+ struct _io_ops *io_ops = &adapter->io_ops;
- r_val = pintfhdl->io_ops._read8(adapter, addr);
+ r_val = io_ops->_read8(adapter, addr);
return r_val;
}
u16 _rtw_read1623a(struct rtw_adapter *adapter, u32 addr)
{
u16 r_val;
- struct intf_hdl *pintfhdl = &adapter->intf;
+ struct _io_ops *io_ops = &adapter->io_ops;
- r_val = pintfhdl->io_ops._read16(adapter, addr);
+ r_val = io_ops->_read16(adapter, addr);
return le16_to_cpu(r_val);
}
u32 _rtw_read3223a(struct rtw_adapter *adapter, u32 addr)
{
u32 r_val;
- struct intf_hdl *pintfhdl = &adapter->intf;
+ struct _io_ops *io_ops = &adapter->io_ops;
- r_val = pintfhdl->io_ops._read32(adapter, addr);
+ r_val = io_ops->_read32(adapter, addr);
return le32_to_cpu(r_val);
}
int _rtw_write823a(struct rtw_adapter *adapter, u32 addr, u8 val)
{
- struct intf_hdl *pintfhdl = &adapter->intf;
+ struct _io_ops *io_ops = &adapter->io_ops;
int ret;
- ret = pintfhdl->io_ops._write8(adapter, addr, val);
+ ret = io_ops->_write8(adapter, addr, val);
return RTW_STATUS_CODE23a(ret);
}
int _rtw_write1623a(struct rtw_adapter *adapter, u32 addr, u16 val)
{
- struct intf_hdl *pintfhdl = &adapter->intf;
+ struct _io_ops *io_ops = &adapter->io_ops;
int ret;
val = cpu_to_le16(val);
- ret = pintfhdl->io_ops._write16(adapter, addr, val);
+ ret = io_ops->_write16(adapter, addr, val);
return RTW_STATUS_CODE23a(ret);
}
int _rtw_write3223a(struct rtw_adapter *adapter, u32 addr, u32 val)
{
- struct intf_hdl *pintfhdl = &adapter->intf;
+ struct _io_ops *io_ops = &adapter->io_ops;
int ret;
val = cpu_to_le32(val);
- ret = pintfhdl->io_ops._write32(adapter, addr, val);
+ ret = io_ops->_write32(adapter, addr, val);
return RTW_STATUS_CODE23a(ret);
}
int _rtw_writeN23a(struct rtw_adapter *adapter, u32 addr , u32 length , u8 *pdata)
{
- struct intf_hdl *pintfhdl = &adapter->intf;
+ struct _io_ops *io_ops = &adapter->io_ops;
int ret;
- ret = pintfhdl->io_ops._writeN(adapter, addr, length, pdata);
+ ret = io_ops->_writeN(adapter, addr, length, pdata);
return RTW_STATUS_CODE23a(ret);
}
void _rtw_read_mem23a(struct rtw_adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
{
- struct intf_hdl *pintfhdl = &adapter->intf;
+ struct _io_ops *io_ops = &adapter->io_ops;
if ((adapter->bDriverStopped == true) ||
(adapter->bSurpriseRemoved == true)) {
return;
}
- pintfhdl->io_ops._read_mem(adapter, addr, cnt, pmem);
+ io_ops->_read_mem(adapter, addr, cnt, pmem);
}
void _rtw_write_mem23a(struct rtw_adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
{
- struct intf_hdl *pintfhdl = &adapter->intf;
+ struct _io_ops *io_ops = &adapter->io_ops;
- pintfhdl->io_ops._write_mem(adapter, addr, cnt, pmem);
+ io_ops->_write_mem(adapter, addr, cnt, pmem);
}
void _rtw_read_port23a(struct rtw_adapter *adapter, u32 addr, u32 cnt,
- struct recv_buf *rbuf)
+ struct recv_buf *rbuf)
{
- struct intf_hdl *pintfhdl = &adapter->intf;
+ struct _io_ops *io_ops = &adapter->io_ops;
if ((adapter->bDriverStopped == true) ||
(adapter->bSurpriseRemoved == true)) {
return;
}
- pintfhdl->io_ops._read_port(adapter, addr, cnt, rbuf);
+ io_ops->_read_port(adapter, addr, cnt, rbuf);
}
void _rtw_read_port23a_cancel(struct rtw_adapter *adapter)
{
void (*_read_port_cancel)(struct rtw_adapter *adapter);
- struct intf_hdl *pintfhdl = &adapter->intf;
+ struct _io_ops *io_ops = &adapter->io_ops;
- _read_port_cancel = pintfhdl->io_ops._read_port_cancel;
+ _read_port_cancel = io_ops->_read_port_cancel;
if (_read_port_cancel)
_read_port_cancel(adapter);
u32 _rtw_write_port23a(struct rtw_adapter *adapter, u32 addr, u32 cnt,
struct xmit_buf *xbuf)
{
- struct intf_hdl *pintfhdl = &adapter->intf;
+ struct _io_ops *io_ops = &adapter->io_ops;
u32 ret = _SUCCESS;
- ret = pintfhdl->io_ops._write_port(adapter, addr, cnt, xbuf);
+ ret = io_ops->_write_port(adapter, addr, cnt, xbuf);
return ret;
}
void _rtw_write_port23a_cancel(struct rtw_adapter *adapter)
{
void (*_write_port_cancel)(struct rtw_adapter *adapter);
- struct intf_hdl *pintfhdl = &adapter->intf;
+ struct _io_ops *io_ops = &adapter->io_ops;
- _write_port_cancel = pintfhdl->io_ops._write_port_cancel;
+ _write_port_cancel = io_ops->_write_port_cancel;
if (_write_port_cancel)
_write_port_cancel(adapter);