diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-04-21 01:47:35 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:25:10 -0400 |
commit | eddc9ec53be2ecdbf4efe0efd4a83052594f0ac0 (patch) | |
tree | 4a38ab4dbd9d61fdf5a5ea6ed61463e0b9e33ba7 /drivers/net/e1000 | |
parent | e023dd643798c4f06c16466af90b4d250e4b8bd7 (diff) |
[SK_BUFF]: Introduce ip_hdr(), remove skb->nh.iph
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/e1000')
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 86161011b539..c324866c9789 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -2890,14 +2890,12 @@ e1000_tso(struct e1000_adapter *adapter, struct e1000_tx_ring *tx_ring, | |||
2890 | hdr_len = ((skb->h.raw - skb->data) + (skb->h.th->doff << 2)); | 2890 | hdr_len = ((skb->h.raw - skb->data) + (skb->h.th->doff << 2)); |
2891 | mss = skb_shinfo(skb)->gso_size; | 2891 | mss = skb_shinfo(skb)->gso_size; |
2892 | if (skb->protocol == htons(ETH_P_IP)) { | 2892 | if (skb->protocol == htons(ETH_P_IP)) { |
2893 | skb->nh.iph->tot_len = 0; | 2893 | struct iphdr *iph = ip_hdr(skb); |
2894 | skb->nh.iph->check = 0; | 2894 | iph->tot_len = 0; |
2895 | skb->h.th->check = | 2895 | iph->check = 0; |
2896 | ~csum_tcpudp_magic(skb->nh.iph->saddr, | 2896 | skb->h.th->check = ~csum_tcpudp_magic(iph->saddr, |
2897 | skb->nh.iph->daddr, | 2897 | iph->daddr, 0, |
2898 | 0, | 2898 | IPPROTO_TCP, 0); |
2899 | IPPROTO_TCP, | ||
2900 | 0); | ||
2901 | cmd_length = E1000_TXD_CMD_IP; | 2899 | cmd_length = E1000_TXD_CMD_IP; |
2902 | ipcse = skb->h.raw - skb->data - 1; | 2900 | ipcse = skb->h.raw - skb->data - 1; |
2903 | } else if (skb->protocol == htons(ETH_P_IPV6)) { | 2901 | } else if (skb->protocol == htons(ETH_P_IPV6)) { |
@@ -2911,7 +2909,7 @@ e1000_tso(struct e1000_adapter *adapter, struct e1000_tx_ring *tx_ring, | |||
2911 | ipcse = 0; | 2909 | ipcse = 0; |
2912 | } | 2910 | } |
2913 | ipcss = skb_network_offset(skb); | 2911 | ipcss = skb_network_offset(skb); |
2914 | ipcso = (void *)&(skb->nh.iph->check) - (void *)skb->data; | 2912 | ipcso = (void *)&(ip_hdr(skb)->check) - (void *)skb->data; |
2915 | tucss = skb->h.raw - skb->data; | 2913 | tucss = skb->h.raw - skb->data; |
2916 | tucso = (void *)&(skb->h.th->check) - (void *)skb->data; | 2914 | tucso = (void *)&(skb->h.th->check) - (void *)skb->data; |
2917 | tucse = 0; | 2915 | tucse = 0; |