aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sky2.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-03-18 20:43:48 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:25:24 -0400
commitab6a5bb6b28a970104a34f0f6959b73cf61bdc72 (patch)
tree54cfa7d4fe00d0c28a60022b075afc0856d6fc2b /drivers/net/sky2.c
parent88c7664f13bd1a36acb8566b93892a4c58759ac6 (diff)
[TCP]: Introduce tcp_hdrlen() and tcp_optlen()
The ip_hdrlen() buddy, created to reduce the number of skb->h.th-> uses and to avoid the longer, open coded equivalent. Ditched a no-op in bnx2 in the process. I wonder if we should have a BUG_ON(skb->h.th->doff < 5) in tcp_optlen()... Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r--drivers/net/sky2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index a35f2f2784ae..fd291fc93169 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -1392,7 +1392,7 @@ static int sky2_xmit_frame(struct sk_buff *skb, struct net_device *dev)
1392 /* Check for TCP Segmentation Offload */ 1392 /* Check for TCP Segmentation Offload */
1393 mss = skb_shinfo(skb)->gso_size; 1393 mss = skb_shinfo(skb)->gso_size;
1394 if (mss != 0) { 1394 if (mss != 0) {
1395 mss += ((skb->h.th->doff - 5) * 4); /* TCP options */ 1395 mss += tcp_optlen(skb); /* TCP options */
1396 mss += ip_hdrlen(skb) + sizeof(struct tcphdr); 1396 mss += ip_hdrlen(skb) + sizeof(struct tcphdr);
1397 mss += ETH_HLEN; 1397 mss += ETH_HLEN;
1398 1398