aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis R. Rodriguez <mcgrof@winlab.rutgers.edu>2007-12-06 04:30:33 -0500
committerLuis R. Rodriguez <mcgrof@winlab.rutgers.edu>2007-12-06 04:30:33 -0500
commit636a9cfad7458f034e8cded5320aa1c96786df65 (patch)
tree2883e094ff7647c96d12ba3c7ba7152d786b4678
parentc8c2995e8f5182edf4804e602d3c4a525c4e32c9 (diff)
downloadcompat-wireless-2.6-old-636a9cfad7458f034e8cded5320aa1c96786df65.tar.gz
* Adds nl80211 compat work, genl multicast cannot be ported though.
* Update compat.diff to reflect new wireless-2.6 git tree changes * Do not continue if the compat.diff fails, this will prevent us from updating the compat tarball with invalid content. * Use defines now in config.mk, get rid of stupid defines in compat.h * Lets you specify your own GIT_TREE variable for admin-update.sh Signed-off-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
-rw-r--r--Makefile19
-rw-r--r--README25
-rw-r--r--compat/compat.diff26
-rw-r--r--compat/compat.h64
-rw-r--r--config.mk251
-rwxr-xr-xscripts/admin-update.sh40
6 files changed, 329 insertions, 96 deletions
diff --git a/Makefile b/Makefile
index fc83d6c..dd59ec1 100644
--- a/Makefile
+++ b/Makefile
@@ -10,11 +10,19 @@ MADWIFI=$(shell modprobe -l ath_pci)
ifneq ($(KERNELRELEASE),)
--include $(src)/config.mk
+# Bug: $(src) is not working ??
+include $(src)/config.mk
+export $(COPTS)
+COMPAT_WIRELESS=$(HOME)/devel/compat-wireless-2.6
+EXTRA_CFLAGS += $(COPTS)
+#NOSTDINC_FLAGS := -I$(PWD)/include/
+NOSTDINC_FLAGS := -I$(PWD)/include/ -include $(M)/include/net/compat.h $(CFLAGS)
-# This is a hack! But hey.. it works, got any better ideas, send a patch ;)
-NOSTDINC_FLAGS := -I$(PWD)/include/ $(CFLAGS)
-NOSTDINC_FLAGS := -I$(PWD)/include/ -include $(M)/compat/compat.h $(CFLAGS)
+#NOSTDINC_FLAGS := -I$(PWD)/include/ $(CFLAGS)
+#NOSTDINC_FLAGS := -I$(PWD)/include/ -include $(M)/include/net/compat.h $(CFLAGS)
+
+#NOSTDINC_FLAGS := -I$(PWD)/include/ -include $(M)/include/net/compat.h
+#NOSTDINC_FLAGS := $(COPTS) $(CFLAGS)
obj-y := net/wireless/ net/mac80211/ net/ieee80211/ \
drivers/ssb/ \
@@ -31,8 +39,9 @@ modules:
clean:
$(MAKE) -C $(KLIB_BUILD) M=$(PWD) clean
+ @rm -f *.symvers
-install:
+install: modules
@# Previous versions of compat installed stuff into different
@# directories lets make sure we remove that suff for now.
@rm -rf $(KLIB)/$(KMODDIR)/wireless/
diff --git a/README b/README
index f5e3e54..3183fdc 100644
--- a/README
+++ b/README
@@ -113,7 +113,10 @@ for example, wlan0_rename. This is a known issue and will be worked on.
* nl80211:
-More compatibility work is needed to add nl80211
+Kernels <= 2.6.22 now get nl80211 support, however, genl_multicast_group
+won't work. This compatibility cannot be extended to older
+kernels as the struct genl_family was extended on 2.6.23 to add
+the struct list_head mcast_groups.
* b43:
@@ -196,6 +199,20 @@ Report the bug because you are working with the latest and greatest.
If your bug is compatibility-related then we should still try to fix
it within the compat.[ch] work.
+ChangeLog
+---------
+
+Here you see the list of changes to all wireless drivers, the wireless core and mac80211.
+
+ * Driver changes:
+http://git.kernel.org/?p=linux/kernel/git/linville/wireless-2.6.git;a=history;f=drivers/net/wireless;
+
+ * Wireless core changes:
+http://git.kernel.org/?p=linux/kernel/git/linville/wireless-2.6.git;a=history;f=net/wireless;
+
+ * mac80211 changes:
+http://git.kernel.org/?p=linux/kernel/git/linville/wireless-2.6.git;a=history;f=net/mac80211;
+
License
-------
@@ -210,6 +227,11 @@ Developers
Compatibility work goes into compat/compat.[ch]. If using those files do
not suffice additional actual code changes can go into compat/compat.diff.
+If you have your own wireless-2.6 git tree, before running admin-update.sh
+be sure to set your GIT_TREE variable. For example:
+
+export GIT_TREE=/home/mcgrof/wireless-2.6/
+
scripts/admin-clean.sh - Cleans the compat-wireless-2.6 tree
scripts/admin-update.sh - Updates compat-wireless-2.6 with your git tree
scripts/admin-refresh.sh - Does the above two
@@ -217,7 +239,6 @@ scripts/admin-refresh.sh - Does the above two
TODO
----
-* Finish nl80211 port
* Compatibilty work for 2.6.18 --> 2.6.21
* Dialog (make menuconfig) option for this package
diff --git a/compat/compat.diff b/compat/compat.diff
index 96becbf..a64e0d9 100644
--- a/compat/compat.diff
+++ b/compat/compat.diff
@@ -500,9 +500,9 @@
#include <net/arp.h>
#include <net/ieee80211.h>
---- a/drivers/net/wireless/Makefile 2007-11-27 21:27:30.000000000 -0500
-+++ b/drivers/net/wireless/Makefile 2007-11-27 21:27:13.000000000 -0500
-@@ -6,48 +6,10 @@
+--- a/drivers/net/wireless/Makefile 2007-12-05 20:38:37.000000000 -0500
++++ b/drivers/net/wireless/Makefile 2007-12-05 20:39:35.000000000 -0500
+@@ -6,47 +6,10 @@
obj-$(CONFIG_IPW2200) += ipw2200.o
@@ -540,8 +540,7 @@
-obj-$(CONFIG_BCM43XX) += bcm43xx/
obj-$(CONFIG_B43) += b43/
obj-$(CONFIG_B43LEGACY) += b43legacy/
--obj-$(CONFIG_ZD1211RW) += zd1211rw/
- obj-$(CONFIG_ZD1211RW_MAC80211) += zd1211rw-mac80211/
+ obj-$(CONFIG_ZD1211RW) += zd1211rw/
-# 16-bit wireless PCMCIA client drivers
-obj-$(CONFIG_PCMCIA_RAYCS) += ray_cs.o
@@ -550,9 +549,9 @@
-obj-$(CONFIG_USB_ZD1201) += zd1201.o
obj-$(CONFIG_LIBERTAS) += libertas/
- rtl8180-objs := rtl8180_dev.o rtl8180_rtl8225.o
---- a/net/mac80211/ieee80211.c 2007-11-30 00:29:10.000000000 -0500
-+++ b/net/mac80211/ieee80211.c 2007-11-30 00:29:24.000000000 -0500
+ rtl8180-objs := rtl8180_dev.o rtl8180_rtl8225.o rtl8180_sa2400.o rtl8180_max2820.o
+--- a/net/mac80211/ieee80211.c 2007-12-05 20:41:35.000000000 -0500
++++ b/net/mac80211/ieee80211.c 2007-12-05 20:41:43.000000000 -0500
@@ -21,7 +21,9 @@
#include <linux/wireless.h>
#include <linux/rtnetlink.h>
@@ -563,7 +562,7 @@
#include <net/cfg80211.h>
#include "ieee80211_i.h"
-@@ -427,7 +429,9 @@
+@@ -432,7 +434,9 @@
void ieee80211_if_setup(struct net_device *dev)
{
ether_setup(dev);
@@ -573,7 +572,7 @@
dev->hard_start_xmit = ieee80211_subif_start_xmit;
dev->wireless_handlers = &ieee80211_iw_handler_def;
dev->set_multicast_list = ieee80211_set_multicast_list;
-@@ -1014,7 +1018,9 @@
+@@ -1068,7 +1072,9 @@
mdev->open = ieee80211_master_open;
mdev->stop = ieee80211_master_stop;
mdev->type = ARPHRD_IEEE80211;
@@ -583,3 +582,10 @@
mdev->set_multicast_list = ieee80211_master_set_multicast_list;
sdata->type = IEEE80211_IF_TYPE_AP;
+--- a/net/wireless/Makefile 2007-12-06 01:00:12.000000000 -0500
++++ b/net/wireless/Makefile 2007-12-06 01:01:51.000000000 -0500
+@@ -1,4 +1,3 @@
+-obj-$(CONFIG_WIRELESS_EXT) += wext.o
+ obj-$(CONFIG_CFG80211) += cfg80211.o
+
+ cfg80211-y += core.o sysfs.o radiotap.o
diff --git a/compat/compat.h b/compat/compat.h
index c90ffc7..b428703 100644
--- a/compat/compat.h
+++ b/compat/compat.h
@@ -9,52 +9,6 @@
#include <linux/version.h>
#include <linux/scatterlist.h>
-/* So all *.[ch] can pick up the options as if defined
- * by the kernel's .config. */
-
-/* XXX: See if we can do something better about this and config.mk */
-#define CONFIG_MAC80211 1
-#define CONFIG_MAC80211_RCSIMPLE 1
-#define CONFIG_CFG80211 1
-#undef CONFIG_NL80211
-#define CONFIG_ATH5K 1
-#define CONFIG_IWL3945 1
-#define CONFIG_IWL4965 1
-#define CONFIG_ZD1211RW_MAC80211 1
-#if 1
-#define CONFIG_B43
-//#define CONFIG_B43_RFKILL 1
-//#define CONFIG_B43_LEDS 1
-#define CONFIG_B43_PCMCIA 1
-//#define CONFIG_B43_DEBUG 1
-#define CONFIG_B43_DMA 1
-#define CONFIG_B43_PIO 1
-#define CONFIG_B43LEGACY_PCI_AUTOSELECT 1
-#define CONFIG_B43LEGACY_PCICORE_AUTOSELECT 1
-#define CONFIG_B43LEGACY_DMA 1
-#define CONFIG_B43LEGACY_PIO 1
-#define CONFIG_B43LEGACY_DMA_AND_PIO_MODE 1
-
-#define CONFIG_SSB 1
-#define CONFIG_SSB_PCIHOST 1
-#define CONFIG_SSB_PCMCIAHOST 1
-#undef CONFIG_SSB_DRIVER_MIPS
-//#define CONFIG_SSB_DRIVER_EXTIF 1
-#define CONFIG_SSB_DRIVER_PCICORE 1
-#define CONFIG_SSB_PCIHOST 1
-/* For mips */
-#undef CONFIG_SSB_PCICORE_HOSTMODE
-#endif
-
-#define CONFIG_RT2X00_LIB_FIRMWARE 1
-
-#define CONFIG_IEEE80211 1
-#define CONFIG_IEEE80211_CRYPT_CCMP 1
-#define CONFIG_IEEE80211_CRYPT_TKIP 1
-#define CONFIG_IEEE80211_CRYPT_WEP 1
-/* Die old softmac, die ! Bleed! */
-#undef CONFIG_IEEE80211_SOFTMAC
-
/* Compat work for 2.6.22 and 2.6.23 */
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))
@@ -146,7 +100,7 @@ static inline void sg_init_table(struct scatterlist *sgl, unsigned int nents)
memset(sgl, 0, sizeof(*sgl) * nents);
}
-#endif
+#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)) */
/* Compat work for 2.6.22 */
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23))
@@ -176,8 +130,12 @@ extern int cancel_delayed_work_sync(struct delayed_work *work);
#define debugfs_rename(a, b, c, d) 1
-/* Eh we need a lot more than this to complete this support. Not
- * a priority for now. This is for nl80211 support */
+/* nl80211 requires multicast group support which is new and added on
+ * 2.6.23. We can't add support for it for older kernels to support it
+ * genl_family structure was changed. Lets just let through the
+ * genl_register_mc_group call. This means no multicast group suppport */
+
+#define genl_register_mc_group(a, b) 0
/**
* struct genl_multicast_group - generic netlink multicast group
@@ -195,6 +153,7 @@ struct genl_multicast_group
u32 id;
};
+
/* Added as of 2.6.23 */
int pci_try_set_mwi(struct pci_dev *dev);
@@ -210,8 +169,7 @@ static inline void set_freezable(void)
#else
static inline void set_freezable(void) {}
-#endif
-
-#endif
+#endif /* CONFIG_PM_SLEEP */
-#endif
+#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)) */
+#endif /* LINUX_26_COMPAT_H */
diff --git a/config.mk b/config.mk
index 9bf141a..f47a426 100644
--- a/config.mk
+++ b/config.mk
@@ -1,106 +1,317 @@
-
-# XXX: Wouldn't it be nice to have a menuconfig ?
+# COPTs are so all *.[ch] can pick up the options as if defined
+# by the kernel's .config. */
+#
+# XXX: move to a C dialog, also, there's gotta be a quicker, shorter
+# way to do this too... meh?
#
-# Note: these CONFIG options won't be picked up through the
-# all *.[ch] files themselves so you should still define required
-# CONFIG_ items on compat.h, this is just a hack for
-# build time.
+# Only enable defines we really need.
export
# Wireless subsystem stuff
CONFIG_MAC80211=m
+ifeq ($(CONFIG_MAC80211),m)
+COPTS+= -DCONFIG_MAC80211=1
+endif
+
CONFIG_MAC80211_RCSIMPLE=y
+ifeq ($(CONFIG_MAC80211_RCSIMPLE),y)
+COPTS+= -DCONFIG_MAC80211_RCSIMPLE=1
+endif
+
CONFIG_CFG80211=m
-# Not yet supported in this compat work
-CONFIG_NL80211=n
+ifeq ($(CONFIG_CFG80211),m)
+COPTS+= -DCONFIG_CFG80211=1
+endif
+
+CONFIG_NL80211=y
+ifeq ($(CONFIG_NL80211),y)
+COPTS+= -DCONFIG_NL80211=1
+endif
# Drivers
CONFIG_ATH5K=m
+ifeq ($(CONFIG_ATH5K),m)
+#COPTS+= -DCONFIG_ATH5K=1
+endif
+
CONFIG_IWL3945=m
+ifeq ($(CONFIG_IWL3945),m)
+#COPTS+= -DCONFIG_IWL3945=1
+endif
+
CONFIG_IWL4965=m
-CONFIG_ZD1211RW_MAC80211=m
+ifeq ($(CONFIG_IWL4965),m)
+#COPTS+= -DCONFIG_IWL4965=1
+endif
+
+CONFIG_ZD1211RW=m
+ifeq ($(CONFIG_ZD1211RW),m)
+#COPTS+= -DCONFIG_ZD1211RW=1
+endif
# CONFIG_ZD1211RW_MAC80211_DEBUG is not set
CONFIG_B43=m
-CONFIG_B43_PCI_AUTOSELECT=y
-CONFIG_B43_PCICORE_AUTOSELECT=y
-#CONFIG_B43_RFKILL=n
-#CONFIG_B43_LEDS=n
+ifeq ($(CONFIG_B43),m)
+#COPTS+= -DCONFIG_B43=1
+endif
+
# B43 uses PCMCIA only for Compact Flash. The Cardbus cards uses PCI
# Example, bcm4318:
# http://www.multicap.biz/wireless-lan/indoor-wlan-hardware/sdc-cf10g-80211g-compact-flash-module
CONFIG_B43_PCMCIA=y
-# CONFIG_B43_DEBUG is not set
+ifeq ($(CONFIG_B43_PCMCIA),y)
+COPTS+= -DCONFIG_B43_PCMCIA=1
+endif
+
CONFIG_B43_DMA=y
+ifeq ($(CONFIG_B43_DMA),y)
+COPTS+= -DCONFIG_B43_DMA=1
+endif
+
CONFIG_B43_PIO=y
+ifeq ($(CONFIG_B43_PIO),y)
+COPTS+= -DCONFIG_B43_PIO=1
+endif
+
CONFIG_B43_DMA_AND_PIO_MODE=y
+ifeq ($(CONFIG_B43_DMA_AND_PIO_MODE),y)
+COPTS+= -DCONFIG_B43_DMA_AND_PIO_MODE=1
+endif
+
+CONFIG_B43_PCI_AUTOSELECT=y
+ifeq ($(CONFIG_B43_PCI_AUTOSELECT),y)
+COPTS+= -DCONFIG_B43_PCI_AUTOSELECT=1
+endif
+
+CONFIG_B43_PCICORE_AUTOSELECT=y
+ifeq ($(CONFIG_B43_PCICORE_AUTOSELECT),y)
+COPTS+= -DCONFIG_B43_PCICORE_AUTOSELECT=1
+endif
+
+#CONFIG_B43_RFKILL=n
+#CONFIG_B43_LEDS=n
+# CONFIG_B43_DEBUG is not set
CONFIG_B43LEGACY=m
+ifeq ($(CONFIG_B43LEGACY),m)
+#COPTS+= -DCONFIG_B43LEGACY=1
+endif
+
CONFIG_B43LEGACY_PCI_AUTOSELECT=y
+ifeq ($(CONFIG_B43LEGACY_PCI_AUTOSELECT),y)
+COPTS+= -DCONFIG_B43LEGACY_PCI_AUTOSELECT=1
+endif
+
CONFIG_B43LEGACY_PCICORE_AUTOSELECT=y
+ifeq ($(CONFIG_B43LEGACY_PCICORE_AUTOSELECT),y)
+COPTS+= -DCONFIG_B43LEGACY_PCICORE_AUTOSELECT=1
+endif
+
CONFIG_B43LEGACY_DMA=y
+ifeq ($(CONFIG_B43LEGACY_DMA),y)
+COPTS+= -DCONFIG_B43LEGACY_DMA=1
+endif
+
CONFIG_B43LEGACY_PIO=y
+ifeq ($(CONFIG_B43LEGACY_PIO),y)
+COPTS+= -DCONFIG_B43LEGACY_PIO=1
+endif
+
CONFIG_B43LEGACY_DMA_AND_PIO_MODE=y
+ifeq ($(CONFIG_B43LEGACY_DMA_AND_PIO_MODE),y)
+COPTS+= -DCONFIG_B43LEGACY_DMA_AND_PIO_MODE=1
+endif
# This is required for some cards
CONFIG_EEPROM_93CX6=m
+ifeq ($(CONFIG_EEPROM_93CX6),m)
+#COPTS+= -DCONFIG_EEPROM_93CX6=1
+endif
# Realtek
CONFIG_RTL8180=m
+ifeq ($(CONFIG_RTL8180),m)
+#COPTS+= -DCONFIG_RTL8180=1
+endif
+
CONFIG_RTL8187=m
+ifeq ($(CONFIG_RTL8187),m)
+#COPTS+= -DCONFIG_RTL8187=1
+endif
+
CONFIG_ADM8211=m
+ifeq ($(CONFIG_ADM8211),m)
+#COPTS+= -DCONFIG_ADM8211=1
+endif
# rt2x00
CONFIG_RT2X00=m
+ifeq ($(CONFIG_RT2X00),m)
+#COPTS+= -DCONFIG_RT2X00=1
+endif
+
CONFIG_RT2X00_LIB=m
+ifeq ($(CONFIG_RT2X00_LIB),m)
+#COPTS+= -DCONFIG_RT2X00_LIB=1
+endif
+
CONFIG_RT2X00_LIB_PCI=m
+ifeq ($(CONFIG_RT2X00_LIB_PCI),m)
+#COPTS+= -DCONFIG_RT2X00_LIB_PCI=1
+endif
+
CONFIG_RT2X00_LIB_USB=m
+ifeq ($(CONFIG_RT2X00_LIB_USB),m)
+#COPTS+= -DCONFIG_RT2X00_LIB_USB=1
+endif
+
CONFIG_RT2X00_LIB_FIRMWARE=y
+ifeq ($(CONFIG_RT2X00_LIB_FIRMWARE),y)
+COPTS+= -DCONFIG_RT2X00_LIB_FIRMWARE=1
+endif
+
CONFIG_RT2400PCI=m
+ifeq ($(CONFIG_RT2400PCI),m)
+#COPTS+= -DCONFIG_RT2400PCI=1
+endif
+
# CONFIG_RT2400PCI_RFKILL is not set
CONFIG_RT2500PCI=m
+ifeq ($(CONFIG_RT2500PCI),m)
+#COPTS+= -DCONFIG_RT2500PCI=1
+endif
+
# CONFIG_RT2500PCI_RFKILL is not set
CONFIG_RT61PCI=m
+ifeq ($(CONFIG_RT61PCI),m)
+#COPTS+= -DCONFIG_RT61PCI=1
+endif
+
# CONFIG_RT61PCI_RFKILL is not set
CONFIG_RT2500USB=m
+ifeq ($(CONFIG_RT2500USB),m)
+#COPTS+= -DCONFIG_RT2500USB=1
+endif
+
CONFIG_RT73USB=m
+ifeq ($(CONFIG_RT73USB),m)
+#COPTS+= -DCONFIG_RT73USB=1
+endif
# CONFIG_RT2X00_LIB_DEBUGFS is not set
# CONFIG_RT2X00_DEBUG is not se
# p54
CONFIG_P54_COMMON=m
+ifeq ($(CONFIG_P54_COMMON),m)
+#COPTS+= -DCONFIG_P54_COMMON=1
+endif
+
CONFIG_P54_USB=m
+ifeq ($(CONFIG_P54_USB),m)
+#COPTS+= -DCONFIG_P54_USB=1
+endif
+
CONFIG_P54_PCI=m
+ifeq ($(CONFIG_P54_PCI),m)
+#COPTS+= -DCONFIG_P54_PCI=1
+endif
# Sonics Silicon Backplane
CONFIG_SSB_POSSIBLE=y
+ifeq ($(CONFIG_SSB_POSSIBLE),y)
+#COPTS+= -DCONFIG_SSB_POSSIBLE=1
+endif
+
CONFIG_SSB=m
+ifeq ($(CONFIG_SSB),m)
+#COPTS+= -DCONFIG_SSB=1
+endif
+
CONFIG_SSB_PCIHOST_POSSIBLE=y
+ifeq ($(CONFIG_SSB_PCIHOST_POSSIBLE),y)
+COPTS+= -DCONFIG_SSB_PCIHOST_POSSIBLE=1
+endif
+
CONFIG_SSB_PCIHOST=y
+ifeq ($(CONFIG_SSB_PCIHOST),y)
+COPTS+= -DCONFIG_SSB_PCIHOST=1
+endif
+
CONFIG_SSB_PCMCIAHOST=y
-# CONFIG_SSB_DEBUG is not set
-CONFIG_SSB_DRIVER_MIPS=n
-# CONFIG_SSB_DRIVER_EXTIF=y
+ifeq ($(CONFIG_SSB_PCMCIAHOST),y)
+COPTS+= -DCONFIG_SSB_PCMCIAHOST=1
+endif
+
CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y
+ifeq ($(CONFIG_SSB_DRIVER_PCICORE_POSSIBLE),y)
+#COPTS+= -DCONFIG_SSB_DRIVER_PCICORE_POSSIBLE=1
+endif
+
CONFIG_SSB_DRIVER_PCICORE=y
+ifeq ($(CONFIG_SSB_DRIVER_PCICORE),y)
+COPTS+= -DCONFIG_SSB_DRIVER_PCICORE=1
+endif
+
+ifeq ($(CONFIG_SSB_PCIHOST),y)
+COPTS+= -DCONFIG_SSB_PCIHOST=1
+endif
+
+# These two are for mips
+CONFIG_SSB_DRIVER_MIPS=n
+CONFIG_SSB_PCICORE_HOSTMODE=n
+# CONFIG_SSB_DEBUG is not set
+# CONFIG_SSB_DRIVER_EXTIF=y
# Old ieee80211 "stack"
# Note: old softmac is scheduled for removal so we
# ignore that stuff
CONFIG_IEEE80211=m
+ifeq ($(CONFIG_IEEE80211),m)
+#COPTS+= -DCONFIG_IEEE80211=1
+endif
+
CONFIG_IEEE80211_CRYPT_CCMP=m
+ifeq ($(CONFIG_IEEE80211_CRYPT_CCMP),m)
+#COPTS+= -DCONFIG_IEEE80211_CRYPT_CCMP=1
+endif
+
CONFIG_IEEE80211_CRYPT_TKIP=m
+ifeq ($(CONFIG_IEEE80211_CRYPT_TKIP),m)
+#COPTS+= -DCONFIG_IEEE80211_CRYPT_TKIP=1
+endif
+
CONFIG_IEEE80211_CRYPT_WEP=m
-CONFIG_IEEE80211_SOFTMAC=n
+ifeq ($(CONFIG_IEEE80211_CRYPT_WEP),m)
+#COPTS+= -DCONFIG_IEEE80211_CRYPT_WEP=1
+endif
+CONFIG_IEEE80211_SOFTMAC=n
# Old drivers which use the old stack
# The Intel ipws
CONFIG_IPW2100=m
+ifeq ($(CONFIG_IPW2100),m)
+#COPTS+= -DCONFIG_IPW2100=1
+endif
+
CONFIG_IPW2200=m
+ifeq ($(CONFIG_IPW2200),m)
+#COPTS+= -DCONFIG_IPW2200=1
+endif
-# Libertas
+# Libertas uses the old stack but not fully, it will soon
+# be cleaned.
CONFIG_LIBERTAS=m
+ifeq ($(CONFIG_LIBERTAS),m)
+#COPTS+= -DCONFIG_LIBERTAS=1
+endif
+
CONFIG_LIBERTAS_USB=m
-CONFIG_LIBERTAS_CS=m
+ifeq ($(CONFIG_LIBERTAS_USB),m)
+#COPTS+= -DCONFIG_LIBERTAS_USB=1
+endif
+CONFIG_LIBERTAS_CS=m
+ifeq ($(CONFIG_LIBERTAS_CS),m)
+#COPTS+= -DCONFIG_LIBERTAS_CS=1
+endif
diff --git a/scripts/admin-update.sh b/scripts/admin-update.sh
index 5ac8b48..b2ac0f2 100755
--- a/scripts/admin-update.sh
+++ b/scripts/admin-update.sh
@@ -8,6 +8,13 @@
# git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git
# We assume you have it on your ~/devel/wireless-2.6/ directory. If you do,
# just run this script from the compat-wireless-2.6 directory.
+# You can specify where your GIT_TREE is by doing:
+#
+# export GIT_TREE=/home/mcgrof/wireless-2.6/
+#
+# for example
+#
+GIT_URL="git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git"
INCLUDE_LINUX="ieee80211.h nl80211.h wireless.h"
INCLUDE_LINUX="$INCLUDE_LINUX pci_ids.h bitops.h eeprom_93cx6.h"
@@ -16,8 +23,22 @@ INCLUDE_NET="cfg80211.h ieee80211_radiotap.h iw_handler.h"
INCLUDE_NET="$INCLUDE_NET mac80211.h wext.h wireless.h"
NET_DIRS="wireless mac80211 ieee80211"
-GIT_TREE="/home/$USER/devel/wireless-2.6"
-
+# User exported this variable
+if [ -z $GIT_TREE ]; then
+ GIT_TREE="/home/$USER/devel/wireless-2.6/"
+ if [ ! -d $GIT_TREE ]; then
+ echo "Please tell me where your wireless-2.6 git tree is."
+ echo "You can do this by exporting its location as follows:"
+ echo
+ echo " export GIT_TREE=/home/mcgrof/wireless-2.6/"
+ echo
+ echo "If you do not have one you can clone the repository:"
+ echo " git-clone $GIT_URL"
+ exit 1
+ fi
+else
+ echo "You said your wireless-2.6 git tree is: $GIT_TREE"
+fi
# Drivers that have their own directory
DRIVERS="drivers/net/wireless/ath5k"
DRIVERS="$DRIVERS drivers/ssb"
@@ -25,11 +46,13 @@ DRIVERS="$DRIVERS drivers/net/wireless/b43"
DRIVERS="$DRIVERS drivers/net/wireless/b43legacy"
DRIVERS="$DRIVERS drivers/net/wireless/iwlwifi"
DRIVERS="$DRIVERS drivers/net/wireless/rt2x00"
-DRIVERS="$DRIVERS drivers/net/wireless/zd1211rw-mac80211"
+DRIVERS="$DRIVERS drivers/net/wireless/zd1211rw"
DRIVERS="$DRIVERS drivers/net/wireless/libertas"
# Drivers that belong the the wireless directory
-DRIVER_FILES="rtl818x.h"
+DRIVER_FILES="rtl818x.h rtl8180_sa2400.h rtl8180_max2820.h"
+DRIVER_FILES="$DRIVER_FILES rtl8180_sa2400.h rtl8180_sa2400.c"
+DRIVER_FILES="$DRIVER_FILES rtl8180_max2820.h rtl8180_max2820.c"
DRIVER_FILES="$DRIVER_FILES rtl8180.h rtl8180_rtl8225.h"
DRIVER_FILES="$DRIVER_FILES rtl8180_dev.c rtl8180_rtl8225.c"
DRIVER_FILES="$DRIVER_FILES rtl8187.h rtl8187_rtl8225.h"
@@ -95,10 +118,15 @@ cp $GIT_TREE/$DIR/Makefile $DIR
cp compat/compat.c net/mac80211/
cp compat/compat.h include/net/
-patch -p1 < compat/compat.diff
+patch -p1 -N -t < compat/compat.diff
+RET=$?
+if [[ $RET -ne 0 ]]; then
+ echo "Patching compat.diff failed, update it"
+ exit $RET
+fi
DIR="$PWD"
cd $GIT_TREE && git-describe > $DIR/git-describe && cd $DIR
-echo "Updated ${GIT_TREE##*/}, git-describe says:"
+echo "Updated from ${GIT_TREE}, git-describe says:"
cat git-describe
if [ -d ./.git ]; then
git-describe > compat-release