diff -Nrub a/mac80211/Makefile b/mac80211/Makefile
--- a/mac80211/Makefile	2008-08-09 08:22:06.000000000 +0300
+++ b/mac80211/Makefile	2008-08-08 18:04:20.000000000 +0300
@@ -12,7 +12,7 @@
 PKG_NAME:=mac80211
 PKG_RELEASE:=1
 
-PKG_VERSION:=$(if $(CONFIG_TARGET_brcm47xx),2008-05-26,2008-07-19)
+PKG_VERSION:=2008-08-06
 PKG_SOURCE:=compat-wireless-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=$(if $(CONFIG_TARGET_brcm47xx),http://www.orbit-lab.org/kernel/compat-wireless-2.6/2008/05,http://www.orbit-lab.org/kernel/compat-wireless-2.6/2008/07)
 #PKG_SOURCE_URL:=http://downloads.openwrt.org/sources/
@@ -98,6 +98,24 @@
   AUTOLOAD:=$(call AutoLoad,27,rt2500pci)
 endef
 
+define KernelPackage/ath5k
+  SUBMENU:=Wireless Drivers
+  $(call KernelPackage/ath5k/Default)
+  DEPENDS+= @PCI_SUPPORT +kmod-mac80211 +kmod-ieee80211 
+  TITLE+= (Ath5k GPL Drivers for Atheros cards)
+  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath5k/ath5k.$(LINUX_KMOD_SUFFIX)
+  AUTOLOAD:=$(call AutoLoad,27,ath5k)
+endef
+
+define KernelPackage/rtl818x
+  SUBMENU:=Wireless Drivers
+  $(call KernelPackage/rtl818x/Default)
+  DEPENDS+= @PCI_SUPPORT +kmod-mac80211 +kmod-ieee80211 +kmod-eeprom-93cx6
+  TITLE+= (Wifi drivers for rtl818x based cards)
+  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rtl8180.$(LINUX_KMOD_SUFFIX)
+  AUTOLOAD:=$(call AutoLoad,27,rtl8180)
+endef
+
 define KernelPackage/rt2500-usb
 $(call KernelPackage/rt2x00/Default)
   DEPENDS+= @USB_SUPPORT +kmod-rt2x00-usb +kmod-crc-itu-t
@@ -148,13 +166,11 @@
 
 define Build/Prepare
 	rm -rf $(PKG_BUILD_DIR)
+	rm -rf $(KERNEL_BUILD_DIR)/compat-wireless
 	mkdir -p $(PKG_BUILD_DIR)
 	$(PKG_UNPACK)
 	$(Build/Patch)
 	$(if $(QUILT),touch $(PKG_BUILD_DIR)/.quilt_used)
-	unzip -jod $(PKG_BUILD_DIR) $(DL_DIR)/$(RT61FW)
-	unzip -jod $(PKG_BUILD_DIR) $(DL_DIR)/$(RT71FW)
-	rm -rf $(PKG_BUILD_DIR)/include/linux/ssb
 endef
 
 ifneq ($(CONFIG_PACKAGE_kmod-mac80211),)
@@ -168,9 +184,8 @@
 endef
 
 define Build/InstallDev
-	mkdir -p $(1)/usr/include/mac80211 $(1)/usr/include/net/mac80211
+	mkdir -p $(1)/usr/include/mac80211
 	$(CP) $(PKG_BUILD_DIR)/net/mac80211/*.h $(PKG_BUILD_DIR)/include/* $(1)/usr/include/mac80211/
-	$(CP) $(PKG_BUILD_DIR)/net/mac80211/rate.h $(1)/usr/include/net/mac80211/
 endef
 
 define KernelPackage/mac80211/install
@@ -198,3 +213,5 @@
 $(eval $(call KernelPackage,rt2500-usb))
 $(eval $(call KernelPackage,rt61-pci))
 $(eval $(call KernelPackage,rt73-usb))
+$(eval $(call KernelPackage,rtl818x))
+$(eval $(call KernelPackage,ath5k))
diff -Nrub a/mac80211/patches/001-disable_drivers.patch b/mac80211/patches/001-disable_drivers.patch
--- a/mac80211/patches/001-disable_drivers.patch	2008-08-09 08:22:06.000000000 +0300
+++ b/mac80211/patches/001-disable_drivers.patch	2008-07-25 23:00:14.000000000 +0300
@@ -1,12 +1,22 @@
-diff -urN compat-wireless-2008-05-26/config.mk compat-wireless-2008-05-26.new/config.mk
---- compat-wireless-2008-05-26/config.mk	2008-05-20 09:37:02.000000000 +0200
-+++ compat-wireless-2008-05-26.new/config.mk	2008-07-14 10:52:01.000000000 +0200
-@@ -28,73 +28,6 @@
+diff -Nrub compat-wireless-2008-07-24/config.mk compat-wireless-2008-07-24-new/config.mk
+--- compat-wireless-2008-07-24/config.mk	2008-07-25 22:58:41.000000000 +0300
++++ compat-wireless-2008-07-24-new/config.mk	2008-07-25 22:57:49.000000000 +0300
+@@ -7,8 +7,6 @@
+ ifeq ($(wildcard $(KLIB_BUILD)/.config),)
+ # These will be ignored by compat autoconf
+  CONFIG_PCI=y
+- CONFIG_USB=y
+- CONFIG_PCMCIA=y
+ else
+ include $(KLIB_BUILD)/.config
+ endif
+@@ -69,177 +67,9 @@
  # PCI Drivers
  ifneq ($(CONFIG_PCI),)
  
--CONFIG_ATH5K=m
--CONFIG_ATH5K_DEBUG=n
++CONFIG_RTL8180=m
+ CONFIG_ATH5K=m
+ CONFIG_ATH5K_DEBUG=n
 -
 -# Required for older kernels which still use this flag.
 -CONFIG_IWLWIFI=m
@@ -72,13 +82,29 @@
 -CONFIG_RTL8180=m
 -CONFIG_ADM8211=m
 -
- CONFIG_RT2X00_LIB_PCI=m
- CONFIG_RT2400PCI=m
- CONFIG_RT2500PCI=m
-@@ -118,32 +51,6 @@
- ifneq ($(CONFIG_USB),)
- CONFIG_ZD1211RW=m
- 
+-CONFIG_RT2X00_LIB_PCI=m
+-CONFIG_RT2400PCI=m
+-CONFIG_RT2500PCI=m
+-NEED_RT2X00=y
+-
+-# Two rt2x00 drivers require firmware: rt61pci and rt73usb. They depend on
+-# CRC to check the firmware. We check here first for the PCI
+-# driver as we're in the PCI section.
+-ifneq ($(CONFIG_CRC_ITU_T),)
+-CONFIG_RT61PCI=m
+-NEED_RT2X00_FIRMWARE=y
+-endif
+-
+-endif
+-## end of PCI
+-
+-# This is required for some cards
+-CONFIG_EEPROM_93CX6=m
+-
+-# USB Drivers
+-ifneq ($(CONFIG_USB),)
+-CONFIG_ZD1211RW=m
+-
 -# support for USB Wireless devices using Atmel at76c503,
 -# at76c505 or at76c505a chips.
 -CONFIG_USB_ATMEL=m
@@ -105,13 +131,30 @@
 -CONFIG_P54_USB=m
 -CONFIG_RTL8187=m
 -
- # RT2500USB does not require firmware
- CONFIG_RT2500USB=m
- CONFIG_RT2X00_LIB_USB=m
-@@ -168,39 +75,6 @@
- CONFIG_RT2X00_LIB_FIRMWARE=y
- endif
- 
+-# RT2500USB does not require firmware
+-CONFIG_RT2500USB=m
+-CONFIG_RT2X00_LIB_USB=m
+-NEED_RT2X00=y
+-# RT73USB requires firmware
+-ifneq ($(CONFIG_CRC_ITU_T),)
+-CONFIG_RT73USB=m
+-NEED_RT2X00_FIRMWARE=y
+-endif
+-
+-endif # end of USB driver list
+-
+-# Common rt2x00 requirements
+-ifeq ($(NEED_RT2X00),y)
+-CONFIG_RT2X00=m
+-CONFIG_RT2X00_LIB=m
+-# CONFIG_RT2X00_LIB_DEBUGFS is not set
+-# CONFIG_RT2X00_DEBUG is not set
+-endif
+-
+-ifeq ($(NEED_RT2X00_FIRMWARE),y)
+-CONFIG_RT2X00_LIB_FIRMWARE=y
+-endif
+-
 -# p54
 -CONFIG_P54_COMMON=m
 -
@@ -143,8 +186,11 @@
 -# Libertas uses the old stack but not fully, it will soon 
 -# be cleaned.
 -NEED_IEEE80211=y
--endif
--
+ endif
+ 
  ifeq ($(NEED_IEEE80211),y)
- # Old ieee80211 "stack"
- # Note: old softmac is scheduled for removal so we
+@@ -252,3 +82,4 @@
+ CONFIG_IEEE80211_CRYPT_WEP=m
+ CONFIG_IEEE80211_SOFTMAC=n
+ endif
++
diff -Nrub a/mac80211/patches/002-headers-fix.patch b/mac80211/patches/002-headers-fix.patch
--- a/mac80211/patches/002-headers-fix.patch	1970-01-01 02:00:00.000000000 +0200
+++ b/mac80211/patches/002-headers-fix.patch	2008-07-25 17:35:19.000000000 +0300
@@ -0,0 +1,11 @@
+--- compat-wireless-2008-07-19/drivers/net/wireless/mac80211_hwsim.c	2008-07-19 19:42:38.000000000 +0300
++++ compat-wireless-2008-07-19/drivers/net/wireless/mac80211_hwsim-new.c	2008-07-19 19:42:24.000000000 +0300
+@@ -15,7 +15,7 @@
+  */
+ 
+ #include <net/mac80211.h>
+-#include <net/ieee80211_radiotap.h>
++#include "net/ieee80211_radiotap.h"
+ #include <linux/if_arp.h>
+ #include <linux/rtnetlink.h>
+ #include <linux/etherdevice.h>
diff -Nrub a/mac80211/patches/003-headers-fix.patch b/mac80211/patches/003-headers-fix.patch
--- a/mac80211/patches/003-headers-fix.patch	1970-01-01 02:00:00.000000000 +0200
+++ b/mac80211/patches/003-headers-fix.patch	2008-07-25 17:35:19.000000000 +0300
@@ -0,0 +1,10 @@
+--- compat-wireless-2008-07-19/include/net/ieee80211_radiotap.h	2008-07-19 07:10:59.000000000 +0300
++++ compat-wireless-2008-07-19/include/net/ieee80211_radiotap-new.h	2008-07-19 19:46:20.000000000 +0300
+@@ -40,7 +40,6 @@
+ 
+ #include <linux/if_ether.h>
+ #include <linux/kernel.h>
+-#include <asm/unaligned.h>
+ 
+ /* Radiotap header version (from official NetBSD feed) */
+ #define IEEE80211RADIOTAP_VERSION	"1.5"
diff -Nrub a/mac80211/patches/004-headers-fix.patch b/mac80211/patches/004-headers-fix.patch
--- a/mac80211/patches/004-headers-fix.patch	1970-01-01 02:00:00.000000000 +0200
+++ b/mac80211/patches/004-headers-fix.patch	2008-07-25 17:35:19.000000000 +0300
@@ -0,0 +1,10 @@
+--- compat-wireless-2008-07-19/drivers/net/wireless/ath5k/base.c	2008-07-19 07:10:59.000000000 +0300
++++ compat-wireless-2008-07-19/drivers/net/wireless/ath5k/base-new.c	2008-07-19 19:49:10.000000000 +0300
+@@ -52,7 +52,6 @@
+ 
+ #include <net/ieee80211_radiotap.h>
+ 
+-#include <asm/unaligned.h>
+ 
+ #include "base.h"
+ #include "reg.h"
diff -Nrub a/mac80211/patches/005-headers-fix.patch b/mac80211/patches/005-headers-fix.patch
--- a/mac80211/patches/005-headers-fix.patch	1970-01-01 02:00:00.000000000 +0200
+++ b/mac80211/patches/005-headers-fix.patch	2008-07-25 17:35:19.000000000 +0300
@@ -0,0 +1,10 @@
+--- compat-wireless-2008-07-19/net/mac80211/mesh.h	2008-07-19 07:10:59.000000000 +0300
++++ compat-wireless-2008-07-19/net/mac80211/mesh-new.h	2008-07-19 19:52:18.000000000 +0300
+@@ -13,7 +13,6 @@
+ 
+ #include <linux/types.h>
+ #include <linux/jhash.h>
+-#include <asm/unaligned.h>
+ #include "ieee80211_i.h"
+ 
+ 
diff -Nrub a/mac80211/patches/006-headers-fix.patch b/mac80211/patches/006-headers-fix.patch
--- a/mac80211/patches/006-headers-fix.patch	1970-01-01 02:00:00.000000000 +0200
+++ b/mac80211/patches/006-headers-fix.patch	2008-07-25 17:35:19.000000000 +0300
@@ -0,0 +1,10 @@
+--- compat-wireless-2008-07-19/net/mac80211/wpa.c	2008-07-19 19:54:59.000000000 +0300
++++ compat-wireless-2008-07-19/net/mac80211/wpa-new.c	2008-07-19 19:56:45.000000000 +0300
+@@ -11,7 +11,6 @@
+ #include <linux/skbuff.h>
+ #include <linux/compiler.h>
+ #include <linux/ieee80211.h>
+-#include <asm/unaligned.h>
+ #include <net/mac80211.h>
+ 
+ #include "ieee80211_i.h"
diff -Nrub a/mac80211/patches/007-headers-fix.patch b/mac80211/patches/007-headers-fix.patch
--- a/mac80211/patches/007-headers-fix.patch	1970-01-01 02:00:00.000000000 +0200
+++ b/mac80211/patches/007-headers-fix.patch	2008-07-25 17:35:19.000000000 +0300
@@ -0,0 +1,10 @@
+--- compat-wireless-2008-07-19/net/mac80211/michael.c	2008-07-19 07:10:59.000000000 +0300
++++ compat-wireless-2008-07-19/net/mac80211/michael-new.c	2008-07-19 19:58:28.000000000 +0300
+@@ -9,7 +9,6 @@
+ #include <linux/types.h>
+ #include <linux/bitops.h>
+ #include <linux/ieee80211.h>
+-#include <asm/unaligned.h>
+ 
+ #include "michael.h"
+ 
diff -Nrub a/mac80211/patches/008-headers-fix.patch b/mac80211/patches/008-headers-fix.patch
--- a/mac80211/patches/008-headers-fix.patch	1970-01-01 02:00:00.000000000 +0200
+++ b/mac80211/patches/008-headers-fix.patch	2008-07-25 17:35:19.000000000 +0300
@@ -0,0 +1,10 @@
+--- compat-wireless-2008-07-19/net/mac80211/tkip.c	2008-07-19 07:10:59.000000000 +0300
++++ compat-wireless-2008-07-19/net/mac80211/tkip-new.c	2008-07-19 19:59:57.000000000 +0300
+@@ -10,7 +10,6 @@
+ #include <linux/bitops.h>
+ #include <linux/types.h>
+ #include <linux/netdevice.h>
+-#include <asm/unaligned.h>
+ 
+ #include <net/mac80211.h>
+ #include "key.h"
diff -Nrub a/mac80211/patches/009-headers-fix.patch b/mac80211/patches/009-headers-fix.patch
--- a/mac80211/patches/009-headers-fix.patch	1970-01-01 02:00:00.000000000 +0200
+++ b/mac80211/patches/009-headers-fix.patch	2008-07-25 17:35:19.000000000 +0300
@@ -0,0 +1,10 @@
+--- compat-wireless-2008-07-19/net/mac80211/tx.c	2008-07-19 07:11:00.000000000 +0300
++++ compat-wireless-2008-07-19/net/mac80211/tx-new.c	2008-07-19 20:01:46.000000000 +0300
+@@ -24,7 +24,6 @@
+ #include <net/ieee80211_radiotap.h>
+ #include <net/cfg80211.h>
+ #include <net/mac80211.h>
+-#include <asm/unaligned.h>
+ 
+ #if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,22))
+ #include "mq_compat.h" /* Internal MQ backport support for older kernels */
diff -Nrub a/mac80211/patches/010-headers-fix.patch b/mac80211/patches/010-headers-fix.patch
--- a/mac80211/patches/010-headers-fix.patch	1970-01-01 02:00:00.000000000 +0200
+++ b/mac80211/patches/010-headers-fix.patch	2008-07-25 17:35:19.000000000 +0300
@@ -0,0 +1,10 @@
+--- compat-wireless-2008-07-19/net/mac80211/mesh.c	2008-07-19 07:10:59.000000000 +0300
++++ compat-wireless-2008-07-19/net/mac80211/mesh-new.c	2008-07-19 20:03:23.000000000 +0300
+@@ -8,7 +8,6 @@
+  * published by the Free Software Foundation.
+  */
+ 
+-#include <asm/unaligned.h>
+ #include "ieee80211_i.h"
+ #include "mesh.h"
+ 
diff -Nrub a/mac80211/patches/011-headers-fix.patch b/mac80211/patches/011-headers-fix.patch
--- a/mac80211/patches/011-headers-fix.patch	1970-01-01 02:00:00.000000000 +0200
+++ b/mac80211/patches/011-headers-fix.patch	2008-07-25 17:35:19.000000000 +0300
@@ -0,0 +1,10 @@
+--- compat-wireless-2008-07-19/net/wireless/radiotap.c	2008-07-19 07:10:59.000000000 +0300
++++ compat-wireless-2008-07-19/net/wireless/radiotap-new.c	2008-07-19 20:04:54.000000000 +0300
+@@ -6,7 +6,6 @@
+ 
+ #include <net/cfg80211.h>
+ #include <net/ieee80211_radiotap.h>
+-#include <asm/unaligned.h>
+ 
+ /* function prototypes and related defs are in include/net/cfg80211.h */
+ 
diff -Nrub a/mac80211/patches/050-ath5k.patch b/mac80211/patches/050-ath5k.patch
--- a/mac80211/patches/050-ath5k.patch	1970-01-01 02:00:00.000000000 +0200
+++ b/mac80211/patches/050-ath5k.patch	2008-07-25 17:35:19.000000000 +0300
@@ -0,0 +1,20 @@
+diff -Nrub compat-wireless-2008-07-20/drivers/net/wireless/ath5k/hw.c compat-wireless-2008-07-20-new/drivers/net/wireless/ath5k/hw.c
+--- compat-wireless-2008-07-20/drivers/net/wireless/ath5k/hw.c	2008-07-22 11:42:27.000000000 +0300
++++ compat-wireless-2008-07-20-new/drivers/net/wireless/ath5k/hw.c	2008-07-22 11:56:10.000000000 +0300
+@@ -1065,8 +1065,16 @@
+ 	if (ah->ah_version != AR5K_AR5210) {
+ 		AR5K_REG_WRITE_BITS(ah, AR5K_TXCFG,
+ 			AR5K_TXCFG_SDMAMR, dma_size);
++#if defined (CONFIG_AG7100)
++               AR5K_REG_WRITE_BITS(ah, AR5K_RXCFG,
++                       AR5K_RXCFG_SDMAMW, AR5K_DMASIZE_4B);
++#elif defined (CONFIG_AG71XX)
++               AR5K_REG_WRITE_BITS(ah, AR5K_RXCFG,
++                       AR5K_RXCFG_SDMAMW, AR5K_DMASIZE_4B);
++#else
+ 		AR5K_REG_WRITE_BITS(ah, AR5K_RXCFG,
+ 			AR5K_RXCFG_SDMAMW, dma_size);
++#endif
+ 	}
+ 
+ 	/*
diff -Nrub a/mac80211/patches/100-unaligned-fix.patch b/mac80211/patches/100-unaligned-fix.patch
--- a/mac80211/patches/100-unaligned-fix.patch	1970-01-01 02:00:00.000000000 +0200
+++ b/mac80211/patches/100-unaligned-fix.patch	2008-08-08 11:55:17.000000000 +0300
@@ -0,0 +1,72 @@
+diff -Nrub compat-wireless-2008-07-29/include/net/compat.h compat-wireless-2008-07-29-new/include/net/compat.h
+--- compat-wireless-2008-07-29/include/net/compat.h	2008-07-29 07:10:56.000000000 +0300
++++ compat-wireless-2008-07-29-new/include/net/compat.h	2008-07-30 12:56:37.000000000 +0300
+@@ -668,16 +668,15 @@
+ #endif /* m68k and m68knommu */
+ #ifdef CONFIG_MIPS
+
++# include <asm-mips/unaligned.h>
+ #if defined(__MIPSEB__)
+ # include <linux/unaligned/be_struct.h>
+ # include <linux/unaligned/le_byteshift.h>
+-# include <linux/unaligned/generic.h>
+ # define get_unaligned  __get_unaligned_be
+ # define put_unaligned  __put_unaligned_be
+ #elif defined(__MIPSEL__)
+ # include <linux/unaligned/le_struct.h>
+ # include <linux/unaligned/be_byteshift.h>
+-# include <linux/unaligned/generic.h>
+ #endif
+
+ #endif /* mips */
+@@ -750,7 +749,7 @@
+  * The x86 can do unaligned accesses itself.
+  */
+ #include <linux/unaligned/access_ok.h>
+-#include <linux/unaligned/generic.h>
++#include <asm-x86/unaligned.h>
+
+ #endif /* x86 */
+ #ifdef CONFIG_XTENSA
+@@ -771,7 +770,7 @@
+
+ #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26)) */
+
+-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27))
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28))
+
+ /* This is from include/linux/rfkill.h */
+ #define RFKILL_STATE_SOFT_BLOCKED      RFKILL_STATE_OFF
+@@ -784,6 +783,31 @@
+ int register_rfkill_notifier(struct notifier_block *nb);
+ int unregister_rfkill_notifier(struct notifier_block *nb);
+
+-#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)) */
++#ifdef CONFIG_MIPS
++
++# include <asm-mips/unaligned.h>
++#if defined(__MIPSEB__)
++# include <linux/unaligned/be_struct.h>
++# include <linux/unaligned/le_byteshift.h>
++# define get_unaligned  __get_unaligned_be
++# define put_unaligned  __put_unaligned_be
++#elif defined(__MIPSEL__)
++# include <linux/unaligned/le_struct.h>
++# include <linux/unaligned/be_byteshift.h>
++#endif
++
++#endif /* mips */
++
++#ifdef CONFIG_X86
++/*
++ *  * The x86 can do unaligned accesses itself.
++ *   */
++#include <linux/unaligned/access_ok.h>
++#include <asm-x86/unaligned.h>
++
++#endif /* x86 */
++
++
++#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)) */
+
+ #endif /* LINUX_26_COMPAT_H */
diff -Nrub a/mac80211/patches/101-remove-ssb.patch b/mac80211/patches/101-remove-ssb.patch
--- a/mac80211/patches/101-remove-ssb.patch	1970-01-01 02:00:00.000000000 +0200
+++ b/mac80211/patches/101-remove-ssb.patch	2008-07-27 19:49:16.000000000 +0300
@@ -0,0 +1,11 @@
+diff -Nrub compat-wireless-2008-07-26/Makefile compat-wireless-2008-07-26-new/Makefile
+--- compat-wireless-2008-07-26/Makefile	2008-07-18 07:11:03.000000000 +0300
++++ compat-wireless-2008-07-26-new/Makefile	2008-07-27 19:43:07.000000000 +0300
+@@ -19,7 +19,6 @@
+ obj-y := net/wireless/ net/mac80211/
+ ifeq ($(ONLY_CORE),)
+ obj-y += net/ieee80211/ \
+-	drivers/ssb/ \
+ 	drivers/misc/ \
+ 	drivers/net/usb/ \
+ 	drivers/net/wireless/
