[PATCH 27/37] staging:r8188eu: remove recvframe_put function

From: Ivan Safonov
Date: Wed Oct 19 2016 - 11:13:15 EST


skb_put used instead.

Signed-off-by: Ivan Safonov <insafonov@xxxxxxxxx>
---
drivers/staging/rtl8188eu/core/rtw_recv.c | 2 +-
drivers/staging/rtl8188eu/include/rtw_recv.h | 17 -----------------
drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 2 +-
3 files changed, 2 insertions(+), 19 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c
index 1d29808..3f7812f 100644
--- a/drivers/staging/rtl8188eu/core/rtw_recv.c
+++ b/drivers/staging/rtl8188eu/core/rtw_recv.c
@@ -1380,7 +1380,7 @@ static struct recv_frame *recvframe_defrag(struct adapter *adapter,
/* memcpy */
memcpy(pfhdr->pkt->tail, pnfhdr->pkt->data, pnfhdr->pkt->len);

- recvframe_put(prframe, pnfhdr->pkt->len);
+ skb_put(prframe->pkt, pnfhdr->pkt->len);

pfhdr->attrib.icv_len = pnfhdr->attrib.icv_len;
plist = plist->next;
diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h
index f0ce2e6..5357a8d 100644
--- a/drivers/staging/rtl8188eu/include/rtw_recv.h
+++ b/drivers/staging/rtl8188eu/include/rtw_recv.h
@@ -253,23 +253,6 @@ u32 rtw_free_uc_swdec_pending_queue(struct adapter *adapter);

void rtw_reordering_ctrl_timeout_handler(unsigned long data);

-static inline u8 *recvframe_put(struct recv_frame *precvframe, uint sz)
-{
- /* used for append sz bytes from ptr to rx_tail, update rx_tail
- * and return the updated rx_tail to the caller */
- /* after putting, rx_tail must be still larger than rx_end. */
-
- u8 *tail;
-
- if (precvframe == NULL)
- return NULL;
-
- tail = skb_put(precvframe->pkt, sz);
- if (!tail)
- return NULL;
- return tail;
-}
-
static inline void recvframe_pull_tail(struct recv_frame *precvframe, uint sz)
{
/* rmv data from rx_tail (by yitsen) */
diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c
index 572a89f..2f29968 100644
--- a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c
+++ b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c
@@ -132,7 +132,7 @@ static int recvbuf2recvframe(struct adapter *adapt, struct sk_buff *pskb)
goto _exit_recvbuf2recvframe;
}

- recvframe_put(precvframe, skb_len);
+ skb_put(precvframe->pkt, skb_len);

switch (haldata->UsbRxAggMode) {
case USB_RX_AGG_DMA:
--
2.7.3