Index: madwifi/branches/madwifi-0.9.4/net80211/Makefile
===================================================================
--- madwifi/branches/madwifi-0.9.4/net80211/Makefile (revision 2608)
+++ madwifi/branches/madwifi-0.9.4/net80211/Makefile (revision 3696)
@@ -40,8 +40,5 @@
 # Makefile for the 802.11 WLAN modules.
 #
-ifeq ($(obj),)
-obj=	.
-endif
-
+obj := $(firstword $(obj) $(SUBDIRS) .)
 TOP = $(obj)/..
 #
Index: madwifi/branches/madwifi-0.9.4/net80211/ieee80211_power.c
===================================================================
--- madwifi/branches/madwifi-0.9.4/net80211/ieee80211_power.c (revision 3302)
+++ madwifi/branches/madwifi-0.9.4/net80211/ieee80211_power.c (revision 3696)
@@ -238,5 +238,5 @@
 	if (tail != NULL) {
 		age -= M_AGE_GET(tail);
-		__skb_append(tail, skb, &ni->ni_savedq);
+		__skb_queue_after(&ni->ni_savedq, tail, skb);
 	} else
 		__skb_queue_head(&ni->ni_savedq, skb);
Index: madwifi/branches/madwifi-0.9.4/net80211/ieee80211_linux.h
===================================================================
--- madwifi/branches/madwifi-0.9.4/net80211/ieee80211_linux.h (revision 2696)
+++ madwifi/branches/madwifi-0.9.4/net80211/ieee80211_linux.h (revision 3696)
@@ -239,9 +239,4 @@
 #endif
 
-/* __skb_append got a third parameter in 2.6.14 */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
-#define __skb_append(a,b,c)	__skb_append(a,b)
-#endif
-
 /*
  * Per-node power-save queue definitions.  Beware of control
@@ -269,14 +264,14 @@
 	(_qlen) = skb_queue_len(&(_ni)->ni_savedq);		\
 } while (0)
-#define	_IEEE80211_NODE_SAVEQ_ENQUEUE(_ni, _skb, _qlen, _age) do {\
-	struct sk_buff *tail = skb_peek_tail(&(_ni)->ni_savedq);\
-	if (tail != NULL) {					\
-		_age -= M_AGE_GET(tail);			\
-		__skb_append(tail, _skb, &(_ni)->ni_savedq);	\
-	} else { 						\
-		__skb_queue_head(&(_ni)->ni_savedq, _skb);	\
-	}							\
-	M_AGE_SET(_skb, _age);					\
-	(_qlen) = skb_queue_len(&(_ni)->ni_savedq); 		\
+#define	_IEEE80211_NODE_SAVEQ_ENQUEUE(_ni, _skb, _qlen, _age) do {	\
+	struct sk_buff *tail = skb_peek_tail(&(_ni)->ni_savedq);	\
+	if (tail != NULL) {						\
+		_age -= M_AGE_GET(tail);				\
+		__skb_queue_after(&(_ni)->ni_savedq, tail, _skb);	\
+	} else { 							\
+		__skb_queue_head(&(_ni)->ni_savedq, _skb);		\
+	}								\
+	M_AGE_SET(_skb, _age);						\
+	(_qlen) = skb_queue_len(&(_ni)->ni_savedq); 			\
 } while (0)
 
Index: madwifi/branches/madwifi-0.9.4/include/compat.h
===================================================================
--- madwifi/branches/madwifi-0.9.4/include/compat.h (revision 3051)
+++ madwifi/branches/madwifi-0.9.4/include/compat.h (revision 3696)
@@ -176,4 +176,11 @@
 #endif
 
+/* __skb_append got a third parameter in 2.6.14 */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
+#define __skb_queue_after(_list, _old, _new)	__skb_append(_old, _new)
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)
+#define __skb_queue_after(_list, _old, _new)	__skb_append(_old, _new, _list)
+#endif
+
 #endif /* __KERNEL__ */
 
Index: madwifi/branches/madwifi-0.9.4/ath_rate/onoe/Makefile
===================================================================
--- madwifi/branches/madwifi-0.9.4/ath_rate/onoe/Makefile (revision 2608)
+++ madwifi/branches/madwifi-0.9.4/ath_rate/onoe/Makefile (revision 3696)
@@ -41,8 +41,5 @@
 # Makefile for the Atheros Rate Control Support.
 #
-ifeq ($(obj),)
-obj=	.
-endif
-
+obj := $(firstword $(obj) $(SUBDIRS) .)
 TOP = $(obj)/../..
 
Index: madwifi/branches/madwifi-0.9.4/ath_rate/amrr/Makefile
===================================================================
--- madwifi/branches/madwifi-0.9.4/ath_rate/amrr/Makefile (revision 2608)
+++ madwifi/branches/madwifi-0.9.4/ath_rate/amrr/Makefile (revision 3696)
@@ -41,8 +41,5 @@
 # Makefile for the Atheros Rate Control Support.
 #
-ifeq ($(obj),)
-obj=	.
-endif
-
+obj := $(firstword $(obj) $(SUBDIRS) .)
 TOP = $(obj)/../..
 
Index: madwifi/branches/madwifi-0.9.4/ath_rate/sample/Makefile
===================================================================
--- madwifi/branches/madwifi-0.9.4/ath_rate/sample/Makefile (revision 2608)
+++ madwifi/branches/madwifi-0.9.4/ath_rate/sample/Makefile (revision 3696)
@@ -39,8 +39,5 @@
 # Makefile for the Atheros Rate Control Support.
 #
-ifeq ($(obj),)
-obj=	.
-endif
-
+obj := $(firstword $(obj) $(SUBDIRS) .)
 TOP = $(obj)/../..
 
Index: madwifi/branches/madwifi-0.9.4/ath_rate/Makefile
===================================================================
--- madwifi/branches/madwifi-0.9.4/ath_rate/Makefile (revision 3030)
+++ madwifi/branches/madwifi-0.9.4/ath_rate/Makefile (revision 3696)
@@ -1,6 +1,3 @@
-ifeq ($(obj),)
-obj=	.
-endif
-
+obj := $(firstword $(obj) $(SUBDIRS) .)
 TOP = $(obj)/..
 
Index: madwifi/branches/madwifi-0.9.4/ath_rate/minstrel/Makefile
===================================================================
--- madwifi/branches/madwifi-0.9.4/ath_rate/minstrel/Makefile (revision 3030)
+++ madwifi/branches/madwifi-0.9.4/ath_rate/minstrel/Makefile (revision 3696)
@@ -39,8 +39,5 @@
 # Makefile for the Atheros Rate Control Support.
 #
-ifeq ($(obj),)
-obj=	.
-endif
-
+obj := $(firstword $(obj) $(SUBDIRS) .)
 TOP = $(obj)/../..
 
Index: madwifi/branches/madwifi-0.9.4/ath_hal/Makefile
===================================================================
--- madwifi/branches/madwifi-0.9.4/ath_hal/Makefile (revision 2608)
+++ madwifi/branches/madwifi-0.9.4/ath_hal/Makefile (revision 3696)
@@ -41,8 +41,5 @@
 #
 
-ifeq ($(obj),)
-obj=	.
-endif
-
+obj := $(firstword $(obj) $(SUBDIRS) .)
 TOP = $(obj)/..
 
Index: madwifi/branches/madwifi-0.9.4/ath/Makefile
===================================================================
--- madwifi/branches/madwifi-0.9.4/ath/Makefile (revision 2608)
+++ madwifi/branches/madwifi-0.9.4/ath/Makefile (revision 3696)
@@ -41,8 +41,5 @@
 #
 
-ifeq ($(obj),)
-obj=	.
-endif
-
+obj := $(firstword $(obj) $(SUBDIRS) .)
 TOP = $(obj)/..
 
Index: madwifi/branches/madwifi-0.9.4/Makefile
===================================================================
--- madwifi/branches/madwifi-0.9.4/Makefile (revision 3061)
+++ madwifi/branches/madwifi-0.9.4/Makefile (revision 3696)
@@ -41,8 +41,5 @@
 #
 
-ifeq ($(obj),)
-obj=	.
-endif
-
+obj := $(firstword $(obj) $(SUBDIRS) .)
 TOP = $(obj)
 

