Commit 09c3fbba authored by navin patidar's avatar navin patidar Committed by Greg Kroah-Hartman

staging: rtl8188eu: Remove 'u8 *pbuf' from struct recv_buf

Instead of using pbuf to pass sbk data pointer to usb_fill_bulk_urb(),
we can use precvbuf->pskb->data to do that.
Signed-off-by: default avatarnavin patidar <navin.patidar@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent acfd19e7
...@@ -612,10 +612,7 @@ static u32 usb_read_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem) ...@@ -612,10 +612,7 @@ static u32 usb_read_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem)
tmpaddr = (size_t)precvbuf->pskb->data; tmpaddr = (size_t)precvbuf->pskb->data;
alignment = tmpaddr & (RECVBUFF_ALIGN_SZ-1); alignment = tmpaddr & (RECVBUFF_ALIGN_SZ-1);
skb_reserve(precvbuf->pskb, (RECVBUFF_ALIGN_SZ - alignment)); skb_reserve(precvbuf->pskb, (RECVBUFF_ALIGN_SZ - alignment));
precvbuf->pbuf = precvbuf->pskb->data;
} else { /* reuse skb */ } else { /* reuse skb */
precvbuf->pbuf = precvbuf->pskb->data;
precvbuf->reuse = false; precvbuf->reuse = false;
} }
...@@ -627,7 +624,7 @@ static u32 usb_read_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem) ...@@ -627,7 +624,7 @@ static u32 usb_read_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem)
pipe = ffaddr2pipehdl(pdvobj, addr); pipe = ffaddr2pipehdl(pdvobj, addr);
usb_fill_bulk_urb(purb, pusbd, pipe, usb_fill_bulk_urb(purb, pusbd, pipe,
precvbuf->pbuf, precvbuf->pskb->data,
MAX_RECVBUF_SZ, MAX_RECVBUF_SZ,
usb_read_port_complete, usb_read_port_complete,
precvbuf);/* context is precvbuf */ precvbuf);/* context is precvbuf */
......
...@@ -236,7 +236,6 @@ struct sta_recv_priv { ...@@ -236,7 +236,6 @@ struct sta_recv_priv {
struct recv_buf { struct recv_buf {
struct adapter *adapter; struct adapter *adapter;
u8 *pbuf;
struct urb *purb; struct urb *purb;
struct sk_buff *pskb; struct sk_buff *pskb;
u8 reuse; u8 reuse;
......
...@@ -60,7 +60,6 @@ int rtw_os_recvbuf_resource_alloc(struct adapter *padapter, ...@@ -60,7 +60,6 @@ int rtw_os_recvbuf_resource_alloc(struct adapter *padapter,
res = _FAIL; res = _FAIL;
precvbuf->pskb = NULL; precvbuf->pskb = NULL;
precvbuf->reuse = false; precvbuf->reuse = false;
precvbuf->pbuf = NULL;
return res; return res;
} }
......
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