u8 r_val;
struct intf_hdl *pintfhdl = &adapter->intf;
- r_val = pintfhdl->io_ops._read8(pintfhdl, addr);
+ r_val = pintfhdl->io_ops._read8(adapter, addr);
return r_val;
}
u16 r_val;
struct intf_hdl *pintfhdl = &adapter->intf;
- r_val = pintfhdl->io_ops._read16(pintfhdl, addr);
+ r_val = pintfhdl->io_ops._read16(adapter, addr);
return le16_to_cpu(r_val);
}
u32 r_val;
struct intf_hdl *pintfhdl = &adapter->intf;
- r_val = pintfhdl->io_ops._read32(pintfhdl, addr);
+ r_val = pintfhdl->io_ops._read32(adapter, addr);
return le32_to_cpu(r_val);
}
struct intf_hdl *pintfhdl = &adapter->intf;
int ret;
- ret = pintfhdl->io_ops._write8(pintfhdl, addr, val);
+ ret = pintfhdl->io_ops._write8(adapter, addr, val);
return RTW_STATUS_CODE23a(ret);
}
int ret;
val = cpu_to_le16(val);
- ret = pintfhdl->io_ops._write16(pintfhdl, addr, val);
+ ret = pintfhdl->io_ops._write16(adapter, addr, val);
return RTW_STATUS_CODE23a(ret);
}
int ret;
val = cpu_to_le32(val);
- ret = pintfhdl->io_ops._write32(pintfhdl, addr, val);
+ ret = pintfhdl->io_ops._write32(adapter, addr, val);
return RTW_STATUS_CODE23a(ret);
}
struct intf_hdl *pintfhdl = &adapter->intf;
int ret;
- ret = pintfhdl->io_ops._writeN(pintfhdl, addr, length, pdata);
+ ret = pintfhdl->io_ops._writeN(adapter, addr, length, pdata);
return RTW_STATUS_CODE23a(ret);
}
return;
}
- pintfhdl->io_ops._read_mem(pintfhdl, addr, cnt, pmem);
+ pintfhdl->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;
- pintfhdl->io_ops._write_mem(pintfhdl, addr, cnt, pmem);
+ pintfhdl->io_ops._write_mem(adapter, addr, cnt, pmem);
}
void _rtw_read_port23a(struct rtw_adapter *adapter, u32 addr, u32 cnt,
return;
}
- pintfhdl->io_ops._read_port(pintfhdl, addr, cnt, rbuf);
+ pintfhdl->io_ops._read_port(adapter, addr, cnt, rbuf);
}
void _rtw_read_port23a_cancel(struct rtw_adapter *adapter)
{
- void (*_read_port_cancel)(struct intf_hdl *pintfhdl);
+ void (*_read_port_cancel)(struct rtw_adapter *adapter);
struct intf_hdl *pintfhdl = &adapter->intf;
_read_port_cancel = pintfhdl->io_ops._read_port_cancel;
if (_read_port_cancel)
- _read_port_cancel(pintfhdl);
+ _read_port_cancel(adapter);
}
u32 _rtw_write_port23a(struct rtw_adapter *adapter, u32 addr, u32 cnt,
struct intf_hdl *pintfhdl = &adapter->intf;
u32 ret = _SUCCESS;
- ret = pintfhdl->io_ops._write_port(pintfhdl, addr, cnt, xbuf);
+ ret = pintfhdl->io_ops._write_port(adapter, addr, cnt, xbuf);
return ret;
}
void _rtw_write_port23a_cancel(struct rtw_adapter *adapter)
{
- void (*_write_port_cancel)(struct intf_hdl *pintfhdl);
+ void (*_write_port_cancel)(struct rtw_adapter *adapter);
struct intf_hdl *pintfhdl = &adapter->intf;
_write_port_cancel = pintfhdl->io_ops._write_port_cancel;
if (_write_port_cancel)
- _write_port_cancel(pintfhdl);
+ _write_port_cancel(adapter);
}
uint status;
struct intf_hdl *pintfhdl = &Adapter->intf;
struct recv_priv *precvpriv = &Adapter->recvpriv;
- u32 (*_read_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt,
+ u32 (*_read_port)(struct rtw_adapter *padapter, u32 addr, u32 cnt,
struct recv_buf *rbuf);
- u32 (*_read_interrupt)(struct intf_hdl *pintfhdl, u32 addr);
+ u32 (*_read_interrupt)(struct rtw_adapter *padapter, u32 addr);
struct hal_data_8723a *pHalData = GET_HAL_DATA(Adapter);
_read_port = pintfhdl->io_ops._read_port;
/* issue Rx irp to receive data */
precvbuf = (struct recv_buf *)precvpriv->precv_buf;
for (i = 0; i < NR_RECVBUFF; i++) {
- if (_read_port(pintfhdl, precvpriv->ff_hwaddr, 0, precvbuf) ==
+ if (_read_port(Adapter, precvpriv->ff_hwaddr, 0, precvbuf) ==
false) {
RT_TRACE(_module_hci_hal_init_c_, _drv_err_,
("usb_rx_init: usb_read_port error\n"));
precvpriv->free_recv_buf_queue_cnt--;
}
_read_interrupt = pintfhdl->io_ops._read_interrupt;
- if (_read_interrupt(pintfhdl, RECV_INT_IN_ADDR) == false) {
+ if (_read_interrupt(Adapter, RECV_INT_IN_ADDR) == false) {
RT_TRACE(_module_hci_hal_init_c_, _drv_err_,
("usb_rx_init: usb_read_interrupt error\n"));
status = _FAIL;
#include <rtl8723a_hal.h>
#include <rtl8723a_recv.h>
-static int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u8 request, u16 value, u16 index, void *pdata, u16 len, u8 requesttype)
+static int usbctrl_vendorreq(struct rtw_adapter *padapter, u8 request,
+ u16 value, u16 index, void *pdata, u16 len,
+ u8 requesttype)
{
- struct rtw_adapter *padapter = pintfhdl->padapter ;
struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(padapter);
struct usb_device *udev = pdvobjpriv->pusbdev;
return status;
}
-static u8 usb_read8(struct intf_hdl *pintfhdl, u32 addr)
+static u8 usb_read8(struct rtw_adapter *padapter, u32 addr)
{
u8 request;
u8 requesttype;
wvalue = (u16)(addr&0x0000ffff);
len = 1;
- usbctrl_vendorreq(pintfhdl, request, wvalue, index, &data, len, requesttype);
+ usbctrl_vendorreq(padapter, request, wvalue, index, &data,
+ len, requesttype);
return data;
}
-static u16 usb_read16(struct intf_hdl *pintfhdl, u32 addr)
+static u16 usb_read16(struct rtw_adapter *padapter, u32 addr)
{
u8 request;
u8 requesttype;
wvalue = (u16)(addr&0x0000ffff);
len = 2;
- usbctrl_vendorreq(pintfhdl, request, wvalue, index, &data, len, requesttype);
+ usbctrl_vendorreq(padapter, request, wvalue, index, &data,
+ len, requesttype);
return data;
}
-static u32 usb_read32(struct intf_hdl *pintfhdl, u32 addr)
+static u32 usb_read32(struct rtw_adapter *padapter, u32 addr)
{
u8 request;
u8 requesttype;
wvalue = (u16)(addr&0x0000ffff);
len = 4;
- usbctrl_vendorreq(pintfhdl, request, wvalue, index, &data, len, requesttype);
+ usbctrl_vendorreq(padapter, request, wvalue, index, &data,
+ len, requesttype);
return data;
}
-static int usb_write8(struct intf_hdl *pintfhdl, u32 addr, u8 val)
+static int usb_write8(struct rtw_adapter *padapter, u32 addr, u8 val)
{
u8 request;
u8 requesttype;
data = val;
- ret = usbctrl_vendorreq(pintfhdl, request, wvalue, index, &data, len, requesttype);
+ ret = usbctrl_vendorreq(padapter, request, wvalue, index, &data,
+ len, requesttype);
return ret;
}
-static int usb_write16(struct intf_hdl *pintfhdl, u32 addr, u16 val)
+static int usb_write16(struct rtw_adapter *padapter, u32 addr, u16 val)
{
u8 request;
u8 requesttype;
data = val;
- ret = usbctrl_vendorreq(pintfhdl, request, wvalue, index, &data, len, requesttype);
+ ret = usbctrl_vendorreq(padapter, request, wvalue, index, &data,
+ len, requesttype);
return ret;
}
-static int usb_write32(struct intf_hdl *pintfhdl, u32 addr, u32 val)
+static int usb_write32(struct rtw_adapter *padapter, u32 addr, u32 val)
{
u8 request;
u8 requesttype;
len = 4;
data = val;
- ret = usbctrl_vendorreq(pintfhdl, request, wvalue, index, &data, len, requesttype);
+ ret = usbctrl_vendorreq(padapter, request, wvalue, index, &data,
+ len, requesttype);
return ret;
}
-static int usb_writeN(struct intf_hdl *pintfhdl, u32 addr, u32 length, u8 *pdata)
+static int usb_writeN(struct rtw_adapter *padapter,
+ u32 addr, u32 length, u8 *pdata)
{
u8 request;
u8 requesttype;
wvalue = (u16)(addr&0x0000ffff);
len = length;
- memcpy(buf, pdata, len);
+ memcpy(buf, pdata, len);
- ret = usbctrl_vendorreq(pintfhdl, request, wvalue, index, buf, len, requesttype);
+ ret = usbctrl_vendorreq(padapter, request, wvalue, index, buf,
+ len, requesttype);
return ret;
}
}
}
-static u32 usb_read_interrupt(struct intf_hdl *pintfhdl, u32 addr)
+static u32 usb_read_interrupt(struct rtw_adapter *adapter, u32 addr)
{
int err;
unsigned int pipe;
u32 ret = _SUCCESS;
- struct rtw_adapter *adapter = pintfhdl->padapter;
struct dvobj_priv *pdvobj = adapter_to_dvobj(adapter);
struct recv_priv *precvpriv = &adapter->recvpriv;
struct usb_device *pusbd = pdvobj->pusbdev;
}
}
-static u32 usb_read_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt,
+static u32 usb_read_port(struct rtw_adapter *adapter, u32 addr, u32 cnt,
struct recv_buf *precvbuf)
{
int err;
unsigned long alignment = 0;
u32 ret = _SUCCESS;
struct urb *purb = NULL;
- struct rtw_adapter *adapter = pintfhdl->padapter;
struct dvobj_priv *pdvobj = adapter_to_dvobj(adapter);
struct recv_priv *precvpriv = &adapter->recvpriv;
struct usb_device *pusbd = pdvobj->pusbdev;
struct _io_ops
{
- u8 (*_read8)(struct intf_hdl *pintfhdl, u32 addr);
- u16 (*_read16)(struct intf_hdl *pintfhdl, u32 addr);
- u32 (*_read32)(struct intf_hdl *pintfhdl, u32 addr);
+ u8 (*_read8)(struct rtw_adapter *adapter, u32 addr);
+ u16 (*_read16)(struct rtw_adapter *adapter, u32 addr);
+ u32 (*_read32)(struct rtw_adapter *adapter, u32 addr);
- int (*_write8)(struct intf_hdl *pintfhdl, u32 addr, u8 val);
- int (*_write16)(struct intf_hdl *pintfhdl, u32 addr, u16 val);
- int (*_write32)(struct intf_hdl *pintfhdl, u32 addr, u32 val);
- int (*_writeN)(struct intf_hdl *pintfhdl, u32 addr, u32 length, u8 *pdata);
+ int (*_write8)(struct rtw_adapter *adapter, u32 addr, u8 val);
+ int (*_write16)(struct rtw_adapter *adapter, u32 addr, u16 val);
+ int (*_write32)(struct rtw_adapter *adapter, u32 addr, u32 val);
+ int (*_writeN)(struct rtw_adapter *adapter, u32 addr, u32 length, u8 *pdata);
- void (*_read_mem)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
- void (*_write_mem)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
+ void (*_read_mem)(struct rtw_adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
+ void (*_write_mem)(struct rtw_adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
- u32 (*_read_interrupt)(struct intf_hdl *pintfhdl, u32 addr);
+ u32 (*_read_interrupt)(struct rtw_adapter *adapter, u32 addr);
- u32 (*_read_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, struct recv_buf *rbuf);
- u32 (*_write_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, struct xmit_buf *pmem);
+ u32 (*_read_port)(struct rtw_adapter *adapter, u32 addr, u32 cnt, struct recv_buf *rbuf);
+ u32 (*_write_port)(struct rtw_adapter *adapter, u32 addr, u32 cnt, struct xmit_buf *pmem);
- void (*_read_port_cancel)(struct intf_hdl *pintfhdl);
- void (*_write_port_cancel)(struct intf_hdl *pintfhdl);
+ void (*_read_port_cancel)(struct rtw_adapter *adapter);
+ void (*_write_port_cancel)(struct rtw_adapter *adapter);
};
struct io_req {
unsigned int ffaddr2pipehdl23a(struct dvobj_priv *pdvobj, u32 addr);
-void usb_read_mem23a(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem);
-void usb_write_mem23a(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem);
+void usb_read_mem23a(struct rtw_adapter *adapter, u32 addr, u32 cnt, u8 *rmem);
+void usb_write_mem23a(struct rtw_adapter *adapter, u32 addr, u32 cnt, u8 *wmem);
-void usb_read_port_cancel23a(struct intf_hdl *pintfhdl);
+void usb_read_port_cancel23a(struct rtw_adapter *adapter);
-u32 usb_write_port23a(struct intf_hdl *pintfhdl, u32 addr, u32 cnt,
- struct xmit_buf *wmem);
-void usb_write_port23a_cancel(struct intf_hdl *pintfhdl);
+u32 usb_write_port23a(struct rtw_adapter *adapter, u32 addr, u32 cnt,
+ struct xmit_buf *wmem);
+void usb_write_port23a_cancel(struct rtw_adapter *adapter);
#endif
void *padapter;
};
-void usb_read_mem23a(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem)
+void usb_read_mem23a(struct rtw_adapter *adapter, u32 addr, u32 cnt, u8 *rmem)
{
}
-void usb_write_mem23a(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem)
+void usb_write_mem23a(struct rtw_adapter *adapter, u32 addr, u32 cnt, u8 *wmem)
{
}
-void usb_read_port_cancel23a(struct intf_hdl *pintfhdl)
+void usb_read_port_cancel23a(struct rtw_adapter *padapter)
{
struct recv_buf *precvbuf;
- struct rtw_adapter *padapter = pintfhdl->padapter;
int i;
precvbuf = (struct recv_buf *)padapter->recvpriv.precv_buf;
tasklet_hi_schedule(&pxmitpriv->xmit_tasklet);
}
-u32 usb_write_port23a(struct intf_hdl *pintfhdl, u32 addr, u32 cnt,
- struct xmit_buf *pxmitbuf)
+u32 usb_write_port23a(struct rtw_adapter *padapter, u32 addr, u32 cnt,
+ struct xmit_buf *pxmitbuf)
{
struct urb *purb = NULL;
- struct rtw_adapter *padapter = (struct rtw_adapter *)pintfhdl->padapter;
struct dvobj_priv *pdvobj = adapter_to_dvobj(padapter);
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
struct xmit_frame *pxmitframe = (struct xmit_frame *)pxmitbuf->priv_data;
return ret;
}
-void usb_write_port23a_cancel(struct intf_hdl *pintfhdl)
+void usb_write_port23a_cancel(struct rtw_adapter *padapter)
{
- struct rtw_adapter *padapter = pintfhdl->padapter;
struct xmit_buf *pxmitbuf;
struct list_head *plist;
int j;