diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-03-18 20:43:48 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:25:24 -0400 |
commit | ab6a5bb6b28a970104a34f0f6959b73cf61bdc72 (patch) | |
tree | 54cfa7d4fe00d0c28a60022b075afc0856d6fc2b /drivers/net/netxen/netxen_nic_main.c | |
parent | 88c7664f13bd1a36acb8566b93892a4c58759ac6 (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/netxen/netxen_nic_main.c')
-rw-r--r-- | drivers/net/netxen/netxen_nic_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index b548a30e5c8e..b488e94bc4c0 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c | |||
@@ -779,7 +779,7 @@ static int netxen_nic_xmit_frame(struct sk_buff *skb, struct net_device *netdev) | |||
779 | if (skb_shinfo(skb)->gso_size > 0) { | 779 | if (skb_shinfo(skb)->gso_size > 0) { |
780 | 780 | ||
781 | no_of_desc++; | 781 | no_of_desc++; |
782 | if ((ip_hdrlen(skb) + skb->h.th->doff * 4 + | 782 | if ((ip_hdrlen(skb) + tcp_hdrlen(skb) + |
783 | sizeof(struct ethhdr)) > | 783 | sizeof(struct ethhdr)) > |
784 | (sizeof(struct cmd_desc_type0) - 2)) { | 784 | (sizeof(struct cmd_desc_type0) - 2)) { |
785 | no_of_desc++; | 785 | no_of_desc++; |