staging: rtl8188eu: Remove 'u8 *pbuf' from struct recv_buf
authornavin patidar <navin.patidar@gmail.com>
Sat, 3 May 2014 11:45:32 +0000 (17:15 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 May 2014 00:30:11 +0000 (20:30 -0400)
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: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/hal/usb_ops_linux.c
drivers/staging/rtl8188eu/include/rtw_recv.h
drivers/staging/rtl8188eu/os_dep/recv_linux.c

index d3c5ed335274f3ea4dbf0b1b1392b0df87355990..d8fc7472eb901fd1c8bd02bc5f09411742c6da57 100644 (file)
@@ -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;
                alignment = tmpaddr & (RECVBUFF_ALIGN_SZ-1);
                skb_reserve(precvbuf->pskb, (RECVBUFF_ALIGN_SZ - alignment));
-
-               precvbuf->pbuf = precvbuf->pskb->data;
        } else { /* reuse skb */
-               precvbuf->pbuf = precvbuf->pskb->data;
                precvbuf->reuse = false;
        }
 
@@ -627,7 +624,7 @@ static u32 usb_read_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem)
        pipe = ffaddr2pipehdl(pdvobj, addr);
 
        usb_fill_bulk_urb(purb, pusbd, pipe,
-                         precvbuf->pbuf,
+                         precvbuf->pskb->data,
                          MAX_RECVBUF_SZ,
                          usb_read_port_complete,
                          precvbuf);/* context is precvbuf */
index 8dadf30a818ae4d075a00e1dd994d1e7ba0eb29b..971dd16d4a27923d113c47328cc991de420054d2 100644 (file)
@@ -236,7 +236,6 @@ struct sta_recv_priv {
 
 struct recv_buf {
        struct adapter *adapter;
-       u8      *pbuf;
        struct urb *purb;
        struct sk_buff *pskb;
        u8      reuse;
index c1664b723bf5e7dae5e6f5ae7ad39206fad9fc19..29ec0148b5738b2c2630c0c767fe2eb092f42057 100644 (file)
@@ -60,7 +60,6 @@ int rtw_os_recvbuf_resource_alloc(struct adapter *padapter,
                res = _FAIL;
        precvbuf->pskb = NULL;
        precvbuf->reuse = false;
-       precvbuf->pbuf = NULL;
        return res;
 }