--- zzzz-none-000/linux-2.6.28.10/include/linux/tcp.h 2009-05-02 18:54:43.000000000 +0000 +++ fusiv-7390-686/linux-2.6.28.10/include/linux/tcp.h 2012-02-14 14:37:49.000000000 +0000 @@ -21,6 +21,8 @@ #include #include +#include + struct tcphdr { __be16 source; __be16 dest; @@ -66,7 +68,11 @@ __be32 words[5]; }; -#define tcp_flag_word(tp) ( ((union tcp_word_hdr *)(tp))->words [3]) +#if defined(CONFIG_FUSIV_VX185) && defined(CONFIG_FUSIV_ALIGNMENT_FIXUPS) +#define tcp_flag_word(tp) (TCP_FLAGS_WORD(tp)) +#else +#define tcp_flag_word(tp) ( ((union tcp_word_hdr *)(tp))->words [3]) +#endif enum { TCP_FLAG_CWR = __constant_htonl(0x00800000), @@ -185,12 +191,12 @@ static inline unsigned int tcp_hdrlen(const struct sk_buff *skb) { - return tcp_hdr(skb)->doff * 4; + return TCP_DOFF(tcp_hdr(skb)) * 4; } static inline unsigned int tcp_optlen(const struct sk_buff *skb) { - return (tcp_hdr(skb)->doff - 5) * 4; + return (TCP_DOFF(tcp_hdr(skb)) - 5) * 4; } /* This defines a selective acknowledgement block. */