Staging: rt2860: Use skb_tail_pointer
authorJeff Mahoney <jeffm@suse.com>
Mon, 11 Jan 2010 15:54:25 +0000 (10:54 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 4 Mar 2010 00:42:42 +0000 (16:42 -0800)
rt2860 uses skb->tail directly. This patch uses the tail pointer macros
instead.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/rt2860/rt_linux.c
drivers/staging/rt2860/rt_linux.h

index 9357fb2..9d763b4 100644 (file)
@@ -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 */
index f85508d..a7c540f 100644 (file)
@@ -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)