[PATCH] Fix ipw3945 for 2.6.22 onwards on 64bit archs

In 2.6.22 onwards (since git commit 27a884dc3cb63b93c2b3b643f5b31eed5f8a4d26),
on 64bit archs, skb->tail is no more a pointer, but just an offset from
skb->head, and an appropriate wrapper (skb_tail_pointer(skb)) must be used.

See the following snippet from include/linux/skbuff.h:

#ifdef NET_SKBUFF_DATA_USES_OFFSET
static inline unsigned char *skb_tail_pointer(const struct sk_buff *skb)
{
        return skb->head + skb->tail;
}
...

For older kernel releases, an appropriate default definition of the kernel
offset is given in ipw3945.h.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>

Index: ipw3945-1.2.2/ipw3945.c
===================================================================
--- ipw3945-1.2.2.orig/ipw3945.c
+++ ipw3945-1.2.2/ipw3945.c
@@ -14928,7 +14928,7 @@ static inline void ipw_build_tx_cmd_hwcr
 		tx_cmd->sec_ctl = TX_CMD_SEC_TKIP;
 
 		if (last_frag)
-			memcpy(tx_cmd->tkip_mic.byte, skb_frag->tail - 8, 8);
+			memcpy(tx_cmd->tkip_mic.byte, skb_tail_pointer(skb_frag) - 8, 8);
 		else
 			memset(tx_cmd->tkip_mic.byte, 0, 8);
 
Index: ipw3945-1.2.2/ipw3945.h
===================================================================
--- ipw3945-1.2.2.orig/ipw3945.h
+++ ipw3945-1.2.2/ipw3945.h
@@ -76,6 +76,13 @@ typedef void irqreturn_t;
 #include <linux/mutex.h>
 #endif
 
+#if ( LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22) )
+static inline unsigned char *skb_tail_pointer(const struct sk_buff *skb)
+{
+	return skb->tail;
+}
+#endif
+
 #if !defined(CONFIG_SOFTWARE_SUSPEND2_BUILTIN) && \
 	(defined(CONFIG_SOFTWARE_SUSPEND2) || \
 	defined(CONFIG_SOFTWARE_SUSPEND2_MODULE))
