From: Jeff Mahoney Date: Mon, 11 Jan 2010 15:54:25 +0000 (-0500) Subject: Staging: rt2860: Use skb_tail_pointer X-Git-Tag: MMI-PSA29.97-13-9~24618^2~1^2~205 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=53cf8743d227283e78c27ada407b506014c9223d;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git Staging: rt2860: Use skb_tail_pointer rt2860 uses skb->tail directly. This patch uses the tail pointer macros instead. Signed-off-by: Jeff Mahoney Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rt2860/rt_linux.c b/drivers/staging/rt2860/rt_linux.c index 9357fb26cc2a..9d763b4f2261 100644 --- a/drivers/staging/rt2860/rt_linux.c +++ b/drivers/staging/rt2860/rt_linux.c @@ -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 */ diff --git a/drivers/staging/rt2860/rt_linux.h b/drivers/staging/rt2860/rt_linux.h index f85508d9d5a9..a7c540f8e3e3 100644 --- a/drivers/staging/rt2860/rt_linux.h +++ b/drivers/staging/rt2860/rt_linux.h @@ -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)