aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/natsemi
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2011-10-18 17:00:24 -0400
committerDavid S. Miller <davem@davemloft.net>2011-10-19 03:10:46 -0400
commit9e903e085262ffbf1fc44a17ac06058aca03524a (patch)
tree4acefc97ba38c1733474d25c0b2053b56af97db1 /drivers/net/ethernet/natsemi
parentdd767856a36e00b631d65ebc4bb81b19915532d6 (diff)
net: add skb frag size accessors
To ease skb->truesize sanitization, its better to be able to localize all references to skb frags size. Define accessors : skb_frag_size() to fetch frag size, and skb_frag_size_{set|add|sub}() to manipulate it. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/natsemi')
-rw-r--r--drivers/net/ethernet/natsemi/ns83820.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/natsemi/ns83820.c b/drivers/net/ethernet/natsemi/ns83820.c
index 73616b911327..2b8f64ddfb55 100644
--- a/drivers/net/ethernet/natsemi/ns83820.c
+++ b/drivers/net/ethernet/natsemi/ns83820.c
@@ -1161,11 +1161,11 @@ again:
1161 break; 1161 break;
1162 1162
1163 buf = skb_frag_dma_map(&dev->pci_dev->dev, frag, 0, 1163 buf = skb_frag_dma_map(&dev->pci_dev->dev, frag, 0,
1164 frag->size, DMA_TO_DEVICE); 1164 skb_frag_size(frag), DMA_TO_DEVICE);
1165 dprintk("frag: buf=%08Lx page=%08lx offset=%08lx\n", 1165 dprintk("frag: buf=%08Lx page=%08lx offset=%08lx\n",
1166 (long long)buf, (long) page_to_pfn(frag->page), 1166 (long long)buf, (long) page_to_pfn(frag->page),
1167 frag->page_offset); 1167 frag->page_offset);
1168 len = frag->size; 1168 len = skb_frag_size(frag);
1169 frag++; 1169 frag++;
1170 nr_frags--; 1170 nr_frags--;
1171 } 1171 }