aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net
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/s390/net
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/s390/net')
-rw-r--r--drivers/s390/net/qeth_eddp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/s390/net/qeth_eddp.c b/drivers/s390/net/qeth_eddp.c
index 90da58b4e532..273f1745a009 100644
--- a/drivers/s390/net/qeth_eddp.c
+++ b/drivers/s390/net/qeth_eddp.c
@@ -477,13 +477,13 @@ qeth_eddp_fill_context_tcp(struct qeth_eddp_context *ctx,
477 skb_network_header(skb), 477 skb_network_header(skb),
478 ip_hdrlen(skb), 478 ip_hdrlen(skb),
479 skb->h.raw, 479 skb->h.raw,
480 skb->h.th->doff * 4); 480 tcp_hdrlen(skb));
481 else 481 else
482 eddp = qeth_eddp_create_eddp_data(qhdr, 482 eddp = qeth_eddp_create_eddp_data(qhdr,
483 skb_network_header(skb), 483 skb_network_header(skb),
484 sizeof(struct ipv6hdr), 484 sizeof(struct ipv6hdr),
485 skb->h.raw, 485 skb->h.raw,
486 skb->h.th->doff * 4); 486 tcp_hdrlen(skb));
487 487
488 if (eddp == NULL) { 488 if (eddp == NULL) {
489 QETH_DBF_TEXT(trace, 2, "eddpfcnm"); 489 QETH_DBF_TEXT(trace, 2, "eddpfcnm");
@@ -596,11 +596,11 @@ qeth_eddp_create_context_tcp(struct qeth_card *card, struct sk_buff *skb,
596 ctx = qeth_eddp_create_context_generic(card, skb, 596 ctx = qeth_eddp_create_context_generic(card, skb,
597 (sizeof(struct qeth_hdr) + 597 (sizeof(struct qeth_hdr) +
598 ip_hdrlen(skb) + 598 ip_hdrlen(skb) +
599 skb->h.th->doff * 4)); 599 tcp_hdrlen(skb)));
600 else if (skb->protocol == htons(ETH_P_IPV6)) 600 else if (skb->protocol == htons(ETH_P_IPV6))
601 ctx = qeth_eddp_create_context_generic(card, skb, 601 ctx = qeth_eddp_create_context_generic(card, skb,
602 sizeof(struct qeth_hdr) + sizeof(struct ipv6hdr) + 602 sizeof(struct qeth_hdr) + sizeof(struct ipv6hdr) +
603 skb->h.th->doff*4); 603 tcp_hdrlen(skb));
604 else 604 else
605 QETH_DBF_TEXT(trace, 2, "cetcpinv"); 605 QETH_DBF_TEXT(trace, 2, "cetcpinv");
606 606