Commit 35abf582 authored by Ivan Safonov's avatar Ivan Safonov Committed by Greg Kroah-Hartman

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: default avatarIvan Safonov <insafonov@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 70cb1162
...@@ -231,7 +231,6 @@ struct recv_frame { ...@@ -231,7 +231,6 @@ struct recv_frame {
uint len; uint len;
u8 *rx_data; u8 *rx_data;
u8 *rx_tail; u8 *rx_tail;
u8 *rx_end;
struct sta_info *psta; struct sta_info *psta;
/* for A-MPDU Rx reordering buffer control */ /* for A-MPDU Rx reordering buffer control */
struct recv_reorder_ctrl *preorder_ctrl; struct recv_reorder_ctrl *preorder_ctrl;
...@@ -282,7 +281,7 @@ static inline u8 *recvframe_put(struct recv_frame *precvframe, int sz) ...@@ -282,7 +281,7 @@ static inline u8 *recvframe_put(struct recv_frame *precvframe, int sz)
precvframe->rx_tail += sz; precvframe->rx_tail += sz;
if (precvframe->rx_tail > precvframe->rx_end) { if (precvframe->rx_tail > precvframe->pkt->end) {
precvframe->rx_tail -= sz; precvframe->rx_tail -= sz;
return NULL; return NULL;
} }
......
...@@ -125,7 +125,6 @@ static int recvbuf2recvframe(struct adapter *adapt, struct sk_buff *pskb) ...@@ -125,7 +125,6 @@ static int recvbuf2recvframe(struct adapter *adapt, struct sk_buff *pskb)
if (pkt_copy) { if (pkt_copy) {
pkt_copy->dev = adapt->pnetdev; pkt_copy->dev = adapt->pnetdev;
precvframe->pkt = pkt_copy; 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, 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. */ 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); memcpy(pkt_copy->data, (pbuf + pattrib->drvinfo_sz + RXDESC_SIZE), skb_len);
......
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