Commit 43969aa7 authored by Ivan Safonov's avatar Ivan Safonov Committed by Greg Kroah-Hartman

staging: r8188eu: change last argument type of the usb_write_port function

usb_write_port writes only xmit_buf object data to device.
In addition, an appropriate name for this argument is used.
Signed-off-by: default avatarIvan Safonov <insafonov@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d37843d1
...@@ -387,7 +387,7 @@ static s32 rtw_dump_xframe(struct adapter *adapt, struct xmit_frame *pxmitframe) ...@@ -387,7 +387,7 @@ static s32 rtw_dump_xframe(struct adapter *adapt, struct xmit_frame *pxmitframe)
} }
ff_hwaddr = rtw_get_ff_hwaddr(pxmitframe); ff_hwaddr = rtw_get_ff_hwaddr(pxmitframe);
inner_ret = usb_write_port(adapt, ff_hwaddr, w_sz, (unsigned char *)pxmitbuf); inner_ret = usb_write_port(adapt, ff_hwaddr, w_sz, pxmitbuf);
rtw_count_tx_stats(adapt, pxmitframe, sz); rtw_count_tx_stats(adapt, pxmitframe, sz);
...@@ -592,7 +592,7 @@ s32 rtl8188eu_xmitframe_complete(struct adapter *adapt, struct xmit_priv *pxmitp ...@@ -592,7 +592,7 @@ s32 rtl8188eu_xmitframe_complete(struct adapter *adapt, struct xmit_priv *pxmitp
/* 3 4. write xmit buffer to USB FIFO */ /* 3 4. write xmit buffer to USB FIFO */
ff_hwaddr = rtw_get_ff_hwaddr(pfirstframe); ff_hwaddr = rtw_get_ff_hwaddr(pfirstframe);
usb_write_port(adapt, ff_hwaddr, pbuf_tail, (u8 *)pxmitbuf); usb_write_port(adapt, ff_hwaddr, pbuf_tail, pxmitbuf);
/* 3 5. update statisitc */ /* 3 5. update statisitc */
pbuf_tail -= (pfirstframe->agg_num * TXDESC_SIZE); pbuf_tail -= (pfirstframe->agg_num * TXDESC_SIZE);
......
...@@ -75,7 +75,7 @@ int usb_write8(struct adapter *adapter, u32 addr, u8 val); ...@@ -75,7 +75,7 @@ int usb_write8(struct adapter *adapter, u32 addr, u8 val);
int usb_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_write32(struct adapter *adapter, u32 addr, u32 val);
u32 usb_write_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem); u32 usb_write_port(struct adapter *adapter, u32 addr, u32 cnt, struct xmit_buf *pmem);
void usb_write_port_cancel(struct adapter *adapter); void usb_write_port_cancel(struct adapter *adapter);
#endif #endif
...@@ -693,7 +693,7 @@ static void usb_write_port_complete(struct urb *purb, struct pt_regs *regs) ...@@ -693,7 +693,7 @@ static void usb_write_port_complete(struct urb *purb, struct pt_regs *regs)
tasklet_hi_schedule(&pxmitpriv->xmit_tasklet); tasklet_hi_schedule(&pxmitpriv->xmit_tasklet);
} }
u32 usb_write_port(struct adapter *padapter, u32 addr, u32 cnt, u8 *wmem) u32 usb_write_port(struct adapter *padapter, u32 addr, u32 cnt, struct xmit_buf *xmitbuf)
{ {
unsigned long irqL; unsigned long irqL;
unsigned int pipe; unsigned int pipe;
...@@ -702,8 +702,7 @@ u32 usb_write_port(struct adapter *padapter, u32 addr, u32 cnt, u8 *wmem) ...@@ -702,8 +702,7 @@ u32 usb_write_port(struct adapter *padapter, u32 addr, u32 cnt, u8 *wmem)
struct urb *purb = NULL; struct urb *purb = NULL;
struct dvobj_priv *pdvobj = adapter_to_dvobj(padapter); struct dvobj_priv *pdvobj = adapter_to_dvobj(padapter);
struct xmit_priv *pxmitpriv = &padapter->xmitpriv; struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
struct xmit_buf *pxmitbuf = (struct xmit_buf *)wmem; struct xmit_frame *pxmitframe = (struct xmit_frame *)xmitbuf->priv_data;
struct xmit_frame *pxmitframe = (struct xmit_frame *)pxmitbuf->priv_data;
struct usb_device *pusbd = pdvobj->pusbdev; struct usb_device *pusbd = pdvobj->pusbdev;
...@@ -713,7 +712,7 @@ u32 usb_write_port(struct adapter *padapter, u32 addr, u32 cnt, u8 *wmem) ...@@ -713,7 +712,7 @@ u32 usb_write_port(struct adapter *padapter, u32 addr, u32 cnt, u8 *wmem)
(padapter->pwrctrlpriv.pnp_bstop_trx)) { (padapter->pwrctrlpriv.pnp_bstop_trx)) {
RT_TRACE(_module_hci_ops_os_c_, _drv_err_, RT_TRACE(_module_hci_ops_os_c_, _drv_err_,
("usb_write_port:( padapter->bDriverStopped ||padapter->bSurpriseRemoved ||adapter->pwrctrlpriv.pnp_bstop_trx)!!!\n")); ("usb_write_port:( padapter->bDriverStopped ||padapter->bSurpriseRemoved ||adapter->pwrctrlpriv.pnp_bstop_trx)!!!\n"));
rtw_sctx_done_err(&pxmitbuf->sctx, RTW_SCTX_DONE_TX_DENY); rtw_sctx_done_err(&xmitbuf->sctx, RTW_SCTX_DONE_TX_DENY);
goto exit; goto exit;
} }
...@@ -722,44 +721,44 @@ u32 usb_write_port(struct adapter *padapter, u32 addr, u32 cnt, u8 *wmem) ...@@ -722,44 +721,44 @@ u32 usb_write_port(struct adapter *padapter, u32 addr, u32 cnt, u8 *wmem)
switch (addr) { switch (addr) {
case VO_QUEUE_INX: case VO_QUEUE_INX:
pxmitpriv->voq_cnt++; pxmitpriv->voq_cnt++;
pxmitbuf->flags = VO_QUEUE_INX; xmitbuf->flags = VO_QUEUE_INX;
break; break;
case VI_QUEUE_INX: case VI_QUEUE_INX:
pxmitpriv->viq_cnt++; pxmitpriv->viq_cnt++;
pxmitbuf->flags = VI_QUEUE_INX; xmitbuf->flags = VI_QUEUE_INX;
break; break;
case BE_QUEUE_INX: case BE_QUEUE_INX:
pxmitpriv->beq_cnt++; pxmitpriv->beq_cnt++;
pxmitbuf->flags = BE_QUEUE_INX; xmitbuf->flags = BE_QUEUE_INX;
break; break;
case BK_QUEUE_INX: case BK_QUEUE_INX:
pxmitpriv->bkq_cnt++; pxmitpriv->bkq_cnt++;
pxmitbuf->flags = BK_QUEUE_INX; xmitbuf->flags = BK_QUEUE_INX;
break; break;
case HIGH_QUEUE_INX: case HIGH_QUEUE_INX:
pxmitbuf->flags = HIGH_QUEUE_INX; xmitbuf->flags = HIGH_QUEUE_INX;
break; break;
default: default:
pxmitbuf->flags = MGT_QUEUE_INX; xmitbuf->flags = MGT_QUEUE_INX;
break; break;
} }
spin_unlock_irqrestore(&pxmitpriv->lock, irqL); spin_unlock_irqrestore(&pxmitpriv->lock, irqL);
purb = pxmitbuf->pxmit_urb[0]; purb = xmitbuf->pxmit_urb[0];
/* translate DMA FIFO addr to pipehandle */ /* translate DMA FIFO addr to pipehandle */
pipe = ffaddr2pipehdl(pdvobj, addr); pipe = ffaddr2pipehdl(pdvobj, addr);
usb_fill_bulk_urb(purb, pusbd, pipe, usb_fill_bulk_urb(purb, pusbd, pipe,
pxmitframe->buf_addr, /* pxmitbuf->pbuf */ pxmitframe->buf_addr, /* xmitbuf->pbuf */
cnt, cnt,
usb_write_port_complete, usb_write_port_complete,
pxmitbuf);/* context is pxmitbuf */ xmitbuf);/* context is xmitbuf */
status = usb_submit_urb(purb, GFP_ATOMIC); status = usb_submit_urb(purb, GFP_ATOMIC);
if (status) { if (status) {
rtw_sctx_done_err(&pxmitbuf->sctx, RTW_SCTX_DONE_WRITE_PORT_ERR); rtw_sctx_done_err(&xmitbuf->sctx, RTW_SCTX_DONE_WRITE_PORT_ERR);
DBG_88E("usb_write_port, status =%d\n", status); DBG_88E("usb_write_port, status =%d\n", status);
RT_TRACE(_module_hci_ops_os_c_, _drv_err_, ("usb_write_port(): usb_submit_urb, status =%x\n", status)); RT_TRACE(_module_hci_ops_os_c_, _drv_err_, ("usb_write_port(): usb_submit_urb, status =%x\n", status));
...@@ -781,7 +780,7 @@ u32 usb_write_port(struct adapter *padapter, u32 addr, u32 cnt, u8 *wmem) ...@@ -781,7 +780,7 @@ u32 usb_write_port(struct adapter *padapter, u32 addr, u32 cnt, u8 *wmem)
exit: exit:
if (ret != _SUCCESS) if (ret != _SUCCESS)
rtw_free_xmitbuf(pxmitpriv, pxmitbuf); rtw_free_xmitbuf(pxmitpriv, xmitbuf);
return ret; return ret;
} }
......
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