From 35abf582a5378e5a878577cc46680bd707795e21 Mon Sep 17 00:00:00 2001 From: Ivan Safonov Date: Mon, 6 Feb 2017 20:23:25 +0300 Subject: [PATCH] staging:r8188eu: replace rx_end member of recv_frame with pkt->end rx_end is duplication of pkt->end pointer. pkt->end is preferred, because it is native skb field supported by skb_*() functions. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8188eu/include/rtw_recv.h | 3 +-- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h index 591dd9d90267..2e5caa4ac59d 100644 --- a/drivers/staging/rtl8188eu/include/rtw_recv.h +++ b/drivers/staging/rtl8188eu/include/rtw_recv.h @@ -231,7 +231,6 @@ struct recv_frame { uint len; u8 *rx_data; u8 *rx_tail; - u8 *rx_end; struct sta_info *psta; /* for A-MPDU Rx reordering buffer control */ struct recv_reorder_ctrl *preorder_ctrl; @@ -282,7 +281,7 @@ static inline u8 *recvframe_put(struct recv_frame *precvframe, int sz) precvframe->rx_tail += sz; - if (precvframe->rx_tail > precvframe->rx_end) { + if (precvframe->rx_tail > precvframe->pkt->end) { precvframe->rx_tail -= sz; return NULL; } diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c index fd5cb8a008f2..cdb2fd387056 100644 --- a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c @@ -125,7 +125,6 @@ static int recvbuf2recvframe(struct adapter *adapt, struct sk_buff *pskb) if (pkt_copy) { pkt_copy->dev = adapt->pnetdev; precvframe->pkt = pkt_copy; - precvframe->rx_end = pkt_copy->data + alloc_sz; skb_reserve(pkt_copy, 8 - ((size_t)(pkt_copy->data) & 7));/* force pkt_copy->data at 8-byte alignment address */ skb_reserve(pkt_copy, shift_sz);/* force ip_hdr at 8-byte alignment address according to shift_sz. */ memcpy(pkt_copy->data, (pbuf + pattrib->drvinfo_sz + RXDESC_SIZE), skb_len); -- 2.20.1