mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
staging:r8188eu: change usb_read_port last argument type to (struct *recv_buf)
To avoid unnecessary typecasts. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
49cb9d4778
commit
181e61440d
@ -999,7 +999,7 @@ u32 rtw_hal_inirp_init(struct adapter *Adapter)
|
|||||||
/* issue Rx irp to receive data */
|
/* issue Rx irp to receive data */
|
||||||
precvbuf = (struct recv_buf *)precvpriv->precv_buf;
|
precvbuf = (struct recv_buf *)precvpriv->precv_buf;
|
||||||
for (i = 0; i < NR_RECVBUFF; i++) {
|
for (i = 0; i < NR_RECVBUFF; i++) {
|
||||||
if (usb_read_port(Adapter, precvpriv->ff_hwaddr, 0, (unsigned char *)precvbuf) == false) {
|
if (usb_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"));
|
RT_TRACE(_module_hci_hal_init_c_, _drv_err_, ("usb_rx_init: usb_read_port error\n"));
|
||||||
status = _FAIL;
|
status = _FAIL;
|
||||||
goto exit;
|
goto exit;
|
||||||
|
@ -53,7 +53,7 @@ u8 usb_read8(struct adapter *adapter, u32 addr);
|
|||||||
u16 usb_read16(struct adapter *adapter, u32 addr);
|
u16 usb_read16(struct adapter *adapter, u32 addr);
|
||||||
u32 usb_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);
|
u32 usb_read_port(struct adapter *adapter, u32 addr, u32 cnt, struct recv_buf *precvbuf);
|
||||||
void usb_read_port_cancel(struct adapter *adapter);
|
void usb_read_port_cancel(struct adapter *adapter);
|
||||||
|
|
||||||
int usb_write8(struct adapter *adapter, u32 addr, u8 val);
|
int usb_write8(struct adapter *adapter, u32 addr, u8 val);
|
||||||
|
@ -403,7 +403,7 @@ static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs)
|
|||||||
RT_TRACE(_module_hci_ops_os_c_, _drv_err_,
|
RT_TRACE(_module_hci_ops_os_c_, _drv_err_,
|
||||||
("usb_read_port_complete: (purb->actual_length > MAX_RECVBUF_SZ) || (purb->actual_length < RXDESC_SIZE)\n"));
|
("usb_read_port_complete: (purb->actual_length > MAX_RECVBUF_SZ) || (purb->actual_length < RXDESC_SIZE)\n"));
|
||||||
precvbuf->reuse = true;
|
precvbuf->reuse = true;
|
||||||
usb_read_port(adapt, precvpriv->ff_hwaddr, 0, (unsigned char *)precvbuf);
|
usb_read_port(adapt, precvpriv->ff_hwaddr, 0, precvbuf);
|
||||||
DBG_88E("%s()-%d: RX Warning!\n", __func__, __LINE__);
|
DBG_88E("%s()-%d: RX Warning!\n", __func__, __LINE__);
|
||||||
} else {
|
} else {
|
||||||
skb_put(precvbuf->pskb, purb->actual_length);
|
skb_put(precvbuf->pskb, purb->actual_length);
|
||||||
@ -414,7 +414,7 @@ static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs)
|
|||||||
|
|
||||||
precvbuf->pskb = NULL;
|
precvbuf->pskb = NULL;
|
||||||
precvbuf->reuse = false;
|
precvbuf->reuse = false;
|
||||||
usb_read_port(adapt, precvpriv->ff_hwaddr, 0, (unsigned char *)precvbuf);
|
usb_read_port(adapt, precvpriv->ff_hwaddr, 0, precvbuf);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
RT_TRACE(_module_hci_ops_os_c_, _drv_err_, ("usb_read_port_complete : purb->status(%d) != 0\n", purb->status));
|
RT_TRACE(_module_hci_ops_os_c_, _drv_err_, ("usb_read_port_complete : purb->status(%d) != 0\n", purb->status));
|
||||||
@ -437,7 +437,7 @@ static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs)
|
|||||||
case -EOVERFLOW:
|
case -EOVERFLOW:
|
||||||
adapt->HalData->srestpriv.Wifi_Error_Status = USB_READ_PORT_FAIL;
|
adapt->HalData->srestpriv.Wifi_Error_Status = USB_READ_PORT_FAIL;
|
||||||
precvbuf->reuse = true;
|
precvbuf->reuse = true;
|
||||||
usb_read_port(adapt, precvpriv->ff_hwaddr, 0, (unsigned char *)precvbuf);
|
usb_read_port(adapt, precvpriv->ff_hwaddr, 0, precvbuf);
|
||||||
break;
|
break;
|
||||||
case -EINPROGRESS:
|
case -EINPROGRESS:
|
||||||
DBG_88E("ERROR: URB IS IN PROGRESS!\n");
|
DBG_88E("ERROR: URB IS IN PROGRESS!\n");
|
||||||
@ -448,10 +448,9 @@ static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 usb_read_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *rmem)
|
u32 usb_read_port(struct adapter *adapter, u32 addr, u32 cnt, struct recv_buf *precvbuf)
|
||||||
{
|
{
|
||||||
struct urb *purb = NULL;
|
struct urb *purb = NULL;
|
||||||
struct recv_buf *precvbuf = (struct recv_buf *)rmem;
|
|
||||||
struct dvobj_priv *pdvobj = adapter_to_dvobj(adapter);
|
struct dvobj_priv *pdvobj = adapter_to_dvobj(adapter);
|
||||||
struct recv_priv *precvpriv = &adapter->recvpriv;
|
struct recv_priv *precvpriv = &adapter->recvpriv;
|
||||||
struct usb_device *pusbd = pdvobj->pusbdev;
|
struct usb_device *pusbd = pdvobj->pusbdev;
|
||||||
|
Loading…
Reference in New Issue
Block a user