aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/forcedeth.c
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2010-04-14 18:59:40 -0400
committerDavid S. Miller <davem@davemloft.net>2010-04-14 19:11:33 -0400
commite743d31312d00932391b123dfac3324d2b9e8c81 (patch)
treee5ac3aacbfdde1fe8eb44c4e010085915da5ea05 /drivers/net/forcedeth.c
parentb4bf665c5761837f693e87ab27870a5868185ccc (diff)
drivers: net: use skb_headlen()
replaces (skb->len - skb->data_len) occurrences by skb_headlen(skb) Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/forcedeth.c')
-rw-r--r--drivers/net/forcedeth.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index 8aa80946d835..a1c0e7bb70e8 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -2148,7 +2148,7 @@ static netdev_tx_t nv_start_xmit(struct sk_buff *skb, struct net_device *dev)
2148 unsigned int i; 2148 unsigned int i;
2149 u32 offset = 0; 2149 u32 offset = 0;
2150 u32 bcnt; 2150 u32 bcnt;
2151 u32 size = skb->len-skb->data_len; 2151 u32 size = skb_headlen(skb);
2152 u32 entries = (size >> NV_TX2_TSO_MAX_SHIFT) + ((size & (NV_TX2_TSO_MAX_SIZE-1)) ? 1 : 0); 2152 u32 entries = (size >> NV_TX2_TSO_MAX_SHIFT) + ((size & (NV_TX2_TSO_MAX_SIZE-1)) ? 1 : 0);
2153 u32 empty_slots; 2153 u32 empty_slots;
2154 struct ring_desc* put_tx; 2154 struct ring_desc* put_tx;
@@ -2269,7 +2269,7 @@ static netdev_tx_t nv_start_xmit_optimized(struct sk_buff *skb,
2269 unsigned int i; 2269 unsigned int i;
2270 u32 offset = 0; 2270 u32 offset = 0;
2271 u32 bcnt; 2271 u32 bcnt;
2272 u32 size = skb->len-skb->data_len; 2272 u32 size = skb_headlen(skb);
2273 u32 entries = (size >> NV_TX2_TSO_MAX_SHIFT) + ((size & (NV_TX2_TSO_MAX_SIZE-1)) ? 1 : 0); 2273 u32 entries = (size >> NV_TX2_TSO_MAX_SHIFT) + ((size & (NV_TX2_TSO_MAX_SIZE-1)) ? 1 : 0);
2274 u32 empty_slots; 2274 u32 empty_slots;
2275 struct ring_desc_ex* put_tx; 2275 struct ring_desc_ex* put_tx;