aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ipg.c
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2010-09-02 16:07:41 -0400
committerDavid S. Miller <davem@davemloft.net>2010-09-02 22:06:22 -0400
commitbc8acf2c8c3e43fcc192762a9f964b3e9a17748b (patch)
treee3a91392771a22390e59c24fcb7bad3045ce17d1 /drivers/net/ipg.c
parent7162f6691e9d39d8d866574687cddb3f1ec65d72 (diff)
drivers/net: avoid some skb->ip_summed initializations
fresh skbs have ip_summed set to CHECKSUM_NONE (0) We can avoid setting again skb->ip_summed to CHECKSUM_NONE in drivers. Introduce skb_checksum_none_assert() helper so that we keep this assertion documented in driver sources. Change most occurrences of : skb->ip_summed = CHECKSUM_NONE; by : skb_checksum_none_assert(skb); Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ipg.c')
-rw-r--r--drivers/net/ipg.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ipg.c b/drivers/net/ipg.c
index 72e3d2da9e9f..dc0198092343 100644
--- a/drivers/net/ipg.c
+++ b/drivers/net/ipg.c
@@ -1213,7 +1213,7 @@ static void ipg_nic_rx_with_start_and_end(struct net_device *dev,
1213 1213
1214 skb_put(skb, framelen); 1214 skb_put(skb, framelen);
1215 skb->protocol = eth_type_trans(skb, dev); 1215 skb->protocol = eth_type_trans(skb, dev);
1216 skb->ip_summed = CHECKSUM_NONE; 1216 skb_checksum_none_assert(skb);
1217 netif_rx(skb); 1217 netif_rx(skb);
1218 sp->rx_buff[entry] = NULL; 1218 sp->rx_buff[entry] = NULL;
1219} 1219}
@@ -1278,7 +1278,7 @@ static void ipg_nic_rx_with_end(struct net_device *dev,
1278 jumbo->skb->protocol = 1278 jumbo->skb->protocol =
1279 eth_type_trans(jumbo->skb, dev); 1279 eth_type_trans(jumbo->skb, dev);
1280 1280
1281 jumbo->skb->ip_summed = CHECKSUM_NONE; 1281 skb_checksum_none_assert(jumbo->skb);
1282 netif_rx(jumbo->skb); 1282 netif_rx(jumbo->skb);
1283 } 1283 }
1284 } 1284 }
@@ -1476,7 +1476,7 @@ static int ipg_nic_rx(struct net_device *dev)
1476 * IP/TCP/UDP frame was received. Let the 1476 * IP/TCP/UDP frame was received. Let the
1477 * upper layer decide. 1477 * upper layer decide.
1478 */ 1478 */
1479 skb->ip_summed = CHECKSUM_NONE; 1479 skb_checksum_none_assert(skb);
1480 1480
1481 /* Hand off frame for higher layer processing. 1481 /* Hand off frame for higher layer processing.
1482 * The function netif_rx() releases the sk_buff 1482 * The function netif_rx() releases the sk_buff