]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/net/sky2.c
[IP]: Introduce ip_hdrlen()
[net-next-2.6.git] / drivers / net / sky2.c
index ac36152c68bf1261206e86f5373ff5eac21b09a7..51e994f26a844ffeccc573c09f98354707300ebc 100644 (file)
@@ -32,6 +32,7 @@
 #include <linux/ethtool.h>
 #include <linux/pci.h>
 #include <linux/ip.h>
+#include <net/ip.h>
 #include <linux/tcp.h>
 #include <linux/in.h>
 #include <linux/delay.h>
@@ -1392,7 +1393,7 @@ static int sky2_xmit_frame(struct sk_buff *skb, struct net_device *dev)
        mss = skb_shinfo(skb)->gso_size;
        if (mss != 0) {
                mss += ((skb->h.th->doff - 5) * 4);     /* TCP options */
-               mss += (skb->nh.iph->ihl * 4) + sizeof(struct tcphdr);
+               mss += ip_hdrlen(skb) + sizeof(struct tcphdr);
                mss += ETH_HLEN;
 
                if (mss != sky2->tx_last_mss) {