Commit 53cf8743 authored by Jeff Mahoney's avatar Jeff Mahoney Committed by Greg Kroah-Hartman

Staging: rt2860: Use skb_tail_pointer

rt2860 uses skb->tail directly. This patch uses the tail pointer macros
instead.
Signed-off-by: default avatarJeff Mahoney <jeffm@suse.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 3bf040c7
......@@ -462,9 +462,9 @@ void *duplicate_pkt(struct rt_rtmp_adapter *pAd,
if ((skb =
__dev_alloc_skb(HdrLen + DataSize + 2, MEM_ALLOC_FLAG)) != NULL) {
skb_reserve(skb, 2);
NdisMoveMemory(skb->tail, pHeader802_3, HdrLen);
NdisMoveMemory(skb_tail_pointer(skb), pHeader802_3, HdrLen);
skb_put(skb, HdrLen);
NdisMoveMemory(skb->tail, pData, DataSize);
NdisMoveMemory(skb_tail_pointer(skb), pData, DataSize);
skb_put(skb, DataSize);
skb->dev = get_netdev_from_bssid(pAd, FromWhichBSSID);
pPacket = OSPKT_TO_RTPKT(skb);
......@@ -515,7 +515,7 @@ void *ClonePacket(struct rt_rtmp_adapter *pAd,
pClonedPkt->dev = pRxPkt->dev;
pClonedPkt->data = pData;
pClonedPkt->len = DataSize;
pClonedPkt->tail = pClonedPkt->data + pClonedPkt->len;
skb_set_tail_pointer(pClonedPkt, DataSize)
ASSERT(DataSize < 1530);
}
return pClonedPkt;
......@@ -535,7 +535,7 @@ void update_os_packet_info(struct rt_rtmp_adapter *pAd,
pOSPkt->dev = get_netdev_from_bssid(pAd, FromWhichBSSID);
pOSPkt->data = pRxBlk->pData;
pOSPkt->len = pRxBlk->DataSize;
pOSPkt->tail = pOSPkt->data + pOSPkt->len;
skb_set_tail_pointer(pOSPkt, pOSPkt->len);
}
void wlan_802_11_to_802_3_packet(struct rt_rtmp_adapter *pAd,
......@@ -553,7 +553,7 @@ void wlan_802_11_to_802_3_packet(struct rt_rtmp_adapter *pAd,
pOSPkt->dev = get_netdev_from_bssid(pAd, FromWhichBSSID);
pOSPkt->data = pRxBlk->pData;
pOSPkt->len = pRxBlk->DataSize;
pOSPkt->tail = pOSPkt->data + pOSPkt->len;
skb_set_tail_pointer(pOSPkt, pOSPkt->len);
/* */
/* copy 802.3 header */
......
......@@ -658,9 +658,9 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size,
(RTPKT_TO_OSPKT(_pkt)->len) = (_len)
#define GET_OS_PKT_DATATAIL(_pkt) \
(RTPKT_TO_OSPKT(_pkt)->tail)
(skb_tail_pointer(RTPKT_TO_OSPKT(_pkt))
#define SET_OS_PKT_DATATAIL(_pkt, _start, _len) \
((RTPKT_TO_OSPKT(_pkt))->tail) = (u8 *)((_start) + (_len))
(skb_set_tail_pointer(RTPKT_TO_OSPKT(_pkt), _len))
#define GET_OS_PKT_HEAD(_pkt) \
(RTPKT_TO_OSPKT(_pkt)->head)
......
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