diff options
author | Jeff Mahoney <jeffm@suse.com> | 2010-01-11 10:54:25 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-03 16:42:42 -0800 |
commit | 53cf8743d227283e78c27ada407b506014c9223d (patch) | |
tree | 626b7fb19ee56ac4cdd50c3094bd85b1757a3a82 /drivers/staging/rt2860 | |
parent | 3bf040c75294ad9470b11902477e2c07af2031bd (diff) | |
download | lwn-53cf8743d227283e78c27ada407b506014c9223d.tar.gz lwn-53cf8743d227283e78c27ada407b506014c9223d.zip |
Staging: rt2860: Use skb_tail_pointer
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>
Diffstat (limited to 'drivers/staging/rt2860')
-rw-r--r-- | drivers/staging/rt2860/rt_linux.c | 10 | ||||
-rw-r--r-- | drivers/staging/rt2860/rt_linux.h | 4 |
2 files changed, 7 insertions, 7 deletions
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) |