summaryrefslogtreecommitdiff
path: root/openwrt/target/linux/package
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2006-10-07 11:57:20 +0000
committerFelix Fietkau <nbd@openwrt.org>2006-10-07 11:57:20 +0000
commitd58a09110ccfa95f06c983fe796806f2e035c9d2 (patch)
tree4b825dc642cb6eb9a060e54bf8d69288fbee4904 /openwrt/target/linux/package
parentaf034797eeb62b62ac05442d5a688b28ccd0f16b (diff)
downloadmtk-20170518-d58a09110ccfa95f06c983fe796806f2e035c9d2.zip
mtk-20170518-d58a09110ccfa95f06c983fe796806f2e035c9d2.tar.gz
mtk-20170518-d58a09110ccfa95f06c983fe796806f2e035c9d2.tar.bz2
move old kamikaze out of trunk - will put buildroot-ng in there as soon as all the developers are ready
SVN-Revision: 4944
Diffstat (limited to 'openwrt/target/linux/package')
-rw-r--r--openwrt/target/linux/package/Config.in1
-rw-r--r--openwrt/target/linux/package/Makefile62
-rw-r--r--openwrt/target/linux/package/alsa/Config.in9
-rw-r--r--openwrt/target/linux/package/alsa/Makefile60
-rw-r--r--openwrt/target/linux/package/alsa/files/alsa.modules10
-rw-r--r--openwrt/target/linux/package/alsa/ipkg/kmod-alsa.control5
-rw-r--r--openwrt/target/linux/package/alsa/patches/100-compile_fix.patch18
-rw-r--r--openwrt/target/linux/package/base-files/Makefile66
-rw-r--r--openwrt/target/linux/package/base-files/files/ar7-2.4/etc/config/network27
-rwxr-xr-xopenwrt/target/linux/package/base-files/files/ar7-2.4/etc/init.d/S00adam28
-rw-r--r--openwrt/target/linux/package/base-files/files/aruba-2.6/etc/config/network5
-rwxr-xr-xopenwrt/target/linux/package/base-files/files/aruba-2.6/etc/init.d/S00aruba4
-rwxr-xr-xopenwrt/target/linux/package/base-files/files/aruba-2.6/init3
-rw-r--r--openwrt/target/linux/package/base-files/files/au1000-2.6/etc/config/network12
-rwxr-xr-xopenwrt/target/linux/package/base-files/files/au1000-2.6/sbin/mount_root23
-rw-r--r--openwrt/target/linux/package/base-files/files/brcm-2.4/etc/hotplug.d/net/09-net43
-rwxr-xr-xopenwrt/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S04nvram66
-rwxr-xr-xopenwrt/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05netconfig108
-rw-r--r--openwrt/target/linux/package/base-files/files/brcm-2.6/etc/hotplug.d/net/09-net33
-rwxr-xr-xopenwrt/target/linux/package/base-files/files/brcm-2.6/etc/init.d/S05netconfig108
-rw-r--r--openwrt/target/linux/package/base-files/files/sibyte-2.6/etc/config/network12
-rw-r--r--openwrt/target/linux/package/base-files/files/sibyte-2.6/etc/inittab3
-rwxr-xr-xopenwrt/target/linux/package/base-files/files/sibyte-2.6/init6
-rw-r--r--openwrt/target/linux/package/base-files/files/x86-2.4/etc/config/network12
-rw-r--r--openwrt/target/linux/package/base-files/files/x86-2.6/etc/config/network12
-rw-r--r--openwrt/target/linux/package/base-files/files/xscale-2.6/etc/config/network5
-rwxr-xr-xopenwrt/target/linux/package/base-files/files/xscale-2.6/etc/init.d/S00xscale4
-rwxr-xr-xopenwrt/target/linux/package/base-files/files/xscale-2.6/init3
-rw-r--r--openwrt/target/linux/package/base-files/include/bcmnvram.h148
-rw-r--r--openwrt/target/linux/package/base-files/include/bcmutils.h157
-rw-r--r--openwrt/target/linux/package/base-files/include/cy_conf.h69
-rw-r--r--openwrt/target/linux/package/base-files/include/epivers.h69
-rw-r--r--openwrt/target/linux/package/base-files/include/proto/802.11.h852
-rw-r--r--openwrt/target/linux/package/base-files/include/proto/ethernet.h179
-rw-r--r--openwrt/target/linux/package/base-files/include/shutils.h200
-rw-r--r--openwrt/target/linux/package/base-files/include/typedefs.h293
-rw-r--r--openwrt/target/linux/package/base-files/include/utils.h131
-rw-r--r--openwrt/target/linux/package/base-files/include/wlcompat.h36
-rw-r--r--openwrt/target/linux/package/base-files/include/wlioctl.h1097
-rw-r--r--openwrt/target/linux/package/base-files/include/wlutils.h59
-rw-r--r--openwrt/target/linux/package/base-files/ipkg/base-files-arch.control4
-rw-r--r--openwrt/target/linux/package/base-files/src/adam2patcher.c59
-rw-r--r--openwrt/target/linux/package/base-files/src/jffs2root.c133
-rw-r--r--openwrt/target/linux/package/diag/Config.in7
-rw-r--r--openwrt/target/linux/package/diag/Makefile31
-rw-r--r--openwrt/target/linux/package/diag/diag_led.c268
-rw-r--r--openwrt/target/linux/package/diag/ipkg/kmod-diag.control4
-rw-r--r--openwrt/target/linux/package/fuse/Config.in19
-rw-r--r--openwrt/target/linux/package/fuse/Makefile80
-rw-r--r--openwrt/target/linux/package/fuse/ipkg/kmod-fuse.control4
-rw-r--r--openwrt/target/linux/package/fuse/patches/101-kmod_build.patch46
-rw-r--r--openwrt/target/linux/package/hostap/Config.in40
-rw-r--r--openwrt/target/linux/package/hostap/Makefile58
-rw-r--r--openwrt/target/linux/package/hostap/ipkg/kmod-hostap-pci.control5
-rw-r--r--openwrt/target/linux/package/hostap/ipkg/kmod-hostap-plx.control5
-rw-r--r--openwrt/target/linux/package/hostap/ipkg/kmod-hostap.control4
-rw-r--r--openwrt/target/linux/package/madwifi-old/Config.in9
-rw-r--r--openwrt/target/linux/package/madwifi-old/Makefile103
-rw-r--r--openwrt/target/linux/package/madwifi-old/files/madwifi.init2
-rw-r--r--openwrt/target/linux/package/madwifi-old/files/madwifi.modules11
-rw-r--r--openwrt/target/linux/package/madwifi-old/ipkg/kmod-madwifi-old.control4
-rw-r--r--openwrt/target/linux/package/madwifi-old/patches/100-kernel_cflags.patch32
-rw-r--r--openwrt/target/linux/package/madwifi/Config.in10
-rw-r--r--openwrt/target/linux/package/madwifi/Makefile105
-rw-r--r--openwrt/target/linux/package/madwifi/files/madwifi.init2
-rw-r--r--openwrt/target/linux/package/madwifi/files/madwifi.modules11
-rw-r--r--openwrt/target/linux/package/madwifi/ipkg/kmod-madwifi.control4
-rw-r--r--openwrt/target/linux/package/madwifi/patches/100-kernel_cflags.patch43
-rw-r--r--openwrt/target/linux/package/madwifi/patches/101-no_werror.patch12
-rw-r--r--openwrt/target/linux/package/madwifi/patches/102-multicall_binary.patch740
-rw-r--r--openwrt/target/linux/package/madwifi/patches/103-disable_rfkill.patch12
-rw-r--r--openwrt/target/linux/package/madwifi/patches/104-apmode_by_default.patch12
-rw-r--r--openwrt/target/linux/package/madwifi/patches/105-slab_fix.patch11
-rw-r--r--openwrt/target/linux/package/mini_fo/Config.in6
-rw-r--r--openwrt/target/linux/package/mini_fo/Makefile42
-rw-r--r--openwrt/target/linux/package/mini_fo/ipkg/kmod-mini-fo.control4
-rw-r--r--openwrt/target/linux/package/mini_fo/patches/101-kmod_build.patch52
-rw-r--r--openwrt/target/linux/package/mini_fo/patches/102-mutex_change.patch602
-rw-r--r--openwrt/target/linux/package/openswan/Config.in10
-rw-r--r--openwrt/target/linux/package/openswan/Makefile36
-rw-r--r--openwrt/target/linux/package/openswan/ipkg/kmod-openswan.control4
-rw-r--r--openwrt/target/linux/package/openswan/patches/101-arp_header.patch11
-rw-r--r--openwrt/target/linux/package/shfs/Config.in22
-rw-r--r--openwrt/target/linux/package/shfs/Makefile46
-rw-r--r--openwrt/target/linux/package/shfs/ipkg/kmod-shfs.control4
-rw-r--r--openwrt/target/linux/package/shfs/patches/101-kmod_build.patch98
-rw-r--r--openwrt/target/linux/package/shfs/patches/102-gcc4_fix.patch23
-rw-r--r--openwrt/target/linux/package/shfs/patches/103-dentry.patch21
-rw-r--r--openwrt/target/linux/package/spca5xx/Config.in9
-rw-r--r--openwrt/target/linux/package/spca5xx/Makefile40
-rw-r--r--openwrt/target/linux/package/spca5xx/ipkg/kmod-spca5xx.control5
-rw-r--r--openwrt/target/linux/package/spca5xx/patches/01-kmod-build.patch177
-rw-r--r--openwrt/target/linux/package/switch/Config.in11
-rw-r--r--openwrt/target/linux/package/switch/Makefile37
-rw-r--r--openwrt/target/linux/package/switch/ipkg/kmod-switch.control4
-rw-r--r--openwrt/target/linux/package/switch/src/Makefile19
-rw-r--r--openwrt/target/linux/package/switch/src/etc53xx.h620
-rw-r--r--openwrt/target/linux/package/switch/src/gpio.h45
-rw-r--r--openwrt/target/linux/package/switch/src/switch-adm.c571
-rw-r--r--openwrt/target/linux/package/switch/src/switch-core.c466
-rw-r--r--openwrt/target/linux/package/switch/src/switch-core.h59
-rw-r--r--openwrt/target/linux/package/switch/src/switch-robo.c480
-rw-r--r--openwrt/target/linux/package/ueagle-atm/Config.in10
-rw-r--r--openwrt/target/linux/package/ueagle-atm/Makefile42
-rw-r--r--openwrt/target/linux/package/ueagle-atm/files/ueagle-atm.modules2
-rw-r--r--openwrt/target/linux/package/ueagle-atm/ipkg/kmod-ueagle-atm.control5
-rw-r--r--openwrt/target/linux/package/ueagle-atm/patches/100-compile_fix.patch11
-rw-r--r--openwrt/target/linux/package/wlcompat/Config.in17
-rw-r--r--openwrt/target/linux/package/wlcompat/Makefile43
-rw-r--r--openwrt/target/linux/package/wlcompat/ipkg/kmod-wlcompat-debug.control5
-rw-r--r--openwrt/target/linux/package/wlcompat/ipkg/kmod-wlcompat.control5
-rw-r--r--openwrt/target/linux/package/wlcompat/wlcompat.c1021
-rw-r--r--openwrt/target/linux/package/zd1211/Config.in11
-rw-r--r--openwrt/target/linux/package/zd1211/Makefile49
-rw-r--r--openwrt/target/linux/package/zd1211/ipkg/kmod-zd1211.control4
115 files changed, 0 insertions, 10657 deletions
diff --git a/openwrt/target/linux/package/Config.in b/openwrt/target/linux/package/Config.in
deleted file mode 100644
index 4d97a57..0000000
--- a/openwrt/target/linux/package/Config.in
+++ /dev/null
@@ -1 +0,0 @@
-source "target/linux/package/*/Config.in"
diff --git a/openwrt/target/linux/package/Makefile b/openwrt/target/linux/package/Makefile
deleted file mode 100644
index 150dee3..0000000
--- a/openwrt/target/linux/package/Makefile
+++ /dev/null
@@ -1,62 +0,0 @@
-# Main makefile for the packages
-include $(TOPDIR)/rules.mk
-include ../rules.mk
-
-package-y += base-files
-package-$(BR2_PACKAGE_KMOD_ALSA) += alsa
-package-$(BR2_PACKAGE_KMOD_FUSE) += fuse
-package-$(BR2_PACKAGE_KMOD_HOSTAP) += hostap
-package-$(BR2_PACKAGE_KMOD_MADWIFI) += madwifi
-package-$(BR2_PACKAGE_KMOD_MADWIFI_OLD) += madwifi-old
-package-$(BR2_PACKAGE_KMOD_MINI_FO) += mini_fo
-package-$(BR2_PACKAGE_KMOD_OPENSWAN) += openswan
-package-$(BR2_PACKAGE_KMOD_SHFS) += shfs
-package-$(BR2_PACKAGE_KMOD_SPCA5XX) += spca5xx
-package-$(BR2_PACKAGE_KMOD_SWITCH) += switch
-package-$(BR2_PACKAGE_KMOD_UEAGLE_ATM) += ueagle-atm
-package-$(BR2_PACKAGE_KMOD_DIAG) += diag
-package-$(BR2_PACKAGE_KMOD_WLCOMPAT) += wlcompat
-package-$(BR2_PACKAGE_KMOD_ZD1211) += zd1211
-
-wlcompat-compile: base-files-compile
-
-all: compile install
-clean: $(patsubst %,%-clean,$(package-) $(package-y) $(package-m))
-prepare: $(patsubst %,%-prepare,$(package-y) $(package-m))
-compile: $(patsubst %,%-compile,$(package-y) $(package-m))
-install: $(patsubst %,%-install,$(package-y))
-
-KPKG_MAKEOPTS += BUILD_DIR="$(LINUX_BUILD_DIR)"
-
-%-prepare:
- @$(START_TRACE) "target/linux/package/$(patsubst %-prepare,%,$@)/prepare: "
- $(MAKE) -C $(patsubst %-prepare,%,$@) \
- $(KPKG_MAKEOPTS) \
- prepare
- @$(CMD_TRACE) " done"
- @$(END_TRACE)
-
-%-compile:
- @$(START_TRACE) "target/linux/package/$(patsubst %-compile,%,$@)-compile: "
- $(MAKE) -C $(patsubst %-compile,%,$@) \
- $(KPKG_MAKEOPTS) \
- compile
- @$(CMD_TRACE) " done"
- @$(END_TRACE)
-
-%-install:
- @$(START_TRACE) "target/linux/package/$(patsubst %-install,%,$@)-install: "
- $(MAKE) -C $(patsubst %-install,%,$@) \
- $(KPKG_MAKEOPTS) \
- install
- @$(CMD_TRACE) " done"
- @$(END_TRACE)
-
-%-clean:
- @$(START_TRACE) "target/linux/package/$(patsubst %-clean,%,$@)-clean: "
- @$(MAKE) -C $(patsubst %-clean,%,$@) \
- $(KPKG_MAKEOPTS) \
- clean
- @$(CMD_TRACE) " done"
- @$(END_TRACE)
-
diff --git a/openwrt/target/linux/package/alsa/Config.in b/openwrt/target/linux/package/alsa/Config.in
deleted file mode 100644
index df4da0b..0000000
--- a/openwrt/target/linux/package/alsa/Config.in
+++ /dev/null
@@ -1,9 +0,0 @@
-config BR2_PACKAGE_KMOD_ALSA
- prompt "kmod-alsa......................... Alsa Sound Drivers"
- tristate
- depends BR2_LINUX_2_4_X86 || BR2_LINUX_2_4_BRCM || BR2_LINUX_2_6_X86 || BR2_LINUX_2_6_BRCM
- depends BR2_PACKAGE_KMOD_USB_CONTROLLER
- select BR2_PACKAGE_KMOD_SOUNDCORE
- default m if CONFIG_DEVEL
- help
- Alsa Drivers for USB Soundcards
diff --git a/openwrt/target/linux/package/alsa/Makefile b/openwrt/target/linux/package/alsa/Makefile
deleted file mode 100644
index 665fc00..0000000
--- a/openwrt/target/linux/package/alsa/Makefile
+++ /dev/null
@@ -1,60 +0,0 @@
-# $Id$
-
-include $(TOPDIR)/rules.mk
-include ../../rules.mk
-
-PKG_NAME:=alsa-driver
-PKG_VERSION:=1.0.11rc4
-PKG_RELEASE:=1
-PKG_MD5SUM:=8e5794026082a964b09b46f9d881e6ec
-
-PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/driver/
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_CAT:=bzcat
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-
-include $(TOPDIR)/package/rules.mk
-
-ifeq ($(LINUX_KARCH),i386)
-KERNEL_C_INCS:= -I$(LINUX_DIR)/include/asm-i386/mach-generic -I$(LINUX_DIR)/include/asm-i386/mach-default
-KERNEL_C_OPTS:= -Os -mpreferred-stack-boundary=2 -march=i486 -fno-unit-at-a-time
-endif
-ifeq ($(LINUX_KARCH),mips)
-KERNEL_C_INCS:= -I$(LINUX_DIR)/include/asm-mips/mach-generic
-KERNEL_C_OPTS:= -Os -G 0 -mno-abicalls -fno-pic -finline-limit=100000 -mabi=32 -march=mips32 -Wa,-32 -Wa,-march=mips32 -Wa,-mips32 -Wa,--trap
-endif
-
-$(eval $(call PKG_template,KMOD_ALSA,kmod-alsa,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE))))
-
-$(PKG_BUILD_DIR)/.configured:
- (cd $(PKG_BUILD_DIR); \
- CFLAGS="$(KERNEL_C_INCS)" \
- ./configure \
- --with-build=$(LINUX_DIR) \
- --with-kernel=$(LINUX_DIR) \
- --with-cross=$(KERNEL_CROSS) \
- --with-redhat=no \
- --with-suse=no \
- --with-oss=yes \
- --with-isapnp=no \
- --with-sequencer=no \
- --with-cards=usb-audio \
- );
- touch $@
-
-$(PKG_BUILD_DIR)/.built:
- $(MAKE) -C $(PKG_BUILD_DIR) \
- ARCH="$(LINUX_KARCH)" \
- CROSS_COMPILE="$(TARGET_CROSS)" \
- c_opts="$(KERNEL_C_OPTS)" \
- all
- touch $@
-
-$(IPKG_KMOD_ALSA):
- install -d -m0755 $(IDIR_KMOD_ALSA)/etc/modules.d
- install -m0644 ./files/alsa.modules $(IDIR_KMOD_ALSA)/etc/modules.d/70-alsa
- install -d -m0755 $(IDIR_KMOD_ALSA)/lib/modules/$(LINUX_VERSION)
- install -m0644 $(PKG_BUILD_DIR)/modules/*.$(LINUX_KMOD_SUFFIX) \
- $(IDIR_KMOD_ALSA)/lib/modules/$(LINUX_VERSION)/
- $(IPKG_BUILD) $(IDIR_KMOD_ALSA) $(PACKAGE_DIR)
diff --git a/openwrt/target/linux/package/alsa/files/alsa.modules b/openwrt/target/linux/package/alsa/files/alsa.modules
deleted file mode 100644
index 6b16c8c..0000000
--- a/openwrt/target/linux/package/alsa/files/alsa.modules
+++ /dev/null
@@ -1,10 +0,0 @@
-snd-page-alloc
-snd
-snd-timer
-snd-pcm
-snd-rawmidi
-snd-usb-lib
-snd-hwdep
-snd-usb-audio
-snd-mixer-oss
-snd-pcm-oss
diff --git a/openwrt/target/linux/package/alsa/ipkg/kmod-alsa.control b/openwrt/target/linux/package/alsa/ipkg/kmod-alsa.control
deleted file mode 100644
index 5641785..0000000
--- a/openwrt/target/linux/package/alsa/ipkg/kmod-alsa.control
+++ /dev/null
@@ -1,5 +0,0 @@
-Package: kmod-alsa
-Priority: optional
-Section: sys
-Depends: kmod-usb-audio
-Description: Alsa Drivers for USB Soundcards
diff --git a/openwrt/target/linux/package/alsa/patches/100-compile_fix.patch b/openwrt/target/linux/package/alsa/patches/100-compile_fix.patch
deleted file mode 100644
index 2e2a3df..0000000
--- a/openwrt/target/linux/package/alsa/patches/100-compile_fix.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-diff -urN alsa.old/include/adriver.h alsa.dev/include/adriver.h
---- alsa.old/include/adriver.h 2006-04-19 08:24:30.000000000 +0200
-+++ alsa.dev/include/adriver.h 2006-05-31 17:24:49.000000000 +0200
-@@ -451,7 +451,7 @@
- #endif /* < 2.6.0 */
-
- /* workarounds for USB API */
--#if defined(SND_NEED_USB_WRAPPER) && (defined(CONFIG_USB) || defined(CONFIG_USB_MODULE))
-+#if 1
-
- #include <linux/usb.h>
-
-@@ -1174,4 +1174,5 @@
- */
- #define OPL3_HW_OPL3_PC98 0x0305 /* PC9800 */
-
-+#undef info /* used in several structs */
- #endif /* __SOUND_LOCAL_DRIVER_H */
diff --git a/openwrt/target/linux/package/base-files/Makefile b/openwrt/target/linux/package/base-files/Makefile
deleted file mode 100644
index cf72eab..0000000
--- a/openwrt/target/linux/package/base-files/Makefile
+++ /dev/null
@@ -1,66 +0,0 @@
-# $Id$
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME := base-files-arch
-PKG_RELEASE := 2
-PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
-
-include $(TOPDIR)/package/rules.mk
-
-IDIR_OPENWRT:=$(PKG_BUILD_DIR)/ipkg
-IPKG_OPENWRT:=$(PACKAGE_DIR)/base-files-$(BOARD)-$(KERNEL)_$(PKG_RELEASE)_$(ARCH).ipk
-
-$(PKG_BUILD_DIR)/.prepared:
- mkdir -p $(PKG_BUILD_DIR)
- touch $@
-
-ifeq ($(BOARD),ar7)
-$(PKG_BUILD_DIR)/adam2patcher: src/adam2patcher.c
- $(TARGET_CC) -o $@ $<
-
-$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/adam2patcher
-
-$(IDIR_OPENWRT)/sbin/adam2patcher: $(PKG_BUILD_DIR)/adam2patcher
- mkdir -p $(IDIR_OPENWRT)/sbin
- $(CP) $(PKG_BUILD_DIR)/adam2patcher $(IDIR_OPENWRT)/sbin
-
-$(IPKG_OPENWRT): $(IDIR_OPENWRT)/sbin/adam2patcher
-endif
-
-ifeq ($(BOARD),brcm)
-$(PKG_BUILD_DIR)/jffs2root: src/jffs2root.c
- $(TARGET_CC) -o $@ $<
-
-$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/jffs2root
-
-$(IDIR_OPENWRT)/sbin/jffs2root: $(PKG_BUILD_DIR)/jffs2root
- mkdir -p $(IDIR_OPENWRT)/sbin
- $(CP) $(PKG_BUILD_DIR)/jffs2root $(IDIR_OPENWRT)/sbin
-
-$(IPKG_OPENWRT): $(IDIR_OPENWRT)/sbin/jffs2root
-endif
-
-$(PKG_BUILD_DIR)/.built:
- touch $@
-
-$(IDIR_OPENWRT):
- $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_OPENWRT) ipkg/base-files-arch.control $(PKG_RELEASE) $(ARCH)
- $(SED) s,base-files-arch,base-files-$(BOARD)-$(KERNEL),g $(IDIR_OPENWRT)/CONTROL/control
-
-$(IPKG_OPENWRT): $(IDIR_OPENWRT)
- [ -d files/$(BOARD)-$(KERNEL) ] && $(CP) -fpR files/$(BOARD)-$(KERNEL)/* $(IDIR_OPENWRT)/
- find $(IDIR_OPENWRT) -name CVS | xargs rm -rf
- find $(IDIR_OPENWRT) -name .svn | xargs rm -rf
- $(RSTRIP) $(IDIR_OPENWRT)
- $(IPKG_BUILD) $(IDIR_OPENWRT) $(PACKAGE_DIR)
-
-install-targets: compile openwrt-install
-
-openwrt-install:
- $(IPKG) install $(IPKG_OPENWRT)
-
-compile-targets: install-dev $(IPKG_OPENWRT)
-install-dev:
- mkdir -p $(STAGING_DIR)/usr/include
- $(CP) ./include/[a-z]* $(STAGING_DIR)/usr/include/
diff --git a/openwrt/target/linux/package/base-files/files/ar7-2.4/etc/config/network b/openwrt/target/linux/package/base-files/files/ar7-2.4/etc/config/network
deleted file mode 100644
index 353538b..0000000
--- a/openwrt/target/linux/package/base-files/files/ar7-2.4/etc/config/network
+++ /dev/null
@@ -1,27 +0,0 @@
-# Network configuration file
-# Uncomment the following statements to change the network configuration
-
-## LAN configuration
-lan_ifname="eth0"
-lan_proto="static"
-lan_ipaddr="192.168.1.1"
-lan_netmask="255.255.255.0"
-# lan_gateway=""
-# lan_dns=""
-
-## WAN configuration
-# wan_proto=pppoe
-wan_ifname=ppp0
-wan_device=nas0
-atm_vpi=8
-atm_vci=35
-# ppp_username=my_username
-# ppp_passwd=my_passwd
-
-## WAN configuration (pppoe)
-pppoe_atm=1
-ppp_mtu=1492
-
-## WAN configuration (pppoa)
-# ppp_mtu=1500
-
diff --git a/openwrt/target/linux/package/base-files/files/ar7-2.4/etc/init.d/S00adam2 b/openwrt/target/linux/package/base-files/files/ar7-2.4/etc/init.d/S00adam2
deleted file mode 100755
index 0ca4c01..0000000
--- a/openwrt/target/linux/package/base-files/files/ar7-2.4/etc/init.d/S00adam2
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-# ADAM2 patcher for Netgear DG834 and compatible
-MD5="$(md5sum /dev/mtdblock/0 | awk '{print $1}')"
-[ "$MD5" = "0530bfdf00ec155f4182afd70da028c1" ] && {
- mtd unlock adam2
- /sbin/adam2patcher /dev/mtdblock/0
-}
-rm -f /etc/init.d/S00adam2 /sbin/adam2patcher >&- 2>&-
diff --git a/openwrt/target/linux/package/base-files/files/aruba-2.6/etc/config/network b/openwrt/target/linux/package/base-files/files/aruba-2.6/etc/config/network
deleted file mode 100644
index f60332c..0000000
--- a/openwrt/target/linux/package/base-files/files/aruba-2.6/etc/config/network
+++ /dev/null
@@ -1,5 +0,0 @@
-# Network configuration file
-
-## LAN configuration
-lan_ifname="eth0"
-lan_proto="dhcp"
diff --git a/openwrt/target/linux/package/base-files/files/aruba-2.6/etc/init.d/S00aruba b/openwrt/target/linux/package/base-files/files/aruba-2.6/etc/init.d/S00aruba
deleted file mode 100755
index 9836de4..0000000
--- a/openwrt/target/linux/package/base-files/files/aruba-2.6/etc/init.d/S00aruba
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-mount none /proc -t proc
-mount_root failsafe
-mount -o remount,rw /dev/root /
diff --git a/openwrt/target/linux/package/base-files/files/aruba-2.6/init b/openwrt/target/linux/package/base-files/files/aruba-2.6/init
deleted file mode 100755
index 8ca48a0..0000000
--- a/openwrt/target/linux/package/base-files/files/aruba-2.6/init
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/ash
-mount none /dev -t devfs
-exec /bin/busybox init
diff --git a/openwrt/target/linux/package/base-files/files/au1000-2.6/etc/config/network b/openwrt/target/linux/package/base-files/files/au1000-2.6/etc/config/network
deleted file mode 100644
index 2cc9e26..0000000
--- a/openwrt/target/linux/package/base-files/files/au1000-2.6/etc/config/network
+++ /dev/null
@@ -1,12 +0,0 @@
-# Network configuration file
-
-## LAN configuration
-lan_ifname="br0"
-lan_ifnames="eth0 ath0"
-lan_proto="static"
-lan_ipaddr="192.168.1.1"
-lan_netmask="255.255.255.0"
-
-## WAN configuration
-wan_ifname=""
-wan_proto="none"
diff --git a/openwrt/target/linux/package/base-files/files/au1000-2.6/sbin/mount_root b/openwrt/target/linux/package/base-files/files/au1000-2.6/sbin/mount_root
deleted file mode 100755
index 5dd1b0c..0000000
--- a/openwrt/target/linux/package/base-files/files/au1000-2.6/sbin/mount_root
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-size=$(awk '/Mem:/ {l=5242880;print((s=$2/2)<l)?$2-l:s}' /proc/meminfo)
-mount none /tmp -t tmpfs -o size=$size
-
-if [ "$1" != "failsafe" ]; then
- mtd unlock filesystem
- mount | grep jffs2 >&-
- if [ $? = 0 ] ; then
- if [ $(cat /proc/mtd | wc -l) = 6 ]; then
- mtd erase filesystem
- jffs2root --move
- else
- mount -o remount,rw /dev/root /
- fi
- else
- . /bin/firstboot
- fi
-fi
-
-mount none /tmp -t tmpfs -o remount,nosuid,nodev,mode=1777
-mkdir -p /dev/pts
-mount none /dev/pts -t devpts
-mount -t sysfs none /sys 2>&-
diff --git a/openwrt/target/linux/package/base-files/files/brcm-2.4/etc/hotplug.d/net/09-net b/openwrt/target/linux/package/base-files/files/brcm-2.4/etc/hotplug.d/net/09-net
deleted file mode 100644
index 9dd7796..0000000
--- a/openwrt/target/linux/package/base-files/files/brcm-2.4/etc/hotplug.d/net/09-net
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/sh
-setup_wl()
-{
- [ -f /proc/net/wl0 ] && {
- lsmod | grep wlcompat >&- || insmod wlcompat
- }
- iwconfig "$INTERFACE" 2>&- | grep -v 'no wireless' >&- && {
- /sbin/wifi
- }
-}
-setup_eth()
-{
- [ -d /proc/switch ] || {
- insmod switch-core
- insmod switch-robo || insmod switch-adm
- }
- if="$(echo "$INTERFACE" | sed s,eth,et,)"
- ifconfig "$INTERFACE" up 2>&- >&-
- [ -d "/proc/switch/$INTERFACE" ] || return 0
- echo "1" > "/proc/switch/$INTERFACE/reset"
- echo "1" > "/proc/switch/$INTERFACE/enable_vlan"
- for vlan in $(seq 0 15); do
- eval "hwname=\"\${vlan${vlan}hwname}\""
- [ "$hwname" = "$if" ] && {
- eval "vports=\"\${vlan${vlan}ports}\""
- [ -n "$vports" ] && echo "$vports" > "/proc/switch/$INTERFACE/vlan/$vlan/ports"
- $DEBUG vconfig add "$INTERFACE" "$vlan"
- }
- done
-}
-
-do_register()
-{
- case "${INTERFACE%%[0-9]*}" in
- eth) setup_eth;;
- wl) setup_wl;;
- esac
-}
-
-
-case "$ACTION" in
- add|register) do_register;;
-esac
diff --git a/openwrt/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S04nvram b/openwrt/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S04nvram
deleted file mode 100755
index 4de1247..0000000
--- a/openwrt/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S04nvram
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/bin/sh
-# NVRAM setup
-#
-# This file handles the NVRAM quirks of various hardware.
-
-# WGT634u
-grep 'mtd0: 00060000' /proc/mtd 2>&- >&- && exit
-
-alias debug=${DEBUG:-:}
-
-nvram_default() {
- [ -z "$(nvram get $1)" ] && nvram set "$1=$2"
-}
-
-nvram_set() { # for the linksys fixup part
- [ "$(nvram get "$1")" = "$2" -a "$2" != "" ] || {
- COMMIT=1
- /usr/sbin/nvram set "$1=$2"
- }
-}
-
-# work around braindead CFE defaults in linksys routers
-boardtype=$(nvram get boardtype)
-boardnum=$(nvram get boardnum)
-boardflags=$(($(nvram get boardflags)))
-adm_switch="$(( ($boardflags & 0x80) >> 7 ))"
-
-case "$(( $boardtype ))" in
- "1800") #0x708
- if [ "$adm_switch" = 0 ]; then
- nvram_set sdram_init "$(printf 0x%04x $(( $(/usr/sbin/nvram get sdram_init) | 0x0100 )))"
- [ "$COMMIT" = 1 ] && {
- nvram_set sdram_config 0x0062
- nvram_set clkfreq 216
- nvram_set sdram_ncdl 0x0
- nvram_set pa0itssit 62
- nvram_set pa0b0 0x15eb
- nvram_set pa0b1 0xfa82
- nvram_set pa0b2 0xfe66
- nvram_set pa0maxpwr 0x4e
- }
- fi
- ;;
- "1127") #0x467
- nvram_set sdram_init "$(printf 0x%04x $(( $(/usr/sbin/nvram get sdram_init) | 0x0100 )))"
- [ "$COMMIT" = 1 ] && {
- nvram_set sdram_config 0x0062
- nvram_set sdram_ncdl 0x0
- nvram_set pa0itssit 62
- nvram_set pa0b0 0x168b
- nvram_set pa0b1 0xfabf
- nvram_set pa0b2 0xfeaf
- nvram_set pa0maxpwr 0x4e
- }
- ;;
-esac
-[ "$COMMIT" = "1" ] && nvram commit
-
-# hack for some motorola routers
-nvram unset wl0gpio0
-
-[ "$(nvram get il0macaddr)" = "00:90:4c:5f:00:2a" ] && {
- # if default wifi mac, set two higher than the lan mac
- nvram set il0macaddr=$(nvram get et0macaddr|
- awk '{OFS=FS=":";for(x=7,y=2;--x;){$x=sprintf("%02x",(y+="0x"$x)%256);y/=256}print}')
-}
diff --git a/openwrt/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05netconfig b/openwrt/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05netconfig
deleted file mode 100755
index 6a626f5..0000000
--- a/openwrt/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05netconfig
+++ /dev/null
@@ -1,108 +0,0 @@
-#!/bin/sh
-[ -e /etc/config/network ] && exit 0
-
-mkdir -p /etc/config
-
-(
- if grep 'mtd0: 00060000' /proc/mtd 2>&- >&-; then
- # WGT634u
- echo boardtype=wgt634u
- else
- strings /dev/mtdblock/3
- fi
-) | awk '
-function p(name) {
- if (c[name] != "") print name "=\"" c[name] "\""
-}
-
-BEGIN {
- FS="="
- c["lan_ifname"]="br0"
- c["lan_ifnames"]="vlan0 eth1"
- c["wan_proto"]="none"
- c["wan_ifname"]="vlan1"
- c["vlan0ports"]="1 2 3 4 5*"
- c["vlan1ports"]="0 5"
-}
-
-($1 == "boardnum") || ($1 == "boardtype") || ($1 == "boardflags") {
- nvram[$1] = $2
-}
-
-END {
- # v1 hardware
- if (nvram["boardtype"] == "bcm94710dev") {
- # Linksys WRT54G v1.x
- if (nvram["boardnum"] == "42") {
- c["vlan0ports"]=""
- c["vlan1ports"]=""
- c["lan_ifnames"]="vlan2 eth2"
- }
-
- # Asus WL-500g
- if (nvram["boardnum"] == "asusX") {
- c["lan_ifnames"]="eth0 eth1 eth2" # FIXME
- # wan_ifname=eth1
- }
- }
- if (nvram["boardtype"] == "wgt634u") {
- c["vlan0ports"] = "0 1 2 3 5*"
- c["vlan1ports"] = "4 5"
- c["lan_ifnames"] = "vlan0 ath0"
- }
- if ((nvram["boardtype"] == "0x0467") || (nvram["boardtype"] == "0x042f")) {
- c["vlan0ports"] = "0 1 2 3 5*"
- c["vlan1ports"] = "4 5"
- }
-
- # WAP54G
- if ((nvram["boardnum"] == "2") || \
- (nvram["boardnum"] == "1024")) {
- c["lan_ifnames"]="eth0 eth1"
- c["wan_ifname"]=""
- }
-
- print "#### VLAN configuration "
- print "vlan0hwname=et0"
- print "vlan1hwname=et0"
- p("vlan0ports")
- p("vlan1ports")
- print ""
- print ""
-
- print "#### LAN configuration"
- print "lan_proto=\"static\""
- p("lan_ifname")
- p("lan_ifnames")
- print "lan_ipaddr=\"192.168.1.1\""
- print "lan_netmask=\"255.255.255.0\""
- print "# lan_dns=\"192.168.1.1\""
- print "# lan_gateway=\"192.168.1.1\""
-
- print ""
- print ""
-
- print "#### WAN configuration"
- print "# wan_proto: WAN protocol, available protocols:"
- print "# none: disable"
- print "# dhcp: DHCP"
- print "# static: Static IP"
- print "# pppoe: PPP over Ethernet"
- print "# pptp: Point-to-Point tunneling Protocol"
- print "# for pppoe and pptp you need to use wan_ifname=\"ppp0\""
- print ""
- print "wan_proto=dhcp"
- p("wan_ifname")
- print "wan_device=\"" c["wan_ifname"] "\""
- print "# wan_ipaddr=\"192.168.0.2\""
- print "# wan_netmask=\"255.255.255.0\""
- print "# wan_gateway=\"192.168.0.1\""
- print "# wan_dns=\"192.168.0.1\""
- print ""
- print "## PPP over Ethernet and PPTP"
- print "# wan_ifname=\"ppp0\""
- print "# ppp_username=\"my_username\""
- print "# ppp_passwd=\"my_password\""
- print "# pptp_server_ip=\"192.168.0.1\""
-}
-' > /etc/config/network
diff --git a/openwrt/target/linux/package/base-files/files/brcm-2.6/etc/hotplug.d/net/09-net b/openwrt/target/linux/package/base-files/files/brcm-2.6/etc/hotplug.d/net/09-net
deleted file mode 100644
index 8bbf604..0000000
--- a/openwrt/target/linux/package/base-files/files/brcm-2.6/etc/hotplug.d/net/09-net
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-setup_eth()
-{
- [ -d /proc/switch ] || {
- insmod switch-core
- insmod switch-robo || insmod switch-adm
- }
- if="$(echo "$INTERFACE" | sed s,eth,et,)"
- ifconfig "$INTERFACE" up 2>&- >&-
- [ -d "/proc/switch/$INTERFACE" ] || return 0
- echo "1" > "/proc/switch/$INTERFACE/reset"
- echo "1" > "/proc/switch/$INTERFACE/enable_vlan"
- for vlan in $(seq 0 15); do
- eval "hwname=\"\${vlan${vlan}hwname}\""
- [ "$hwname" = "$if" ] && {
- eval "vports=\"\${vlan${vlan}ports}\""
- [ -n "$vports" ] && echo "$vports" > "/proc/switch/$INTERFACE/vlan/$vlan/ports"
- $DEBUG vconfig add "$INTERFACE" "$vlan"
- }
- done
-}
-
-do_register()
-{
- case "${INTERFACE%%[0-9]*}" in
- eth) setup_eth;;
- esac
-}
-
-
-case "$ACTION" in
- add|register) do_register;;
-esac
diff --git a/openwrt/target/linux/package/base-files/files/brcm-2.6/etc/init.d/S05netconfig b/openwrt/target/linux/package/base-files/files/brcm-2.6/etc/init.d/S05netconfig
deleted file mode 100755
index 6a626f5..0000000
--- a/openwrt/target/linux/package/base-files/files/brcm-2.6/etc/init.d/S05netconfig
+++ /dev/null
@@ -1,108 +0,0 @@
-#!/bin/sh
-[ -e /etc/config/network ] && exit 0
-
-mkdir -p /etc/config
-
-(
- if grep 'mtd0: 00060000' /proc/mtd 2>&- >&-; then
- # WGT634u
- echo boardtype=wgt634u
- else
- strings /dev/mtdblock/3
- fi
-) | awk '
-function p(name) {
- if (c[name] != "") print name "=\"" c[name] "\""
-}
-
-BEGIN {
- FS="="
- c["lan_ifname"]="br0"
- c["lan_ifnames"]="vlan0 eth1"
- c["wan_proto"]="none"
- c["wan_ifname"]="vlan1"
- c["vlan0ports"]="1 2 3 4 5*"
- c["vlan1ports"]="0 5"
-}
-
-($1 == "boardnum") || ($1 == "boardtype") || ($1 == "boardflags") {
- nvram[$1] = $2
-}
-
-END {
- # v1 hardware
- if (nvram["boardtype"] == "bcm94710dev") {
- # Linksys WRT54G v1.x
- if (nvram["boardnum"] == "42") {
- c["vlan0ports"]=""
- c["vlan1ports"]=""
- c["lan_ifnames"]="vlan2 eth2"
- }
-
- # Asus WL-500g
- if (nvram["boardnum"] == "asusX") {
- c["lan_ifnames"]="eth0 eth1 eth2" # FIXME
- # wan_ifname=eth1
- }
- }
- if (nvram["boardtype"] == "wgt634u") {
- c["vlan0ports"] = "0 1 2 3 5*"
- c["vlan1ports"] = "4 5"
- c["lan_ifnames"] = "vlan0 ath0"
- }
- if ((nvram["boardtype"] == "0x0467") || (nvram["boardtype"] == "0x042f")) {
- c["vlan0ports"] = "0 1 2 3 5*"
- c["vlan1ports"] = "4 5"
- }
-
- # WAP54G
- if ((nvram["boardnum"] == "2") || \
- (nvram["boardnum"] == "1024")) {
- c["lan_ifnames"]="eth0 eth1"
- c["wan_ifname"]=""
- }
-
- print "#### VLAN configuration "
- print "vlan0hwname=et0"
- print "vlan1hwname=et0"
- p("vlan0ports")
- p("vlan1ports")
- print ""
- print ""
-
- print "#### LAN configuration"
- print "lan_proto=\"static\""
- p("lan_ifname")
- p("lan_ifnames")
- print "lan_ipaddr=\"192.168.1.1\""
- print "lan_netmask=\"255.255.255.0\""
- print "# lan_dns=\"192.168.1.1\""
- print "# lan_gateway=\"192.168.1.1\""
-
- print ""
- print ""
-
- print "#### WAN configuration"
- print "# wan_proto: WAN protocol, available protocols:"
- print "# none: disable"
- print "# dhcp: DHCP"
- print "# static: Static IP"
- print "# pppoe: PPP over Ethernet"
- print "# pptp: Point-to-Point tunneling Protocol"
- print "# for pppoe and pptp you need to use wan_ifname=\"ppp0\""
- print ""
- print "wan_proto=dhcp"
- p("wan_ifname")
- print "wan_device=\"" c["wan_ifname"] "\""
- print "# wan_ipaddr=\"192.168.0.2\""
- print "# wan_netmask=\"255.255.255.0\""
- print "# wan_gateway=\"192.168.0.1\""
- print "# wan_dns=\"192.168.0.1\""
- print ""
- print "## PPP over Ethernet and PPTP"
- print "# wan_ifname=\"ppp0\""
- print "# ppp_username=\"my_username\""
- print "# ppp_passwd=\"my_password\""
- print "# pptp_server_ip=\"192.168.0.1\""
-}
-' > /etc/config/network
diff --git a/openwrt/target/linux/package/base-files/files/sibyte-2.6/etc/config/network b/openwrt/target/linux/package/base-files/files/sibyte-2.6/etc/config/network
deleted file mode 100644
index 2cc9e26..0000000
--- a/openwrt/target/linux/package/base-files/files/sibyte-2.6/etc/config/network
+++ /dev/null
@@ -1,12 +0,0 @@
-# Network configuration file
-
-## LAN configuration
-lan_ifname="br0"
-lan_ifnames="eth0 ath0"
-lan_proto="static"
-lan_ipaddr="192.168.1.1"
-lan_netmask="255.255.255.0"
-
-## WAN configuration
-wan_ifname=""
-wan_proto="none"
diff --git a/openwrt/target/linux/package/base-files/files/sibyte-2.6/etc/inittab b/openwrt/target/linux/package/base-files/files/sibyte-2.6/etc/inittab
deleted file mode 100644
index 6eef29e..0000000
--- a/openwrt/target/linux/package/base-files/files/sibyte-2.6/etc/inittab
+++ /dev/null
@@ -1,3 +0,0 @@
-::sysinit:/etc/init.d/rcS
-duart/0::askfirst:/bin/ash --login
-#tts/1::askfirst:/bin/ash --login
diff --git a/openwrt/target/linux/package/base-files/files/sibyte-2.6/init b/openwrt/target/linux/package/base-files/files/sibyte-2.6/init
deleted file mode 100755
index 1f98589..0000000
--- a/openwrt/target/linux/package/base-files/files/sibyte-2.6/init
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/ash
-mount none /dev -t devfs
-mount none /proc -t proc
-mount_root failsafe
-mount -o remount,rw /dev/root /
-exec /bin/busybox init
diff --git a/openwrt/target/linux/package/base-files/files/x86-2.4/etc/config/network b/openwrt/target/linux/package/base-files/files/x86-2.4/etc/config/network
deleted file mode 100644
index fd0f557..0000000
--- a/openwrt/target/linux/package/base-files/files/x86-2.4/etc/config/network
+++ /dev/null
@@ -1,12 +0,0 @@
-# Network configuration file
-
-## LAN configuration
-lan_ifname="br0"
-lan_ifnames="eth1 eth2"
-lan_proto="static"
-lan_ipaddr="192.168.1.1"
-lan_netmask="255.255.255.0"
-
-## WAN configuration
-wan_ifname="eth0"
-wan_proto="dhcp"
diff --git a/openwrt/target/linux/package/base-files/files/x86-2.6/etc/config/network b/openwrt/target/linux/package/base-files/files/x86-2.6/etc/config/network
deleted file mode 100644
index fd0f557..0000000
--- a/openwrt/target/linux/package/base-files/files/x86-2.6/etc/config/network
+++ /dev/null
@@ -1,12 +0,0 @@
-# Network configuration file
-
-## LAN configuration
-lan_ifname="br0"
-lan_ifnames="eth1 eth2"
-lan_proto="static"
-lan_ipaddr="192.168.1.1"
-lan_netmask="255.255.255.0"
-
-## WAN configuration
-wan_ifname="eth0"
-wan_proto="dhcp"
diff --git a/openwrt/target/linux/package/base-files/files/xscale-2.6/etc/config/network b/openwrt/target/linux/package/base-files/files/xscale-2.6/etc/config/network
deleted file mode 100644
index f60332c..0000000
--- a/openwrt/target/linux/package/base-files/files/xscale-2.6/etc/config/network
+++ /dev/null
@@ -1,5 +0,0 @@
-# Network configuration file
-
-## LAN configuration
-lan_ifname="eth0"
-lan_proto="dhcp"
diff --git a/openwrt/target/linux/package/base-files/files/xscale-2.6/etc/init.d/S00xscale b/openwrt/target/linux/package/base-files/files/xscale-2.6/etc/init.d/S00xscale
deleted file mode 100755
index 9836de4..0000000
--- a/openwrt/target/linux/package/base-files/files/xscale-2.6/etc/init.d/S00xscale
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-mount none /proc -t proc
-mount_root failsafe
-mount -o remount,rw /dev/root /
diff --git a/openwrt/target/linux/package/base-files/files/xscale-2.6/init b/openwrt/target/linux/package/base-files/files/xscale-2.6/init
deleted file mode 100755
index 8ca48a0..0000000
--- a/openwrt/target/linux/package/base-files/files/xscale-2.6/init
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/ash
-mount none /dev -t devfs
-exec /bin/busybox init
diff --git a/openwrt/target/linux/package/base-files/include/bcmnvram.h b/openwrt/target/linux/package/base-files/include/bcmnvram.h
deleted file mode 100644
index 3c45263..0000000
--- a/openwrt/target/linux/package/base-files/include/bcmnvram.h
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * NVRAM variable manipulation
- *
- * Copyright 2004, Broadcom Corporation
- * All Rights Reserved.
- *
- * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
- * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
- * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
- * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
- *
- * $Id$
- */
-
-#ifndef _bcmnvram_h_
-#define _bcmnvram_h_
-
-#ifndef _LANGUAGE_ASSEMBLY
-
-#include <typedefs.h>
-
-struct nvram_header {
- uint32 magic;
- uint32 len;
- uint32 crc_ver_init; /* 0:7 crc, 8:15 ver, 16:27 init, mem. test 28, 29-31 reserved */
- uint32 config_refresh; /* 0:15 config, 16:31 refresh */
- uint32 config_ncdl; /* ncdl values for memc */
-};
-
-struct nvram_tuple {
- char *name;
- char *value;
- struct nvram_tuple *next;
-};
-
-/*
- * Initialize NVRAM access. May be unnecessary or undefined on certain
- * platforms.
- */
-extern int nvram_init(void *sbh);
-
-/*
- * Disable NVRAM access. May be unnecessary or undefined on certain
- * platforms.
- */
-extern void nvram_exit(void);
-
-/*
- * Get the value of an NVRAM variable. The pointer returned may be
- * invalid after a set.
- * @param name name of variable to get
- * @return value of variable or NULL if undefined
- */
-extern char * nvram_get(const char *name);
-
-/*
- * Get the value of an NVRAM variable.
- * @param name name of variable to get
- * @return value of variable or NUL if undefined
- */
-#define nvram_safe_get(name) (nvram_get(name) ? : "")
-
-#define nvram_safe_unset(name) ({ \
- if(nvram_get(name)) \
- nvram_unset(name); \
-})
-
-#define nvram_safe_set(name, value) ({ \
- if(!nvram_get(name) || strcmp(nvram_get(name), value)) \
- nvram_set(name, value); \
-})
-
-/*
- * Match an NVRAM variable.
- * @param name name of variable to match
- * @param match value to compare against value of variable
- * @return TRUE if variable is defined and its value is string equal
- * to match or FALSE otherwise
- */
-static INLINE int
-nvram_match(char *name, char *match) {
- const char *value = nvram_get(name);
- return (value && !strcmp(value, match));
-}
-
-/*
- * Inversely match an NVRAM variable.
- * @param name name of variable to match
- * @param match value to compare against value of variable
- * @return TRUE if variable is defined and its value is not string
- * equal to invmatch or FALSE otherwise
- */
-static INLINE int
-nvram_invmatch(char *name, char *invmatch) {
- const char *value = nvram_get(name);
- return (value && strcmp(value, invmatch));
-}
-
-/*
- * Set the value of an NVRAM variable. The name and value strings are
- * copied into private storage. Pointers to previously set values
- * may become invalid. The new value may be immediately
- * retrieved but will not be permanently stored until a commit.
- * @param name name of variable to set
- * @param value value of variable
- * @return 0 on success and errno on failure
- */
-extern int nvram_set(const char *name, const char *value);
-
-/*
- * Unset an NVRAM variable. Pointers to previously set values
- * remain valid until a set.
- * @param name name of variable to unset
- * @return 0 on success and errno on failure
- * NOTE: use nvram_commit to commit this change to flash.
- */
-extern int nvram_unset(const char *name);
-
-/*
- * Commit NVRAM variables to permanent storage. All pointers to values
- * may be invalid after a commit.
- * NVRAM values are undefined after a commit.
- * @return 0 on success and errno on failure
- */
-extern int nvram_commit(void);
-
-/*
- * Get all NVRAM variables (format name=value\0 ... \0\0).
- * @param buf buffer to store variables
- * @param count size of buffer in bytes
- * @return 0 on success and errno on failure
- */
-extern int nvram_getall(char *buf, int count);
-
-extern int file2nvram(char *filename, char *varname);
-extern int nvram2file(char *varname, char *filename);
-
-#endif /* _LANGUAGE_ASSEMBLY */
-
-#define NVRAM_MAGIC 0x48534C46 /* 'FLSH' */
-#define NVRAM_VERSION 1
-#define NVRAM_HEADER_SIZE 20
-#define NVRAM_SPACE 0x8000
-#define FLASH_BASE 0xbfc00000 /* Extif core */
-#define FLASH_MIN 0x00100000 /* Minimum flash size */
-#define FLASH_MAX 0x00400000 /* Maximum flash size with extif */
-
-#endif /* _bcmnvram_h_ */
diff --git a/openwrt/target/linux/package/base-files/include/bcmutils.h b/openwrt/target/linux/package/base-files/include/bcmutils.h
deleted file mode 100644
index 05ad41d..0000000
--- a/openwrt/target/linux/package/base-files/include/bcmutils.h
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Misc useful os-independent macros and functions.
- *
- * Copyright 2004, Broadcom Corporation
- * All Rights Reserved.
- *
- * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
- * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
- * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
- * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
- * $Id$
- */
-
-#ifndef _bcmutils_h_
-#define _bcmutils_h_
-
-#ifndef MIN
-#define MIN(a, b) (((a)<(b))?(a):(b))
-#endif
-
-#ifndef MAX
-#define MAX(a, b) (((a)>(b))?(a):(b))
-#endif
-
-#define CEIL(x, y) (((x) + ((y)-1)) / (y))
-#define ROUNDUP(x, y) ((((ulong)(x)+((y)-1))/(y))*(y))
-#define ISALIGNED(a, x) (((uint)(a) & ((x)-1)) == 0)
-#define ISPOWEROF2(x) ((((x)-1)&(x))==0)
-#define OFFSETOF(type, member) ((uint) &((type *)0)->member)
-#define ARRAYSIZE(a) (sizeof(a)/sizeof(a[0]))
-
-/* bit map related macros */
-#ifndef setbit
-#define NBBY 8 /* 8 bits per byte */
-#define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY))
-#define clrbit(a,i) ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY)))
-#define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY)))
-#define isclr(a,i) (((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0)
-#endif
-
-#define NBITS(type) (sizeof (type) * 8)
-
-#define _BCM_U 0x01 /* upper */
-#define _BCM_L 0x02 /* lower */
-#define _BCM_D 0x04 /* digit */
-#define _BCM_C 0x08 /* cntrl */
-#define _BCM_P 0x10 /* punct */
-#define _BCM_S 0x20 /* white space (space/lf/tab) */
-#define _BCM_X 0x40 /* hex digit */
-#define _BCM_SP 0x80 /* hard space (0x20) */
-
-extern unsigned char bcm_ctype[];
-#define bcm_ismask(x) (bcm_ctype[(int)(unsigned char)(x)])
-
-#define bcm_isalnum(c) ((bcm_ismask(c)&(_BCM_U|_BCM_L|_BCM_D)) != 0)
-#define bcm_isalpha(c) ((bcm_ismask(c)&(_BCM_U|_BCM_L)) != 0)
-#define bcm_iscntrl(c) ((bcm_ismask(c)&(_BCM_C)) != 0)
-#define bcm_isdigit(c) ((bcm_ismask(c)&(_BCM_D)) != 0)
-#define bcm_isgraph(c) ((bcm_ismask(c)&(_BCM_P|_BCM_U|_BCM_L|_BCM_D)) != 0)
-#define bcm_islower(c) ((bcm_ismask(c)&(_BCM_L)) != 0)
-#define bcm_isprint(c) ((bcm_ismask(c)&(_BCM_P|_BCM_U|_BCM_L|_BCM_D|_BCM_SP)) != 0)
-#define bcm_ispunct(c) ((bcm_ismask(c)&(_BCM_P)) != 0)
-#define bcm_isspace(c) ((bcm_ismask(c)&(_BCM_S)) != 0)
-#define bcm_isupper(c) ((bcm_ismask(c)&(_BCM_U)) != 0)
-#define bcm_isxdigit(c) ((bcm_ismask(c)&(_BCM_D|_BCM_X)) != 0)
-
-/*
- * Spin at most 'us' microseconds while 'exp' is true.
- * Caller should explicitly test 'exp' when this completes
- * and take appropriate error action if 'exp' is still true.
- */
-#define SPINWAIT(exp, us) { \
- uint countdown = (us) + 9; \
- while ((exp) && (countdown >= 10)) {\
- OSL_DELAY(10); \
- countdown -= 10; \
- } \
-}
-
-/* generic osl packet queue */
-struct pktq {
- void *head; /* first packet to dequeue */
- void *tail; /* last packet to dequeue */
- uint len; /* number of queued packets */
- uint maxlen; /* maximum number of queued packets */
- bool priority; /* enqueue by packet priority */
-};
-#define DEFAULT_QLEN 128
-
-#define pktq_len(q) ((q)->len)
-#define pktq_avail(q) ((q)->maxlen - (q)->len)
-#define pktq_head(q) ((q)->head)
-#define pktq_full(q) ((q)->len >= (q)->maxlen)
-
-/* crc defines */
-#define CRC8_INIT_VALUE 0xff /* Initial CRC8 checksum value */
-#define CRC8_GOOD_VALUE 0x9f /* Good final CRC8 checksum value */
-#define CRC16_INIT_VALUE 0xffff /* Initial CRC16 checksum value */
-#define CRC16_GOOD_VALUE 0xf0b8 /* Good final CRC16 checksum value */
-#define CRC32_INIT_VALUE 0xffffffff /* Initial CRC32 checksum value */
-#define CRC32_GOOD_VALUE 0xdebb20e3 /* Good final CRC32 checksum value */
-
-/* tag_ID/length/value_buffer tuple */
-typedef struct bcm_tlv {
- uint8 id;
- uint8 len;
- uint8 data[1];
-} bcm_tlv_t;
-
-/* Check that bcm_tlv_t fits into the given buflen */
-#define bcm_valid_tlv(elt, buflen) ((buflen) >= 2 && (buflen) >= 2 + (elt)->len)
-
-/* buffer length for ethernet address from bcm_ether_ntoa() */
-#define ETHER_ADDR_STR_LEN 18
-
-/*
-* load 32-bit value from unaligned byte array
-*/
-#ifdef IL_BIGENDIAN
-#define load32_ua(a) ((((uint8 *)(a))[0] << 24) + (((uint8 *)(a))[1] << 16) + \
- (((uint8 *)(a))[2] << 8) + ((uint8 *)(a))[3])
-#else
-#define load32_ua(a) ((((uint8 *)(a))[3] << 24) + (((uint8 *)(a))[2] << 16) + \
- (((uint8 *)(a))[1] << 8) + ((uint8 *)(a))[0])
-#endif
-
-/* externs */
-extern uint bcm_atoi(char *s);
-extern uchar bcm_toupper(uchar c);
-extern ulong bcm_strtoul(char *cp, char **endp, uint base);
-extern void deadbeef(char *p, uint len);
-extern void prhex(char *msg, uchar *buf, uint len);
-extern void prpkt(char *msg, void *drv, void *p0);
-extern uint pktcopy(void *drv, void *p, uint offset, int len, uchar *buf);
-extern uint pkttotlen(void *drv, void *);
-extern uchar *bcm_ether_ntoa(char *ea, char *buf);
-extern int bcm_ether_atoe(char *p, char *ea);
-extern void bcm_mdelay(uint ms);
-extern char *getvar(char *vars, char *name);
-extern int getintvar(char *vars, char *name);
-extern char *bcmstrstr(char *haystack, char *needle);
-
-extern uint8 crc8(uint8 *p, uint nbytes, uint8 crc);
-extern uint16 crc16(uint8 *p, uint nbytes, uint16 crc);
-extern uint32 crc32(uint8 *p, uint nbytes, uint32 crc);
-extern bcm_tlv_t *bcm_next_tlv(bcm_tlv_t *elt, int *buflen);
-extern bcm_tlv_t *bcm_parse_tlvs(void *buf, int buflen, uint key);
-extern bcm_tlv_t *bcm_parse_ordered_tlvs(void *buf, int buflen, uint key);
-extern void pktq_init(struct pktq *q, uint maxlen, bool priority);
-extern bool pktenq(struct pktq *q, void *p, bool lifo);
-extern void *pktdeq(struct pktq *q);
-
-#define bcmlog(fmt, a1, a2)
-#define bcmdumplog(buf, size) *buf = '\0'
-#define bcmdumplogent(buf, idx) -1
-
-#endif /* _bcmutils_h_ */
diff --git a/openwrt/target/linux/package/base-files/include/cy_conf.h b/openwrt/target/linux/package/base-files/include/cy_conf.h
deleted file mode 100644
index dbe387b..0000000
--- a/openwrt/target/linux/package/base-files/include/cy_conf.h
+++ /dev/null
@@ -1,69 +0,0 @@
-
-#define DNSMASQ_SUPPORT 1
-#define CONFIG_DNSMASQ y
-#define UDHCPD_SUPPORT 1
-#define CONFIG_UDHCPD y
-#define UDHCPC_SUPPORT 1
-#define CONFIG_UDHCPC y
-#define PPPOE_SUPPORT 1
-#define CONFIG_PPPOE y
-#define PPTP_SUPPORT 1
-#define CONFIG_PPTP y
-#define L2TP_SUPPORT 1
-#define CONFIG_L2TP y
-#define PPPD_SUPPORT 1
-#define CONFIG_PPPD y
-#define ZEBRA_SUPPORT 1
-#define CONFIG_ZEBRA y
-#define TFTPD_SUPPORT 1
-#define CONFIG_TFTPD y
-#define DDNS_SUPPORT 1
-#define CONFIG_DDNS y
-#define CRON_SUPPORT 1
-#define CONFIG_CRON y
-#define HTTPD_SUPPORT 1
-#define CONFIG_HTTPD y
-#define GET_POST_SUPPORT 1
-#define CONFIG_GET_POST y
-
-#if 1
-#define HEARTBEAT_SUPPORT 1
-#define CONFIG_HEARTBEAT y
-#define MULTICAST_SUPPORT 1
-#define CONFIG_MULTICAST y
-#define SETUP_WIZARD_SUPPORT 1
-#define CONFIG_SETUP_WIZARD y
-#define PARENTAL_CONTROL_SUPPORT 1
-#define CONFIG_PARENTAL_CONTROL y
-#define HTTPS_SUPPORT 1
-#define CONFIG_HTTPS y
-#define EOU_SUPPORT 1
-#define CONFIG_EOU y
-#define EZC_SUPPORT 1
-#define CONFIG_EZC y
-#define WRITE_MAC_SUPPORT 1
-#define CONFIG_WRITE_MAC y
-#define DIAG_SUPPORT 1
-#define CONFIG_DIAG y
-#endif
-
-#define SPEED_BOOSTER_SUPPORT 1
-#define CONFIG_SPEED_BOOSTER y
-#define XBOX_SUPPORT 1
-#define CONFIG_XBOX y
-
-#if 0
-#define MPPPOE_SUPPORT 1
-#define CONFIG_MPPPOE y
-#define UNNUMBERIP_SUPPORT 1
-#define CONFIG_UNNUMBERIP y
-#endif
-
-#define WL_STA_SUPPORT 1
-#define CONFIG_WL_STA y
-#define BACKUP_RESTORE_SUPPORT 1
-#define CONFIG_BACKUP_RESTORE y
-#define PORT_TRIGGER_SUPPORT 1
-#define CONFIG_PORT_TRIGGER y
-#define HW_QOS_SUPPORT 1
-#define CONFIG_HW_QOS y
diff --git a/openwrt/target/linux/package/base-files/include/epivers.h b/openwrt/target/linux/package/base-files/include/epivers.h
deleted file mode 100644
index e174fb5..0000000
--- a/openwrt/target/linux/package/base-files/include/epivers.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright 2004, Broadcom Corporation
- * All Rights Reserved.
- *
- * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
- * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
- * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
- * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
- *
- * $Id$
- *
-*/
-
-#ifndef _epivers_h_
-#define _epivers_h_
-
-#ifdef linux
-#include <linux/config.h>
-#endif
-
-/* Vendor Name, ASCII, 32 chars max */
-#ifdef COMPANYNAME
-#define HPNA_VENDOR COMPANYNAME
-#else
-#define HPNA_VENDOR "Broadcom Corporation"
-#endif
-
-/* Driver Date, ASCII, 32 chars max */
-#define HPNA_DRV_BUILD_DATE __DATE__
-
-/* Hardware Manufacture Date, ASCII, 32 chars max */
-#define HPNA_HW_MFG_DATE "Not Specified"
-
-/* See documentation for Device Type values, 32 values max */
-#ifndef HPNA_DEV_TYPE
-
-#if defined(CONFIG_BRCM_VJ)
-#define HPNA_DEV_TYPE { CDCF_V0_DEVICE_DISPLAY }
-
-#elif defined(CONFIG_BCRM_93725)
-#define HPNA_DEV_TYPE { CDCF_V0_DEVICE_CM_BRIDGE, CDCF_V0_DEVICE_DISPLAY }
-
-#else
-#define HPNA_DEV_TYPE { CDCF_V0_DEVICE_PCINIC }
-
-#endif
-
-#endif /* !HPNA_DEV_TYPE */
-
-
-#define EPI_MAJOR_VERSION 3
-
-#define EPI_MINOR_VERSION 60
-
-#define EPI_RC_NUMBER 13
-
-#define EPI_INCREMENTAL_NUMBER 0
-
-#define EPI_BUILD_NUMBER 0
-
-#define EPI_VERSION 3,60,13,0
-
-#define EPI_VERSION_NUM 0x033c0d00
-
-/* Driver Version String, ASCII, 32 chars max */
-#define EPI_VERSION_STR "3.60.13.0"
-#define EPI_ROUTER_VERSION_STR "3.61.13.0"
-
-#endif /* _epivers_h_ */
diff --git a/openwrt/target/linux/package/base-files/include/proto/802.11.h b/openwrt/target/linux/package/base-files/include/proto/802.11.h
deleted file mode 100644
index ea57850..0000000
--- a/openwrt/target/linux/package/base-files/include/proto/802.11.h
+++ /dev/null
@@ -1,852 +0,0 @@
-/*
- * Copyright 2004, Broadcom Corporation
- * All Rights Reserved.
- *
- * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
- * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
- * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
- * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
- *
- * Fundamental types and constants relating to 802.11
- *
- * $Id$
- */
-
-#ifndef _802_11_H_
-#define _802_11_H_
-
-#ifndef _TYPEDEFS_H_
-#include <typedefs.h>
-#endif
-
-#ifndef _NET_ETHERNET_H_
-#include <proto/ethernet.h>
-#endif
-
-/* enable structure packing */
-#if !defined(__GNUC__)
-#pragma pack(1)
-#endif
-
-/* some platforms require stronger medicine */
-#if defined(__GNUC__)
-#define PACKED __attribute__((packed))
-#else
-#define PACKED
-#endif
-
-
-#define DOT11_TU_TO_US 1024 /* 802.11 Time Unit is 1024 microseconds */
-
-/* Generic 802.11 frame constants */
-#define DOT11_A3_HDR_LEN 24
-#define DOT11_A4_HDR_LEN 30
-#define DOT11_MAC_HDR_LEN DOT11_A3_HDR_LEN
-#define DOT11_FCS_LEN 4
-#define DOT11_ICV_LEN 4
-#define DOT11_ICV_AES_LEN 8
-#define DOT11_QOS_LEN 2
-
-#define DOT11_KEY_INDEX_SHIFT 6
-#define DOT11_IV_LEN 4
-#define DOT11_IV_TKIP_LEN 8
-#define DOT11_IV_AES_OCB_LEN 4
-#define DOT11_IV_AES_CCM_LEN 8
-
-/* Includes MIC */
-#define DOT11_MAX_MPDU_BODY_LEN 2304
-/* A4 header + QoS + CCMP + PDU + ICV + FCS = 2352 */
-#define DOT11_MAX_MPDU_LEN (DOT11_A4_HDR_LEN + \
- DOT11_QOS_LEN + \
- DOT11_IV_AES_CCM_LEN + \
- DOT11_MAX_MPDU_BODY_LEN + \
- DOT11_ICV_LEN + \
- DOT11_FCS_LEN)
-
-#define DOT11_MAX_SSID_LEN 32
-
-/* dot11RTSThreshold */
-#define DOT11_DEFAULT_RTS_LEN 2347
-#define DOT11_MAX_RTS_LEN 2347
-
-/* dot11FragmentationThreshold */
-#define DOT11_MIN_FRAG_LEN 256
-#define DOT11_MAX_FRAG_LEN 2346 /* Max frag is also limited by aMPDUMaxLength of the attached PHY */
-#define DOT11_DEFAULT_FRAG_LEN 2346
-
-/* dot11BeaconPeriod */
-#define DOT11_MIN_BEACON_PERIOD 1
-#define DOT11_MAX_BEACON_PERIOD 0xFFFF
-
-/* dot11DTIMPeriod */
-#define DOT11_MIN_DTIM_PERIOD 1
-#define DOT11_MAX_DTIM_PERIOD 0xFF
-
-/* 802.2 LLC/SNAP header used by 802.11 per 802.1H */
-#define DOT11_LLC_SNAP_HDR_LEN 8
-#define DOT11_OUI_LEN 3
-struct dot11_llc_snap_header {
- uint8 dsap; /* always 0xAA */
- uint8 ssap; /* always 0xAA */
- uint8 ctl; /* always 0x03 */
- uint8 oui[DOT11_OUI_LEN]; /* RFC1042: 0x00 0x00 0x00
- Bridge-Tunnel: 0x00 0x00 0xF8 */
- uint16 type; /* ethertype */
-} PACKED;
-
-/* RFC1042 header used by 802.11 per 802.1H */
-#define RFC1042_HDR_LEN (ETHER_HDR_LEN + DOT11_LLC_SNAP_HDR_LEN)
-
-/* Generic 802.11 MAC header */
-/*
- * N.B.: This struct reflects the full 4 address 802.11 MAC header.
- * The fields are defined such that the shorter 1, 2, and 3
- * address headers just use the first k fields.
- */
-struct dot11_header {
- uint16 fc; /* frame control */
- uint16 durid; /* duration/ID */
- struct ether_addr a1; /* address 1 */
- struct ether_addr a2; /* address 2 */
- struct ether_addr a3; /* address 3 */
- uint16 seq; /* sequence control */
- struct ether_addr a4; /* address 4 */
-} PACKED;
-
-/* Control frames */
-
-struct dot11_rts_frame {
- uint16 fc; /* frame control */
- uint16 durid; /* duration/ID */
- struct ether_addr ra; /* receiver address */
- struct ether_addr ta; /* transmitter address */
-} PACKED;
-#define DOT11_RTS_LEN 16
-
-struct dot11_cts_frame {
- uint16 fc; /* frame control */
- uint16 durid; /* duration/ID */
- struct ether_addr ra; /* receiver address */
-} PACKED;
-#define DOT11_CTS_LEN 10
-
-struct dot11_ack_frame {
- uint16 fc; /* frame control */
- uint16 durid; /* duration/ID */
- struct ether_addr ra; /* receiver address */
-} PACKED;
-#define DOT11_ACK_LEN 10
-
-struct dot11_ps_poll_frame {
- uint16 fc; /* frame control */
- uint16 durid; /* AID */
- struct ether_addr bssid; /* receiver address, STA in AP */
- struct ether_addr ta; /* transmitter address */
-} PACKED;
-#define DOT11_PS_POLL_LEN 16
-
-struct dot11_cf_end_frame {
- uint16 fc; /* frame control */
- uint16 durid; /* duration/ID */
- struct ether_addr ra; /* receiver address */
- struct ether_addr bssid; /* transmitter address, STA in AP */
-} PACKED;
-#define DOT11_CS_END_LEN 16
-
-/* Management frame header */
-struct dot11_management_header {
- uint16 fc; /* frame control */
- uint16 durid; /* duration/ID */
- struct ether_addr da; /* receiver address */
- struct ether_addr sa; /* transmitter address */
- struct ether_addr bssid; /* BSS ID */
- uint16 seq; /* sequence control */
-} PACKED;
-#define DOT11_MGMT_HDR_LEN 24
-
-/* Management frame payloads */
-
-struct dot11_bcn_prb {
- uint32 timestamp[2];
- uint16 beacon_interval;
- uint16 capability;
-} PACKED;
-#define DOT11_BCN_PRB_LEN 12
-
-struct dot11_auth {
- uint16 alg; /* algorithm */
- uint16 seq; /* sequence control */
- uint16 status; /* status code */
-} PACKED;
-#define DOT11_AUTH_FIXED_LEN 6 /* length of auth frame without challenge info elt */
-
-struct dot11_assoc_req {
- uint16 capability; /* capability information */
- uint16 listen; /* listen interval */
-} PACKED;
-
-struct dot11_assoc_resp {
- uint16 capability; /* capability information */
- uint16 status; /* status code */
- uint16 aid; /* association ID */
-} PACKED;
-
-struct dot11_action_measure {
- uint8 category;
- uint8 action;
- uint8 token;
- uint8 data[1];
-} PACKED;
-#define DOT11_ACTION_MEASURE_LEN 3
-
-/**************
- 802.11h related definitions.
-**************/
-typedef struct {
- uint8 id;
- uint8 len;
- uint8 power;
-} dot11_power_cnst_t;
-
-typedef struct {
- uint8 min;
- uint8 max;
-} dot11_power_cap_t;
-
-typedef struct {
- uint8 id;
- uint8 len;
- uint8 tx_pwr;
- uint8 margin;
-} dot11_tpc_rep_t;
-#define DOT11_MNG_IE_TPC_REPORT_LEN 2 /* length of IE data, not including 2 byte header */
-
-typedef struct {
- uint8 id;
- uint8 len;
- uint8 first_channel;
- uint8 num_channels;
-} dot11_supp_channels_t;
-
-struct dot11_channel_switch {
- uint8 id;
- uint8 len;
- uint8 mode;
- uint8 channel;
- uint8 count;
-} PACKED;
-typedef struct dot11_channel_switch dot11_channel_switch_t;
-
-/* 802.11h Measurement Request/Report IEs */
-/* Measurement Type field */
-#define DOT11_MEASURE_TYPE_BASIC 0
-#define DOT11_MEASURE_TYPE_CCA 1
-#define DOT11_MEASURE_TYPE_RPI 2
-
-/* Measurement Mode field */
-
-/* Measurement Request Modes */
-#define DOT11_MEASURE_MODE_ENABLE (1<<1)
-#define DOT11_MEASURE_MODE_REQUEST (1<<2)
-#define DOT11_MEASURE_MODE_REPORT (1<<3)
-/* Measurement Report Modes */
-#define DOT11_MEASURE_MODE_LATE (1<<0)
-#define DOT11_MEASURE_MODE_INCAPABLE (1<<1)
-#define DOT11_MEASURE_MODE_REFUSED (1<<2)
-/* Basic Measurement Map bits */
-#define DOT11_MEASURE_BASIC_MAP_BSS ((uint8)(1<<0))
-#define DOT11_MEASURE_BASIC_MAP_OFDM ((uint8)(1<<1))
-#define DOT11_MEASURE_BASIC_MAP_UKNOWN ((uint8)(1<<2))
-#define DOT11_MEASURE_BASIC_MAP_RADAR ((uint8)(1<<3))
-#define DOT11_MEASURE_BASIC_MAP_UNMEAS ((uint8)(1<<4))
-
-typedef struct {
- uint8 id;
- uint8 len;
- uint8 token;
- uint8 mode;
- uint8 type;
- uint8 channel;
- uint8 start_time[8];
- uint16 duration;
-} dot11_meas_req_t;
-#define DOT11_MNG_IE_MREQ_LEN 14
-/* length of Measure Request IE data not including variable len */
-#define DOT11_MNG_IE_MREQ_FIXED_LEN 3
-
-struct dot11_meas_rep {
- uint8 id;
- uint8 len;
- uint8 token;
- uint8 mode;
- uint8 type;
- union
- {
- struct {
- uint8 channel;
- uint8 start_time[8];
- uint16 duration;
- uint8 map;
- } PACKED basic;
- uint8 data[1];
- } PACKED rep;
-} PACKED;
-typedef struct dot11_meas_rep dot11_meas_rep_t;
-
-/* length of Measure Report IE data not including variable len */
-#define DOT11_MNG_IE_MREP_FIXED_LEN 3
-
-struct dot11_meas_rep_basic {
- uint8 channel;
- uint8 start_time[8];
- uint16 duration;
- uint8 map;
-} PACKED;
-typedef struct dot11_meas_rep_basic dot11_meas_rep_basic_t;
-#define DOT11_MEASURE_BASIC_REP_LEN 12
-
-struct dot11_quiet {
- uint8 id;
- uint8 len;
- uint8 count; /* TBTTs until beacon interval in quiet starts */
- uint8 period; /* Beacon intervals between periodic quiet periods ? */
- uint16 duration;/* Length of quiet period, in TU's */
- uint16 offset; /* TU's offset from TBTT in Count field */
-} PACKED;
-typedef struct dot11_quiet dot11_quiet_t;
-
-typedef struct {
- uint8 channel;
- uint8 map;
-} chan_map_tuple_t;
-
-typedef struct {
- uint8 id;
- uint8 len;
- uint8 eaddr[ETHER_ADDR_LEN];
- uint8 interval;
- chan_map_tuple_t map[1];
-} dot11_ibss_dfs_t;
-
-/* WME Elements */
-#define WME_OUI "\x00\x50\xf2"
-#define WME_VER 1
-#define WME_TYPE 2
-#define WME_SUBTYPE_IE 0 /* Information Element */
-#define WME_SUBTYPE_PARAM_IE 1 /* Parameter Element */
-#define WME_SUBTYPE_TSPEC 2 /* Traffic Specification */
-
-/* WME Access Category Indices (ACIs) */
-#define AC_BE 0 /* Best Effort */
-#define AC_BK 1 /* Background */
-#define AC_VI 2 /* Video */
-#define AC_VO 3 /* Voice */
-#define AC_MAX 4
-
-/* WME Information Element (IE) */
-struct wme_ie {
- uint8 oui[3];
- uint8 type;
- uint8 subtype;
- uint8 version;
- uint8 acinfo;
-} PACKED;
-typedef struct wme_ie wme_ie_t;
-#define WME_IE_LEN 7
-
-struct wme_acparam {
- uint8 ACI;
- uint8 ECW;
- uint16 TXOP; /* stored in network order (ls octet first) */
-} PACKED;
-typedef struct wme_acparam wme_acparam_t;
-
-/* WME Parameter Element (PE) */
-struct wme_params {
- uint8 oui[3];
- uint8 type;
- uint8 subtype;
- uint8 version;
- uint8 acinfo;
- uint8 rsvd;
- wme_acparam_t acparam[4];
-} PACKED;
-typedef struct wme_params wme_params_t;
-#define WME_PARAMS_IE_LEN 24
-
-/* acinfo */
-#define WME_COUNT_MASK 0x0f
-/* ACI */
-#define WME_AIFS_MASK 0x0f
-#define WME_ACM_MASK 0x10
-#define WME_ACI_MASK 0x60
-#define WME_ACI_SHIFT 5
-/* ECW */
-#define WME_CWMIN_MASK 0x0f
-#define WME_CWMAX_MASK 0xf0
-#define WME_CWMAX_SHIFT 4
-
-#define WME_TXOP_UNITS 32
-
-/* WME Traffic Specification (TSPEC) element */
-#define WME_SUBTYPE_TSPEC 2
-#define WME_TSPEC_HDR_LEN 2
-#define WME_TSPEC_BODY_OFF 2
-struct wme_tspec {
- uint8 oui[DOT11_OUI_LEN]; /* WME_OUI */
- uint8 type; /* WME_TYPE */
- uint8 subtype; /* WME_SUBTYPE_TSPEC */
- uint8 version; /* WME_VERSION */
- uint16 ts_info; /* TS Info */
- uint16 nom_msdu_size; /* (Nominal or fixed) MSDU Size (bytes) */
- uint16 max_msdu_size; /* Maximum MSDU Size (bytes) */
- uint32 min_service_interval; /* Minimum Service Interval (us) */
- uint32 max_service_interval; /* Maximum Service Interval (us) */
- uint32 inactivity_interval; /* Inactivity Interval (us) */
- uint32 service_start; /* Service Start Time (us) */
- uint32 min_rate; /* Minimum Data Rate (bps) */
- uint32 mean_rate; /* Mean Data Rate (bps) */
- uint32 max_burst_size; /* Maximum Burst Size (bytes) */
- uint32 min_phy_rate; /* Minimum PHY Rate (bps) */
- uint32 peak_rate; /* Peak Data Rate (bps) */
- uint32 delay_bound; /* Delay Bound (us) */
- uint16 surplus_bandwidth; /* Surplus Bandwidth Allowance Factor */
- uint16 medium_time; /* Medium Time (32 us/s periods) */
-} PACKED;
-typedef struct wme_tspec wme_tspec_t;
-#define WME_TSPEC_LEN 56 /* not including 2-byte header */
-
-/* ts_info */
-/* 802.1D priority is duplicated - bits 13-11 AND bits 3-1 */
-#define TS_INFO_PRIO_SHIFT_HI 11
-#define TS_INFO_PRIO_MASK_HI (0x7 << TS_INFO_PRIO_SHIFT_HI)
-#define TS_INFO_PRIO_SHIFT_LO 1
-#define TS_INFO_PRIO_MASK_LO (0x7 << TS_INFO_PRIO_SHIFT_LO)
-#define TS_INFO_CONTENTION_SHIFT 7
-#define TS_INFO_CONTENTION_MASK (0x1 << TS_INFO_CONTENTION_SHIFT)
-#define TS_INFO_DIRECTION_SHIFT 5
-#define TS_INFO_DIRECTION_MASK (0x3 << TS_INFO_DIRECTION_SHIFT)
-#define TS_INFO_UPLINK (0 << TS_INFO_DIRECTION_SHIFT)
-#define TS_INFO_DOWNLINK (1 << TS_INFO_DIRECTION_SHIFT)
-#define TS_INFO_BIDIRECTIONAL (3 << TS_INFO_DIRECTION_SHIFT)
-
-/* nom_msdu_size */
-#define FIXED_MSDU_SIZE 0x8000 /* MSDU size is fixed */
-#define MSDU_SIZE_MASK 0x7fff /* (Nominal or fixed) MSDU size */
-
-/* surplus_bandwidth */
-/* Represented as 3 bits of integer, binary point, 13 bits fraction */
-#define INTEGER_SHIFT 13
-#define FRACTION_MASK 0x1FFF
-
-/* Management Notification Frame */
-struct dot11_management_notification {
- uint8 category; /* DOT11_ACTION_NOTIFICATION */
- uint8 action;
- uint8 token;
- uint8 status;
- uint8 data[1]; /* Elements */
-} PACKED;
-#define DOT11_MGMT_NOTIFICATION_LEN 4 /* Fixed length */
-
-/* WME Action Codes */
-#define WME_SETUP_REQUEST 0
-#define WME_SETUP_RESPONSE 1
-#define WME_TEARDOWN 2
-
-/* WME Setup Response Status Codes */
-#define WME_ADMISSION_ACCEPTED 0
-#define WME_INVALID_PARAMETERS 1
-#define WME_ADMISSION_REFUSED 3
-
-/* Macro to take a pointer to a beacon or probe response
- * header and return the char* pointer to the SSID info element
- */
-#define BCN_PRB_SSID(hdr) ((char*)(hdr) + DOT11_MGMT_HDR_LEN + DOT11_BCN_PRB_LEN)
-
-/* Authentication frame payload constants */
-#define DOT11_OPEN_SYSTEM 0
-#define DOT11_SHARED_KEY 1
-#define DOT11_CHALLENGE_LEN 128
-
-/* Frame control macros */
-#define FC_PVER_MASK 0x3
-#define FC_PVER_SHIFT 0
-#define FC_TYPE_MASK 0xC
-#define FC_TYPE_SHIFT 2
-#define FC_SUBTYPE_MASK 0xF0
-#define FC_SUBTYPE_SHIFT 4
-#define FC_TODS 0x100
-#define FC_TODS_SHIFT 8
-#define FC_FROMDS 0x200
-#define FC_FROMDS_SHIFT 9
-#define FC_MOREFRAG 0x400
-#define FC_MOREFRAG_SHIFT 10
-#define FC_RETRY 0x800
-#define FC_RETRY_SHIFT 11
-#define FC_PM 0x1000
-#define FC_PM_SHIFT 12
-#define FC_MOREDATA 0x2000
-#define FC_MOREDATA_SHIFT 13
-#define FC_WEP 0x4000
-#define FC_WEP_SHIFT 14
-#define FC_ORDER 0x8000
-#define FC_ORDER_SHIFT 15
-
-/* sequence control macros */
-#define SEQNUM_SHIFT 4
-#define FRAGNUM_MASK 0xF
-
-/* Frame Control type/subtype defs */
-
-/* FC Types */
-#define FC_TYPE_MNG 0
-#define FC_TYPE_CTL 1
-#define FC_TYPE_DATA 2
-
-/* Management Subtypes */
-#define FC_SUBTYPE_ASSOC_REQ 0
-#define FC_SUBTYPE_ASSOC_RESP 1
-#define FC_SUBTYPE_REASSOC_REQ 2
-#define FC_SUBTYPE_REASSOC_RESP 3
-#define FC_SUBTYPE_PROBE_REQ 4
-#define FC_SUBTYPE_PROBE_RESP 5
-#define FC_SUBTYPE_BEACON 8
-#define FC_SUBTYPE_ATIM 9
-#define FC_SUBTYPE_DISASSOC 10
-#define FC_SUBTYPE_AUTH 11
-#define FC_SUBTYPE_DEAUTH 12
-#define FC_SUBTYPE_ACTION 13
-
-/* Control Subtypes */
-#define FC_SUBTYPE_PS_POLL 10
-#define FC_SUBTYPE_RTS 11
-#define FC_SUBTYPE_CTS 12
-#define FC_SUBTYPE_ACK 13
-#define FC_SUBTYPE_CF_END 14
-#define FC_SUBTYPE_CF_END_ACK 15
-
-/* Data Subtypes */
-#define FC_SUBTYPE_DATA 0
-#define FC_SUBTYPE_DATA_CF_ACK 1
-#define FC_SUBTYPE_DATA_CF_POLL 2
-#define FC_SUBTYPE_DATA_CF_ACK_POLL 3
-#define FC_SUBTYPE_NULL 4
-#define FC_SUBTYPE_CF_ACK 5
-#define FC_SUBTYPE_CF_POLL 6
-#define FC_SUBTYPE_CF_ACK_POLL 7
-#define FC_SUBTYPE_QOS_DATA 8
-#define FC_SUBTYPE_QOS_NULL 12
-
-/* type-subtype combos */
-#define FC_KIND_MASK (FC_TYPE_MASK | FC_SUBTYPE_MASK)
-
-#define FC_KIND(t, s) (((t) << FC_TYPE_SHIFT) | ((s) << FC_SUBTYPE_SHIFT))
-
-#define FC_ASSOC_REQ FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_ASSOC_REQ)
-#define FC_ASSOC_RESP FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_ASSOC_RESP)
-#define FC_REASSOC_REQ FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_REASSOC_REQ)
-#define FC_REASSOC_RESP FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_REASSOC_RESP)
-#define FC_PROBE_REQ FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_PROBE_REQ)
-#define FC_PROBE_RESP FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_PROBE_RESP)
-#define FC_BEACON FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_BEACON)
-#define FC_DISASSOC FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_DISASSOC)
-#define FC_AUTH FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_AUTH)
-#define FC_DEAUTH FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_DEAUTH)
-#define FC_ACTION FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_ACTION)
-
-#define FC_PS_POLL FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_PS_POLL)
-#define FC_RTS FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_RTS)
-#define FC_CTS FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_CTS)
-#define FC_ACK FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_ACK)
-#define FC_CF_END FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_CF_END)
-#define FC_CF_END_ACK FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_CF_END_ACK)
-
-#define FC_DATA FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_DATA)
-#define FC_NULL_DATA FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_NULL)
-#define FC_DATA_CF_ACK FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_DATA_CF_ACK)
-#define FC_QOS_DATA FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_QOS_DATA)
-#define FC_QOS_NULL FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_QOS_NULL)
-
-/* QoS Control Field */
-
-/* 802.1D Tag */
-#define QOS_PRIO_SHIFT 0
-#define QOS_PRIO_MASK 0x0007
-#define QOS_PRIO(qos) (((qos) & QOS_PRIO_MASK) >> QOS_PRIO_SHIFT)
-
-/* Ack Policy (0 means Acknowledge) */
-#define QOS_ACK_SHIFT 5
-#define QOS_ACK_MASK 0x0060
-#define QOS_ACK(qos) (((qos) & QOS_ACK_MASK) >> QOS_ACK_SHIFT)
-
-/* Management Frames */
-
-/* Management Frame Constants */
-
-/* Fixed fields */
-#define DOT11_MNG_AUTH_ALGO_LEN 2
-#define DOT11_MNG_AUTH_SEQ_LEN 2
-#define DOT11_MNG_BEACON_INT_LEN 2
-#define DOT11_MNG_CAP_LEN 2
-#define DOT11_MNG_AP_ADDR_LEN 6
-#define DOT11_MNG_LISTEN_INT_LEN 2
-#define DOT11_MNG_REASON_LEN 2
-#define DOT11_MNG_AID_LEN 2
-#define DOT11_MNG_STATUS_LEN 2
-#define DOT11_MNG_TIMESTAMP_LEN 8
-
-/* DUR/ID field in assoc resp is 0xc000 | AID */
-#define DOT11_AID_MASK 0x3fff
-
-/* Reason Codes */
-#define DOT11_RC_RESERVED 0
-#define DOT11_RC_UNSPECIFIED 1 /* Unspecified reason */
-#define DOT11_RC_AUTH_INVAL 2 /* Previous authentication no longer valid */
-#define DOT11_RC_DEAUTH_LEAVING 3 /* Deauthenticated because sending station is
- leaving (or has left) IBSS or ESS */
-#define DOT11_RC_INACTIVITY 4 /* Disassociated due to inactivity */
-#define DOT11_RC_BUSY 5 /* Disassociated because AP is unable to handle
- all currently associated stations */
-#define DOT11_RC_INVAL_CLASS_2 6 /* Class 2 frame received from
- nonauthenticated station */
-#define DOT11_RC_INVAL_CLASS_3 7 /* Class 3 frame received from
- nonassociated station */
-#define DOT11_RC_DISASSOC_LEAVING 8 /* Disassociated because sending station is
- leaving (or has left) BSS */
-#define DOT11_RC_NOT_AUTH 9 /* Station requesting (re)association is
- not authenticated with responding station */
-#define DOT11_RC_MAX 23 /* Reason codes > 23 are reserved */
-
-/* Status Codes */
-#define DOT11_STATUS_SUCCESS 0 /* Successful */
-#define DOT11_STATUS_FAILURE 1 /* Unspecified failure */
-#define DOT11_STATUS_CAP_MISMATCH 10 /* Cannot support all requested capabilities
- in the Capability Information field */
-#define DOT11_STATUS_REASSOC_FAIL 11 /* Reassociation denied due to inability to
- confirm that association exists */
-#define DOT11_STATUS_ASSOC_FAIL 12 /* Association denied due to reason outside
- the scope of this standard */
-#define DOT11_STATUS_AUTH_MISMATCH 13 /* Responding station does not support the
- specified authentication algorithm */
-#define DOT11_STATUS_AUTH_SEQ 14 /* Received an Authentication frame with
- authentication transaction sequence number
- out of expected sequence */
-#define DOT11_STATUS_AUTH_CHALLENGE_FAIL 15 /* Authentication rejected because of challenge failure */
-#define DOT11_STATUS_AUTH_TIMEOUT 16 /* Authentication rejected due to timeout waiting
- for next frame in sequence */
-#define DOT11_STATUS_ASSOC_BUSY_FAIL 17 /* Association denied because AP is unable to
- handle additional associated stations */
-#define DOT11_STATUS_ASSOC_RATE_MISMATCH 18 /* Association denied due to requesting station
- not supporting all of the data rates in the
- BSSBasicRateSet parameter */
-#define DOT11_STATUS_ASSOC_SHORT_REQUIRED 19 /* Association denied due to requesting station
- not supporting the Short Preamble option */
-#define DOT11_STATUS_ASSOC_PBCC_REQUIRED 20 /* Association denied due to requesting station
- not supporting the PBCC Modulation option */
-#define DOT11_STATUS_ASSOC_AGILITY_REQUIRED 21 /* Association denied due to requesting station
- not supporting the Channel Agility option */
-#define DOT11_STATUS_ASSOC_SPECTRUM_REQUIRED 22 /* Association denied because Spectrum Management
- capability is required. */
-#define DOT11_STATUS_ASSOC_BAD_POWER_CAP 23 /* Association denied because the info in the
- Power Cap element is unacceptable. */
-#define DOT11_STATUS_ASSOC_BAD_SUP_CHANNELS 24 /* Association denied because the info in the
- Supported Channel element is unacceptable */
-#define DOT11_STATUS_ASSOC_SHORTSLOT_REQUIRED 25 /* Association denied due to requesting station
- not supporting the Short Slot Time option */
-#define DOT11_STATUS_ASSOC_ERPBCC_REQUIRED 26 /* Association denied due to requesting station
- not supporting the ER-PBCC Modulation option */
-#define DOT11_STATUS_ASSOC_DSSOFDM_REQUIRED 27 /* Association denied due to requesting station
- not supporting the DSS-OFDM option */
-
-/* Info Elts, length of INFORMATION portion of Info Elts */
-#define DOT11_MNG_DS_PARAM_LEN 1
-#define DOT11_MNG_IBSS_PARAM_LEN 2
-
-/* TIM Info element has 3 bytes fixed info in INFORMATION field,
- * followed by 1 to 251 bytes of Partial Virtual Bitmap */
-#define DOT11_MNG_TIM_FIXED_LEN 3
-#define DOT11_MNG_TIM_DTIM_COUNT 0
-#define DOT11_MNG_TIM_DTIM_PERIOD 1
-#define DOT11_MNG_TIM_BITMAP_CTL 2
-#define DOT11_MNG_TIM_PVB 3
-
-/* TLV defines */
-#define TLV_TAG_OFF 0
-#define TLV_LEN_OFF 1
-#define TLV_HDR_LEN 2
-#define TLV_BODY_OFF 2
-
-/* Management Frame Information Element IDs */
-#define DOT11_MNG_SSID_ID 0
-#define DOT11_MNG_RATES_ID 1
-#define DOT11_MNG_FH_PARMS_ID 2
-#define DOT11_MNG_DS_PARMS_ID 3
-#define DOT11_MNG_CF_PARMS_ID 4
-#define DOT11_MNG_TIM_ID 5
-#define DOT11_MNG_IBSS_PARMS_ID 6
-#define DOT11_MNG_COUNTRY_ID 7
-#define DOT11_MNG_HOPPING_PARMS_ID 8
-#define DOT11_MNG_HOPPING_TABLE_ID 9
-#define DOT11_MNG_REQUEST_ID 10
-#define DOT11_MNG_CHALLENGE_ID 16
-#define DOT11_MNG_PWR_CONSTRAINT_ID 32 /* 11H PowerConstraint */
-#define DOT11_MNG_PWR_CAP_ID 33 /* 11H PowerCapability */
-#define DOT11_MNG_TPC_REQUEST_ID 34 /* 11H TPC Request */
-#define DOT11_MNG_TPC_REPORT_ID 35 /* 11H TPC Report */
-#define DOT11_MNG_SUPP_CHANNELS_ID 36 /* 11H Supported Channels */
-#define DOT11_MNG_CHANNEL_SWITCH_ID 37 /* 11H ChannelSwitch Announcement*/
-#define DOT11_MNG_MEASURE_REQUEST_ID 38 /* 11H MeasurementRequest */
-#define DOT11_MNG_MEASURE_REPORT_ID 39 /* 11H MeasurementReport */
-#define DOT11_MNG_QUIET_ID 40 /* 11H Quiet */
-#define DOT11_MNG_IBSS_DFS_ID 41 /* 11H IBSS_DFS */
-#define DOT11_MNG_ERP_ID 42
-#define DOT11_MNG_NONERP_ID 47
-#define DOT11_MNG_EXT_RATES_ID 50
-#define DOT11_MNG_WPA_ID 221
-#define DOT11_MNG_PROPR_ID 221
-
-/* ERP info element bit values */
-#define DOT11_MNG_ERP_LEN 1 /* ERP is currently 1 byte long */
-#define DOT11_MNG_NONERP_PRESENT 0x01 /* NonERP (802.11b) STAs are present in the BSS */
-#define DOT11_MNG_USE_PROTECTION 0x02 /* Use protection mechanisms for ERP-OFDM frames */
-#define DOT11_MNG_BARKER_PREAMBLE 0x04 /* Short Preambles: 0 == allowed, 1 == not allowed */
-
-/* Capability Information Field */
-#define DOT11_CAP_ESS 0x0001
-#define DOT11_CAP_IBSS 0x0002
-#define DOT11_CAP_POLLABLE 0x0004
-#define DOT11_CAP_POLL_RQ 0x0008
-#define DOT11_CAP_PRIVACY 0x0010
-#define DOT11_CAP_SHORT 0x0020
-#define DOT11_CAP_PBCC 0x0040
-#define DOT11_CAP_AGILITY 0x0080
-#define DOT11_CAP_SPECTRUM 0x0100
-#define DOT11_CAP_SHORTSLOT 0x0400
-#define DOT11_CAP_CCK_OFDM 0x2000
-
-/* Action Frame Constants */
-#define DOT11_ACTION_CAT_ERR_MASK 0x80
-#define DOT11_ACTION_CAT_SPECT_MNG 0x00
-#define DOT11_ACTION_NOTIFICATION 0x11 /* 17 */
-
-#define DOT11_ACTION_ID_M_REQ 0
-#define DOT11_ACTION_ID_M_REP 1
-#define DOT11_ACTION_ID_TPC_REQ 2
-#define DOT11_ACTION_ID_TPC_REP 3
-#define DOT11_ACTION_ID_CHANNEL_SWITCH 4
-
-/* MLME Enumerations */
-#define DOT11_BSSTYPE_INFRASTRUCTURE 0
-#define DOT11_BSSTYPE_INDEPENDENT 1
-#define DOT11_BSSTYPE_ANY 2
-#define DOT11_SCANTYPE_ACTIVE 0
-#define DOT11_SCANTYPE_PASSIVE 1
-
-/* 802.11 A PHY constants */
-#define APHY_SLOT_TIME 9
-#define APHY_SIFS_TIME 16
-#define APHY_DIFS_TIME (APHY_SIFS_TIME + (2 * APHY_SLOT_TIME))
-#define APHY_PREAMBLE_TIME 16
-#define APHY_SIGNAL_TIME 4
-#define APHY_SYMBOL_TIME 4
-#define APHY_SERVICE_NBITS 16
-#define APHY_TAIL_NBITS 6
-#define APHY_CWMIN 15
-
-/* 802.11 B PHY constants */
-#define BPHY_SLOT_TIME 20
-#define BPHY_SIFS_TIME 10
-#define BPHY_DIFS_TIME 50
-#define BPHY_PLCP_TIME 192
-#define BPHY_PLCP_SHORT_TIME 96
-#define BPHY_CWMIN 31
-
-/* 802.11 G constants */
-#define DOT11_OFDM_SIGNAL_EXTENSION 6
-
-#define PHY_CWMAX 1023
-
-#define DOT11_MAXNUMFRAGS 16 /* max # fragments per MSDU */
-
-/* dot11Counters Table - 802.11 spec., Annex D */
-typedef struct d11cnt {
- uint32 txfrag; /* dot11TransmittedFragmentCount */
- uint32 txmulti; /* dot11MulticastTransmittedFrameCount */
- uint32 txfail; /* dot11FailedCount */
- uint32 txretry; /* dot11RetryCount */
- uint32 txretrie; /* dot11MultipleRetryCount */
- uint32 rxdup; /* dot11FrameduplicateCount */
- uint32 txrts; /* dot11RTSSuccessCount */
- uint32 txnocts; /* dot11RTSFailureCount */
- uint32 txnoack; /* dot11ACKFailureCount */
- uint32 rxfrag; /* dot11ReceivedFragmentCount */
- uint32 rxmulti; /* dot11MulticastReceivedFrameCount */
- uint32 rxcrc; /* dot11FCSErrorCount */
- uint32 txfrmsnt; /* dot11TransmittedFrameCount */
- uint32 rxundec; /* dot11WEPUndecryptableCount */
-} d11cnt_t;
-
-/* BRCM OUI */
-#define BRCM_OUI "\x00\x10\x18"
-
-/* BRCM info element */
-struct brcm_ie {
- uchar id;
- uchar len;
- uchar oui[3];
- uchar ver;
- uchar assoc; /* # of assoc STAs */
- uchar flags; /* misc flags */
-} PACKED;
-#define BRCM_IE_LEN 8
-typedef struct brcm_ie brcm_ie_t;
-#define BRCM_IE_VER 1
-
-/* brcm_ie flags */
-#define BRF_ABCAP 0x1 /* afterburner capable */
-#define BRF_ABRQRD 0x2 /* afterburner requested */
-
-/* WPA definitions */
-#define WPA_VERSION 1
-#define WPA_OUI "\x00\x50\xF2"
-
-#define WPA_OUI_LEN 3
-
-/* WPA authentication modes */
-#define WPA_AUTH_NONE 0 /* None */
-#define WPA_AUTH_UNSPECIFIED 1 /* Unspecified authentication over 802.1X: default for WPA */
-#define WPA_AUTH_PSK 2 /* Pre-shared Key over 802.1X */
-#define WPA_AUTH_DISABLED 255 /* Legacy (i.e., non-WPA) */
-
-#define IS_WPA_AUTH(auth) ((auth) == WPA_AUTH_NONE || \
- (auth) == WPA_AUTH_UNSPECIFIED || \
- (auth) == WPA_AUTH_PSK)
-
-
-/* Key related defines */
-#define DOT11_MAX_DEFAULT_KEYS 4 /* number of default keys */
-#define DOT11_MAX_KEY_SIZE 32 /* max size of any key */
-#define DOT11_MAX_IV_SIZE 16 /* max size of any IV */
-#define DOT11_EXT_IV_FLAG (1<<5) /* flag to indicate IV is > 4 bytes */
-
-#define WEP1_KEY_SIZE 5 /* max size of any WEP key */
-#define WEP1_KEY_HEX_SIZE 10 /* size of WEP key in hex. */
-#define WEP128_KEY_SIZE 13 /* max size of any WEP key */
-#define WEP128_KEY_HEX_SIZE 26 /* size of WEP key in hex. */
-#define TKIP_MIC_SIZE 8 /* size of TKIP MIC */
-#define TKIP_EOM_SIZE 7 /* max size of TKIP EOM */
-#define TKIP_EOM_FLAG 0x5a /* TKIP EOM flag byte */
-#define TKIP_KEY_SIZE 32 /* size of any TKIP key */
-#define TKIP_MIC_AUTH_TX 16 /* offset to Authenticator MIC TX key */
-#define TKIP_MIC_AUTH_RX 24 /* offset to Authenticator MIC RX key */
-#define TKIP_MIC_SUP_RX 16 /* offset to Supplicant MIC RX key */
-#define TKIP_MIC_SUP_TX 24 /* offset to Supplicant MIC TX key */
-#define AES_KEY_SIZE 16 /* size of AES key */
-
-#undef PACKED
-#if !defined(__GNUC__)
-#pragma pack()
-#endif
-
-#endif /* _802_11_H_ */
diff --git a/openwrt/target/linux/package/base-files/include/proto/ethernet.h b/openwrt/target/linux/package/base-files/include/proto/ethernet.h
deleted file mode 100644
index 173464a..0000000
--- a/openwrt/target/linux/package/base-files/include/proto/ethernet.h
+++ /dev/null
@@ -1,179 +0,0 @@
-/*******************************************************************************
- * $Id$
- * Copyright 2004, Broadcom Corporation
- * All Rights Reserved.
- *
- * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
- * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
- * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
- * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
- * From FreeBSD 2.2.7: Fundamental constants relating to ethernet.
- ******************************************************************************/
-
-#ifndef _NET_ETHERNET_H_ /* use native BSD ethernet.h when available */
-#define _NET_ETHERNET_H_
-
-#ifndef _TYPEDEFS_H_
-#include "typedefs.h"
-#endif
-
-#if defined(__GNUC__)
-#define PACKED __attribute__((packed))
-#else
-#define PACKED
-#endif
-
-/*
- * The number of bytes in an ethernet (MAC) address.
- */
-#ifndef ETHER_ADDR_LEN
-#define ETHER_ADDR_LEN 6
-#endif
-
-/*
- * The number of bytes in the type field.
- */
-#ifndef ETHER_TYPE_LEN
-#define ETHER_TYPE_LEN 2
-#endif
-
-/*
- * The number of bytes in the trailing CRC field.
- */
-#ifndef ETHER_CRC_LEN
-#define ETHER_CRC_LEN 4
-#endif
-
-/*
- * The length of the combined header.
- */
-#ifndef ETHER_HDR_LEN
-#define ETHER_HDR_LEN (ETHER_ADDR_LEN*2+ETHER_TYPE_LEN)
-#endif
-
-/*
- * The minimum packet length.
- */
-#ifndef ETHER_MIN_LEN
-#define ETHER_MIN_LEN 64
-#endif
-
-/*
- * The minimum packet user data length.
- */
-#ifndef ETHER_MIN_DATA
-#define ETHER_MIN_DATA 46
-#endif
-
-/*
- * The maximum packet length.
- */
-#ifndef ETHER_MAX_LEN
-#define ETHER_MAX_LEN 1518
-#endif
-
-/*
- * The maximum packet user data length.
- */
-#define ETHER_MAX_DATA 1500
-
-/*
- * Used to uniquely identify a 802.1q VLAN-tagged header.
- */
-#define VLAN_TAG 0x8100
-
-/*
- * Located after dest & src address in ether header.
- */
-#define VLAN_FIELDS_OFFSET (ETHER_ADDR_LEN * 2)
-
-/*
- * 4 bytes of vlan field info.
- */
-#define VLAN_FIELDS_SIZE 4
-
-/* location of bits in 16-bit vlan fields */
-#define VLAN_PRI_SHIFT 13 /* user priority */
-#define VLAN_CFI_SHIFT 12 /* canonical format indicator bit */
-
-/* 3 bits of priority */
-#define VLAN_PRI_MASK 7
-/* 12 bits of vlan identfier (VID) */
-#define VLAN_VID_MASK 0xFFF /* VLAN identifier (VID) field */
-
-struct vlan_tags {
- uint16 tag_type; /* 0x8100 for VLAN */
- uint16 tag_control; /* prio | cfi | vid */
-} PACKED ;
-
-/* 802.1X ethertype */
-
-#define ETHER_TYPE_IP 0x0800 /* IP */
-#define ETHER_TYPE_BRCM 0x886c /* Broadcom Corp. */
-#define ETHER_TYPE_802_1X 0x888e /* 802.1x */
-
-#define ETHER_BRCM_SUBTYPE_LEN 4 /* Broadcom 4byte subtype follows ethertype */
-#define ETHER_BRCM_CRAM 0x1 /* Broadcom subtype cram protocol */
-
-/*
- * A macro to validate a length with
- */
-#define ETHER_IS_VALID_LEN(foo) \
- ((foo) >= ETHER_MIN_LEN && (foo) <= ETHER_MAX_LEN)
-
-#ifndef __NET_ETHERNET_H
-#ifndef __INCif_etherh /* Quick and ugly hack for VxWorks */
-/*
- * Structure of a 10Mb/s Ethernet header.
- */
-struct ether_header {
- uint8 ether_dhost[ETHER_ADDR_LEN];
- uint8 ether_shost[ETHER_ADDR_LEN];
- uint16 ether_type;
-} PACKED ;
-
-/*
- * Structure of a 48-bit Ethernet address.
- */
-struct ether_addr {
- uint8 octet[ETHER_ADDR_LEN];
-} PACKED ;
-#endif
-#endif
-
-/*
- * Takes a pointer, returns true if a 48-bit multicast address
- * (including broadcast, since it is all ones)
- */
-#define ETHER_ISMULTI(ea) (((uint8 *)(ea))[0] & 1)
-
-/*
- * Takes a pointer, returns true if a 48-bit broadcast (all ones)
- */
-#define ETHER_ISBCAST(ea) ((((uint8 *)(ea))[0] & \
- ((uint8 *)(ea))[1] & \
- ((uint8 *)(ea))[2] & \
- ((uint8 *)(ea))[3] & \
- ((uint8 *)(ea))[4] & \
- ((uint8 *)(ea))[5]) == 0xff)
-
-static const struct ether_addr ether_bcast = {{255, 255, 255, 255, 255, 255}};
-
-/*
- * Takes a pointer, returns true if a 48-bit null address (all zeros)
- */
-#define ETHER_ISNULLADDR(ea) ((((uint8 *)(ea))[0] | \
- ((uint8 *)(ea))[1] | \
- ((uint8 *)(ea))[2] | \
- ((uint8 *)(ea))[3] | \
- ((uint8 *)(ea))[4] | \
- ((uint8 *)(ea))[5]) == 0)
-
-/* Differentiated Services Codepoint - lower 6 bits of tos in iphdr */
-#define DSCP_PRI_MASK 0x3F /* bits 0-6 */
-#define DSCP_WME_PRI_MASK 0x38 /* bits 3-6 */
-#define DSCP_WME_PRI_SHIFT 3
-
-#undef PACKED
-
-#endif /* _NET_ETHERNET_H_ */
diff --git a/openwrt/target/linux/package/base-files/include/shutils.h b/openwrt/target/linux/package/base-files/include/shutils.h
deleted file mode 100644
index 783ee9e..0000000
--- a/openwrt/target/linux/package/base-files/include/shutils.h
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * Shell-like utility functions
- *
- * Copyright 2004, Broadcom Corporation
- * All Rights Reserved.
- *
- * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
- * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
- * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
- * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
- *
- * $Id$
- */
-
-#ifndef _shutils_h_
-#define _shutils_h_
-#include <string.h>
-/*
- * Reads file and returns contents
- * @param fd file descriptor
- * @return contents of file or NULL if an error occurred
- */
-extern char * fd2str(int fd);
-
-/*
- * Reads file and returns contents
- * @param path path to file
- * @return contents of file or NULL if an error occurred
- */
-extern char * file2str(const char *path);
-
-/*
- * Waits for a file descriptor to become available for reading or unblocked signal
- * @param fd file descriptor
- * @param timeout seconds to wait before timing out or 0 for no timeout
- * @return 1 if descriptor changed status or 0 if timed out or -1 on error
- */
-extern int waitfor(int fd, int timeout);
-
-/*
- * Concatenates NULL-terminated list of arguments into a single
- * commmand and executes it
- * @param argv argument list
- * @param path NULL, ">output", or ">>output"
- * @param timeout seconds to wait before timing out or 0 for no timeout
- * @param ppid NULL to wait for child termination or pointer to pid
- * @return return value of executed command or errno
- */
-extern int _eval(char *const argv[], char *path, int timeout, pid_t *ppid);
-
-/*
- * Concatenates NULL-terminated list of arguments into a single
- * commmand and executes it
- * @param argv argument list
- * @return stdout of executed command or NULL if an error occurred
- */
-extern char * _backtick(char *const argv[]);
-
-/*
- * Kills process whose PID is stored in plaintext in pidfile
- * @param pidfile PID file
- * @return 0 on success and errno on failure
- */
-extern int kill_pidfile(char *pidfile);
-
-/*
- * fread() with automatic retry on syscall interrupt
- * @param ptr location to store to
- * @param size size of each element of data
- * @param nmemb number of elements
- * @param stream file stream
- * @return number of items successfully read
- */
-extern int safe_fread(void *ptr, size_t size, size_t nmemb, FILE *stream);
-
-/*
- * fwrite() with automatic retry on syscall interrupt
- * @param ptr location to read from
- * @param size size of each element of data
- * @param nmemb number of elements
- * @param stream file stream
- * @return number of items successfully written
- */
-extern int safe_fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream);
-
-/*
- * Convert Ethernet address string representation to binary data
- * @param a string in xx:xx:xx:xx:xx:xx notation
- * @param e binary data
- * @return TRUE if conversion was successful and FALSE otherwise
- */
-extern int ether_atoe(const char *a, unsigned char *e);
-
-/*
- * Convert Ethernet address binary data to string representation
- * @param e binary data
- * @param a string in xx:xx:xx:xx:xx:xx notation
- * @return a
- */
-extern char * ether_etoa(const unsigned char *e, char *a);
-
-/*
- * Concatenate two strings together into a caller supplied buffer
- * @param s1 first string
- * @param s2 second string
- * @param buf buffer large enough to hold both strings
- * @return buf
- */
-static inline char * strcat_r(const char *s1, const char *s2, char *buf)
-{
- strcpy(buf, s1);
- strcat(buf, s2);
- return buf;
-}
-
-/* Check for a blank character; that is, a space or a tab */
-#define isblank(c) ((c) == ' ' || (c) == '\t')
-
-/* Strip trailing CR/NL from string <s> */
-#define chomp(s) ({ \
- char *c = (s) + strlen((s)) - 1; \
- while ((c > (s)) && (*c == '\n' || *c == '\r' || *c == ' ')) \
- *c-- = '\0'; \
- s; \
-})
-
-/* Simple version of _backtick() */
-#define backtick(cmd, args...) ({ \
- char *argv[] = { cmd, ## args, NULL }; \
- _backtick(argv); \
-})
-
-/* Simple version of _eval() (no timeout and wait for child termination) */
-#define eval(cmd, args...) ({ \
- char *argv[] = { cmd, ## args, NULL }; \
- _eval(argv, ">/dev/console", 0, NULL); \
-})
-
-/* Copy each token in wordlist delimited by space into word */
-#define foreach(word, wordlist, next) \
- for (next = &wordlist[strspn(wordlist, " ")], \
- strncpy(word, next, sizeof(word)), \
- word[strcspn(word, " ")] = '\0', \
- word[sizeof(word) - 1] = '\0', \
- next = strchr(next, ' '); \
- strlen(word); \
- next = next ? &next[strspn(next, " ")] : "", \
- strncpy(word, next, sizeof(word)), \
- word[strcspn(word, " ")] = '\0', \
- word[sizeof(word) - 1] = '\0', \
- next = strchr(next, ' '))
-
-/* Return NUL instead of NULL if undefined */
-#define safe_getenv(s) (getenv(s) ? : "")
-
-/* Print directly to the console */
-#define cprintf(fmt, args...) do { \
- FILE *fp = fopen("/dev/console", "w"); \
- if (fp) { \
- fprintf(fp, fmt, ## args); \
- fclose(fp); \
- } \
-} while (0)
-
-/* Debug print */
-#ifdef DEBUG
-#define dprintf(fmt, args...) cprintf("%s: " fmt, __FUNCTION__, ## args)
-#else
-#define dprintf(fmt, args...)
-#endif
-
-#ifdef vxworks
-
-#include <inetLib.h>
-#define inet_aton(a, n) ((inet_aton((a), (n)) == ERROR) ? 0 : 1)
-#define inet_ntoa(n) ({ char a[INET_ADDR_LEN]; inet_ntoa_b ((n), a); a; })
-
-#include <typedefs.h>
-#include <bcmutils.h>
-#define ether_atoe(a, e) bcm_ether_atoe((a), (e))
-#define ether_etoa(e, a) bcm_ether_ntoa((e), (a))
-
-/* These declarations are not available where you would expect them */
-extern int vsnprintf (char *, size_t, const char *, va_list);
-extern int snprintf(char *str, size_t count, const char *fmt, ...);
-extern char *strdup(const char *);
-extern char *strsep(char **stringp, char *delim);
-extern int strcasecmp(const char *s1, const char *s2);
-extern int strncasecmp(const char *s1, const char *s2, size_t n);
-
-/* Neither are socket() and connect() */
-#include <sockLib.h>
-
-#ifdef DEBUG
-#undef dprintf
-#define dprintf printf
-#endif
-#endif
-
-#endif /* _shutils_h_ */
diff --git a/openwrt/target/linux/package/base-files/include/typedefs.h b/openwrt/target/linux/package/base-files/include/typedefs.h
deleted file mode 100644
index 6b0c25e..0000000
--- a/openwrt/target/linux/package/base-files/include/typedefs.h
+++ /dev/null
@@ -1,293 +0,0 @@
-/*
- * Copyright 2004, Broadcom Corporation
- * All Rights Reserved.
- *
- * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
- * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
- * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
- * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
- * $Id$
- */
-
-#ifndef _TYPEDEFS_H_
-#define _TYPEDEFS_H_
-
-
-/* Define 'SITE_TYPEDEFS' in the compile to include a site specific
- * typedef file "site_typedefs.h".
- *
- * If 'SITE_TYPEDEFS' is not defined, then the "Inferred Typedefs"
- * section of this file makes inferences about the compile environment
- * based on defined symbols and possibly compiler pragmas.
- *
- * Following these two sections is the "Default Typedefs"
- * section. This section is only prcessed if 'USE_TYPEDEF_DEFAULTS' is
- * defined. This section has a default set of typedefs and a few
- * proprocessor symbols (TRUE, FALSE, NULL, ...).
- */
-
-#ifdef SITE_TYPEDEFS
-
-/*******************************************************************************
- * Site Specific Typedefs
- *******************************************************************************/
-
-#include "site_typedefs.h"
-
-#else
-
-/*******************************************************************************
- * Inferred Typedefs
- *******************************************************************************/
-
-/* Infer the compile environment based on preprocessor symbols and pramas.
- * Override type definitions as needed, and include configuration dependent
- * header files to define types.
- */
-
-#ifdef __cplusplus
-
-#define TYPEDEF_BOOL
-#ifndef FALSE
-#define FALSE false
-#endif
-#ifndef TRUE
-#define TRUE true
-#endif
-
-#else /* ! __cplusplus */
-
-/* for Windows build, define bool as a uchar instead of the default int */
-#if defined(_WIN32)
-
-#define TYPEDEF_BOOL
-typedef unsigned char bool;
-
-#endif /* _WIN32 */
-
-#endif /* ! __cplusplus */
-
-#ifdef _MSC_VER /* Microsoft C */
-#define TYPEDEF_INT64
-#define TYPEDEF_UINT64
-typedef signed __int64 int64;
-typedef unsigned __int64 uint64;
-#endif
-
-#if defined(MACOSX) && defined(KERNEL)
-#define TYPEDEF_BOOL
-#endif
-
-
-#if defined(linux)
-#define TYPEDEF_UINT
-#define TYPEDEF_USHORT
-#define TYPEDEF_ULONG
-#endif
-
-#if !defined(linux) && !defined(_WIN32) && !defined(PMON) && !defined(_CFE_)
-#define TYPEDEF_UINT
-#define TYPEDEF_USHORT
-#endif
-
-
-/* Do not support the (u)int64 types with strict ansi for GNU C */
-#if defined(__GNUC__) && defined(__STRICT_ANSI__)
-#define TYPEDEF_INT64
-#define TYPEDEF_UINT64
-#endif
-
-/* ICL accepts unsigned 64 bit type only, and complains in ANSI mode
- * for singned or unsigned */
-#if defined(__ICL)
-
-#define TYPEDEF_INT64
-
-#if defined(__STDC__)
-#define TYPEDEF_UINT64
-#endif
-
-#endif /* __ICL */
-
-
-#if !defined(_WIN32) && !defined(PMON) && !defined(_CFE_)
-
-/* pick up ushort & uint from standard types.h */
-#if defined(linux) && defined(__KERNEL__)
-
-#include <linux/types.h> /* sys/types.h and linux/types.h are oil and water */
-
-#else
-
-#include <sys/types.h>
-
-#endif
-
-#endif /* !_WIN32 && !PMON && !_CFE_ */
-
-#if defined(MACOSX) && defined(KERNEL)
-#include <IOKit/IOTypes.h>
-#endif
-
-
-/* use the default typedefs in the next section of this file */
-#define USE_TYPEDEF_DEFAULTS
-
-#endif /* SITE_TYPEDEFS */
-
-
-/*******************************************************************************
- * Default Typedefs
- *******************************************************************************/
-
-#ifdef USE_TYPEDEF_DEFAULTS
-#undef USE_TYPEDEF_DEFAULTS
-
-#ifndef TYPEDEF_BOOL
-typedef int bool;
-#endif
-
-/*----------------------- define uchar, ushort, uint, ulong ----------------*/
-
-#ifndef TYPEDEF_UCHAR
-typedef unsigned char uchar;
-#endif
-
-#ifndef TYPEDEF_USHORT
-typedef unsigned short ushort;
-#endif
-
-#ifndef TYPEDEF_UINT
-typedef unsigned int uint;
-#endif
-
-#ifndef TYPEDEF_ULONG
-typedef unsigned long ulong;
-#endif
-
-/*----------------------- define [u]int8/16/32/64 --------------------------*/
-
-#ifndef TYPEDEF_UINT8
-typedef unsigned char uint8;
-#endif
-
-#ifndef TYPEDEF_UINT16
-typedef unsigned short uint16;
-#endif
-
-#ifndef TYPEDEF_UINT32
-typedef unsigned int uint32;
-#endif
-
-#ifndef TYPEDEF_UINT64
-typedef unsigned long long uint64;
-#endif
-
-#ifndef TYPEDEF_INT8
-typedef signed char int8;
-#endif
-
-#ifndef TYPEDEF_INT16
-typedef signed short int16;
-#endif
-
-#ifndef TYPEDEF_INT32
-typedef signed int int32;
-#endif
-
-#ifndef TYPEDEF_INT64
-typedef signed long long int64;
-#endif
-
-/*----------------------- define float32/64, float_t -----------------------*/
-
-#ifndef TYPEDEF_FLOAT32
-typedef float float32;
-#endif
-
-#ifndef TYPEDEF_FLOAT64
-typedef double float64;
-#endif
-
-/*
- * abstracted floating point type allows for compile time selection of
- * single or double precision arithmetic. Compiling with -DFLOAT32
- * selects single precision; the default is double precision.
- */
-
-#ifndef TYPEDEF_FLOAT_T
-
-#if defined(FLOAT32)
-typedef float32 float_t;
-#else /* default to double precision floating point */
-typedef float64 float_t;
-#endif
-
-#endif /* TYPEDEF_FLOAT_T */
-
-/*----------------------- define macro values -----------------------------*/
-
-#ifndef FALSE
-#define FALSE 0
-#endif
-
-#ifndef TRUE
-#define TRUE 1
-#endif
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-#ifndef OFF
-#define OFF 0
-#endif
-
-#ifndef ON
-#define ON 1
-#endif
-
-/*----------------------- define PTRSZ, INLINE ----------------------------*/
-
-#ifndef PTRSZ
-#define PTRSZ sizeof (char*)
-#endif
-
-#ifndef INLINE
-
-#ifdef _MSC_VER
-
-#define INLINE __inline
-
-#elif __GNUC__
-
-#define INLINE __inline__
-
-#else
-
-#define INLINE
-
-#endif /* _MSC_VER */
-
-#endif /* INLINE */
-
-#undef TYPEDEF_BOOL
-#undef TYPEDEF_UCHAR
-#undef TYPEDEF_USHORT
-#undef TYPEDEF_UINT
-#undef TYPEDEF_ULONG
-#undef TYPEDEF_UINT8
-#undef TYPEDEF_UINT16
-#undef TYPEDEF_UINT32
-#undef TYPEDEF_UINT64
-#undef TYPEDEF_INT8
-#undef TYPEDEF_INT16
-#undef TYPEDEF_INT32
-#undef TYPEDEF_INT64
-#undef TYPEDEF_FLOAT32
-#undef TYPEDEF_FLOAT64
-#undef TYPEDEF_FLOAT_T
-
-#endif /* USE_TYPEDEF_DEFAULTS */
-
-#endif /* _TYPEDEFS_H_ */
diff --git a/openwrt/target/linux/package/base-files/include/utils.h b/openwrt/target/linux/package/base-files/include/utils.h
deleted file mode 100644
index b8d1cdb..0000000
--- a/openwrt/target/linux/package/base-files/include/utils.h
+++ /dev/null
@@ -1,131 +0,0 @@
-#include <cy_conf.h>
-
-extern int diag_led(int type, int act);
-extern int C_led(int i);
-extern int get_single_ip(char *ipaddr, int which);
-extern char *get_mac_from_ip(char *ip);
-extern struct dns_lists *get_dns_list(int no);
-extern int dns_to_resolv(void);
-extern char *get_wan_face(void);
-extern int check_wan_link(int num);
-extern char *get_complete_lan_ip(char *ip);
-extern int get_int_len(int num);
-extern int file_to_buf(char *path, char *buf, int len);
-extern int buf_to_file(char *path, char *buf);
-extern pid_t* find_pid_by_name( char* pidName);
-extern int find_pid_by_ps(char* pidName);
-extern int *find_all_pid_by_ps(char* pidName);
-extern char *find_name_by_proc(int pid);
-extern int get_ppp_pid(char *file);
-extern long convert_ver(char *ver);
-extern int check_flash(void);
-extern int check_action(void);
-extern int check_now_boot(void);
-extern int check_hw_type(void);
-extern int is_exist(char *filename);
-extern void set_ip_forward(char c);
-struct mtu_lists *get_mtu(char *proto);
-extern void set_host_domain_name(void);
-
-extern void encode(char *buf, int len);
-extern void decode(char *buf, int len);
-
-extern int sys_netdev_ioctl(int family, int socket, char *if_name, int cmd, struct ifreq *ifr);
-
-int ct_openlog(const char *ident, int option, int facility, char *log_name);
-void ct_syslog(int level, int enable, const char *fmt,...);
-void ct_logger(int level, const char *fmt,...);
-struct wl_assoc_mac * get_wl_assoc_mac(int *c);
-
-
-
-enum { DMZ, SESSION, DIAG , WL};
-
-enum { START_LED, STOP_LED };
-
-typedef enum { ACT_IDLE,
- ACT_TFTP_UPGRADE,
- ACT_WEB_UPGRADE,
- ACT_WEBS_UPGRADE,
- ACT_SW_RESTORE,
- ACT_HW_RESTORE } ACTION;
-
-enum { UNKNOWN_BOOT = -1, PMON_BOOT, CFE_BOOT };
-
-enum { BCM4702_CHIP, BCM4712_CHIP, BCM5325E_CHIP };
-
-enum { FIRST, SECOND };
-
-enum { SYSLOG_LOG=1, SYSLOG_DEBUG, CONSOLE_ONLY, LOG_CONSOLE, DEBUG_CONSOLE };
-
-#define ACTION(cmd) buf_to_file(ACTION_FILE, cmd)
-
-struct dns_lists {
- int num_servers;
- char dns_server[4][16];
-};
-
-#define NOT_USING 0
-#define USING 1
-
-struct wl_assoc_mac
-{
- char mac[18];
-};
-
-struct mtu_lists {
- char *proto; /* protocol */
- char *min; /* min mtu */
- char *max; /* max mtu */
-};
-
-
-#define PPP_PSEUDO_IP "10.64.64.64"
-#define PPP_PSEUDO_NM "255.255.255.255"
-#define PPP_PSEUDO_GW "10.112.112.112"
-
-#define PING_TMP "/tmp/ping.log"
-#define TRACEROUTE_TMP "/tmp/traceroute.log"
-#define MAX_BUF_LEN 254
-
-#define RESOLV_FILE "/tmp/resolv.conf"
-#define HOSTS_FILE "/tmp/hosts"
-
-#define LOG_FILE "/var/log/mess"
-
-#define ACTION_FILE "/tmp/action"
-
-
-#define split(word, wordlist, next, delim) \
- for (next = wordlist, \
- strncpy(word, next, sizeof(word)), \
- word[(next=strstr(next, delim)) ? strstr(word, delim) - word : sizeof(word) - 1] = '\0', \
- next = next ? next + sizeof(delim) - 1 : NULL ; \
- strlen(word); \
- next = next ? : "", \
- strncpy(word, next, sizeof(word)), \
- word[(next=strstr(next, delim)) ? strstr(word, delim) - word : sizeof(word) - 1] = '\0', \
- next = next ? next + sizeof(delim) - 1 : NULL)
-
-#define STRUCT_LEN(name) sizeof(name)/sizeof(name[0])
-
-#define printHEX(str,len) { \
- int i; \
- for (i=0 ; i<len ; i++) { \
- printf("%02X ", (unsigned char)*(str+i)); \
- if(((i+1)%16) == 0) printf("- "); \
- if(((i+1)%32) == 0) printf("\n"); \
- } \
- printf("\n\n"); \
-}
-
-
-#define printASC(str,len) { \
- int i; \
- for (i=0 ; i<len ; i++) { \
- printf("%c", (unsigned char)*(str+i)); \
- if(((i+1)%16) == 0) printf("- "); \
- if(((i+1)%32) == 0) printf("\n"); \
- } \
- printf("\n\n"); \
-}
diff --git a/openwrt/target/linux/package/base-files/include/wlcompat.h b/openwrt/target/linux/package/base-files/include/wlcompat.h
deleted file mode 100644
index a4fc134..0000000
--- a/openwrt/target/linux/package/base-files/include/wlcompat.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * wlcompat.h
- *
- * Copyright (C) 2005 Felix Fietkau <nbd@vd-s.ath.cx>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id$
- */
-#include <linux/wireless.h>
-
-#ifndef WLCOMPAT_H
-#define WLCOMPAT_H
-
-#define WLCOMPAT_SET_MONITOR SIOCIWFIRSTPRIV + 0
-#define WLCOMPAT_GET_MONITOR SIOCIWFIRSTPRIV + 1
-#define WLCOMPAT_SET_TXPWR_LIMIT SIOCIWFIRSTPRIV + 2
-#define WLCOMPAT_GET_TXPWR_LIMIT SIOCIWFIRSTPRIV + 3
-#define WLCOMPAT_SET_ANTDIV SIOCIWFIRSTPRIV + 4
-#define WLCOMPAT_GET_ANTDIV SIOCIWFIRSTPRIV + 5
-#define WLCOMPAT_SET_TXANT SIOCIWFIRSTPRIV + 6
-#define WLCOMPAT_GET_TXANT SIOCIWFIRSTPRIV + 7
-
-#endif
diff --git a/openwrt/target/linux/package/base-files/include/wlioctl.h b/openwrt/target/linux/package/base-files/include/wlioctl.h
deleted file mode 100644
index 66783cc..0000000
--- a/openwrt/target/linux/package/base-files/include/wlioctl.h
+++ /dev/null
@@ -1,1097 +0,0 @@
-/*
- * Custom OID/ioctl definitions for
- * Broadcom 802.11abg Networking Device Driver
- *
- * Definitions subject to change without notice.
- *
- * Copyright 2004, Broadcom Corporation
- * All Rights Reserved.
- *
- * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
- * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
- * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
- * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
- *
- * $Id$
- */
-
-#ifndef _wlioctl_h_
-#define _wlioctl_h_
-
-#include <typedefs.h>
-#include <proto/ethernet.h>
-#include <proto/802.11.h>
-
-#if defined(__GNUC__)
-#define PACKED __attribute__((packed))
-#else
-#define PACKED
-#endif
-
-#define WLC_ESSID_MAX_SIZE 32
-
-#define WL_NUMRATES 255 /* max # of rates in a rateset */
-
-typedef struct wl_rateset {
- uint32 count; /* # rates in this set */
- uint8 rates[WL_NUMRATES]; /* rates in 500kbps units w/hi bit set if basic */
-} wl_rateset_t;
-
-#define WL_CHANSPEC_CHAN_MASK 0x0fff
-#define WL_CHANSPEC_BAND_MASK 0xf000
-#define WL_CHANSPEC_BAND_SHIFT 12
-#define WL_CHANSPEC_BAND_A 0x1000
-#define WL_CHANSPEC_BAND_B 0x2000
-
-/*
- * Per-bss information structure.
- */
-
-#define WL_LEGACY_BSS_INFO_VERSION 106 /* an older supported version of wl_bss_info struct */
-#define WL_BSS_INFO_VERSION 107 /* current version of wl_bss_info struct */
-
-typedef struct wl_bss_info106 {
- uint version; /* version field */
- struct ether_addr BSSID;
- uint8 SSID_len;
- uint8 SSID[32];
- uint8 Privacy; /* 0=No WEP, 1=Use WEP */
- int16 RSSI; /* receive signal strength (in dBm) */
- uint16 beacon_period; /* units are Kusec */
- uint16 atim_window; /* units are Kusec */
- uint8 channel; /* Channel no. */
- int8 infra; /* 0=IBSS, 1=infrastructure, 2=unknown */
- struct {
- uint count; /* # rates in this set */
- uint8 rates[12]; /* rates in 500kbps units w/hi bit set if basic */
- } rateset; /* supported rates */
- uint8 dtim_period; /* DTIM period */
- int8 phy_noise; /* noise right after tx (in dBm) */
- uint16 capability; /* Capability information */
- struct dot11_bcn_prb *prb; /* probe response frame (ioctl na) */
- uint16 prb_len; /* probe response frame length (ioctl na) */
- struct {
- uint8 supported; /* wpa supported */
- uint8 multicast; /* multicast cipher */
- uint8 ucount; /* count of unicast ciphers */
- uint8 unicast[4]; /* unicast ciphers */
- uint8 acount; /* count of auth modes */
- uint8 auth[4]; /* Authentication modes */
- } wpa;
-} wl_bss_info106_t;
-
-typedef struct wl_bss_info {
- uint32 version; /* version field */
- uint32 length; /* byte length of data in this record, starting at version and including IEs */
- struct ether_addr BSSID;
- uint16 beacon_period; /* units are Kusec */
- uint16 capability; /* Capability information */
- uint8 SSID_len;
- uint8 SSID[32];
- struct {
- uint count; /* # rates in this set */
- uint8 rates[16]; /* rates in 500kbps units w/hi bit set if basic */
- } rateset; /* supported rates */
- uint8 channel; /* Channel no. */
- uint16 atim_window; /* units are Kusec */
- uint8 dtim_period; /* DTIM period */
- int16 RSSI; /* receive signal strength (in dBm) */
- int8 phy_noise; /* noise (in dBm) */
- uint32 ie_length; /* byte length of Information Elements */
- /* variable length Information Elements */
-} wl_bss_info_t;
-
-typedef struct wlc_ssid {
- uint32 SSID_len;
- uchar SSID[32];
-} wlc_ssid_t;
-
-typedef struct wl_scan_params {
- wlc_ssid_t ssid; /* default is {0, ""} */
- struct ether_addr bssid;/* default is bcast */
- int8 bss_type; /* default is any, DOT11_BSSTYPE_ANY/INFRASTRUCTURE/INDEPENDENT */
- int8 scan_type; /* -1 use default, DOT11_SCANTYPE_ACTIVE/PASSIVE */
- int32 nprobes; /* -1 use default, number of probes per channel */
- int32 active_time; /* -1 use default, dwell time per channel for active scanning */
- int32 passive_time; /* -1 use default, dwell time per channel for passive scanning */
- int32 home_time; /* -1 use default, dwell time for the home channel between channel scans */
- int32 channel_num; /* 0 use default (all available channels), count of channels in channel_list */
- uint16 channel_list[1]; /* list of chanspecs */
-} wl_scan_params_t;
-/* size of wl_scan_params not including variable length array */
-#define WL_SCAN_PARAMS_FIXED_SIZE 64
-
-typedef struct wl_scan_results {
- uint32 buflen;
- uint32 version;
- uint32 count;
- wl_bss_info_t bss_info[1];
-} wl_scan_results_t;
-/* size of wl_scan_results not including variable length array */
-#define WL_SCAN_RESULTS_FIXED_SIZE 12
-
-/* uint32 list */
-typedef struct wl_uint32_list {
- /* in - # of elements, out - # of entries */
- uint32 count;
- /* variable length uint32 list */
- uint32 element[1];
-} wl_uint32_list_t;
-
-#define WLC_CNTRY_BUF_SZ 4 /* Country string is 3 bytes + NULL */
-
-typedef struct wl_channels_in_country {
- uint32 buflen;
- uint32 band;
- char country_abbrev[WLC_CNTRY_BUF_SZ];
- uint32 count;
- uint32 channel[1];
-} wl_channels_in_country_t;
-
-typedef struct wl_country_list {
- uint32 buflen;
- uint32 band_set;
- uint32 band;
- uint32 count;
- char country_abbrev[1];
-} wl_country_list_t;
-
-#define WL_RM_TYPE_BASIC 1
-#define WL_RM_TYPE_CCA 2
-#define WL_RM_TYPE_RPI 3
-
-#define WL_RM_FLAG_PARALLEL (1<<0)
-
-#define WL_RM_FLAG_LATE (1<<1)
-#define WL_RM_FLAG_INCAPABLE (1<<2)
-#define WL_RM_FLAG_REFUSED (1<<3)
-
-typedef struct wl_rm_req_elt {
- int8 type;
- int8 flags;
- uint16 chanspec;
- uint32 token; /* token for this measurement */
- uint32 tsf_h; /* TSF high 32-bits of Measurement start time */
- uint32 tsf_l; /* TSF low 32-bits */
- uint32 dur; /* TUs */
-} wl_rm_req_elt_t;
-
-typedef struct wl_rm_req {
- uint32 token; /* overall measurement set token */
- uint32 count; /* number of measurement reqests */
- wl_rm_req_elt_t req[1]; /* variable length block of requests */
-} wl_rm_req_t;
-#define WL_RM_REQ_FIXED_LEN 8
-
-typedef struct wl_rm_rep_elt {
- int8 type;
- int8 flags;
- uint16 chanspec;
- uint32 token; /* token for this measurement */
- uint32 tsf_h; /* TSF high 32-bits of Measurement start time */
- uint32 tsf_l; /* TSF low 32-bits */
- uint32 dur; /* TUs */
- uint32 len; /* byte length of data block */
- uint8 data[1]; /* variable length data block */
-} wl_rm_rep_elt_t;
-#define WL_RM_REP_ELT_FIXED_LEN 24 /* length excluding data block */
-
-#define WL_RPI_REP_BIN_NUM 8
-typedef struct wl_rm_rpi_rep {
- uint8 rpi[WL_RPI_REP_BIN_NUM];
- int8 rpi_max[WL_RPI_REP_BIN_NUM];
-} wl_rm_rpi_rep_t;
-
-typedef struct wl_rm_rep {
- uint32 token; /* overall measurement set token */
- uint32 len; /* length of measurement report block */
- wl_rm_rep_elt_t rep[1]; /* variable length block of reports */
-} wl_rm_rep_t;
-#define WL_RM_REP_FIXED_LEN 8
-
-
-#define WLC_MAX_KEY_SIZE 32 /* max size of any key */
-#define WLC_MAX_IV_SIZE 16 /* max size of any IV */
-#define WLC_EXT_IV_FLAG (1<<5) /* flag to indicate IV is > 4 bytes */
-#define WLC_MAX_DEFAULT_KEYS 4 /* # of default WEP keys */
-#define WLC_MAX_KEYS 54 /* Max # of WEP keys */
-#define WLC_WEP1_KEY_SIZE 5 /* max size of any WEP key */
-#define WLC_WEP1_KEY_HEX_SIZE 10 /* size of WEP key in hex. */
-#define WLC_WEP128_KEY_SIZE 13 /* max size of any WEP key */
-#define WLC_WEP128_KEY_HEX_SIZE 26 /* size of WEP key in hex. */
-#define WLC_TKIP_MIC_SIZE 8 /* size of TKIP MIC */
-#define WLC_TKIP_EOM_SIZE 7 /* max size of TKIP EOM */
-#define WLC_TKIP_EOM_FLAG 0x5a /* TKIP EOM flag byte */
-#define WLC_TKIP_KEY_SIZE 32 /* size of any TKIP key */
-#define WLC_TKIP_MIC_AUTH_TX 16 /* offset to Authenticator MIC TX key */
-#define WLC_TKIP_MIC_AUTH_RX 24 /* offset to Authenticator MIC RX key */
-#define WLC_TKIP_MIC_SUP_RX 16 /* offset to Supplicant MIC RX key */
-#define WLC_TKIP_MIC_SUP_TX 24 /* offset to Supplicant MIC TX key */
-#define WLC_TKIP_P1_KEY_SIZE 10 /* size of TKHash Phase1 output, in bytes */
-#define WLC_TKIP_P2_KEY_SIZE 16 /* size of TKHash Phase2 output */
-#define WLC_AES_KEY_SIZE 16 /* size of AES key */
-
-
-typedef enum sup_auth_status {
- WLC_SUP_DISCONNECTED = 0,
- WLC_SUP_CONNECTING,
- WLC_SUP_IDREQUIRED,
- WLC_SUP_AUTHENTICATING,
- WLC_SUP_AUTHENTICATED,
- WLC_SUP_KEYXCHANGE,
- WLC_SUP_KEYED
-} sup_auth_status_t;
-
-/* Enumerate crypto algorithms */
-#define CRYPTO_ALGO_OFF 0
-#define CRYPTO_ALGO_WEP1 1
-#define CRYPTO_ALGO_TKIP 2
-#define CRYPTO_ALGO_WEP128 3
-#define CRYPTO_ALGO_AES_CCM 4
-#define CRYPTO_ALGO_AES_OCB_MSDU 5
-#define CRYPTO_ALGO_AES_OCB_MPDU 6
-#define CRYPTO_ALGO_NALG 7
-
-#define WSEC_GEN_MIC_ERROR 0x0001
-#define WSEC_GEN_REPLAY 0x0002
-
-#define WL_SOFT_KEY (1 << 0) /* Indicates this key is using soft encrypt */
-#define WL_PRIMARY_KEY (1 << 1) /* Indicates this key is the primary (ie tx) key */
-#define WL_KF_RES_4 (1 << 4) /* Reserved for backward compat */
-#define WL_KF_RES_5 (1 << 5) /* Reserved for backward compat */
-
-
-typedef struct wlc_tkip_info {
- uint16 phase1[WLC_TKIP_P1_KEY_SIZE/sizeof(uint16)]; /* tkhash phase1 result */
- uint8 phase2[WLC_TKIP_P2_KEY_SIZE]; /* tkhash phase2 result */
- uint32 micl;
- uint32 micr;
-} tkip_info_t;
-
-typedef struct _wsec_iv {
- uint32 hi; /* upper 32 bits of IV */
- uint16 lo; /* lower 16 bits of IV */
-} wsec_iv_t;
-
-typedef struct wsec_key {
- uint32 index; /* key index */
- uint32 len; /* key length */
- uint8 data[WLC_MAX_KEY_SIZE]; /* key data */
- tkip_info_t tkip_tx; /* tkip transmit state */
- tkip_info_t tkip_rx; /* tkip receive state */
- uint32 algo; /* CRYPTO_ALGO_AES_CCM, CRYPTO_ALGO_WEP128, etc */
- uint32 flags; /* misc flags */
- uint32 algo_hw; /* cache for hw register*/
- uint32 aes_mode; /* cache for hw register*/
- int iv_len; /* IV length */
- int iv_initialized; /* has IV been initialized already? */
- int icv_len; /* ICV length */
- wsec_iv_t rxiv; /* Rx IV */
- wsec_iv_t txiv; /* Tx IV */
- struct ether_addr ea; /* per station */
-} wsec_key_t;
-
-
-
-typedef struct wl_wsec_key {
- uint32 index; /* key index */
- uint32 len; /* key length */
- uint8 data[DOT11_MAX_KEY_SIZE]; /* key data */
- uint32 pad_1[18];
- uint32 algo; /* CRYPTO_ALGO_AES_CCM, CRYPTO_ALGO_WEP128, etc */
- uint32 flags; /* misc flags */
- uint32 pad_2[2];
- int pad_3;
- int iv_initialized; /* has IV been initialized already? */
- int pad_4;
- /* Rx IV */
- struct {
- uint32 hi; /* upper 32 bits of IV */
- uint16 lo; /* lower 16 bits of IV */
- } rxiv;
- uint32 pad_5[2];
- struct ether_addr ea; /* per station */
-} wl_wsec_key_t;
-
-/* For use with wlc_wep_key.flags */
-#define WSEC_PRIMARY_KEY (1 << 1) /* Indicates this key is the primary (ie tx) key */
-#define WSEC_TKIP_ERROR (1 << 2) /* Provoke deliberate error */
-
-#define WSEC_MIN_PSK_LEN 8
-#define WSEC_MAX_PSK_LEN 64
-
-/* Flag for key material needing passhash'ing */
-#define WSEC_PASSPHRASE (1<<0)
-
-/* recepticle for WLC_SET_WSEC_PMK parameter */
-typedef struct {
- ushort key_len; /* octets in key material */
- ushort flags; /* key handling qualification */
- uint8 key[WSEC_MAX_PSK_LEN]; /* PMK material */
-} wsec_pmk_t;
-
-/* wireless security bitvec */
-#define WEP_ENABLED 1
-#define TKIP_ENABLED 2
-#define AES_ENABLED 4
-#define WSEC_SWFLAG 8
-
-#define WSEC_SW(wsec) ((wsec) & WSEC_SWFLAG)
-#define WSEC_HW(wsec) (!WSEC_SW(wsec))
-#define WSEC_WEP_ENABLED(wsec) ((wsec) & WEP_ENABLED)
-#define WSEC_TKIP_ENABLED(wsec) ((wsec) & TKIP_ENABLED)
-#define WSEC_AES_ENABLED(wsec) ((wsec) & AES_ENABLED)
-#define WSEC_ENABLED(wsec) ((wsec) & (WEP_ENABLED | TKIP_ENABLED | AES_ENABLED))
-
-
-/* wireless authentication bit vector */
-#define WPA_ENABLED 1
-#define PSK_ENABLED 2
-
-#define WAUTH_WPA_ENABLED(wauth) ((wauth) & WPA_ENABLED)
-#define WAUTH_PSK_ENABLED(wauth) ((wauth) & PSK_ENABLED)
-#define WAUTH_ENABLED(wauth) ((wauth) & (WPA_ENABLED | PSK_ENABLED))
-
-/* group/mcast cipher */
-#define WPA_MCAST_CIPHER(wsec) (((wsec) & TKIP_ENABLED) ? WPA_CIPHER_TKIP : \
- ((wsec) & AES_ENABLED) ? WPA_CIPHER_AES_CCM : \
- WPA_CIPHER_NONE)
-
-
-typedef struct wl_led_info {
- uint32 index; /* led index */
- uint32 behavior;
- bool activehi;
-} wl_led_info_t;
-
-/*
- * definitions for driver messages passed from WL to NAS.
- */
-/* Use this to recognize wpa and 802.1x driver messages. */
-static const uint8 wl_wpa_snap_template[] =
- { 0xaa, 0xaa, 0x03, 0x00, 0x90, 0x4c };
-
-#define WL_WPA_MSG_IFNAME_MAX 16
-
-/* WPA driver message */
-typedef struct wl_wpa_header {
- struct ether_header eth;
- struct dot11_llc_snap_header snap;
- uint8 version;
- uint8 type;
- /* version 2 additions */
- char ifname[WL_WPA_MSG_IFNAME_MAX];
- /* version specific data */
- /* uint8 data[1]; */
-} wl_wpa_header_t PACKED;
-
-/*
- * definitions for 802.2 messages passed from WL to NAS.
- */
-/* This seems not to be defined outside the kernel on linux. */
-#ifndef ETH_P_802_2
-#define ETH_P_802_2 4
-#endif
-
-#define WL_WPA_HEADER_LEN (ETHER_HDR_LEN + DOT11_LLC_SNAP_HDR_LEN + 2 + WL_WPA_MSG_IFNAME_MAX)
-
-/* WPA driver message ethertype - private between wlc and nas */
-#define WL_WPA_ETHER_TYPE 0x9999
-
-/* WPA driver message current version */
-#define WL_WPA_MSG_VERSION 2
-
-/* Type field values for the 802.2 driver messages for WPA. */
-#define WLC_ASSOC_MSG 1
-#define WLC_DISASSOC_MSG 2
-#define WLC_PTK_MIC_MSG 3
-#define WLC_GTK_MIC_MSG 4
-
-/* Use this to recognize 802.2 driver messages. */
-static const uint8 wpa_snap_template[] =
- { 0xaa, 0xaa, 0x03, 0x00, 0x90, 0x4c };
-
-
-/* 802.1x driver message */
-typedef struct wl_eapol_header {
- struct ether_header eth;
- struct dot11_llc_snap_header snap;
- uint8 version;
- uint8 reserved;
- char ifname[WL_WPA_MSG_IFNAME_MAX];
- /* version specific data */
- /* uint8 802_1x_msg[1]; */
-} wl_eapol_header_t PACKED;
-
-#define WL_EAPOL_HEADER_LEN (ETHER_HDR_LEN + DOT11_LLC_SNAP_HDR_LEN + 2 + WL_WPA_MSG_IFNAME_MAX)
-
-/* 802.1x driver message ethertype - private between wlc and nas */
-#define WL_EAPOL_ETHER_TYPE 0x999A
-
-/* 802.1x driver message current version */
-#define WL_EAPOL_MSG_VERSION 1
-
-/* srom read/write struct passed through ioctl */
-typedef struct {
- uint byteoff; /* byte offset */
- uint nbytes; /* number of bytes */
- uint16 buf[1];
-} srom_rw_t;
-
-/* R_REG and W_REG struct passed through ioctl */
-typedef struct {
- uint32 byteoff; /* byte offset of the field in d11regs_t */
- uint32 val; /* read/write value of the field */
- uint32 size; /* sizeof the field */
-} rw_reg_t;
-
-/* Structure used by GET/SET_ATTEN ioctls */
-typedef struct {
- uint16 auto_ctrl; /* 1: Automatic control, 0: overriden */
- uint16 bb; /* Baseband attenuation */
- uint16 radio; /* Radio attenuation */
- uint16 txctl1; /* Radio TX_CTL1 value */
-} atten_t;
-
-/* Used to get specific STA parameters */
-typedef struct {
- uint32 val;
- struct ether_addr ea;
-} scb_val_t;
-
-/* callback registration data types */
-
-typedef struct _mac_event_params {
- uint msg;
- struct ether_addr *addr;
- uint result;
- uint status;
- uint auth_type;
-} mac_event_params_t;
-
-typedef struct _mic_error_params {
- struct ether_addr *ea;
- bool group;
- bool flush_txq;
-} mic_error_params_t;
-
-typedef enum _wl_callback {
- WL_MAC_EVENT_CALLBACK = 0,
- WL_LINK_UP_CALLBACK,
- WL_LINK_DOWN_CALLBACK,
- WL_MIC_ERROR_CALLBACK,
- WL_LAST_CALLBACK
-} wl_callback_t;
-
-typedef struct _callback {
- void (*fn)(void *, void *);
- void *context;
-} callback_t;
-
-typedef struct _scan_callback {
- void (*fn)(void *);
- void *context;
-} scan_callback_t;
-
-/* used to register an arbitrary callback via the IOCTL interface */
-typedef struct _set_callback {
- int index;
- callback_t callback;
-} set_callback_t;
-
-
-
-/* Event data type */
-typedef struct {
- uint msg; /* Message (see below) */
- struct ether_addr *addr; /* Station address (if applicable) */
- uint status; /* Status code (see below) */
- uint reason; /* Reason code (if applicable) */
- uint auth_type; /* WLC_E_AUTH */
- bool link; /* WLC_E_LINK */
- bool group; /* WLC_E_MIC_ERROR */
- bool flush_txq; /* WLC_E_MIC_ERROR */
-} wlc_event_t;
-
-typedef struct {
- uint16 ver; /* version of this struct */
- uint16 cap; /* sta's advertized capabilities */
- uint32 flags; /* flags defined below */
- uint32 idle; /* time since data pkt rx'd from sta */
- struct ether_addr ea; /* Station address */
- wl_rateset_t rateset; /* rateset in use */
-} sta_info_t;
-
-#define WL_STA_INFO_LEN 300
-#define WL_STA_VER 1
-
-/* flags fields */
-#define WL_STA_BRCM 0x01
-#define WL_STA_WME 0x02
-#define WL_STA_ABCAP 0x04
-#define WL_STA_AUTHE 0x08
-#define WL_STA_ASSOC 0x10
-#define WL_STA_AUTHO 0x20
-
-/* Event messages */
-#define WLC_E_SET_SSID 1
-#define WLC_E_JOIN 2
-#define WLC_E_START 3
-#define WLC_E_AUTH 4
-#define WLC_E_AUTH_IND 5
-#define WLC_E_DEAUTH 6
-#define WLC_E_DEAUTH_IND 7
-#define WLC_E_ASSOC 8
-#define WLC_E_ASSOC_IND 9
-#define WLC_E_REASSOC 10
-#define WLC_E_REASSOC_IND 11
-#define WLC_E_DISASSOC 12
-#define WLC_E_DISASSOC_IND 13
-#define WLC_E_QUIET_START 14 /* 802.11h Quiet period started */
-#define WLC_E_QUIET_END 15 /* 802.11h Quiet period ended */
-#define WLC_E_GOT_BEACONS 16
-#define WLC_E_LINK 17 /* Link indication */
-#define WLC_E_MIC_ERROR 18 /* TKIP MIC error occurred */
-#define WLC_E_NDIS_LINK 19 /* NDIS style link indication */
-#define WLC_E_ROAM 20
-#define WLC_E_LAST 21
-
-/* Event status codes */
-#define WLC_E_STATUS_SUCCESS 0
-#define WLC_E_STATUS_FAIL 1
-#define WLC_E_STATUS_TIMEOUT 2
-#define WLC_E_STATUS_NO_NETWORKS 3
-#define WLC_E_STATUS_ABORT 4
-
-typedef struct wlc_event_cb {
- uint msg; /* Event message or 0 for all */
- void (*fn)(void *, wlc_event_t *); /* Callback function */
- void *context; /* Passed to callback function */
- struct wlc_event_cb *next; /* Next in the chain */
-} wlc_event_cb_t;
-
-/*
- * Country locale determines which channels are available to us.
- */
-typedef enum _wlc_locale {
- WLC_WW = 0, /* Worldwide */
- WLC_THA, /* Thailand */
- WLC_ISR, /* Israel */
- WLC_JDN, /* Jordan */
- WLC_PRC, /* China */
- WLC_JPN, /* Japan */
- WLC_FCC, /* USA */
- WLC_EUR, /* Europe */
- WLC_USL, /* US Low Band only */
- WLC_JPH, /* Japan High Band only */
- WLC_ALL, /* All the channels in this band */
- WLC_11D, /* Represents locale recieved by 11d beacons */
- WLC_LAST_LOCALE,
- WLC_UNDEFINED_LOCALE = 0xf
-} wlc_locale_t;
-
-/* channel encoding */
-typedef struct channel_info {
- int hw_channel;
- int target_channel;
- int scan_channel;
-} channel_info_t;
-
-/* For ioctls that take a list of MAC addresses */
-struct maclist {
- uint count; /* number of MAC addresses */
- struct ether_addr ea[1]; /* variable length array of MAC addresses */
-};
-
-/* get pkt count struct passed through ioctl */
-typedef struct get_pktcnt {
- uint rx_good_pkt;
- uint rx_bad_pkt;
- uint tx_good_pkt;
- uint tx_bad_pkt;
-} get_pktcnt_t;
-
-/* Linux network driver ioctl encoding */
-typedef struct wl_ioctl {
- uint cmd; /* common ioctl definition */
- void *buf; /* pointer to user buffer */
- uint len; /* length of user buffer */
- bool set; /* get or set request (optional) */
- uint used; /* bytes read or written (optional) */
- uint needed; /* bytes needed (optional) */
-} wl_ioctl_t;
-
-/*
- * Structure for passing hardware and software
- * revision info up from the driver.
- */
-typedef struct wlc_rev_info {
- uint vendorid; /* PCI vendor id */
- uint deviceid; /* device id of chip */
- uint radiorev; /* radio revision */
- uint chiprev; /* chip revision */
- uint corerev; /* core revision */
- uint boardid; /* board identifier (usu. PCI sub-device id) */
- uint boardvendor; /* board vendor (usu. PCI sub-vendor id) */
- uint boardrev; /* board revision */
- uint driverrev; /* driver version */
- uint ucoderev; /* microcode version */
- uint bus; /* bus type */
- uint chipnum; /* chip number */
-} wlc_rev_info_t;
-
-/* check this magic number */
-#define WLC_IOCTL_MAGIC 0x14e46c77
-
-/* bump this number if you change the ioctl interface */
-#define WLC_IOCTL_VERSION 1
-
-/* maximum length buffer required */
-#define WLC_IOCTL_MAXLEN 8192
-
-/* maximum length buffer required */
-#define WLC_IOCTL_SMLEN 256
-
-/* common ioctl definitions */
-#define WLC_GET_MAGIC 0
-#define WLC_GET_VERSION 1
-#define WLC_UP 2
-#define WLC_DOWN 3
-#define WLC_GET_LOOP 4
-#define WLC_SET_LOOP 5
-#define WLC_DUMP 6
-#define WLC_GET_MSGLEVEL 7
-#define WLC_SET_MSGLEVEL 8
-#define WLC_GET_PROMISC 9
-#define WLC_SET_PROMISC 10
-#define WLC_OBSOLETE 11
-#define WLC_GET_RATE 12
-#define WLC_SET_RATE 13
-#define WLC_GET_INSTANCE 14
-#define WLC_GET_FRAG 15
-#define WLC_SET_FRAG 16
-#define WLC_GET_RTS 17
-#define WLC_SET_RTS 18
-#define WLC_GET_INFRA 19
-#define WLC_SET_INFRA 20
-#define WLC_GET_AUTH 21
-#define WLC_SET_AUTH 22
-#define WLC_GET_BSSID 23
-#define WLC_SET_BSSID 24
-#define WLC_GET_SSID 25
-#define WLC_SET_SSID 26
-#define WLC_RESTART 27
-#define WLC_DUMP_SCB 28
-#define WLC_GET_CHANNEL 29
-#define WLC_SET_CHANNEL 30
-#define WLC_GET_SRL 31
-#define WLC_SET_SRL 32
-#define WLC_GET_LRL 33
-#define WLC_SET_LRL 34
-#define WLC_GET_PLCPHDR 35
-#define WLC_SET_PLCPHDR 36
-#define WLC_GET_RADIO 37
-#define WLC_SET_RADIO 38
-#define WLC_GET_PHYTYPE 39
-#define WLC_DUMP_RATE 40
-#define WLC_SET_RATE_PARAMS 41
-#define WLC_GET_WEP 42
-#define WLC_SET_WEP 43
-#define WLC_GET_KEY 44
-#define WLC_SET_KEY 45
-#define WLC_GET_REGULATORY 46
-#define WLC_SET_REGULATORY 47
-#define WLC_GET_PASSIVE 48 /* added by nbd */
-#define WLC_SET_PASSIVE 49 /* added by nbd */
-#define WLC_SCAN 50
-#define WLC_SCAN_RESULTS 51
-#define WLC_DISASSOC 52
-#define WLC_REASSOC 53
-#define WLC_GET_ROAM_TRIGGER 54
-#define WLC_SET_ROAM_TRIGGER 55
-#define WLC_GET_ROAM_DELTA 56
-#define WLC_SET_ROAM_DELTA 57
-#define WLC_GET_ROAM_SCAN_PERIOD 58
-#define WLC_SET_ROAM_SCAN_PERIOD 59
-#define WLC_EVM 60
-#define WLC_GET_TXANT 61
-#define WLC_SET_TXANT 62
-#define WLC_GET_ANTDIV 63
-#define WLC_SET_ANTDIV 64
-#define WLC_GET_TXPWR 65
-#define WLC_SET_TXPWR 66
-#define WLC_GET_CLOSED 67
-#define WLC_SET_CLOSED 68
-#define WLC_GET_MACLIST 69
-#define WLC_SET_MACLIST 70
-#define WLC_GET_RATESET 71
-#define WLC_SET_RATESET 72
-#define WLC_GET_LOCALE 73
-#define WLC_SET_LOCALE 74
-#define WLC_GET_BCNPRD 75
-#define WLC_SET_BCNPRD 76
-#define WLC_GET_DTIMPRD 77
-#define WLC_SET_DTIMPRD 78
-#define WLC_GET_SROM 79
-#define WLC_SET_SROM 80
-#define WLC_GET_WEP_RESTRICT 81
-#define WLC_SET_WEP_RESTRICT 82
-#define WLC_GET_COUNTRY 83
-#define WLC_SET_COUNTRY 84
-#define WLC_GET_PM 85
-#define WLC_SET_PM 86
-#define WLC_GET_WAKE 87
-#define WLC_SET_WAKE 88
-#define WLC_GET_D11CNTS 89
-#define WLC_GET_FORCELINK 90 /* ndis only */
-#define WLC_SET_FORCELINK 91 /* ndis only */
-#define WLC_FREQ_ACCURACY 92
-#define WLC_CARRIER_SUPPRESS 93
-#define WLC_GET_PHYREG 94
-#define WLC_SET_PHYREG 95
-#define WLC_GET_RADIOREG 96
-#define WLC_SET_RADIOREG 97
-#define WLC_GET_REVINFO 98
-#define WLC_GET_UCANTDIV 99
-#define WLC_SET_UCANTDIV 100
-#define WLC_R_REG 101
-#define WLC_W_REG 102
-#define WLC_DIAG_LOOPBACK 103
-#define WLC_RESET_D11CNTS 104
-#define WLC_GET_MACMODE 105
-#define WLC_SET_MACMODE 106
-#define WLC_GET_MONITOR 107 /* added by nbd */
-#define WLC_SET_MONITOR 108 /* added by nbd */
-#define WLC_GET_GMODE 109
-#define WLC_SET_GMODE 110
-#define WLC_GET_LEGACY_ERP 111
-#define WLC_SET_LEGACY_ERP 112
-#define WLC_GET_RX_ANT 113
-#define WLC_GET_CURR_RATESET 114 /* current rateset */
-#define WLC_GET_SCANSUPPRESS 115
-#define WLC_SET_SCANSUPPRESS 116
-#define WLC_GET_AP 117
-#define WLC_SET_AP 118
-#define WLC_GET_EAP_RESTRICT 119
-#define WLC_SET_EAP_RESTRICT 120
-#define WLC_SCB_AUTHORIZE 121
-#define WLC_SCB_DEAUTHORIZE 122
-#define WLC_GET_WDSLIST 123
-#define WLC_SET_WDSLIST 124
-#define WLC_GET_ATIM 125
-#define WLC_SET_ATIM 126
-#define WLC_GET_RSSI 127
-#define WLC_GET_PHYANTDIV 128
-#define WLC_SET_PHYANTDIV 129
-#define WLC_AP_RX_ONLY 130
-#define WLC_GET_TX_PATH_PWR 131
-#define WLC_SET_TX_PATH_PWR 132
-#define WLC_GET_WSEC 133
-#define WLC_SET_WSEC 134
-#define WLC_GET_PHY_NOISE 135
-#define WLC_GET_BSS_INFO 136
-#define WLC_GET_PKTCNTS 137
-#define WLC_GET_LAZYWDS 138
-#define WLC_SET_LAZYWDS 139
-#define WLC_GET_BANDLIST 140
-#define WLC_GET_BAND 141
-#define WLC_SET_BAND 142
-#define WLC_SCB_DEAUTHENTICATE 143
-#define WLC_GET_SHORTSLOT 144
-#define WLC_GET_SHORTSLOT_OVERRIDE 145
-#define WLC_SET_SHORTSLOT_OVERRIDE 146
-#define WLC_GET_SHORTSLOT_RESTRICT 147
-#define WLC_SET_SHORTSLOT_RESTRICT 148
-#define WLC_GET_GMODE_PROTECTION 149
-#define WLC_GET_GMODE_PROTECTION_OVERRIDE 150
-#define WLC_SET_GMODE_PROTECTION_OVERRIDE 151
-#define WLC_UPGRADE 152
-#define WLC_GET_MRATE 153
-#define WLC_SET_MRATE 154
-#define WLC_GET_IGNORE_BCNS 155
-#define WLC_SET_IGNORE_BCNS 156
-#define WLC_GET_SCB_TIMEOUT 157
-#define WLC_SET_SCB_TIMEOUT 158
-#define WLC_GET_ASSOCLIST 159
-#define WLC_GET_CLK 160
-#define WLC_SET_CLK 161
-#define WLC_GET_UP 162
-#define WLC_OUT 163
-#define WLC_GET_WPA_AUTH 164
-#define WLC_SET_WPA_AUTH 165
-#define WLC_GET_UCFLAGS 166
-#define WLC_SET_UCFLAGS 167
-#define WLC_GET_PWRIDX 168
-#define WLC_SET_PWRIDX 169
-#define WLC_GET_TSSI 170
-#define WLC_GET_SUP_RATESET_OVERRIDE 171
-#define WLC_SET_SUP_RATESET_OVERRIDE 172
-#define WLC_SET_FAST_TIMER 173
-#define WLC_GET_FAST_TIMER 174
-#define WLC_SET_SLOW_TIMER 175
-#define WLC_GET_SLOW_TIMER 176
-#define WLC_DUMP_PHYREGS 177
-#define WLC_GET_GMODE_PROTECTION_CONTROL 178
-#define WLC_SET_GMODE_PROTECTION_CONTROL 179
-#define WLC_GET_PHYLIST 180
-#define WLC_ENCRYPT_STRENGTH 181 /* ndis only */
-#define WLC_DECRYPT_STATUS 182 /* ndis only */
-#define WLC_GET_KEY_SEQ 183
-#define WLC_GET_SCAN_CHANNEL_TIME 184
-#define WLC_SET_SCAN_CHANNEL_TIME 185
-#define WLC_GET_SCAN_UNASSOC_TIME 186
-#define WLC_SET_SCAN_UNASSOC_TIME 187
-#define WLC_GET_SCAN_HOME_TIME 188
-#define WLC_SET_SCAN_HOME_TIME 189
-#define WLC_GET_SCAN_PASSES 190
-#define WLC_SET_SCAN_PASSES 191
-#define WLC_GET_PRB_RESP_TIMEOUT 192
-#define WLC_SET_PRB_RESP_TIMEOUT 193
-#define WLC_GET_ATTEN 194
-#define WLC_SET_ATTEN 195
-#define WLC_GET_SHMEM 196 /* diag */
-#define WLC_SET_SHMEM 197 /* diag */
-#define WLC_GET_GMODE_PROTECTION_CTS 198
-#define WLC_SET_GMODE_PROTECTION_CTS 199
-#define WLC_SET_TKIP_MIC_FLAG 200
-#define WLC_SCB_DEAUTHENTICATE_FOR_REASON 201
-#define WLC_TKIP_COUNTERMEASURES 202
-#define WLC_GET_PIOMODE 203
-#define WLC_SET_PIOMODE 204
-#define WLC_SET_LED 209
-#define WLC_GET_LED 210
-#define WLC_GET_INTERFERENCE_MODE 211
-#define WLC_SET_INTERFERENCE_MODE 212
-#define WLC_GET_CHANNEL_QA 213
-#define WLC_START_CHANNEL_QA 214
-#define WLC_GET_CHANNEL_SEL 215
-#define WLC_START_CHANNEL_SEL 216
-#define WLC_GET_VALID_CHANNELS 217
-#define WLC_GET_FAKEFRAG 218
-#define WLC_SET_FAKEFRAG 219
-#define WLC_GET_PWROUT_PERCENTAGE 220
-#define WLC_SET_PWROUT_PERCENTAGE 221
-#define WLC_SET_BAD_FRAME_PREEMPT 222
-#define WLC_GET_BAD_FRAME_PREEMPT 223
-#define WLC_SET_LEAP_LIST 224
-#define WLC_GET_LEAP_LIST 225
-#define WLC_GET_CWMIN 226
-#define WLC_SET_CWMIN 227
-#define WLC_GET_CWMAX 228
-#define WLC_SET_CWMAX 229
-#define WLC_GET_WET 230
-#define WLC_SET_WET 231
-#define WLC_GET_KEY_PRIMARY 235
-#define WLC_SET_KEY_PRIMARY 236
-#define WLC_SCAN_WITH_CALLBACK 240
-#define WLC_WDS_GET_REMOTE_HWADDR 246 /* currently handled in wl_linux.c/wl_vx.c */
-#define WLC_SET_CS_SCAN_TIMER 248
-#define WLC_GET_CS_SCAN_TIMER 249
-#define WLC_CURRENT_PWR 256
-#define WLC_GET_CHANNELS_IN_COUNTRY 260
-#define WLC_GET_COUNTRY_LIST 261
-#define WLC_GET_VAR 262 /* get value of named variable */
-#define WLC_SET_VAR 263 /* set named variable to value */
-#define WLC_NVRAM_GET 264
-#define WLC_NVRAM_SET 265
-#define WLC_SET_WSEC_PMK 268
-#define WLC_GET_AUTH_MODE 269
-#define WLC_SET_AUTH_MODE 270
-#define WLC_LAST 273 /* do not change - use get_var/set_var */
-
-/*
- * Minor kludge alert:
- * Duplicate a few definitions that irelay requires from epiioctl.h here
- * so caller doesn't have to include this file and epiioctl.h .
- * If this grows any more, it would be time to move these irelay-specific
- * definitions out of the epiioctl.h and into a separate driver common file.
- */
-#ifndef EPICTRL_COOKIE
-#define EPICTRL_COOKIE 0xABADCEDE
-#endif
-
-/* vx wlc ioctl's offset */
-#define CMN_IOCTL_OFF 0x180
-
-/*
- * custom OID support
- *
- * 0xFF - implementation specific OID
- * 0xE4 - first byte of Broadcom PCI vendor ID
- * 0x14 - second byte of Broadcom PCI vendor ID
- * 0xXX - the custom OID number
- */
-
-/* begin 0x1f values beyond the start of the ET driver range. */
-#define WL_OID_BASE 0xFFE41420
-
-/* NDIS overrides */
-#define OID_WL_GETINSTANCE (WL_OID_BASE + WLC_GET_INSTANCE)
-#define OID_WL_GET_FORCELINK (WL_OID_BASE + WLC_GET_FORCELINK)
-#define OID_WL_SET_FORCELINK (WL_OID_BASE + WLC_SET_FORCELINK)
-#define OID_WL_ENCRYPT_STRENGTH (WL_OID_BASE + WLC_ENCRYPT_STRENGTH)
-#define OID_WL_DECRYPT_STATUS (WL_OID_BASE + WLC_DECRYPT_STATUS)
-
-#define WL_DECRYPT_STATUS_SUCCESS 1
-#define WL_DECRYPT_STATUS_FAILURE 2
-#define WL_DECRYPT_STATUS_UNKNOWN 3
-
-/* allows user-mode app to poll the status of USB image upgrade */
-#define WLC_UPGRADE_SUCCESS 0
-#define WLC_UPGRADE_PENDING 1
-
-/* Bit masks for radio disabled status - returned by WL_GET_RADIO */
-#define WL_RADIO_SW_DISABLE (1<<0)
-#define WL_RADIO_HW_DISABLE (1<<1)
-
-/* Override bit for WLC_SET_TXPWR. if set, ignore other level limits */
-#define WL_TXPWR_OVERRIDE (1<<31)
-
-
-/* Bus types */
-#define WL_SB_BUS 0 /* Silicon Backplane */
-#define WL_PCI_BUS 1 /* PCI target */
-#define WL_PCMCIA_BUS 2 /* PCMCIA target */
-
-/* band types */
-#define WLC_BAND_AUTO 0 /* auto-select */
-#define WLC_BAND_A 1 /* "a" band (5 Ghz) */
-#define WLC_BAND_B 2 /* "b" band (2.4 Ghz) */
-
-/* MAC list modes */
-#define WLC_MACMODE_DISABLED 0 /* MAC list disabled */
-#define WLC_MACMODE_DENY 1 /* Deny specified (i.e. allow unspecified) */
-#define WLC_MACMODE_ALLOW 2 /* Allow specified (i.e. deny unspecified) */
-
-
-/* 54g modes (basic bits may still be overridden) */
-#define GMODE_LEGACY_B 0 /* Rateset: 1b, 2b, 5.5, 11 */
- /* Preamble: Long */
- /* Shortslot: Off */
-#define GMODE_AUTO 1 /* Rateset: 1b, 2b, 5.5b, 11b, 18, 24, 36, 54 */
- /* Extended Rateset: 6, 9, 12, 48 */
- /* Preamble: Long */
- /* Shortslot: Auto */
-#define GMODE_ONLY 2 /* Rateset: 1b, 2b, 5.5b, 11b, 18, 24b, 36, 54 */
- /* Extended Rateset: 6b, 9, 12b, 48 */
- /* Preamble: Short required */
- /* Shortslot: Auto */
-#define GMODE_B_DEFERRED 3 /* Rateset: 1b, 2b, 5.5b, 11b, 18, 24, 36, 54 */
- /* Extended Rateset: 6, 9, 12, 48 */
- /* Preamble: Long */
- /* Shortslot: On */
-#define GMODE_PERFORMANCE 4 /* Rateset: 1b, 2b, 5.5b, 6b, 9, 11b, 12b, 18, 24b, 36, 48, 54 */
- /* Preamble: Short required */
- /* Shortslot: On and required */
-#define GMODE_LRS 5 /* Rateset: 1b, 2b, 5.5b, 11b */
- /* Extended Rateset: 6, 9, 12, 18, 24, 36, 48, 54 */
- /* Preamble: Long */
- /* Shortslot: Auto */
-#define GMODE_MAX 6
-
-
-/* values for PLCPHdr_override */
-#define WLC_PLCP_AUTO -1
-#define WLC_PLCP_SHORT 0
-#define WLC_PLCP_LONG 1
-
-/* values for g_protection_override */
-#define WLC_G_PROTECTION_AUTO -1
-#define WLC_G_PROTECTION_OFF 0
-#define WLC_G_PROTECTION_ON 1
-
-/* values for g_protection_control */
-#define WLC_G_PROTECTION_CTL_OFF 0
-#define WLC_G_PROTECTION_CTL_LOCAL 1
-#define WLC_G_PROTECTION_CTL_OVERLAP 2
-
-/* Values for PM */
-#define PM_OFF 0
-#define PM_MAX 1
-#define PM_FAST 2
-
-/* interference mitigation options */
-#define INTERFERE_NONE 0 /* off */
-#define NON_WLAN 1 /* foreign/non 802.11 interference, no auto detect */
-#define WLAN_MANUAL 2 /* ACI: no auto detection */
-#define WLAN_AUTO 3 /* ACI: auto - detact */
-
-/* Message levels */
-#define WL_ERROR_VAL 0x0001
-#define WL_TRACE_VAL 0x0002
-#define WL_PRHDRS_VAL 0x0004
-#define WL_PRPKT_VAL 0x0008
-#define WL_INFORM_VAL 0x0010
-#define WL_TMP_VAL 0x0020
-#define WL_OID_VAL 0x0040
-#define WL_RATE_VAL 0x0080
-#define WL_ASSOC_VAL 0x0100
-#define WL_PRUSR_VAL 0x0200
-#define WL_PS_VAL 0x0400
-#define WL_TXPWR_VAL 0x0800
-#define WL_GMODE_VAL 0x1000
-#define WL_DUAL_VAL 0x2000
-#define WL_WSEC_VAL 0x4000
-#define WL_WSEC_DUMP_VAL 0x8000
-#define WL_LOG_VAL 0x10000
-#define WL_NRSSI_VAL 0x20000
-#define WL_LOFT_VAL 0x40000
-#define WL_REGULATORY_VAL 0x80000
-#define WL_ACI_VAL 0x100000
-
-
-/* 802.11h enforcement levels */
-#define SPECT_MNGMT_OFF 0 /* 11h disabled */
-#define SPECT_MNGMT_LOOSE 1 /* Allow scan lists to contain non-11h AP */
- /* when 11h is enabled */
-#define SPECT_MNGMT_STRICT 2 /* Prine out non-11h APs from scan list */
-
-
-
-/* max # of leds supported by GPIO (gpio pin# == led index#) */
-#define WL_LED_NUMGPIO 16 /* gpio 0-15 */
-
-/* led per-pin behaviors */
-#define WL_LED_OFF 0 /* always off */
-#define WL_LED_ON 1 /* always on */
-#define WL_LED_ACTIVITY 2 /* activity */
-#define WL_LED_RADIO 3 /* radio enabled */
-#define WL_LED_ARADIO 4 /* 5 Ghz radio enabled */
-#define WL_LED_BRADIO 5 /* 2.4Ghz radio enabled */
-#define WL_LED_BGMODE 6 /* on if gmode, off if bmode */
-#define WL_LED_WI1 7
-#define WL_LED_WI2 8
-#define WL_LED_WI3 9
-#define WL_LED_ASSOC 10 /* associated state indicator */
-#define WL_LED_INACTIVE 11 /* null behavior (clears default behavior) */
-#define WL_LED_NUMBEHAVIOR 12
-
-/* led behavior numeric value format */
-#define WL_LED_BEH_MASK 0x7f /* behavior mask */
-#define WL_LED_AL_MASK 0x80 /* activelow (polarity) bit */
-
-
-/* maximum channels */
-#define WL_NUMCHANNELS 64 /* max # of channels in the band */
-
-/* rate check */
-#define WL_RATE_OFDM(r) (((r) & 0x7f) == 12 || ((r) & 0x7f) == 18 || \
- ((r) & 0x7f) == 24 || ((r) & 0x7f) == 36 || \
- ((r) & 0x7f) == 48 || ((r) & 0x7f) == 72 || \
- ((r) & 0x7f) == 96 || ((r) & 0x7f) == 108)
-
-/* WDS link local endpoint WPA role */
-#define WL_WDS_WPA_ROLE_AUTH 0 /* authenticator */
-#define WL_WDS_WPA_ROLE_SUP 1 /* supplicant */
-#define WL_WDS_WPA_ROLE_AUTO 255 /* auto, based on mac addr value */
-
-/* afterburner_override */
-#define ABO_AUTO -1 /* auto - no override */
-#define ABO_OFF 0 /* force afterburner off */
-#define ABO_ON 1 /* force afterburner on */
-
-#define GMODE_AFTERBURNER 6
-
-#undef PACKED
-
-#endif /* _wlioctl_h_ */
diff --git a/openwrt/target/linux/package/base-files/include/wlutils.h b/openwrt/target/linux/package/base-files/include/wlutils.h
deleted file mode 100644
index 07e2536..0000000
--- a/openwrt/target/linux/package/base-files/include/wlutils.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Broadcom wireless network adapter utility functions
- *
- * Copyright 2004, Broadcom Corporation
- * All Rights Reserved.
- *
- * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
- * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
- * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
- * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
- *
- * $Id$
- */
-
-#ifndef _wlutils_h_
-#define _wlutils_h_
-
-#include <typedefs.h>
-#include <wlioctl.h>
-
-/*
- * Pass a wlioctl request to the specified interface.
- * @param name interface name
- * @param cmd WLC_GET_MAGIC <= cmd < WLC_LAST
- * @param buf buffer for passing in and/or receiving data
- * @param len length of buf
- * @return >= 0 if successful or < 0 otherwise
- */
-extern int wl_ioctl(char *name, int cmd, void *buf, int len);
-
-/*
- * Get the MAC (hardware) address of the specified interface.
- * @param name interface name
- * @param hwaddr 6-byte buffer for receiving address
- * @return >= 0 if successful or < 0 otherwise
- */
-extern int wl_hwaddr(char *name, unsigned char *hwaddr);
-
-/*
- * Probe the specified interface.
- * @param name interface name
- * @return >= 0 if a Broadcom wireless device or < 0 otherwise
- */
-extern int wl_probe(char *name);
-
-/*
- * Set/Get named variable.
- * @param name interface name
- * @param var variable name
- * @param val variable value/buffer
- * @param len variable value/buffer length
- * @return success == 0, failure != 0
- */
-extern int wl_set_val(char *name, char *var, void *val, int len);
-extern int wl_get_val(char *name, char *var, void *val, int len);
-extern int wl_set_int(char *name, char *var, int val);
-extern int wl_get_int(char *name, char *var, int *val);
-
-#endif /* _wlutils_h_ */
diff --git a/openwrt/target/linux/package/base-files/ipkg/base-files-arch.control b/openwrt/target/linux/package/base-files/ipkg/base-files-arch.control
deleted file mode 100644
index f4a6509..0000000
--- a/openwrt/target/linux/package/base-files/ipkg/base-files-arch.control
+++ /dev/null
@@ -1,4 +0,0 @@
-Package: base-files-arch
-Priority: optional
-Section: sys
-Description: Board/architecture specific files
diff --git a/openwrt/target/linux/package/base-files/src/adam2patcher.c b/openwrt/target/linux/package/base-files/src/adam2patcher.c
deleted file mode 100644
index 25a7807..0000000
--- a/openwrt/target/linux/package/base-files/src/adam2patcher.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * patcher.c - ADAM2 patcher for Netgear DG834 (and compatible)
- *
- * Copyright (C) 2006 Felix Fietkau
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <stdint.h>
-#include <sys/mman.h>
-#include <sys/stat.h>
-#include <string.h>
-
-#include <sys/ioctl.h>
-
-int main(int argc, char **argv)
-{
- int fd;
- char *ptr;
- uint32_t *i;
-
- if (argc != 2) {
- fprintf(stderr, "Usage: %s <filename>\n", argv[0]);
- exit(1);
- }
-
- if (((fd = open(argv[1], O_RDWR)) < 0)
- || ((ptr = mmap(0, 128 * 1024, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0)) == (void *) (-1))) {
- fprintf(stderr, "Can't open file\n");
- exit(1);
- }
-
- i = (uint32_t *) &ptr[0x3944];
- if (*i == 0x0c000944) {
- fprintf(stderr, "Unpatched ADAM2 detected. Patching... ");
- *i = 0x00000000;
- msync(i, sizeof(*i), MS_SYNC|MS_INVALIDATE);
- fprintf(stderr, "done!\n");
- } else if (*i == 0x00000000) {
- fprintf(stderr, "Patched ADAM2 detected.\n");
- } else {
- fprintf(stderr, "Unknown ADAM2 detected. Can't patch!\n");
- }
-
- close(fd);
-}
diff --git a/openwrt/target/linux/package/base-files/src/jffs2root.c b/openwrt/target/linux/package/base-files/src/jffs2root.c
deleted file mode 100644
index 14662fc..0000000
--- a/openwrt/target/linux/package/base-files/src/jffs2root.c
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * jffs2root.c
- *
- * Copyright (C) 2005 Mike Baker
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id$
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/mman.h>
-#include <sys/stat.h>
-#include <string.h>
-
-#include <sys/ioctl.h>
-#include <linux/mtd/mtd.h>
-
-#define FILENAME "/dev/mtdblock/1"
-
-struct trx_header {
- unsigned magic; /* "HDR0" */
- unsigned len; /* Length of file including header */
- unsigned crc32; /* 32-bit CRC from flag_version to end of file */
- unsigned flag_version; /* 0:15 flags, 16:31 version */
- unsigned offsets[3]; /* Offsets of partitions from start of header */
-};
-
-unsigned long *crc32;
-
-void init_crc32()
-{
- unsigned long crc;
- unsigned long poly = 0xEDB88320L;
- int n, bit;
- if ((crc32 = (unsigned long *) malloc(256 * sizeof(unsigned long))) == (void *)-1) {
- perror("malloc");
- exit(1);
- }
- for (n = 0; n < 256; n++) {
- crc = (unsigned long) n;
- for (bit = 0; bit < 8; bit++)
- crc = (crc & 1) ? (poly ^ (crc >> 1)) : (crc >> 1);
- crc32[n] = crc;
- }
-}
-
-unsigned int crc32buf(char *buf, size_t len)
-{
- unsigned int crc = 0xFFFFFFFF;
- for (; len; len--, buf++)
- crc = crc32[(crc ^ *buf) & 0xff] ^ (crc >> 8);
- return crc;
-}
-
-int main(int argc, char **argv)
-{
- int fd;
- struct mtd_info_user mtdInfo;
- unsigned long len;
- struct trx_header *ptr;
- char *buf;
-
- if (((fd = open(FILENAME, O_RDWR)) < 0)
- || ((len = lseek(fd, 0, SEEK_END)) < 0)
- || ((ptr = (struct trx_header *) mmap(0, len, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0)) == (void *) (-1))
- || (ptr->magic != 0x30524448)) {
- printf("Error reading trx info\n");
- exit(-1);
- }
- close (fd);
-
- if (((fd = open("/dev/mtd/1", O_RDWR)) < 0)
- || (ioctl(fd, MEMGETINFO, &mtdInfo))) {
- fprintf(stderr, "Could not get MTD device info from %s\n", FILENAME);
- close(fd);
- exit(1);
- }
- close(fd);
-
- if (argc > 1 && !strcmp(argv[1],"--move")) {
- if (ptr->offsets[2] >= ptr->len) {
- printf("Partition already moved outside trx\n");
- } else {
- init_crc32();
- ptr->offsets[2] += (mtdInfo.erasesize - 1);
- ptr->offsets[2] &= ~(mtdInfo.erasesize - 1);
- ptr->len = ptr->offsets[2];
- ptr->crc32 = crc32buf((void *) &(ptr->flag_version), ptr->len - offsetof(struct trx_header, flag_version));
- msync(ptr,sizeof(struct trx_header),MS_SYNC|MS_INVALIDATE);
- printf("Partition moved; please reboot\n");
- }
- } else if (argc > 1 && !strcmp(argv[1], "--clean")) {
- buf = (char *) ptr;
- if (buf[ptr->offsets[1] - 1] == 0) {
- init_crc32();
- buf[ptr->offsets[1] - 1] = 1;
- ptr->crc32 = crc32buf((void *) &(ptr->flag_version), ptr->len - offsetof(struct trx_header, flag_version));
- msync(ptr,sizeof(struct trx_header),MS_SYNC|MS_INVALIDATE);
- printf("Partition marked as clean\n");
- }
- } else {
- int x;
- printf(" erase: 0x%08x\n",mtdInfo.erasesize);
- printf("=== trx ===\n");
- printf("mapped: 0x%08x\n", (unsigned)ptr);
- printf(" magic: 0x%08x\n", ptr->magic);
- printf(" len: 0x%08x\n", ptr->len);
- printf(" crc: 0x%08x\n", ptr->crc32);
- for (x = 0; x < 3; x++)
- printf(" offset[%d]: 0x%08x\n", x, ptr->offsets[x]);
- }
-
- munmap((void *) ptr, len);
- return 0;
-}
diff --git a/openwrt/target/linux/package/diag/Config.in b/openwrt/target/linux/package/diag/Config.in
deleted file mode 100644
index 70f726c..0000000
--- a/openwrt/target/linux/package/diag/Config.in
+++ /dev/null
@@ -1,7 +0,0 @@
-config BR2_PACKAGE_KMOD_DIAG
- prompt "kmod-diag......................... Driver for router LEDs and Buttons"
- tristate
- depends BR2_LINUX_2_4_BRCM
- default y
- help
- Driver for router LEDs and Buttons
diff --git a/openwrt/target/linux/package/diag/Makefile b/openwrt/target/linux/package/diag/Makefile
deleted file mode 100644
index 3329ee9..0000000
--- a/openwrt/target/linux/package/diag/Makefile
+++ /dev/null
@@ -1,31 +0,0 @@
-# Makefile for the diag module
-#
-# $Id$
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME := kmod-diag
-PKG_RELEASE := 1
-PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
-
-include $(TOPDIR)/package/rules.mk
-
-$(eval $(call PKG_template,KMOD_DIAG,$(PKG_NAME),$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE))))
-
-DIAG_FLAGS:=$(TARGET_CFLAGS) -D__KERNEL__ -fno-strict-aliasing -fno-common -fomit-frame-pointer -G 0 \
- -mno-abicalls -fno-pic -finline-limit=100000 -mabi=32 -march=mips32 -Wa,-32 -Wa,-march=mips32 \
- -Wa,-mips32 -Wa,--trap -Wstrict-prototypes -Wno-trigraphs -DMODULE -mlong-calls -fno-common -I. -I linux-2.4 -nostdinc \
- -iwithprefix include -I$(LINUX_DIR)/include -I$(LINUX_DIR)/include/asm/gcc -c -I$(LINUX_DIR)/arch/mips/bcm947xx/include -DBCMDRIVER
-
-$(PKG_BUILD_DIR)/.prepared:
- mkdir -p $(PKG_BUILD_DIR)
- touch $@
-
-$(PKG_BUILD_DIR)/.built:
- $(TARGET_CC) $(DIAG_FLAGS) -o $(PKG_BUILD_DIR)/diag.o diag_led.c
- touch $@
-
-$(IPKG_KMOD_DIAG):
- mkdir -p $(IDIR_KMOD_DIAG)/lib/modules/$(LINUX_VERSION)
- $(CP) $(PKG_BUILD_DIR)/diag.o $(IDIR_KMOD_DIAG)/lib/modules/$(LINUX_VERSION)/
- $(IPKG_BUILD) $(IDIR_KMOD_DIAG) $(PACKAGE_DIR)
diff --git a/openwrt/target/linux/package/diag/diag_led.c b/openwrt/target/linux/package/diag/diag_led.c
deleted file mode 100644
index 6ad7ff1..0000000
--- a/openwrt/target/linux/package/diag/diag_led.c
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
- * diag_led.c - replacement diag module
- *
- * Copyright (C) 2004 Mike Baker,
- * Imre Kaloz <kaloz@dune.hu>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id$
- */
-
-/*
- * ChangeLog:
- * 2004/03/28 initial release
- * 2004/08/26 asus & buffalo support added
- * 2005/03/14 asus wl-500g deluxe and buffalo v2 support added
- * 2005/04/13 added licensing informations
- * 2005/04/18 base reset polarity off initial readings
- * 2006/02/07 motorola wa840g/we800g support added
- */
-
-#include <linux/module.h>
-#include <linux/init.h>
-#include <linux/kernel.h>
-#include <linux/sysctl.h>
-#include <asm/io.h>
-#include <typedefs.h>
-#include <osl.h>
-#include <bcmdevs.h>
-#include <sbutils.h>
-
-extern char * nvram_get(const char *name);
-static void *sbh;
-
-// v2.x - - - - -
-#define DIAG_GPIO (1<<1)
-#define DMZ_GPIO (1<<7)
-
-static void set_gpio(uint32 mask, uint32 value) {
- sb_gpiocontrol(sbh,mask, 0, GPIO_DRV_PRIORITY);
- sb_gpioouten(sbh,mask,mask,GPIO_DRV_PRIORITY);
- sb_gpioout(sbh,mask,value,GPIO_DRV_PRIORITY);
-}
-
-static void v2_set_diag(u8 state) {
- set_gpio(DIAG_GPIO,state);
-}
-static void v2_set_dmz(u8 state) {
- set_gpio(DMZ_GPIO,state);
-}
-
-// v1.x - - - - -
-#define LED_DIAG 0x13
-#define LED_DMZ 0x12
-
-static void v1_set_diag(u8 state) {
- if (!state) {
- *(volatile u8*)(KSEG1ADDR(BCM4710_EUART)+LED_DIAG)=0xFF;
- } else {
- *(volatile u8*)(KSEG1ADDR(BCM4710_EUART)+LED_DIAG);
- }
-}
-static void v1_set_dmz(u8 state) {
- if (!state) {
- *(volatile u8*)(KSEG1ADDR(BCM4710_EUART)+LED_DMZ)=0xFF;
- } else {
- *(volatile u8*)(KSEG1ADDR(BCM4710_EUART)+LED_DMZ);
- }
-}
-
-static void wap1_set_diag(u8 state) {
- set_gpio(1<<3,state);
-}
-static void wap1_set_dmz(u8 state) {
- set_gpio(1<<4,state);
-}
-
-// - - - - -
-static void ignore(u8 ignored) {};
-
-// - - - - -
-#define BIT_DMZ 0x01
-#define BIT_DIAG 0x04
-
-void (*set_diag)(u8 state);
-void (*set_dmz)(u8 state);
-
-static unsigned int diag = 0;
-
-static void diag_change()
-{
- set_diag(0xFF); // off
- set_dmz(0xFF); // off
-
- if(diag & BIT_DIAG)
- set_diag(0x00); // on
- if(diag & BIT_DMZ)
- set_dmz(0x00); // on
-}
-
-static int proc_diag(ctl_table *table, int write, struct file *filp,
- void *buffer, size_t *lenp)
-{
- int r;
- r = proc_dointvec(table, write, filp, buffer, lenp);
- if (write && !r) {
- diag_change();
- }
- return r;
-}
-
-// - - - - -
-static unsigned char reset_gpio = 0;
-static unsigned char reset_polarity = 0;
-static unsigned int reset = 0;
-
-static int proc_reset(ctl_table *table, int write, struct file *filp,
- void *buffer, size_t *lenp)
-{
-
- if (reset_gpio) {
- sb_gpiocontrol(sbh,reset_gpio,reset_gpio,GPIO_DRV_PRIORITY);
- sb_gpioouten(sbh,reset_gpio,0,GPIO_DRV_PRIORITY);
- reset=!(sb_gpioin(sbh)&reset_gpio);
-
- if (reset_polarity) reset=!reset;
- } else {
- reset=0;
- }
-
- return proc_dointvec(table, write, filp, buffer, lenp);
-}
-
-// - - - - -
-static struct ctl_table_header *diag_sysctl_header;
-
-static ctl_table sys_diag[] = {
- {
- ctl_name: 2000,
- procname: "diag",
- data: &diag,
- maxlen: sizeof(diag),
- mode: 0644,
- proc_handler: proc_diag
- },
- {
- ctl_name: 2001,
- procname: "reset",
- data: &reset,
- maxlen: sizeof(reset),
- mode: 0444,
- proc_handler: proc_reset
- },
- { 0 }
-};
-
-static int __init diag_init()
-{
- char *buf;
- u32 board_type;
- sbh = sb_kattach();
- sb_gpiosetcore(sbh);
-
- board_type = sb_boardtype(sbh);
- printk(KERN_INFO "diag boardtype: %08x\n",board_type);
-
- set_diag=ignore;
- set_dmz=ignore;
-
- buf=nvram_get("pmon_ver") ?: "";
- if (((board_type & 0xf00) == 0x400) && (strncmp(buf, "CFE", 3) != 0)) {
- buf=nvram_get("boardtype")?:"";
- if (!strncmp(buf,"bcm94710dev",11)) {
- buf=nvram_get("boardnum")?:"";
- if (!strcmp(buf,"42")) {
- // wrt54g v1.x
- set_diag=v1_set_diag;
- set_dmz=v1_set_dmz;
- reset_gpio=(1<<6);
- }
- if (simple_strtoul(buf, NULL, 0) == 2) {
- // wap54g v1.0
- // do not use strcmp as PMON v5.3.22 has some built-in nvram
- // defaults with trailing \r
- set_diag=wap1_set_diag;
- // no dmz led on wap54g, used green led
- // labeled "WLAN Link" instead
- set_dmz=wap1_set_dmz;
- reset_gpio=(1<<0);
- }
- if (!strcmp(buf,"asusX")) {
- //asus wl-500g
- reset_gpio=(1<<6);
- }
- if (!strcmp(buf,"2")) {
- //wa840g v1 / we800g v1
- reset_gpio=(1<<0);
- }
- }
- if (!strcmp(buf,"bcm94710ap")) {
- buf=nvram_get("boardnum")?:"";
- if (!strcmp(buf,"42")) {
- // buffalo
- set_dmz=v2_set_dmz;
- reset_gpio=(1<<4);
- }
- if (!strcmp(buf,"44")) {
- //dell truemobile
- set_dmz=v2_set_dmz;
- reset_gpio=(1<<0);
- }
- }
- } else {
- buf=nvram_get("boardnum")?:"";
- if (!strcmp(buf,"42")) {
- //linksys
- set_diag=v2_set_diag;
- set_dmz=v2_set_dmz;
- reset_gpio=(1<<6);
- }
- if (!strcmp(buf,"44")) {
- //motorola
- reset_gpio=(1<<5);
- }
- if (!strcmp(buf,"00")) {
- //buffalo
- reset_gpio=(1<<7);
- }
- if (!strcmp(buf,"45")) {
- //wl-500g deluxe
- reset_gpio=(1<<6);
- }
- }
-
-
- sb_gpiocontrol(sbh,reset_gpio,reset_gpio,GPIO_DRV_PRIORITY);
- sb_gpioouten(sbh,reset_gpio,0,GPIO_DRV_PRIORITY);
- reset_polarity=!(sb_gpioin(sbh)&reset_gpio);
-
- diag_sysctl_header = register_sysctl_table(sys_diag, 0);
- diag_change();
-
- return 0;
-}
-
-static void __exit diag_exit()
-{
- unregister_sysctl_table(diag_sysctl_header);
-}
-
-EXPORT_NO_SYMBOLS;
-MODULE_AUTHOR("openwrt.org");
-MODULE_LICENSE("GPL");
-
-module_init(diag_init);
-module_exit(diag_exit);
diff --git a/openwrt/target/linux/package/diag/ipkg/kmod-diag.control b/openwrt/target/linux/package/diag/ipkg/kmod-diag.control
deleted file mode 100644
index 9c93926..0000000
--- a/openwrt/target/linux/package/diag/ipkg/kmod-diag.control
+++ /dev/null
@@ -1,4 +0,0 @@
-Package: kmod-diag
-Priority: essential
-Section: sys
-Description: Driver for Router LEDs and Buttons
diff --git a/openwrt/target/linux/package/fuse/Config.in b/openwrt/target/linux/package/fuse/Config.in
deleted file mode 100644
index 8fbb34c..0000000
--- a/openwrt/target/linux/package/fuse/Config.in
+++ /dev/null
@@ -1,19 +0,0 @@
-config BR2_PACKAGE_KMOD_FUSE
- prompt "kmod-fuse......................... FUSE kernel module"
- tristate
- default m if CONFIG_DEVEL
- help
- With FUSE it is possible to implement a fully functional
- filesystem in a userspace program.
-
- Features include:
-
- * Simple library API
- * Simple installation (no need to patch or recompile the kernel)
- * Secure implementation
- * Userspace - kernel interface is very efficient
- * Usable by non privileged users
- * Runs on Linux kernels 2.4.X and 2.6.X
- * Has proven very stable over time
-
- http://fuse.sourceforge.net/
diff --git a/openwrt/target/linux/package/fuse/Makefile b/openwrt/target/linux/package/fuse/Makefile
deleted file mode 100644
index e9922bc..0000000
--- a/openwrt/target/linux/package/fuse/Makefile
+++ /dev/null
@@ -1,80 +0,0 @@
-# $Id$
-
-include $(TOPDIR)/rules.mk
-include ../../rules.mk
-
-PKG_NAME:=fuse
-PKG_VERSION:=2.5.2
-PKG_RELEASE:=1
-PKG_MD5SUM:=ea565debe6c7486963bef05c45c50361
-
-PKG_SOURCE_URL:=@SF/$(PKG_NAME)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_CAT:=zcat
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
-
-include $(TOPDIR)/package/rules.mk
-
-$(eval $(call PKG_template,KMOD_FUSE,kmod-fuse,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE))))
-
-$(PKG_BUILD_DIR)/.configured:
- (cd $(PKG_BUILD_DIR); \
- rm -rf config.{cache,status} ; \
- touch configure.in ; \
- touch aclocal.m4 ; \
- touch Makefile.in ; \
- touch include/config.h.in ; \
- touch configure ; \
- $(TARGET_CONFIGURE_OPTS) \
- ./configure \
- --target=$(GNU_TARGET_NAME) \
- --host=$(GNU_TARGET_NAME) \
- --build=$(GNU_HOST_NAME) \
- --program-prefix="" \
- --program-suffix="" \
- --prefix=/usr \
- --exec-prefix=/usr \
- --bindir=/usr/bin \
- --datadir=/usr/share \
- --includedir=/usr/include \
- --infodir=/usr/share/info \
- --libdir=/usr/lib \
- --libexecdir=/usr/lib \
- --localstatedir=/var \
- --mandir=/usr/share/man \
- --sbindir=/usr/sbin \
- --sysconfdir=/etc \
- $(DISABLE_LARGEFILE) \
- $(DISABLE_NLS) \
- --enable-shared \
- --enable-static \
- --disable-rpath \
- --enable-kernel-module \
- --disable-lib \
- --disable-util \
- --disable-example \
- --disable-auto-modprobe \
- --with-kernel=$(LINUX_DIR) \
- --disable-mtab \
- );
- touch $@
-
-$(PKG_BUILD_DIR)/.built:
- mkdir -p $(PKG_INSTALL_DIR)
- $(MAKE) -C $(PKG_BUILD_DIR) \
- ARCH="$(LINUX_KARCH)" \
- CROSS_COMPILE="$(TARGET_CROSS)" \
- PATH="$(TARGET_PATH)" \
- DESTDIR="$(PKG_INSTALL_DIR)" \
- SUBDIRS="kernel" \
- all install
- touch $@
-
-$(IPKG_KMOD_FUSE):
- mkdir -p $(IDIR_KMOD_FUSE)/lib/modules/$(LINUX_VERSION)
- $(CP) $(PKG_INSTALL_DIR)/lib/modules/$(LINUX_VERSION)/kernel/fs/fuse/fuse.$(LINUX_KMOD_SUFFIX) \
- $(IDIR_KMOD_FUSE)/lib/modules/$(LINUX_VERSION)/
- $(IPKG_BUILD) $(IDIR_KMOD_FUSE) $(PACKAGE_DIR)
-
diff --git a/openwrt/target/linux/package/fuse/ipkg/kmod-fuse.control b/openwrt/target/linux/package/fuse/ipkg/kmod-fuse.control
deleted file mode 100644
index 1a9d322..0000000
--- a/openwrt/target/linux/package/fuse/ipkg/kmod-fuse.control
+++ /dev/null
@@ -1,4 +0,0 @@
-Package: kmod-fuse
-Priority: optional
-Section: sys
-Description: Filesystem in Userspace (kernel module)
diff --git a/openwrt/target/linux/package/fuse/patches/101-kmod_build.patch b/openwrt/target/linux/package/fuse/patches/101-kmod_build.patch
deleted file mode 100644
index e541d47..0000000
--- a/openwrt/target/linux/package/fuse/patches/101-kmod_build.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-diff -Nur fuse-2.5.2/kernel/Makefile.in fuse-2.5.2.patched/kernel/Makefile.in
---- fuse-2.5.2/kernel/Makefile.in 2006-02-02 18:04:52.000000000 +0100
-+++ fuse-2.5.2.patched/kernel/Makefile.in 2006-03-28 20:17:13.000000000 +0200
-@@ -54,23 +54,8 @@
-
- ifeq ($(majver), 2.4)
-
--CC = gcc
--LD = ld
--CFLAGS = -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -pipe @KERNELCFLAGS@
--CPPFLAGS = -I@kernelsrc@/include -I. -D__KERNEL__ -DMODULE -D_LOOSE_KERNEL_NAMES -DFUSE_VERSION=\"$(VERSION)\" @KERNELCPPFLAGS@
--
- fuse_objs = dev.o dir.o file.o inode.o compat/parser.o
-
--SUFFIXES = .c .o .s
--
--all-spec: fuse.o
--
--.c.o:
-- $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
--
--fuse.o: $(fuse_objs)
-- $(LD) -r -o fuse.o $(fuse_objs)
--
- fuse_headers = fuse_i.h fuse_kernel.h
-
- dev.o: $(fuse_headers)
-@@ -78,6 +63,18 @@
- file.o: $(fuse_headers)
- inode.o: $(fuse_headers)
-
-+EXTRA_CFLAGS += -DFUSE_VERSION=\"$(VERSION)\"
-+
-+O_TARGET := fuse.o
-+
-+obj-y := $(fuse_objs)
-+obj-m := $(O_TARGET)
-+
-+-include $(TOPDIR)/Rules.make
-+
-+all-spec:
-+ $(MAKE) -C @kernelsrc@ TOPDIR=@kernelsrc@ SUBDIRS=$(PWD) modules
-+
- else
-
- EXTRA_CFLAGS += -DFUSE_VERSION=\"$(VERSION)\"
diff --git a/openwrt/target/linux/package/hostap/Config.in b/openwrt/target/linux/package/hostap/Config.in
deleted file mode 100644
index 767b459..0000000
--- a/openwrt/target/linux/package/hostap/Config.in
+++ /dev/null
@@ -1,40 +0,0 @@
-config BR2_PACKAGE_KMOD_HOSTAP
- prompt "kmod-hostap....................... Host AP support for Prism2/2.5/3 IEEE 802.11b"
- tristate
- depends BR2_LINUX_2_4_X86 || BR2_LINUX_2_4_BRCM
- default m if CONFIG_DEVEL
- help
- A driver for 802.11b wireless cards based on Intersil Prism2/2.5/3
- chipset. This driver supports so called Host AP mode that allows
- the card to act as an IEEE 802.11 access point.
-
- This option includes the base Host AP driver code that is shared by
- different hardware models. You will also need to enable support for
- PLX/PCI/CS version of the driver to actually use the driver.
-
- http://hostap.epitest.fi/
-
-config BR2_PACKAGE_KMOD_HOSTAP_PCI
- prompt "kmod-hostap-pci................. Host AP driver for Prism2.5 PCI adaptors"
- tristate
- default m if CONFIG_DEVEL
- depends BR2_PACKAGE_KMOD_HOSTAP
- help
- Host AP support for Prism2/2.5/3 IEEE 802.11b" is required for this
- driver and its help text includes more information about the Host AP
- driver.
-
- http://hostap.epitest.fi/
-
-config BR2_PACKAGE_KMOD_HOSTAP_PLX
- prompt "kmod-hostap-plx................. Host AP driver for Prism2/2.5/3 in PLX9052 based PCI adaptors"
- tristate
- default m if CONFIG_DEVEL
- depends BR2_PACKAGE_KMOD_HOSTAP
- help
- Host AP support for Prism2/2.5/3 IEEE 802.11b" is required for this
- driver and its help text includes more information about the Host AP
- driver.
-
- http://hostap.epitest.fi/
-
diff --git a/openwrt/target/linux/package/hostap/Makefile b/openwrt/target/linux/package/hostap/Makefile
deleted file mode 100644
index 3e8e604..0000000
--- a/openwrt/target/linux/package/hostap/Makefile
+++ /dev/null
@@ -1,58 +0,0 @@
-# $Id$
-
-include $(TOPDIR)/rules.mk
-include ../../rules.mk
-
-PKG_NAME:=hostap-driver
-PKG_VERSION:=0.4.7
-PKG_RELEASE:=1
-PKG_MD5SUM:=ee495686cf27011b4e401963c2c7f62a
-
-PKG_SOURCE_URL:=http://hostap.epitest.fi/releases/
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_CAT:=zcat
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
-
-include $(TOPDIR)/package/rules.mk
-
-$(eval $(call PKG_template,KMOD_HOSTAP,kmod-hostap,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE))))
-$(eval $(call PKG_template,KMOD_HOSTAP_PCI,kmod-hostap-pci,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE))))
-$(eval $(call PKG_template,KMOD_HOSTAP_PLX,kmod-hostap-plx,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE))))
-
-$(PKG_BUILD_DIR)/.configured:
- touch $@
-
-$(PKG_BUILD_DIR)/.built:
- $(MAKE) -C $(LINUX_DIR)/ \
- ARCH="$(LINUX_KARCH)" \
- CROSS_COMPILE="$(TARGET_CROSS)" \
- SUBDIRS="$(PKG_BUILD_DIR)/driver/modules" \
- modules
- touch $@
-
-$(IPKG_KMOD_HOSTAP):
- install -m0755 -d $(IDIR_KMOD_HOSTAP)/lib/modules/$(LINUX_VERSION)
- $(CP) \
- $(PKG_BUILD_DIR)/driver/modules/hostap.$(LINUX_KMOD_SUFFIX) \
- $(PKG_BUILD_DIR)/driver/modules/hostap_crypt_ccmp.$(LINUX_KMOD_SUFFIX) \
- $(PKG_BUILD_DIR)/driver/modules/hostap_crypt_tkip.$(LINUX_KMOD_SUFFIX) \
- $(PKG_BUILD_DIR)/driver/modules/hostap_crypt_wep.$(LINUX_KMOD_SUFFIX) \
- $(IDIR_KMOD_HOSTAP)/lib/modules/$(LINUX_VERSION)/
- $(IPKG_BUILD) $(IDIR_KMOD_HOSTAP) $(PACKAGE_DIR)
-
-$(IPKG_KMOD_HOSTAP_PCI):
- install -m0755 -d $(IDIR_KMOD_HOSTAP_PCI)/lib/modules/$(LINUX_VERSION)
- $(CP) \
- $(PKG_BUILD_DIR)/driver/modules/hostap_pci.$(LINUX_KMOD_SUFFIX) \
- $(IDIR_KMOD_HOSTAP_PCI)/lib/modules/$(LINUX_VERSION)/
- $(IPKG_BUILD) $(IDIR_KMOD_HOSTAP_PCI) $(PACKAGE_DIR)
-
-$(IPKG_KMOD_HOSTAP_PLX):
- install -m0755 -d $(IDIR_KMOD_HOSTAP_PLX)/lib/modules/$(LINUX_VERSION)
- $(CP) \
- $(PKG_BUILD_DIR)/driver/modules/hostap_plx.$(LINUX_KMOD_SUFFIX) \
- $(IDIR_KMOD_HOSTAP_PLX)/lib/modules/$(LINUX_VERSION)/
- $(IPKG_BUILD) $(IDIR_KMOD_HOSTAP_PLX) $(PACKAGE_DIR)
-
diff --git a/openwrt/target/linux/package/hostap/ipkg/kmod-hostap-pci.control b/openwrt/target/linux/package/hostap/ipkg/kmod-hostap-pci.control
deleted file mode 100644
index 3c3cdf8..0000000
--- a/openwrt/target/linux/package/hostap/ipkg/kmod-hostap-pci.control
+++ /dev/null
@@ -1,5 +0,0 @@
-Package: kmod-hostap-pci
-Priority: optional
-Section: net
-Depends: kmod-hostap
-Description: Host AP driver for Prism2.5 PCI adaptors
diff --git a/openwrt/target/linux/package/hostap/ipkg/kmod-hostap-plx.control b/openwrt/target/linux/package/hostap/ipkg/kmod-hostap-plx.control
deleted file mode 100644
index 6e039b8..0000000
--- a/openwrt/target/linux/package/hostap/ipkg/kmod-hostap-plx.control
+++ /dev/null
@@ -1,5 +0,0 @@
-Package: kmod-hostap-plx
-Priority: optional
-Section: net
-Depends: kmod-hostap
-Description: Host AP driver for Prism2/2.5/3 in PLX9052 based PCI adaptors
diff --git a/openwrt/target/linux/package/hostap/ipkg/kmod-hostap.control b/openwrt/target/linux/package/hostap/ipkg/kmod-hostap.control
deleted file mode 100644
index e5efb4e..0000000
--- a/openwrt/target/linux/package/hostap/ipkg/kmod-hostap.control
+++ /dev/null
@@ -1,4 +0,0 @@
-Package: kmod-hostap
-Priority: optional
-Section: net
-Description: Host AP support for Prism2/2.5/3 IEEE 802.11b
diff --git a/openwrt/target/linux/package/madwifi-old/Config.in b/openwrt/target/linux/package/madwifi-old/Config.in
deleted file mode 100644
index 115ce03..0000000
--- a/openwrt/target/linux/package/madwifi-old/Config.in
+++ /dev/null
@@ -1,9 +0,0 @@
-config BR2_PACKAGE_KMOD_MADWIFI_OLD
- prompt "kmod-madwifi-old.................. (old) Atheros Wifi driver"
- tristate
- default m if CONFIG_DEVEL
- default n
- help
- Madwifi-old driver for Atheros wireless adapters
-
- http://www.madwifi.org/
diff --git a/openwrt/target/linux/package/madwifi-old/Makefile b/openwrt/target/linux/package/madwifi-old/Makefile
deleted file mode 100644
index 25c64df..0000000
--- a/openwrt/target/linux/package/madwifi-old/Makefile
+++ /dev/null
@@ -1,103 +0,0 @@
-# $Id: Makefile 3287 2006-02-28 20:09:56Z nbd $
-
-include $(TOPDIR)/rules.mk
-include ../../rules.mk
-
-PKG_NAME:=madwifi-old
-PKG_VERSION:=r1417-20060128
-PKG_RELEASE:=1
-PKG_MD5SUM:=95d457e0edfb7028e09dee60db7fa7b8
-
-PKG_SOURCE_URL:=http://snapshots.madwifi.org/$(PKG_NAME)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_CAT:=zcat
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-
-ifeq ($(ARCH),mips)
-HAL_TARGET:=mips-be-elf
-endif
-ifeq ($(ARCH),mipsel)
-HAL_TARGET:=mips-le-elf
-endif
-ifeq ($(ARCH),i386)
-HAL_TARGET:=i386-elf
-endif
-
-BUS := PCI
-
-ifneq ($(BR2_LINUX_2_4_AR531X),)
- BUS := AHB
-endif
-# ifneq ($(BR2_LINUX_2_6_ARUBA),)
-# BUS := PCI AHB # no suitable HAL for AHB yet.
-# endif
-
-BUS_MODULES:=
-ifeq ($(findstring AHB,$(BUS)),AHB)
-BUS_MODULES+=$(PKG_BUILD_DIR)/ath/ath_ahb.$(LINUX_KMOD_SUFFIX)
-endif
-ifeq ($(findstring PCI,$(BUS)),PCI)
-BUS_MODULES+=$(PKG_BUILD_DIR)/ath/ath_pci.$(LINUX_KMOD_SUFFIX)
-endif
-
-
-include $(TOPDIR)/package/rules.mk
-
-$(eval $(call PKG_template,KMOD_MADWIFI_OLD,kmod-madwifi-old,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE))))
-
-$(PKG_BUILD_DIR)/.configured:
- touch $@
-
-MADWIFI_OLD_MAKEOPTS= -C $(PKG_BUILD_DIR) \
- PATH="$(TARGET_PATH)" \
- ARCH="$(LINUX_KARCH)" \
- CROSS_COMPILE="$(TARGET_CROSS)" \
- TARGET="$(HAL_TARGET)" \
- TOOLPREFIX="$(KERNEL_CROSS)" \
- TOOLPATH="$(KERNEL_CROSS)" \
- KERNELPATH="$(LINUX_DIR)" \
- DOMULTI=1
-
-
-$(PKG_BUILD_DIR)/.built:
-ifeq ($(findstring AHB,$(BUS)),AHB)
- $(MAKE) $(MADWIFI_OLD_MAKEOPTS) BUS="AHB" all
-endif
-ifeq ($(findstring PCI,$(BUS)),PCI)
- $(MAKE) $(MADWIFI_OLD_MAKEOPTS) BUS="PCI" all
-endif
- $(MAKE) $(MADWIFI_OLD_MAKEOPTS) -C tools all
- $(RSTRIP) $(PKG_BUILD_DIR)/tools/madwifi_multi
- touch $@
-
-$(IPKG_KMOD_MADWIFI_OLD):
- install -d -m0755 $(IDIR_KMOD_MADWIFI_OLD)/etc/modules.d
- install -m0644 ./files/madwifi.modules $(IDIR_KMOD_MADWIFI_OLD)/etc/modules.d/20-madwifi
- install -d -m0755 $(IDIR_KMOD_MADWIFI_OLD)/etc/init.d
- install -m0755 ./files/madwifi.init $(IDIR_KMOD_MADWIFI_OLD)/etc/init.d/S20madwifi
- install -d -m0755 $(IDIR_KMOD_MADWIFI_OLD)/lib/modules/$(LINUX_VERSION)
- $(CP) $(PKG_BUILD_DIR)/net80211/wlan*.$(LINUX_KMOD_SUFFIX) \
- $(PKG_BUILD_DIR)/ath_hal/ath_hal.$(LINUX_KMOD_SUFFIX) \
- $(BUS_MODULES) \
- $(PKG_BUILD_DIR)/ath_rate/sample/ath_rate_sample.$(LINUX_KMOD_SUFFIX) \
- $(PKG_BUILD_DIR)/net80211/*.$(LINUX_KMOD_SUFFIX) \
- $(IDIR_KMOD_MADWIFI_OLD)/lib/modules/$(LINUX_VERSION)/
- install -d -m0755 $(IDIR_KMOD_MADWIFI_OLD)/usr/sbin
- $(CP) $(PKG_BUILD_DIR)/tools/{80211debug,80211stats,athchans,athctrl,athdebug,athkey,athstats} $(IDIR_KMOD_MADWIFI_OLD)/usr/sbin/
- $(IPKG_BUILD) $(IDIR_KMOD_MADWIFI_OLD) $(PACKAGE_DIR)
-
-$(STAGING_DIR)/usr/include/madwifi-old/net80211/ieee80211.h: $(PKG_BUILD_DIR)/.built
- mkdir -p $(STAGING_DIR)/usr/include/madwifi-old
- $(CP) $(PKG_BUILD_DIR)/include $(STAGING_DIR)/usr/include/madwifi-old
- mkdir -p $(STAGING_DIR)/usr/include/madwifi-old/net80211
- $(CP) $(PKG_BUILD_DIR)/net80211/*.h $(STAGING_DIR)/usr/include/madwifi-old/net80211/
- touch $@
-
-install-dev: $(STAGING_DIR)/usr/include/madwifi-old/net80211/ieee80211.h
-
-uninstall-dev:
- rm -rf $(STAGING_DIR)/usr/include/madwifi-old
-
-compile-targets: install-dev
-clean-targets: uninstall-dev
diff --git a/openwrt/target/linux/package/madwifi-old/files/madwifi.init b/openwrt/target/linux/package/madwifi-old/files/madwifi.init
deleted file mode 100644
index b1e78c0..0000000
--- a/openwrt/target/linux/package/madwifi-old/files/madwifi.init
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-iwpriv ath0 mode 3
diff --git a/openwrt/target/linux/package/madwifi-old/files/madwifi.modules b/openwrt/target/linux/package/madwifi-old/files/madwifi.modules
deleted file mode 100644
index 996b8e7..0000000
--- a/openwrt/target/linux/package/madwifi-old/files/madwifi.modules
+++ /dev/null
@@ -1,11 +0,0 @@
-wlan
-ath_hal
-ath_rate_sample
-ath_pci
-wlan_acl
-wlan_ccmp
-wlan_tkip
-wlan_wep
-wlan_xauth
-wlan_scan_ap
-wlan_scan_sta
diff --git a/openwrt/target/linux/package/madwifi-old/ipkg/kmod-madwifi-old.control b/openwrt/target/linux/package/madwifi-old/ipkg/kmod-madwifi-old.control
deleted file mode 100644
index f7e5b87..0000000
--- a/openwrt/target/linux/package/madwifi-old/ipkg/kmod-madwifi-old.control
+++ /dev/null
@@ -1,4 +0,0 @@
-Package: kmod-madwifi-old
-Priority: optional
-Section: net
-Description: Driver for Atheros 802.11a/b/g MiniPCI cards
diff --git a/openwrt/target/linux/package/madwifi-old/patches/100-kernel_cflags.patch b/openwrt/target/linux/package/madwifi-old/patches/100-kernel_cflags.patch
deleted file mode 100644
index 5525c3f..0000000
--- a/openwrt/target/linux/package/madwifi-old/patches/100-kernel_cflags.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-diff -urN madwifi.old/Makefile madwifi.dev/Makefile
---- madwifi.old/Makefile 2005-07-13 02:35:11.000000000 +0200
-+++ madwifi.dev/Makefile 2005-08-13 22:39:26.973649096 +0200
-@@ -46,7 +46,7 @@
- # NB: the order is important here
- DIRS= ${ATH_HAL} ${ATH_RATE} ${WLAN} ${ATH}
-
--all: configcheck
-+all:
- mkdir -p ${SYMBOLSDIR}
- for i in ${DIRS}; do \
- $(MAKE) -C $$i || exit 1; \
-diff -urn madwifi.old/hal/public/mips-le-elf.inc madwifi.dev/hal/public/mips-le-elf.inc
---- madwifi.old/hal/public/mips-le-elf.inc 2005-08-13 22:36:45.646174000 +0200
-+++ madwifi.dev/hal/public/mips-le-elf.inc 2005-08-13 22:37:52.506010360 +0200
-@@ -63,5 +63,5 @@
-
- LDOPTS= -EL
- COPTS+= -DAH_BYTE_ORDER=AH_LITTLE_ENDIAN
--COPTS+= -G 0 -EL -mno-abicalls -fno-pic -mips2 -Wa,--trap \
-+COPTS+= -G 0 -EL -mno-abicalls -fno-pic -mips32 -Wa,--trap \
- -fno-strict-aliasing -fno-common -fomit-frame-pointer -mlong-calls
-diff -urn madwifi.old/hal/public/mips-be-elf.inc madwifi.dev/hal/public/mips-be-elf.inc
---- madwifi.old/hal/public/mips-be-elf.inc 2005-08-13 22:36:45.646174000 +0200
-+++ madwifi.dev/hal/public/mips-be-elf.inc 2005-08-13 22:37:52.506010360 +0200
-@@ -66,5 +66,5 @@
-
- LDOPTS= -EB
- COPTS+= -DAH_BYTE_ORDER=AH_BIG_ENDIAN
--COPTS+= -G 0 -EB -mno-abicalls -fno-pic -mips2 -Wa,--trap \
-+COPTS+= -G 0 -EB -mno-abicalls -fno-pic -mips32 -Wa,--trap \
- -fno-strict-aliasing -fno-common -fomit-frame-pointer -mlong-calls
diff --git a/openwrt/target/linux/package/madwifi/Config.in b/openwrt/target/linux/package/madwifi/Config.in
deleted file mode 100644
index 14a3b85..0000000
--- a/openwrt/target/linux/package/madwifi/Config.in
+++ /dev/null
@@ -1,10 +0,0 @@
-config BR2_PACKAGE_KMOD_MADWIFI
- prompt "kmod-madwifi...................... Atheros Wifi driver"
- tristate
- default y if BR2_LINUX_2_6_BRCM || BR2_LINUX_2_6_ARUBA || BR2_LINUX_2_4_AR531X || BR2_LINUX_2_6_XSCALE
- default m if CONFIG_DEVEL
- default n
- help
- Driver for Atheros 802.11a/b/g MiniPCI cards
-
- http://www.madwifi.org/
diff --git a/openwrt/target/linux/package/madwifi/Makefile b/openwrt/target/linux/package/madwifi/Makefile
deleted file mode 100644
index 1a50c5d..0000000
--- a/openwrt/target/linux/package/madwifi/Makefile
+++ /dev/null
@@ -1,105 +0,0 @@
-# $Id$
-
-include $(TOPDIR)/rules.mk
-include ../../rules.mk
-
-PKG_NAME:=madwifi-ng
-PKG_VERSION:=r1590-20060523
-PKG_RELEASE:=1
-PKG_MD5SUM:=d3b32a2db92ff95cb0c3eb24a1017d9e
-
-PKG_SOURCE_URL:=http://snapshots.madwifi.org/$(PKG_NAME)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_CAT:=zcat
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-
-ifeq ($(ARCH),mips)
-HAL_TARGET:=mips-be-elf
-endif
-ifeq ($(ARCH),mipsel)
-HAL_TARGET:=mips-le-elf
-endif
-ifeq ($(ARCH),i386)
-HAL_TARGET:=i386-elf
-endif
-ifeq ($(ARCH),armeb)
-HAL_TARGET:=xscale-be-elf
-endif
-
-BUS := PCI
-
-ifneq ($(BR2_LINUX_2_4_AR531X),)
- BUS := AHB
-endif
-ifneq ($(BR2_LINUX_2_6_ARUBA),)
- BUS := PCI AHB # no suitable HAL for AHB yet.
-endif
-
-BUS_MODULES:=
-ifeq ($(findstring AHB,$(BUS)),AHB)
-BUS_MODULES+=$(PKG_BUILD_DIR)/ath/ath_ahb.$(LINUX_KMOD_SUFFIX)
-endif
-ifeq ($(findstring PCI,$(BUS)),PCI)
-BUS_MODULES+=$(PKG_BUILD_DIR)/ath/ath_pci.$(LINUX_KMOD_SUFFIX)
-endif
-
-
-include $(TOPDIR)/package/rules.mk
-
-$(eval $(call PKG_template,KMOD_MADWIFI,kmod-madwifi,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE))))
-
-$(PKG_BUILD_DIR)/.configured:
- touch $@
-
-MADWIFI_MAKEOPTS= -C $(PKG_BUILD_DIR) \
- PATH="$(TARGET_PATH)" \
- ARCH="$(LINUX_KARCH)" \
- CROSS_COMPILE="$(TARGET_CROSS)" \
- TARGET="$(HAL_TARGET)" \
- TOOLPREFIX="$(KERNEL_CROSS)" \
- TOOLPATH="$(KERNEL_CROSS)" \
- KERNELPATH="$(LINUX_DIR)" \
- DOMULTI=1
-
-
-$(PKG_BUILD_DIR)/.built:
-ifeq ($(findstring AHB,$(BUS)),AHB)
- $(MAKE) $(MADWIFI_MAKEOPTS) BUS="AHB" all
-endif
-ifeq ($(findstring PCI,$(BUS)),PCI)
- $(MAKE) $(MADWIFI_MAKEOPTS) BUS="PCI" all
-endif
- $(RSTRIP) $(PKG_BUILD_DIR)/tools/madwifi_multi
- touch $@
-
-$(IPKG_KMOD_MADWIFI):
- mkdir -p $(IDIR_KMOD_MADWIFI)/etc/modules.d
- mkdir -p $(IDIR_KMOD_MADWIFI)/etc/init.d
- mkdir -p $(IDIR_KMOD_MADWIFI)/lib/modules/$(LINUX_VERSION)
- mkdir -p $(IDIR_KMOD_MADWIFI)/usr/sbin
- install -m0644 ./files/madwifi.modules $(IDIR_KMOD_MADWIFI)/etc/modules.d/20-madwifi
- install -m0755 ./files/madwifi.init $(IDIR_KMOD_MADWIFI)/etc/init.d/S20madwifi
- $(CP) $(PKG_BUILD_DIR)/net80211/wlan*.$(LINUX_KMOD_SUFFIX) \
- $(PKG_BUILD_DIR)/ath_hal/ath_hal.$(LINUX_KMOD_SUFFIX) \
- $(BUS_MODULES) \
- $(PKG_BUILD_DIR)/ath_rate/sample/ath_rate_sample.$(LINUX_KMOD_SUFFIX) \
- $(PKG_BUILD_DIR)/net80211/*.$(LINUX_KMOD_SUFFIX) \
- $(IDIR_KMOD_MADWIFI)/lib/modules/$(LINUX_VERSION)/
- $(CP) $(PKG_BUILD_DIR)/tools/{madwifi_multi,80211debug,80211stats,athchans,athctrl,athdebug,athkey,athstats,wlanconfig} $(IDIR_KMOD_MADWIFI)/usr/sbin/
- $(IPKG_BUILD) $(IDIR_KMOD_MADWIFI) $(PACKAGE_DIR)
-
-$(STAGING_DIR)/usr/include/madwifi/net80211/ieee80211.h: $(PKG_BUILD_DIR)/.built
- mkdir -p $(STAGING_DIR)/usr/include/madwifi
- $(CP) $(PKG_BUILD_DIR)/include $(STAGING_DIR)/usr/include/madwifi/
- mkdir -p $(STAGING_DIR)/usr/include/madwifi/net80211
- $(CP) $(PKG_BUILD_DIR)/net80211/*.h $(STAGING_DIR)/usr/include/madwifi/net80211/
- touch $@
-
-install-dev: $(STAGING_DIR)/usr/include/madwifi/net80211/ieee80211.h
-
-uninstall-dev:
- rm -rf $(STAGING_DIR)/usr/include/madwifi
-
-compile-targets: install-dev
-clean-targets: uninstall-dev
diff --git a/openwrt/target/linux/package/madwifi/files/madwifi.init b/openwrt/target/linux/package/madwifi/files/madwifi.init
deleted file mode 100644
index b1e78c0..0000000
--- a/openwrt/target/linux/package/madwifi/files/madwifi.init
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-iwpriv ath0 mode 3
diff --git a/openwrt/target/linux/package/madwifi/files/madwifi.modules b/openwrt/target/linux/package/madwifi/files/madwifi.modules
deleted file mode 100644
index eac01b6..0000000
--- a/openwrt/target/linux/package/madwifi/files/madwifi.modules
+++ /dev/null
@@ -1,11 +0,0 @@
-wlan
-wlan_scan_ap
-wlan_scan_sta
-ath_hal
-ath_rate_sample
-ath_pci
-wlan_acl
-wlan_ccmp
-wlan_tkip
-wlan_wep
-wlan_xauth
diff --git a/openwrt/target/linux/package/madwifi/ipkg/kmod-madwifi.control b/openwrt/target/linux/package/madwifi/ipkg/kmod-madwifi.control
deleted file mode 100644
index ddab426..0000000
--- a/openwrt/target/linux/package/madwifi/ipkg/kmod-madwifi.control
+++ /dev/null
@@ -1,4 +0,0 @@
-Package: kmod-madwifi
-Priority: optional
-Section: net
-Description: Driver for Atheros 802.11a/b/g MiniPCI cards
diff --git a/openwrt/target/linux/package/madwifi/patches/100-kernel_cflags.patch b/openwrt/target/linux/package/madwifi/patches/100-kernel_cflags.patch
deleted file mode 100644
index ef283dd..0000000
--- a/openwrt/target/linux/package/madwifi/patches/100-kernel_cflags.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-diff -ru madwifi-ng-r1486-20060329/Makefile madwifi-ng-r1486-20060329-patch/Makefile
---- madwifi-ng-r1486-20060329/Makefile 2006-03-13 19:23:02.000000000 -0500
-+++ madwifi-ng-r1486-20060329-patch/Makefile 2006-03-31 10:52:05.000000000 -0500
-@@ -51,7 +51,7 @@
-
- all: modules tools
-
--modules: configcheck svnversion.h
-+modules: svnversion.h
- mkdir -p ${SYMBOLSDIR}
- for i in ${DIRS_MODULES}; do \
- $(MAKE) -C $$i || exit 1; \
-diff -ru madwifi-ng-r1486-20060329/hal/public/mips-be-elf.inc madwifi-ng-r1486-20060329-patch/hal/public/mips-be-elf.inc
---- madwifi-ng-r1486-20060329/hal/public/mips-be-elf.inc 2006-03-28 03:46:27.000000000 -0500
-+++ madwifi-ng-r1486-20060329-patch/hal/public/mips-be-elf.inc 2006-03-31 10:52:05.000000000 -0500
-@@ -66,5 +66,5 @@
-
- LDOPTS= -EB
- COPTS+= -DAH_BYTE_ORDER=AH_BIG_ENDIAN
--COPTS+= -G 0 -EB -mno-abicalls -fno-pic -Wa,--trap \
-+COPTS+= -G 0 -EB -mno-abicalls -fno-pic -Wa,--trap -mips32 \
- -fno-strict-aliasing -fno-common -fomit-frame-pointer -mlong-calls
-diff -ru madwifi-ng-r1486-20060329/hal/public/mips-le-elf.inc madwifi-ng-r1486-20060329-patch/hal/public/mips-le-elf.inc
---- madwifi-ng-r1486-20060329/hal/public/mips-le-elf.inc 2006-03-28 03:46:27.000000000 -0500
-+++ madwifi-ng-r1486-20060329-patch/hal/public/mips-le-elf.inc 2006-03-31 10:52:05.000000000 -0500
-@@ -63,5 +63,5 @@
-
- LDOPTS= -EL
- COPTS+= -DAH_BYTE_ORDER=AH_LITTLE_ENDIAN
--COPTS+= -G 0 -EL -mno-abicalls -fno-pic -Wa,--trap \
-+COPTS+= -G 0 -EL -mno-abicalls -fno-pic -Wa,--trap -mips32 \
- -fno-strict-aliasing -fno-common -fomit-frame-pointer -mlong-calls
-diff -ur madwifi-ng-r1486-20060329/hal/public/xscale-be-elf.inc madwifi-ng-r1486-20060329-patch/hal/public/xscale-be-elf.inc
---- madwifi-ng-r1486-20060329/hal/public/xscale-be-elf.inc 2006-02-11 13:04:39.000000000 +0100
-+++ madwifi-ng-r1486-20060329-patch/hal/public/xscale-be-elf.inc 2006-04-16 15:07:59.000000000 +0200
-@@ -72,5 +72,5 @@
-
- LDOPTS= -EB
- COPTS+= -DAH_BYTE_ORDER=AH_BIG_ENDIAN -DAH_REGOPS_FUNC
--COPTS+= -march=armv4 -mbig-endian -fno-strict-aliasing -fno-common -mapcs-32 \
-- -mtune=xscale -mshort-load-bytes -msoft-float -mfp=2
-+COPTS+= -mcpu=xscale -mbig-endian -fno-strict-aliasing -fno-common \
-+ -msoft-float -mfp=2
diff --git a/openwrt/target/linux/package/madwifi/patches/101-no_werror.patch b/openwrt/target/linux/package/madwifi/patches/101-no_werror.patch
deleted file mode 100644
index 40eddc6..0000000
--- a/openwrt/target/linux/package/madwifi/patches/101-no_werror.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ru madwifi-ng-r1486-20060329/Makefile.inc madwifi-ng-r1486-20060329-patch/Makefile.inc
---- madwifi-ng-r1486-20060329/Makefile.inc 2006-03-21 15:21:12.000000000 -0500
-+++ madwifi-ng-r1486-20060329-patch/Makefile.inc 2006-03-29 16:44:41.000000000 -0500
-@@ -193,7 +193,7 @@
- #
- TOOLS= ${DEPTH}/tools
-
--COPTS+= -Werror
-+#COPTS+= -Werror
- INCS= -include ${obj}/${DEPTH}/include/compat.h -I${obj}/${DEPTH}/include
-
- ifeq ($(strip ${BUS}),AHB)
diff --git a/openwrt/target/linux/package/madwifi/patches/102-multicall_binary.patch b/openwrt/target/linux/package/madwifi/patches/102-multicall_binary.patch
deleted file mode 100644
index 8f20e46..0000000
--- a/openwrt/target/linux/package/madwifi/patches/102-multicall_binary.patch
+++ /dev/null
@@ -1,740 +0,0 @@
-diff -ruN madwifi-ng-r1486-20060329/102-multicall_binary.patch madwifi-ng-r1486-20060329-patch/102-multicall_binary.patch
---- madwifi-ng-r1486-20060329/102-multicall_binary.patch 1969-12-31 19:00:00.000000000 -0500
-+++ madwifi-ng-r1486-20060329-patch/102-multicall_binary.patch 2006-03-31 10:58:27.000000000 -0500
-@@ -0,0 +1,367 @@
-+diff -urN madwifi-ng-r1416-20060126/tools/80211debug.c madwifi-ng-r1416-20060126-owrt/tools/80211debug.c
-+--- madwifi-ng-r1416-20060126/tools/80211debug.c 2005-11-23 22:23:20.000000000 +0100
-++++ madwifi-ng-r1416-20060126-owrt/tools/80211debug.c 2006-01-26 11:26:44.000000000 +0100
-+@@ -49,6 +49,10 @@
-+ #include <getopt.h>
-+ #include <err.h>
-+
-++#ifdef DOMULTI
-++#include "do_multi.h"
-++#endif
-++
-+ #define N(a) (sizeof(a)/sizeof(a[0]))
-+
-+ const char *progname;
-+@@ -176,9 +180,19 @@
-+ }
-+ #endif /* __linux__ */
-+
-++#ifdef DOMULTI
-++
-++int
-++a80211debug_init(int argc, char *argv[])
-++{
-++
-++#else
-++
-+ int
-+ main(int argc, char *argv[])
-+ {
-++
-++#endif
-+ const char *ifname = "ath0";
-+ const char *cp, *tp;
-+ const char *sep;
-+diff -urN madwifi-ng-r1416-20060126/tools/80211stats.c madwifi-ng-r1416-20060126-owrt/tools/80211stats.c
-+--- madwifi-ng-r1416-20060126/tools/80211stats.c 2005-11-23 22:52:24.000000000 +0100
-++++ madwifi-ng-r1416-20060126-owrt/tools/80211stats.c 2006-01-26 11:26:44.000000000 +0100
-+@@ -58,6 +58,10 @@
-+ #include "net80211/ieee80211_crypto.h"
-+ #include "net80211/ieee80211_ioctl.h"
-+
-++#ifdef DOMULTI
-++#include "do_multi.h"
-++#endif
-++
-+ #ifndef SIOCG80211STATS
-+ #define SIOCG80211STATS (SIOCDEVPRIVATE+2)
-+ #endif
-+@@ -239,9 +243,19 @@
-+ #undef STAT
-+ }
-+
-++#ifdef DOMULTI
-++
-++int
-++a80211stats_init(int argc, char *argv[])
-++{
-++
-++#else
-++
-+ int
-+ main(int argc, char *argv[])
-+ {
-++
-++#endif
-+ int c, len;
-+ struct ieee80211req_sta_info *si;
-+ u_int8_t buf[24*1024], *cp;
-+diff -urN madwifi-ng-r1416-20060126/tools/athchans.c madwifi-ng-r1416-20060126-owrt/tools/athchans.c
-+--- madwifi-ng-r1416-20060126/tools/athchans.c 2005-11-24 00:07:30.000000000 +0100
-++++ madwifi-ng-r1416-20060126-owrt/tools/athchans.c 2006-01-26 11:26:44.000000000 +0100
-+@@ -57,6 +57,10 @@
-+ #include "net80211/ieee80211_crypto.h"
-+ #include "net80211/ieee80211_ioctl.h"
-+
-++#ifdef DOMULTI
-++#include "do_multi.h"
-++#endif
-++
-+ static int s = -1;
-+ const char *progname;
-+
-+@@ -134,9 +138,20 @@
-+ }
-+
-+ #define MAXCHAN ((int)(sizeof(struct ieee80211req_chanlist) * NBBY))
-++
-++#ifdef DOMULTI
-++
-++int
-++athchans_init(int argc, char *argv[])
-++{
-++
-++#else
-++
-+ int
-+ main(int argc, char *argv[])
-+ {
-++
-++#endif
-+ const char *ifname = "wifi0";
-+ struct ieee80211req_chanlist chanlist;
-+ int c;
-+diff -urN madwifi-ng-r1416-20060126/tools/athctrl.c madwifi-ng-r1416-20060126-owrt/tools/athctrl.c
-+--- madwifi-ng-r1416-20060126/tools/athctrl.c 2005-11-23 22:23:20.000000000 +0100
-++++ madwifi-ng-r1416-20060126-owrt/tools/athctrl.c 2006-01-26 11:26:44.000000000 +0100
-+@@ -52,6 +52,10 @@
-+
-+ #include <net/if.h>
-+
-++#ifdef DOMULTI
-++#include "do_multi.h"
-++#endif
-++
-+ static int
-+ setsysctrl(const char *dev, const char *control , u_long value)
-+ {
-+@@ -83,9 +87,19 @@
-+ exit(1);
-+ }
-+
-++#ifdef DOMULTI
-++
-++int
-++athctrl_init(int argc, char *argv[])
-++{
-++
-++#else
-++
-+ int
-+ main(int argc, char *argv[])
-+ {
-++
-++#endif
-+ char device[IFNAMSIZ + 1];
-+ int distance = -1;
-+ int c;
-+diff -urN madwifi-ng-r1416-20060126/tools/athdebug.c madwifi-ng-r1416-20060126-owrt/tools/athdebug.c
-+--- madwifi-ng-r1416-20060126/tools/athdebug.c 2005-11-23 22:23:20.000000000 +0100
-++++ madwifi-ng-r1416-20060126-owrt/tools/athdebug.c 2006-01-26 11:26:44.000000000 +0100
-+@@ -52,6 +52,10 @@
-+ #include <getopt.h>
-+ #include <err.h>
-+
-++#ifdef DOMULTI
-++#include "do_multi.h"
-++#endif
-++
-+ #define N(a) (sizeof(a)/sizeof(a[0]))
-+
-+ const char *progname;
-+@@ -170,9 +174,20 @@
-+ }
-+ #endif /* __linux__ */
-+
-++#ifdef DOMULTI
-++
-++int
-++athdebug_init(int argc, char *argv[])
-++{
-++
-++#else
-++
-+ int
-+ main(int argc, char *argv[])
-+ {
-++
-++#endif
-++
-+ #ifdef __linux__
-+ const char *ifname = "wifi0";
-+ #else
-+diff -urN madwifi-ng-r1416-20060126/tools/athkey.c madwifi-ng-r1416-20060126-owrt/tools/athkey.c
-+--- madwifi-ng-r1416-20060126/tools/athkey.c 2005-11-24 00:07:30.000000000 +0100
-++++ madwifi-ng-r1416-20060126-owrt/tools/athkey.c 2006-01-26 11:26:44.000000000 +0100
-+@@ -57,6 +57,10 @@
-+ #include "net80211/ieee80211_crypto.h"
-+ #include "net80211/ieee80211_ioctl.h"
-+
-++#ifdef DOMULTI
-++#include "do_multi.h"
-++#endif
-++
-+ static int s = -1;
-+ const char *progname;
-+
-+@@ -207,9 +211,19 @@
-+ exit(-1);
-+ }
-+
-++#ifdef DOMULTI
-++
-++int
-++athkey_init(int argc, char *argv[])
-++{
-++
-++#else
-++
-+ int
-+ main(int argc, char *argv[])
-+ {
-++
-++#endif
-+ const char *ifname = "wifi0";
-+ struct ieee80211req_key setkey;
-+ struct ieee80211req_del_key delkey;
-+diff -urN madwifi-ng-r1416-20060126/tools/athstats.c madwifi-ng-r1416-20060126-owrt/tools/athstats.c
-+--- madwifi-ng-r1416-20060126/tools/athstats.c 2006-01-16 09:59:07.000000000 +0100
-++++ madwifi-ng-r1416-20060126-owrt/tools/athstats.c 2006-01-26 11:26:44.000000000 +0100
-+@@ -64,6 +64,10 @@
-+ #include "ah_desc.h"
-+ #include "if_athioctl.h"
-+
-++#ifdef DOMULTI
-++#include "do_multi.h"
-++#endif
-++
-+ static const struct {
-+ u_int phyerr;
-+ const char* desc;
-+@@ -242,9 +246,20 @@
-+ signalled = 1;
-+ }
-+
-++#ifdef DOMULTI
-++
-++int
-++athstats_init(int argc, char *argv[])
-++{
-++
-++#else
-++
-+ int
-+ main(int argc, char *argv[])
-+ {
-++
-++#endif
-++
-+ #ifdef __linux__
-+ const char *ifname = "wifi0";
-+ #else
-+diff -urN madwifi-ng-r1416-20060126/tools/do_multi.c madwifi-ng-r1416-20060126-owrt/tools/do_multi.c
-+--- madwifi-ng-r1416-20060126/tools/do_multi.c 1970-01-01 01:00:00.000000000 +0100
-++++ madwifi-ng-r1416-20060126-owrt/tools/do_multi.c 2006-01-26 11:26:44.000000000 +0100
-+@@ -0,0 +1,30 @@
-++#include <string.h>
-++#include "do_multi.h"
-++
-++int
-++main(int argc, char *argv[])
-++{
-++ char *progname;
-++ int ret = 0;
-++
-++ progname = basename(argv[0]);
-++
-++ if(strcmp(progname, "80211debug") == 0)
-++ ret = a80211debug_init(argc, argv);
-++ if(strcmp(progname, "80211stats") == 0)
-++ ret = a80211stats_init(argc, argv);
-++ if(strcmp(progname, "athchans") == 0)
-++ ret = athchans_init(argc, argv);
-++ if(strcmp(progname, "athctrl") == 0)
-++ ret = athctrl_init(argc, argv);
-++ if(strcmp(progname, "athdebug") == 0)
-++ ret = athdebug_init(argc, argv);
-++ if(strcmp(progname, "athkey") == 0)
-++ ret = athkey_init(argc, argv);
-++ if(strcmp(progname, "athstats") == 0)
-++ ret = athstats_init(argc, argv);
-++ if(strcmp(progname, "wlanconfig") == 0)
-++ ret = wlanconfig_init(argc, argv);
-++
-++ return ret;
-++}
-+diff -urN madwifi-ng-r1416-20060126/tools/do_multi.h madwifi-ng-r1416-20060126-owrt/tools/do_multi.h
-+--- madwifi-ng-r1416-20060126/tools/do_multi.h 1970-01-01 01:00:00.000000000 +0100
-++++ madwifi-ng-r1416-20060126-owrt/tools/do_multi.h 2006-01-26 11:26:44.000000000 +0100
-+@@ -0,0 +1,9 @@
-++
-++int a80211debug_init(int argc, char *argv[]);
-++int a80211stats_init(int argc, char *argv[]);
-++int athchans_init(int argc, char *argv[]);
-++int athctrl_init(int argc, char *argv[]);
-++int athdebug_init(int argc, char *argv[]);
-++int athkey_init(int argc, char *argv[]);
-++int athstats_init(int argc, char *argv[]);
-++int wlanconfig_init(int argc, char *argv[]);
-+diff -urN madwifi-ng-r1416-20060126/tools/Makefile madwifi-ng-r1416-20060126-owrt/tools/Makefile
-+--- madwifi-ng-r1416-20060126/tools/Makefile 2006-01-04 09:16:11.000000000 +0100
-++++ madwifi-ng-r1416-20060126-owrt/tools/Makefile 2006-01-26 14:52:45.000000000 +0100
-+@@ -50,6 +50,12 @@
-+ ALL= athstats 80211stats athkey athchans athctrl \
-+ athdebug 80211debug wlanconfig
-+
-++ifdef DOMULTI
-++OBJS= do_multi.o athstats.o 80211stats.o athkey.o athchans.o athctrl.o \
-++ athdebug.o 80211debug.o wlanconfig.o
-++ALL= ${OBJS} madwifi_multi
-++endif
-++
-+ all: ${ALL}
-+
-+ INCS+= -I. -I${HAL} -I${DEPTH}
-+@@ -59,6 +65,28 @@
-+
-+ all: ${ALL}
-+
-++athstats.o: athstats.c
-++ ${CC} -c -o athstats.o -DDOMULTI=1 ${ALL_CFLAGS} -I../ath athstats.c
-++80211stats.o: 80211stats.c
-++ ${CC} -c -o 80211stats.o -DDOMULTI=1 ${ALL_CFLAGS} 80211stats.c
-++athkey.o: athkey.c
-++ ${CC} -c -o athkey.o -DDOMULTI=1 ${ALL_CFLAGS} athkey.c
-++athchans.o: athchans.c
-++ ${CC} -c -o athchans.o -DDOMULTI=1 ${ALL_CFLAGS} athchans.c
-++athctrl.o: athctrl.c
-++ ${CC} -c -o athctrl.o -DDOMULTI=1 ${ALL_CFLAGS} athctrl.c
-++athdebug.o: athdebug.c
-++ ${CC} -c -o athdebug.o -DDOMULTI=1 ${ALL_CFLAGS} athdebug.c
-++wlanconfig.o: wlanconfig.c
-++ ${CC} -c -o wlanconfig.o -DDOMULTI=1 ${ALL_CFLAGS} wlanconfig.c
-++80211debug.o: 80211debug.c
-++ ${CC} -c -o 80211debug.o -DDOMULTI=1 ${ALL_CFLAGS} 80211debug.c
-++madwifi_multi:
-++ ${CC} -o madwifi_multi ${LDFLAGS} ${OBJS}
-++ for i in athstats 80211stats athkey athchans athctrl athdebug wlanconfig 80211debug; do \
-++ ln -s -f madwifi_multi $$i; \
-++ done
-++
-+ athstats: athstats.c
-+ ${CC} -o athstats ${ALL_CFLAGS} -I../ath ${LDFLAGS} athstats.c
-+ 80211stats: 80211stats.c
-+diff -urN madwifi-ng-r1416-20060126/tools/wlanconfig.c madwifi-ng-r1416-20060126-owrt/tools/wlanconfig.c
-+--- madwifi-ng-r1416-20060126/tools/wlanconfig.c 2006-01-22 10:58:31.000000000 +0100
-++++ madwifi-ng-r1416-20060126-owrt/tools/wlanconfig.c 2006-01-26 11:26:44.000000000 +0100
-+@@ -57,6 +57,10 @@
-+ #include "net80211/ieee80211_crypto.h"
-+ #include "net80211/ieee80211_ioctl.h"
-+
-++#ifdef DOMULTI
-++#include "do_multi.h"
-++#endif
-++
-+ /*
-+ * These are taken from ieee80211_node.h
-+ */
-+@@ -91,9 +95,19 @@
-+
-+ int verbose = 0;
-+
-++#ifdef DOMULTI
-++
-++int
-++wlanconfig_init(int argc, char *argv[])
-++{
-++
-++#else
-++
-+ int
-+ main(int argc, char *argv[])
-+ {
-++
-++#endif
-+ const char *ifname, *cmd;
-+
-+ if (argc < 2)
-diff -ruN madwifi-ng-r1486-20060329/tools/80211debug.c madwifi-ng-r1486-20060329-patch/tools/80211debug.c
---- madwifi-ng-r1486-20060329/tools/80211debug.c 2006-03-10 08:23:50.000000000 -0500
-+++ madwifi-ng-r1486-20060329-patch/tools/80211debug.c 2006-03-31 10:58:27.000000000 -0500
-@@ -49,6 +49,10 @@
- #include <getopt.h>
- #include <err.h>
-
-+#ifdef DOMULTI
-+#include "do_multi.h"
-+#endif
-+
- #define N(a) (sizeof(a)/sizeof(a[0]))
-
- const char *progname;
-@@ -180,9 +184,19 @@
- }
- #endif /* __linux__ */
-
-+#ifdef DOMULTI
-+
-+int
-+a80211debug_init(int argc, char *argv[])
-+{
-+
-+#else
-+
- int
- main(int argc, char *argv[])
- {
-+
-+#endif
- const char *ifname = "ath0";
- const char *cp, *tp;
- const char *sep;
-diff -ruN madwifi-ng-r1486-20060329/tools/80211stats.c madwifi-ng-r1486-20060329-patch/tools/80211stats.c
---- madwifi-ng-r1486-20060329/tools/80211stats.c 2006-03-10 08:23:50.000000000 -0500
-+++ madwifi-ng-r1486-20060329-patch/tools/80211stats.c 2006-03-31 10:58:27.000000000 -0500
-@@ -58,6 +58,10 @@
- #include "net80211/ieee80211_crypto.h"
- #include "net80211/ieee80211_ioctl.h"
-
-+#ifdef DOMULTI
-+#include "do_multi.h"
-+#endif
-+
- #ifndef SIOCG80211STATS
- #define SIOCG80211STATS (SIOCDEVPRIVATE + 2)
- #endif
-@@ -241,9 +245,19 @@
- #undef STAT
- }
-
-+#ifdef DOMULTI
-+
-+int
-+a80211stats_init(int argc, char *argv[])
-+{
-+
-+#else
-+
- int
- main(int argc, char *argv[])
- {
-+
-+#endif
- int c, len;
- struct ieee80211req_sta_info *si;
- u_int8_t buf[24*1024], *cp;
-diff -ruN madwifi-ng-r1486-20060329/tools/Makefile madwifi-ng-r1486-20060329-patch/tools/Makefile
---- madwifi-ng-r1486-20060329/tools/Makefile 2006-01-04 03:16:11.000000000 -0500
-+++ madwifi-ng-r1486-20060329-patch/tools/Makefile 2006-03-31 10:58:27.000000000 -0500
-@@ -50,6 +50,12 @@
- ALL= athstats 80211stats athkey athchans athctrl \
- athdebug 80211debug wlanconfig
-
-+ifdef DOMULTI
-+OBJS= do_multi.o athstats.o 80211stats.o athkey.o athchans.o athctrl.o \
-+ athdebug.o 80211debug.o wlanconfig.o
-+ALL= ${OBJS} madwifi_multi
-+endif
-+
- all: ${ALL}
-
- INCS+= -I. -I${HAL} -I${DEPTH}
-@@ -59,6 +65,30 @@
-
- all: ${ALL}
-
-+athstats.o: athstats.c
-+ ${CC} -c -o athstats.o -DDOMULTI=1 ${ALL_CFLAGS} -I../ath athstats.c
-+80211stats.o: 80211stats.c
-+ ${CC} -c -o 80211stats.o -DDOMULTI=1 ${ALL_CFLAGS} 80211stats.c
-+athkey.o: athkey.c
-+ ${CC} -c -o athkey.o -DDOMULTI=1 ${ALL_CFLAGS} athkey.c
-+athchans.o: athchans.c
-+ ${CC} -c -o athchans.o -DDOMULTI=1 ${ALL_CFLAGS} athchans.c
-+athctrl.o: athctrl.c
-+ ${CC} -c -o athctrl.o -DDOMULTI=1 ${ALL_CFLAGS} athctrl.c
-+athdebug.o: athdebug.c
-+ ${CC} -c -o athdebug.o -DDOMULTI=1 ${ALL_CFLAGS} athdebug.c
-+wlanconfig.o: wlanconfig.c
-+ ${CC} -c -o wlanconfig.o -DDOMULTI=1 ${ALL_CFLAGS} wlanconfig.c
-+80211debug.o: 80211debug.c
-+ ${CC} -c -o 80211debug.o -DDOMULTI=1 ${ALL_CFLAGS} 80211debug.c
-+do_multi.o: do_multi.c
-+ ${CC} -c -o do_multi.o -DDOMULTI=1 ${ALL_CFLAGS} do_multi.c
-+madwifi_multi:
-+ ${CC} -o madwifi_multi ${LDFLAGS} ${OBJS}
-+ for i in athstats 80211stats athkey athchans athctrl athdebug wlanconfig 80211debug; do \
-+ ln -s -f madwifi_multi $$i; \
-+ done
-+
- athstats: athstats.c
- ${CC} -o athstats ${ALL_CFLAGS} -I../ath ${LDFLAGS} athstats.c
- 80211stats: 80211stats.c
-diff -ruN madwifi-ng-r1486-20060329/tools/athchans.c madwifi-ng-r1486-20060329-patch/tools/athchans.c
---- madwifi-ng-r1486-20060329/tools/athchans.c 2006-02-01 15:07:11.000000000 -0500
-+++ madwifi-ng-r1486-20060329-patch/tools/athchans.c 2006-03-31 10:58:27.000000000 -0500
-@@ -57,6 +57,10 @@
- #include "net80211/ieee80211_crypto.h"
- #include "net80211/ieee80211_ioctl.h"
-
-+#ifdef DOMULTI
-+#include "do_multi.h"
-+#endif
-+
- static int s = -1;
- const char *progname;
-
-@@ -134,9 +138,20 @@
- }
-
- #define MAXCHAN ((int)(sizeof(struct ieee80211req_chanlist) * NBBY))
-+
-+#ifdef DOMULTI
-+
-+int
-+athchans_init(int argc, char *argv[])
-+{
-+
-+#else
-+
- int
- main(int argc, char *argv[])
- {
-+
-+#endif
- const char *ifname = "wifi0";
- struct ieee80211req_chanlist chanlist;
- int c;
-diff -ruN madwifi-ng-r1486-20060329/tools/athctrl.c madwifi-ng-r1486-20060329-patch/tools/athctrl.c
---- madwifi-ng-r1486-20060329/tools/athctrl.c 2006-02-03 07:03:03.000000000 -0500
-+++ madwifi-ng-r1486-20060329-patch/tools/athctrl.c 2006-03-31 10:58:27.000000000 -0500
-@@ -53,6 +53,10 @@
-
- #include <net/if.h>
-
-+#ifdef DOMULTI
-+#include "do_multi.h"
-+#endif
-+
- static int
- setsysctrl(const char *dev, const char *control , u_long value)
- {
-@@ -87,9 +91,19 @@
- exit(1);
- }
-
-+#ifdef DOMULTI
-+
-+int
-+athctrl_init(int argc, char *argv[])
-+{
-+
-+#else
-+
- int
- main(int argc, char *argv[])
- {
-+
-+#endif
- char device[IFNAMSIZ + 1];
- int distance = -1;
- int c;
-diff -ruN madwifi-ng-r1486-20060329/tools/athdebug.c madwifi-ng-r1486-20060329-patch/tools/athdebug.c
---- madwifi-ng-r1486-20060329/tools/athdebug.c 2006-03-10 08:23:50.000000000 -0500
-+++ madwifi-ng-r1486-20060329-patch/tools/athdebug.c 2006-03-31 10:58:27.000000000 -0500
-@@ -52,6 +52,10 @@
- #include <getopt.h>
- #include <err.h>
-
-+#ifdef DOMULTI
-+#include "do_multi.h"
-+#endif
-+
- #define N(a) (sizeof(a)/sizeof(a[0]))
-
- const char *progname;
-@@ -171,9 +175,20 @@
- }
- #endif /* __linux__ */
-
-+#ifdef DOMULTI
-+
-+int
-+athdebug_init(int argc, char *argv[])
-+{
-+
-+#else
-+
- int
- main(int argc, char *argv[])
- {
-+
-+#endif
-+
- #ifdef __linux__
- const char *ifname = "wifi0";
- #else
-diff -ruN madwifi-ng-r1486-20060329/tools/athkey.c madwifi-ng-r1486-20060329-patch/tools/athkey.c
---- madwifi-ng-r1486-20060329/tools/athkey.c 2006-02-01 15:07:11.000000000 -0500
-+++ madwifi-ng-r1486-20060329-patch/tools/athkey.c 2006-03-31 10:58:27.000000000 -0500
-@@ -57,6 +57,10 @@
- #include "net80211/ieee80211_crypto.h"
- #include "net80211/ieee80211_ioctl.h"
-
-+#ifdef DOMULTI
-+#include "do_multi.h"
-+#endif
-+
- static int s = -1;
- const char *progname;
-
-@@ -207,9 +211,19 @@
- exit(-1);
- }
-
-+#ifdef DOMULTI
-+
-+int
-+athkey_init(int argc, char *argv[])
-+{
-+
-+#else
-+
- int
- main(int argc, char *argv[])
- {
-+
-+#endif
- const char *ifname = "wifi0";
- struct ieee80211req_key setkey;
- struct ieee80211req_del_key delkey;
-diff -ruN madwifi-ng-r1486-20060329/tools/athstats.c madwifi-ng-r1486-20060329-patch/tools/athstats.c
---- madwifi-ng-r1486-20060329/tools/athstats.c 2006-02-01 15:07:11.000000000 -0500
-+++ madwifi-ng-r1486-20060329-patch/tools/athstats.c 2006-03-31 10:58:27.000000000 -0500
-@@ -64,6 +64,10 @@
- #include "ah_desc.h"
- #include "if_athioctl.h"
-
-+#ifdef DOMULTI
-+#include "do_multi.h"
-+#endif
-+
- static const struct {
- u_int phyerr;
- const char* desc;
-@@ -242,9 +246,20 @@
- signalled = 1;
- }
-
-+#ifdef DOMULTI
-+
-+int
-+athstats_init(int argc, char *argv[])
-+{
-+
-+#else
-+
- int
- main(int argc, char *argv[])
- {
-+
-+#endif
-+
- #ifdef __linux__
- const char *ifname = "wifi0";
- #else
-diff -ruN madwifi-ng-r1486-20060329/tools/do_multi.c madwifi-ng-r1486-20060329-patch/tools/do_multi.c
---- madwifi-ng-r1486-20060329/tools/do_multi.c 1969-12-31 19:00:00.000000000 -0500
-+++ madwifi-ng-r1486-20060329-patch/tools/do_multi.c 2006-03-31 10:58:27.000000000 -0500
-@@ -0,0 +1,30 @@
-+#include <string.h>
-+#include "do_multi.h"
-+
-+int
-+main(int argc, char *argv[])
-+{
-+ char *progname;
-+ int ret = 0;
-+
-+ progname = basename(argv[0]);
-+
-+ if(strcmp(progname, "80211debug") == 0)
-+ ret = a80211debug_init(argc, argv);
-+ if(strcmp(progname, "80211stats") == 0)
-+ ret = a80211stats_init(argc, argv);
-+ if(strcmp(progname, "athchans") == 0)
-+ ret = athchans_init(argc, argv);
-+ if(strcmp(progname, "athctrl") == 0)
-+ ret = athctrl_init(argc, argv);
-+ if(strcmp(progname, "athdebug") == 0)
-+ ret = athdebug_init(argc, argv);
-+ if(strcmp(progname, "athkey") == 0)
-+ ret = athkey_init(argc, argv);
-+ if(strcmp(progname, "athstats") == 0)
-+ ret = athstats_init(argc, argv);
-+ if(strcmp(progname, "wlanconfig") == 0)
-+ ret = wlanconfig_init(argc, argv);
-+
-+ return ret;
-+}
-diff -ruN madwifi-ng-r1486-20060329/tools/do_multi.h madwifi-ng-r1486-20060329-patch/tools/do_multi.h
---- madwifi-ng-r1486-20060329/tools/do_multi.h 1969-12-31 19:00:00.000000000 -0500
-+++ madwifi-ng-r1486-20060329-patch/tools/do_multi.h 2006-03-31 10:58:27.000000000 -0500
-@@ -0,0 +1,9 @@
-+
-+int a80211debug_init(int argc, char *argv[]);
-+int a80211stats_init(int argc, char *argv[]);
-+int athchans_init(int argc, char *argv[]);
-+int athctrl_init(int argc, char *argv[]);
-+int athdebug_init(int argc, char *argv[]);
-+int athkey_init(int argc, char *argv[]);
-+int athstats_init(int argc, char *argv[]);
-+int wlanconfig_init(int argc, char *argv[]);
-diff -ruN madwifi-ng-r1486-20060329/tools/wlanconfig.c madwifi-ng-r1486-20060329-patch/tools/wlanconfig.c
---- madwifi-ng-r1486-20060329/tools/wlanconfig.c 2006-02-01 15:07:11.000000000 -0500
-+++ madwifi-ng-r1486-20060329-patch/tools/wlanconfig.c 2006-03-31 10:58:27.000000000 -0500
-@@ -59,6 +59,10 @@
- #include "net80211/ieee80211_crypto.h"
- #include "net80211/ieee80211_ioctl.h"
-
-+#ifdef DOMULTI
-+#include "do_multi.h"
-+#endif
-+
- /*
- * These are taken from ieee80211_node.h
- */
-@@ -92,9 +96,19 @@
-
- int verbose = 0;
-
-+#ifdef DOMULTI
-+
-+int
-+wlanconfig_init(int argc, char *argv[])
-+{
-+
-+#else
-+
- int
- main(int argc, char *argv[])
- {
-+
-+#endif
- const char *ifname, *cmd;
-
- if (argc < 2)
diff --git a/openwrt/target/linux/package/madwifi/patches/103-disable_rfkill.patch b/openwrt/target/linux/package/madwifi/patches/103-disable_rfkill.patch
deleted file mode 100644
index f5b3de1..0000000
--- a/openwrt/target/linux/package/madwifi/patches/103-disable_rfkill.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -urN madwifi.old/ath/if_ath.c madwifi.dev/ath/if_ath.c
---- madwifi.old/ath/if_ath.c 2006-06-08 17:20:12.000000000 +0200
-+++ madwifi.dev/ath/if_ath.c 2006-06-08 18:30:10.000000000 +0200
-@@ -252,7 +252,7 @@
- static int ath_outdoor = AH_FALSE; /* enable outdoor use */
- static int ath_xchanmode = AH_TRUE; /* enable extended channels */
- static char *autocreate = NULL;
--static int rfkill = -1;
-+static int rfkill = 0;
- static int countrycode = -1;
- static int outdoor = -1;
- static int xchanmode = -1;
diff --git a/openwrt/target/linux/package/madwifi/patches/104-apmode_by_default.patch b/openwrt/target/linux/package/madwifi/patches/104-apmode_by_default.patch
deleted file mode 100644
index bce07b5..0000000
--- a/openwrt/target/linux/package/madwifi/patches/104-apmode_by_default.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ruN madwifi-ng-r1486-20060329/ath/if_ath.c madwifi-ng-r1486-20060329-patch/ath/if_ath.c
---- madwifi-ng-r1486-20060329/ath/if_ath.c 2006-03-23 15:12:18.000000000 -0500
-+++ madwifi-ng-r1486-20060329-patch/ath/if_ath.c 2006-03-31 11:00:30.000000000 -0500
-@@ -388,7 +388,7 @@
- struct ath_hal *ah;
- HAL_STATUS status;
- int error = 0, i;
-- int autocreatemode = IEEE80211_M_STA;
-+ int autocreatemode = IEEE80211_M_HOSTAP;
- u_int8_t csz;
-
- sc->devid = devid;
diff --git a/openwrt/target/linux/package/madwifi/patches/105-slab_fix.patch b/openwrt/target/linux/package/madwifi/patches/105-slab_fix.patch
deleted file mode 100644
index 8de7dc7..0000000
--- a/openwrt/target/linux/package/madwifi/patches/105-slab_fix.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -ruN madwifi-ng-r1590-20060523/net80211/ieee80211_linux.c madwifi-ng-r1590-20060523-patch/net80211/ieee80211_linux.c
---- madwifi-ng-r1590-20060523/net80211/ieee80211_linux.c 2006-06-13 14:26:25 -04:00
-+++ madwifi-ng-r1590-20060523-patch/net80211/ieee80211_linux.c 2006-06-13 14:26:41 -04:00
-@@ -44,6 +44,7 @@
- #include <linux/etherdevice.h>
- #include <linux/if_vlan.h>
- #include <linux/vmalloc.h>
-+#include <linux/slab.h>
-
- #include <net/iw_handler.h>
- #include <linux/wireless.h>
diff --git a/openwrt/target/linux/package/mini_fo/Config.in b/openwrt/target/linux/package/mini_fo/Config.in
deleted file mode 100644
index a92ff97..0000000
--- a/openwrt/target/linux/package/mini_fo/Config.in
+++ /dev/null
@@ -1,6 +0,0 @@
-config BR2_PACKAGE_KMOD_MINI_FO
- prompt "kmod-mini_fo...................... mini fanout overlay file system"
- tristate
- default m if CONFIG_DEVEL
- help
- The mini fanout overlay file system.
diff --git a/openwrt/target/linux/package/mini_fo/Makefile b/openwrt/target/linux/package/mini_fo/Makefile
deleted file mode 100644
index dcd5b91..0000000
--- a/openwrt/target/linux/package/mini_fo/Makefile
+++ /dev/null
@@ -1,42 +0,0 @@
-# $Id$
-
-include $(TOPDIR)/rules.mk
-include ../../rules.mk
-
-PKG_NAME := mini_fo
-PKG_VERSION := 0.6.2pre1
-PKG_RELEASE := 1
-PKG_MD5SUM := acd12157be25d7b3c8df90914049403e
-
-PKG_SOURCE_URL := http://www.denx.de/twiki/pub/Know/MiniFOHome/
-PKG_SOURCE := mini_fo-0-6-2-pre1.tar.bz2
-PKG_CAT := bzcat
-
-PKG_BUILD_DIR := $(BUILD_DIR)/mini_fo-0-6-2-pre1
-PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
-
-include $(TOPDIR)/package/rules.mk
-
-$(eval $(call PKG_template,KMOD_MINI_FO,kmod-mini-fo,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE))))
-
-$(PKG_BUILD_DIR)/.configured:
- touch $@
-
-$(PKG_BUILD_DIR)/.built:
- $(MAKE) -C $(PKG_BUILD_DIR) \
- PATH="$(TARGET_PATH)" \
- ARCH="$(LINUX_KARCH)" \
- CROSS_COMPILE="$(TARGET_CROSS)" \
- KERNELVERSION="$(KERNEL)" \
- KERNEL_SRC="$(LINUX_DIR)" \
- all
- touch $@
-
-$(IPKG_KMOD_MINI_FO):
- install -m0755 -d $(IDIR_KMOD_MINI_FO)/lib/modules/$(LINUX_VERSION)
- install -m0755 -d $(IDIR_KMOD_MINI_FO)/etc/modules.d
- $(CP) $(PKG_BUILD_DIR)/mini_fo.$(LINUX_KMOD_SUFFIX) \
- $(IDIR_KMOD_MINI_FO)/lib/modules/$(LINUX_VERSION)/
- echo "mini_fo" > $(IDIR_KMOD_MINI_FO)/etc/modules.d/15-mini-fo
- $(IPKG_BUILD) $(IDIR_KMOD_MINI_FO) $(PACKAGE_DIR)
-
diff --git a/openwrt/target/linux/package/mini_fo/ipkg/kmod-mini-fo.control b/openwrt/target/linux/package/mini_fo/ipkg/kmod-mini-fo.control
deleted file mode 100644
index 9ccdc5f..0000000
--- a/openwrt/target/linux/package/mini_fo/ipkg/kmod-mini-fo.control
+++ /dev/null
@@ -1,4 +0,0 @@
-Package: kmod-mini-fo
-Priority: optional
-Section: sys
-Description: mini fanout overlay file system
diff --git a/openwrt/target/linux/package/mini_fo/patches/101-kmod_build.patch b/openwrt/target/linux/package/mini_fo/patches/101-kmod_build.patch
deleted file mode 100644
index 9b47a69..0000000
--- a/openwrt/target/linux/package/mini_fo/patches/101-kmod_build.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-diff -Nur mini_fo-0-6-2-pre1/Makefile mini_fo-0-6-2-pre1.patched/Makefile
---- mini_fo-0-6-2-pre1/Makefile 2005-10-15 12:49:43.000000000 +0200
-+++ mini_fo-0-6-2-pre1.patched/Makefile 2005-12-25 14:03:36.864205250 +0100
-@@ -26,36 +26,29 @@
- # allow custom override of TOPINC for fistgen developers
- -include fistdev.mk
-
-+obj-m := mini_fo.o
-+mini_fo-objs := meta.o dentry.o file.o inode.o main.o super.o state.o aux.o
-+
- ifeq ($(KERNELVERSION),2.4)
--CFLAGS = -D__KERNEL__ -DMODULE -DFISTGEN -I. ${TOPINC} -O2 -Wall -Wno-unused -g -fno-common -fno-schedule-insns -fno-schedule-insns2 -fno-strict-aliasing -msoft-float -Werror
--ifeq ($(ARCH),um)
--CFLAGS += $(shell cd $(KERNEL_SRC) ; make script 'SCRIPT=@echo $$(CFLAGS)' ARCH=um)
--endif
--UCFLAGS = -DFISTGEN -I. ${TOPINC} -g -O2 -Wall -Wno-unused -Werror
--endif
-
--CC = $(CROSS_COMPILE)gcc
--LD = $(CROSS_COMPILE)ld
-+O_TARGET := $(obj-m)
-+obj-y := $(mini_fo-objs)
-
--obj-m := mini_fo.o
--mini_fo-objs := meta.o dentry.o file.o inode.o main.o super.o state.o aux.o
-+-include $(TOPDIR)/Rules.make
-+
-+endif
-
- all: mini_fo$(KERNELVERSION)
-
--mini_fo2.4: ${obj-m}
-+mini_fo2.4:
-+ $(MAKE) -C ${KERNEL_SRC} TOPDIR="${KERNEL_SRC}" SUBDIRS=$(shell pwd) modules
-
- mini_fo2.6:
-- make -C ${KERNEL_SRC} SUBDIRS=$(PWD) modules
--
--${obj-m}: ${mini_fo-objs}
-- $(LD) -o ${obj-m} -r ${mini_fo-objs}
--
--tags:
-- ctags -R -e
-+ $(MAKE) -C ${KERNEL_SRC} SUBDIRS=$(shell pwd) modules
-
- clean:
- ifeq ($(KERNELVERSION),2.6)
-- -make -C ${KERNEL_SRC} SUBDIRS=$(PWD) clean
-+ -$(MAKE) -C ${KERNEL_SRC} SUBDIRS=$(shell pwd) clean
- endif
- rm -f ${obj-m} ${mini_fo-objs} ${obj-m:.o=.ko} *.d .*.flags *~
- rm -f TAGS
diff --git a/openwrt/target/linux/package/mini_fo/patches/102-mutex_change.patch b/openwrt/target/linux/package/mini_fo/patches/102-mutex_change.patch
deleted file mode 100644
index 4dec47b..0000000
--- a/openwrt/target/linux/package/mini_fo/patches/102-mutex_change.patch
+++ /dev/null
@@ -1,602 +0,0 @@
-From: <mk@mary.denx.de>
-Date: Tue, 24 Jan 2006 14:09:21 +0000 (+0100)
-Subject: Support for new mutex infrastructure
-X-Git-Url: http://www.denx.de/cgi-bin/gitweb.cgi?p=mini_fo.git;a=commitdiff;h=1dcc028729060ea83ea662155634b33ae8e2c493
-
- Support for new mutex infrastructure
- (7892f2f48d165a34b0b8130c8a195dfd807b8cb6)
----
-
---- a/ChangeLog
-+++ b/ChangeLog
-@@ -1,3 +1,13 @@
-+2006-01-24 Markus Klotzbuecher <mk@mary.denx.de>
-+
-+ * Add tons of ugly ifdefs to Ed L. Cashin's mutex patch to
-+ retain backwards compatibility.
-+
-+2006-01-24 Ed L. Cashin <ecashin@coraid.com>
-+
-+ * Support for the new mutex infrastructure
-+ (7892f2f48d165a34b0b8130c8a195dfd807b8cb6)
-+
- 2005-10-15 Markus Klotzbuecher <mk@localhost.localdomain>
-
- * Bugfix for a serious memory leak in mini_fo_follow_link.
---- a/aux.c
-+++ b/aux.c
-@@ -435,8 +435,11 @@ int build_sto_structure(dentry_t *dir, d
-
- /* was: hidden_sto_dir_dentry = lock_parent(hidden_sto_dentry); */
- hidden_sto_dir_dentry = dget(hidden_sto_dentry->d_parent);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_lock(&hidden_sto_dir_dentry->d_inode->i_mutex);
-+#else
- down(&hidden_sto_dir_dentry->d_inode->i_sem);
--
-+#endif
- /* lets be safe */
- if(dtohd2(dir) != hidden_sto_dir_dentry) {
- printk(KERN_CRIT "mini_fo: build_sto_structure: invalid parameter or meta data corruption [2].\n");
-@@ -457,7 +460,11 @@ int build_sto_structure(dentry_t *dir, d
- if(err) {
- printk(KERN_CRIT "mini_fo: build_sto_structure: failed to create storage dir [1].\n");
- /* was: unlock_dir(dir); */
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_unlock(&dir->d_inode->i_mutex);
-+#else
- up(&dir->d_inode->i_sem);
-+#endif
- dput(dir);
- return err;
- }
-@@ -466,7 +473,11 @@ int build_sto_structure(dentry_t *dir, d
- if(!dtohd2(dentry)->d_inode) {
- printk(KERN_CRIT "mini_fo: build_sto_structure: failed to create storage dir [2].\n");
- /* was: unlock_dir(dir); */
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_unlock(&dir->d_inode->i_mutex);
-+#else
- up(&dir->d_inode->i_sem);
-+#endif
- dput(dir);
- return 1;
- }
-@@ -485,7 +496,11 @@ int build_sto_structure(dentry_t *dir, d
- hidden_sto_dir_dentry->d_inode);
- dir->d_inode->i_nlink++;
- /* was: unlock_dir(hidden_sto_dir_dentry); */
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_unlock(&hidden_sto_dir_dentry->d_inode->i_mutex);
-+#else
- up(&hidden_sto_dir_dentry->d_inode->i_sem);
-+#endif
- dput(hidden_sto_dir_dentry);
- return 0;
- }
---- a/file.c
-+++ b/file.c
-@@ -613,18 +613,34 @@ mini_fo_fsync(file_t *file, dentry_t *de
- if ((hidden_file = ftohf(file)) != NULL) {
- hidden_dentry = dtohd(dentry);
- if (hidden_file->f_op && hidden_file->f_op->fsync) {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_lock(&hidden_dentry->d_inode->i_mutex);
-+#else
- down(&hidden_dentry->d_inode->i_sem);
-+#endif
- err1 = hidden_file->f_op->fsync(hidden_file, hidden_dentry, datasync);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_unlock(&hidden_dentry->d_inode->i_mutex);
-+#else
- up(&hidden_dentry->d_inode->i_sem);
-+#endif
- }
- }
-
- if ((hidden_file = ftohf2(file)) != NULL) {
- hidden_dentry = dtohd2(dentry);
- if (hidden_file->f_op && hidden_file->f_op->fsync) {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_lock(&hidden_dentry->d_inode->i_mutex);
-+#else
- down(&hidden_dentry->d_inode->i_sem);
-+#endif
- err2 = hidden_file->f_op->fsync(hidden_file, hidden_dentry, datasync);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_unlock(&hidden_dentry->d_inode->i_mutex);
-+#else
- up(&hidden_dentry->d_inode->i_sem);
-+#endif
- }
- }
- else
---- a/inode.c
-+++ b/inode.c
-@@ -355,7 +355,11 @@ mini_fo_link(dentry_t *old_dentry, inode
-
- /* was: hidden_dir_dentry = lock_parent(hidden_new_dentry); */
- hidden_dir_dentry = dget(hidden_new_dentry->d_parent);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_lock(&hidden_dir_dentry->d_inode->i_mutex);
-+#else
- down(&hidden_dir_dentry->d_inode->i_sem);
-+#endif
-
- err = vfs_link(hidden_old_dentry,
- hidden_dir_dentry->d_inode,
-@@ -374,7 +378,11 @@ mini_fo_link(dentry_t *old_dentry, inode
-
- out_lock:
- /* was: unlock_dir(hidden_dir_dentry); */
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_unlock(&hidden_dir_dentry->d_inode->i_mutex);
-+#else
- up(&hidden_dir_dentry->d_inode->i_sem);
-+#endif
- dput(hidden_dir_dentry);
-
- dput(hidden_new_dentry);
-@@ -452,7 +460,11 @@ mini_fo_symlink(inode_t *dir, dentry_t *
- dget(hidden_sto_dentry);
- /* was: hidden_sto_dir_dentry = lock_parent(hidden_sto_dentry); */
- hidden_sto_dir_dentry = dget(hidden_sto_dentry->d_parent);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_lock(&hidden_sto_dir_dentry->d_inode->i_mutex);
-+#else
- down(&hidden_sto_dir_dentry->d_inode->i_sem);
-+#endif
-
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
- mode = S_IALLUGO;
-@@ -481,7 +493,11 @@ mini_fo_symlink(inode_t *dir, dentry_t *
-
- out_lock:
- /* was: unlock_dir(hidden_sto_dir_dentry); */
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_unlock(&hidden_sto_dir_dentry->d_inode->i_mutex);
-+#else
- up(&hidden_sto_dir_dentry->d_inode->i_sem);
-+#endif
- dput(hidden_sto_dir_dentry);
-
- dput(hidden_sto_dentry);
-@@ -524,7 +540,11 @@ mini_fo_rmdir(inode_t *dir, dentry_t *de
-
- /* was:hidden_sto_dir_dentry = lock_parent(hidden_sto_dentry); */
- hidden_sto_dir_dentry = dget(hidden_sto_dentry->d_parent);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_lock(&hidden_sto_dir_dentry->d_inode->i_mutex);
-+#else
- down(&hidden_sto_dir_dentry->d_inode->i_sem);
-+#endif
-
- /* avoid destroying the hidden inode if the file is in use */
- dget(hidden_sto_dentry);
-@@ -572,7 +592,11 @@ mini_fo_rmdir(inode_t *dir, dentry_t *de
- dentry->d_name.len);
- }
- /* was: unlock_dir(hidden_sto_dir_dentry); */
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_unlock(&hidden_sto_dir_dentry->d_inode->i_mutex);
-+#else
- up(&hidden_sto_dir_dentry->d_inode->i_sem);
-+#endif
- dput(hidden_sto_dir_dentry);
- goto out;
- }
-@@ -602,7 +626,12 @@ mini_fo_rmdir(inode_t *dir, dentry_t *de
-
- /* was: hidden_sto_dir_dentry = lock_parent(hidden_sto_dentry);*/
- hidden_sto_dir_dentry = dget(hidden_sto_dentry->d_parent);
-+
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_lock(&hidden_sto_dir_dentry->d_inode->i_mutex);
-+#else
- down(&hidden_sto_dir_dentry->d_inode->i_sem);
-+#endif
-
- /* avoid destroying the hidden inode if the file is in use */
- dget(hidden_sto_dentry);
-@@ -630,7 +659,11 @@ mini_fo_rmdir(inode_t *dir, dentry_t *de
- dtopd(dentry)->state = NON_EXISTANT;
-
- /* was: unlock_dir(hidden_sto_dir_dentry); */
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_unlock(&hidden_sto_dir_dentry->d_inode->i_mutex);
-+#else
- up(&hidden_sto_dir_dentry->d_inode->i_sem);
-+#endif
- dput(hidden_sto_dir_dentry);
-
- goto out;
-@@ -641,7 +674,12 @@ mini_fo_rmdir(inode_t *dir, dentry_t *de
-
- /* was: hidden_sto_dir_dentry = lock_parent(hidden_sto_dentry);*/
- hidden_sto_dir_dentry = dget(hidden_sto_dentry->d_parent);
-+
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_lock(&hidden_sto_dir_dentry->d_inode->i_mutex);
-+#else
- down(&hidden_sto_dir_dentry->d_inode->i_sem);
-+#endif
-
- /* avoid destroying the hidden inode if the file is in use */
- dget(hidden_sto_dentry);
-@@ -668,7 +706,12 @@ mini_fo_rmdir(inode_t *dir, dentry_t *de
- dentry->d_inode->i_nlink = itohi2(dentry->d_inode)->i_nlink;
- dtopd(dentry)->state = DELETED;
- /* was: unlock_dir(hidden_sto_dir_dentry); */
-+
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_unlock(&hidden_sto_dir_dentry->d_inode->i_mutex);
-+#else
- up(&hidden_sto_dir_dentry->d_inode->i_sem);
-+#endif
- dput(hidden_sto_dir_dentry);
- goto out;
- }
-@@ -1294,11 +1337,19 @@ mini_fo_getxattr(struct dentry *dentry,
- encoded_name = (char *)name;
- encoded_value = (char *)value;
-
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_lock(&hidden_dentry->d_inode->i_mutex);
-+#else
- down(&hidden_dentry->d_inode->i_sem);
-+#endif
- /* lock_kernel() already done by caller. */
- err = hidden_dentry->d_inode->i_op->getxattr(hidden_dentry, encoded_name, encoded_value, size);
- /* unlock_kernel() will be done by caller. */
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_lock(&hidden_dentry->d_inode->i_mutex);
-+#else
- up(&hidden_dentry->d_inode->i_sem);
-+#endif
- }
- return err;
- }
-@@ -1340,11 +1391,19 @@ mini_fo_setxattr(struct dentry *dentry,
- encoded_name = (char *)name;
- encoded_value = (char *)value;
-
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_lock(&hidden_dentry->d_inode->i_mutex);
-+#else
- down(&hidden_dentry->d_inode->i_sem);
-+#endif
- /* lock_kernel() already done by caller. */
- err = hidden_dentry->d_inode->i_op->setxattr(hidden_dentry, encoded_name, encoded_value, size, flags);
- /* unlock_kernel() will be done by caller. */
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_unlock(&hidden_dentry->d_inode->i_mutex);
-+#else
- up(&hidden_dentry->d_inode->i_sem);
-+#endif
- }
- return err;
- }
-@@ -1372,11 +1431,19 @@ mini_fo_removexattr(struct dentry *dentr
- if (hidden_dentry->d_inode->i_op->removexattr) {
- encoded_name = (char *)name;
-
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_lock(&hidden_dentry->d_inode->i_mutex);
-+#else
- down(&hidden_dentry->d_inode->i_sem);
-+#endif
- /* lock_kernel() already done by caller. */
- err = hidden_dentry->d_inode->i_op->removexattr(hidden_dentry, encoded_name);
- /* unlock_kernel() will be done by caller. */
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_unlock(&hidden_dentry->d_inode->i_mutex);
-+#else
- up(&hidden_dentry->d_inode->i_sem);
-+#endif
- }
- return err;
- }
-@@ -1403,11 +1470,20 @@ mini_fo_listxattr(struct dentry *dentry,
-
- if (hidden_dentry->d_inode->i_op->listxattr) {
- encoded_list = list;
-+
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_lock(&hidden_dentry->d_inode->i_mutex);
-+#else
- down(&hidden_dentry->d_inode->i_sem);
-+#endif
- /* lock_kernel() already done by caller. */
- err = hidden_dentry->d_inode->i_op->listxattr(hidden_dentry, encoded_list, size);
- /* unlock_kernel() will be done by caller. */
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_unlock(&hidden_dentry->d_inode->i_mutex);
-+#else
- up(&hidden_dentry->d_inode->i_sem);
-+#endif
- }
- return err;
- }
---- a/meta.c
-+++ b/meta.c
-@@ -650,9 +650,20 @@ int meta_sync_d_list(dentry_t *dentry, i
- struct iattr newattrs;
- newattrs.ia_size = 0;
- newattrs.ia_valid = ATTR_SIZE | ATTR_CTIME;
-+
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_lock(&meta_dentry->d_inode->i_mutex);
-+#else
- down(&meta_dentry->d_inode->i_sem);
-+#endif
- err = notify_change(meta_dentry, &newattrs);
-+
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_unlock(&meta_dentry->d_inode->i_mutex);
-+#else
- up(&meta_dentry->d_inode->i_sem);
-+#endif
-+
- if(err || meta_dentry->d_inode->i_size != 0) {
- printk(KERN_CRIT "mini_fo: meta_sync_d_list: \
- ERROR truncating meta file.\n");
-@@ -780,9 +791,19 @@ int meta_sync_r_list(dentry_t *dentry, i
- struct iattr newattrs;
- newattrs.ia_size = 0;
- newattrs.ia_valid = ATTR_SIZE | ATTR_CTIME;
-+
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_lock(&meta_dentry->d_inode->i_mutex);
-+#else
- down(&meta_dentry->d_inode->i_sem);
-+#endif
- err = notify_change(meta_dentry, &newattrs);
-+
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_unlock(&meta_dentry->d_inode->i_mutex);
-+#else
- up(&meta_dentry->d_inode->i_sem);
-+#endif
- if(err || meta_dentry->d_inode->i_size != 0) {
- printk(KERN_CRIT "mini_fo: meta_sync_r_list: \
- ERROR truncating meta file.\n");
---- a/mini_fo.h
-+++ b/mini_fo.h
-@@ -433,6 +433,33 @@ fist_copy_attr_all(inode_t *dest, const
-
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
- /* copied from linux/fs.h */
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+static inline void double_lock(struct dentry *d1, struct dentry *d2)
-+{
-+ struct mutex *m1 = &d1->d_inode->i_mutex;
-+ struct mutex *m2 = &d2->d_inode->i_mutex;
-+ if (m1 != m2) {
-+ if ((unsigned long) m1 < (unsigned long) m2) {
-+ struct mutex *tmp = m2;
-+ m2 = m1; m1 = tmp;
-+ }
-+ mutex_lock(m1);
-+ }
-+ mutex_lock(m2);
-+}
-+
-+static inline void double_unlock(struct dentry *d1, struct dentry *d2)
-+{
-+ struct mutex *m1 = &d1->d_inode->i_mutex;
-+ struct mutex *m2 = &d2->d_inode->i_mutex;
-+ mutex_unlock(m1);
-+ if (m1 != m2)
-+ mutex_unlock(m2);
-+ dput(d1);
-+ dput(d2);
-+}
-+
-+#else
- static inline void double_down(struct semaphore *s1, struct semaphore *s2)
- {
- if (s1 != s2) {
-@@ -463,8 +490,8 @@ static inline void double_unlock(struct
- dput(d1);
- dput(d2);
- }
--
--#endif
-+#endif /* if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16) */
-+#endif /* if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) */
- #endif /* __KERNEL__ */
-
- /*
---- a/mmap.c
-+++ b/mmap.c
-@@ -478,7 +478,11 @@ mini_fo_commit_write(file_t *file, page_
- if (ftopd(file) != NULL)
- hidden_file = ftohf(file);
-
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_lock(&hidden_inode->i_mutex);
-+#else
- down(&hidden_inode->i_sem);
-+#endif
- /* find lower page (returns a locked page) */
- hidden_page = grab_cache_page(hidden_inode->i_mapping, page->index);
- if (!hidden_page)
-@@ -556,7 +560,12 @@ mini_fo_commit_write(file_t *file, page_
- ClearPageUptodate(page);
- else
- SetPageUptodate(page);
-+
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_unlock(&hidden_inode->i_mutex);
-+#else
- up(&hidden_inode->i_sem);
-+#endif
- print_exit_status(err);
- return err; /* assume all is ok */
- }
---- a/state.c
-+++ b/state.c
-@@ -44,7 +44,12 @@ int create_sto_reg_file(dentry_t *dentry
-
- /* lock parent */
- hidden_sto_dir_dentry = dget(hidden_sto_dentry->d_parent);
-+
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_lock(&hidden_sto_dir_dentry->d_inode->i_mutex);
-+#else
- down(&hidden_sto_dir_dentry->d_inode->i_sem);
-+#endif
-
- err = PTR_ERR(hidden_sto_dir_dentry);
- if (IS_ERR(hidden_sto_dir_dentry))
-@@ -97,7 +102,11 @@ int create_sto_reg_file(dentry_t *dentry
- hidden_sto_dir_dentry->d_inode);
-
- out_lock:
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_unlock(&hidden_sto_dir_dentry->d_inode->i_mutex);
-+#else
- up(&hidden_sto_dir_dentry->d_inode->i_sem);
-+#endif
- dput(hidden_sto_dir_dentry);
- out:
- return err;
-@@ -130,7 +139,12 @@ n");
-
- /* was: hidden_sto_dir_dentry = lock_parent(hidden_sto_dentry); */
- hidden_sto_dir_dentry = dget(hidden_sto_dentry->d_parent);
-+
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_lock(&hidden_sto_dir_dentry->d_inode->i_mutex);
-+#else
- down(&hidden_sto_dir_dentry->d_inode->i_sem);
-+#endif
-
- err = PTR_ERR(hidden_sto_dir_dentry);
- if (IS_ERR(hidden_sto_dir_dentry))
-@@ -184,7 +198,11 @@ n");
-
- out_lock:
- /* was: unlock_dir(hidden_sto_dir_dentry); */
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_unlock(&hidden_sto_dir_dentry->d_inode->i_mutex);
-+#else
- up(&hidden_sto_dir_dentry->d_inode->i_sem);
-+#endif
- dput(hidden_sto_dir_dentry);
- out:
- return err;
-@@ -217,7 +235,12 @@ int create_sto_nod(dentry_t *dentry, int
-
- /* lock parent */
- hidden_sto_dir_dentry = dget(hidden_sto_dentry->d_parent);
-+
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_lock(&hidden_sto_dir_dentry->d_inode->i_mutex);
-+#else
- down(&hidden_sto_dir_dentry->d_inode->i_sem);
-+#endif
-
- err = PTR_ERR(hidden_sto_dir_dentry);
- if (IS_ERR(hidden_sto_dir_dentry))
-@@ -260,7 +283,11 @@ int create_sto_nod(dentry_t *dentry, int
- fist_copy_attr_timesizes(dir, hidden_sto_dir_dentry->d_inode);
-
- out_lock:
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_unlock(&hidden_sto_dir_dentry->d_inode->i_mutex);
-+#else
- up(&hidden_sto_dir_dentry->d_inode->i_sem);
-+#endif
- dput(hidden_sto_dir_dentry);
- out:
- return err;
-@@ -314,7 +341,12 @@ int nondir_unmod_to_mod(dentry_t *dentry
-
- /* lock parent */
- hidden_sto_dir_dentry = dget(hidden_sto_dentry->d_parent);
-+
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_lock(&hidden_sto_dir_dentry->d_inode->i_mutex);
-+#else
- down(&hidden_sto_dir_dentry->d_inode->i_sem);
-+#endif
-
- err = PTR_ERR(hidden_sto_dir_dentry);
- if (IS_ERR(hidden_sto_dir_dentry))
-@@ -365,7 +397,12 @@ int nondir_unmod_to_mod(dentry_t *dentry
- if((cp_flag == 1) && S_ISREG(dentry->d_inode->i_mode)) {
-
- /* unlock first */
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_unlock(&hidden_sto_dir_dentry->d_inode->i_mutex);
-+#else
- up(&hidden_sto_dir_dentry->d_inode->i_sem);
-+#endif
-+
- dput(hidden_sto_dir_dentry);
-
- tgt_dentry = dtohd2(dentry);
-@@ -383,7 +420,11 @@ int nondir_unmod_to_mod(dentry_t *dentry
- }
-
- out_lock:
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_unlock(&hidden_sto_dir_dentry->d_inode->i_mutex);
-+#else
- up(&hidden_sto_dir_dentry->d_inode->i_sem);
-+#endif
- dput(hidden_sto_dir_dentry);
- out:
- return err;
-@@ -420,7 +461,12 @@ int nondir_creat_to_del(dentry_t *dentry
-
- /* was: hidden_sto_dir_dentry = lock_parent(hidden_sto_dentry);*/
- hidden_sto_dir_dentry = dget(hidden_sto_dentry->d_parent);
-+
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_lock(&hidden_sto_dir_dentry->d_inode->i_mutex);
-+#else
- down(&hidden_sto_dir_dentry->d_inode->i_sem);
-+#endif
-
- /* avoid destroying the hidden inode if the file is in use */
- dget(hidden_sto_dentry);
-@@ -435,7 +481,11 @@ int nondir_creat_to_del(dentry_t *dentry
- dtost(dentry) = NON_EXISTANT;
-
- /* was: unlock_dir(hidden_sto_dir_dentry); */
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_unlock(&hidden_sto_dir_dentry->d_inode->i_mutex);
-+#else
- up(&hidden_sto_dir_dentry->d_inode->i_sem);
-+#endif
- dput(hidden_sto_dir_dentry);
-
- out:
-@@ -464,7 +514,12 @@ int nondir_mod_to_del(dentry_t *dentry)
-
- /* was hidden_sto_dir_dentry = lock_parent(hidden_sto_dentry); */
- hidden_sto_dir_dentry = dget(hidden_sto_dentry->d_parent);
-+
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_lock(&hidden_sto_dir_dentry->d_inode->i_mutex);
-+#else
- down(&hidden_sto_dir_dentry->d_inode->i_sem);
-+#endif
-
- /* avoid destroying the hidden inode if the file is in use */
- dget(hidden_sto_dentry);
-@@ -488,7 +543,11 @@ int nondir_mod_to_del(dentry_t *dentry)
- dentry->d_name.len);
-
- /* was: unlock_dir(hidden_sto_dir_dentry); */
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-+ mutex_unlock(&hidden_sto_dir_dentry->d_inode->i_mutex);
-+#else
- up(&hidden_sto_dir_dentry->d_inode->i_sem);
-+#endif
- dput(hidden_sto_dir_dentry);
-
- out:
-
diff --git a/openwrt/target/linux/package/openswan/Config.in b/openwrt/target/linux/package/openswan/Config.in
deleted file mode 100644
index 59a943f..0000000
--- a/openwrt/target/linux/package/openswan/Config.in
+++ /dev/null
@@ -1,10 +0,0 @@
-config BR2_PACKAGE_KMOD_OPENSWAN
- prompt "kmod-openswan..................... Openswan kernel module"
- tristate
- default m if CONFIG_DEVEL
- help
- Openswan is an implementation of IPsec for Linux.
-
- http://www.openswan.org/
-
- This package contains the Openswan IPSec module for the kernel
diff --git a/openwrt/target/linux/package/openswan/Makefile b/openwrt/target/linux/package/openswan/Makefile
deleted file mode 100644
index 0a82895..0000000
--- a/openwrt/target/linux/package/openswan/Makefile
+++ /dev/null
@@ -1,36 +0,0 @@
-# $Id$
-
-include $(TOPDIR)/rules.mk
-include ../../rules.mk
-
-PKG_NAME:=openswan
-PKG_VERSION:=2.4.5
-PKG_RELEASE:=1
-PKG_MD5SUM:=a9a8e88313faceebfc5ceb1a9da9a3c4
-
-PKG_SOURCE_URL:=http://www.openswan.org/download
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_CAT:=zcat
-
-include $(TOPDIR)/package/rules.mk
-
-$(eval $(call PKG_template,KMOD_OPENSWAN,kmod-openswan,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE))))
-
-FLAGS := $(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)/linux/include -L$(STAGING_DIR)/usr/lib -I$(STAGING_DIR)/usr/include
-
-$(PKG_BUILD_DIR)/.built:
- $(MAKE) -C $(PKG_BUILD_DIR) \
- $(TARGET_CONFIGURE_OPTS) \
- LINUX_RELEASE="$(LINUX_RELEASE)" \
- KERNELSRC="$(LINUX_DIR)" \
- ARCH="$(LINUX_KARCH)" \
- CROSS_COMPILE="$(TARGET_CROSS)" \
- USERCOMPILE="$(FLAGS)" \
- AS="$(TARGET_CC) -c $(TARGET_CFLAGS)" \
- module
-
-$(IPKG_KMOD_OPENSWAN):
- mkdir -p $(IDIR_KMOD_OPENSWAN)/lib/modules/$(LINUX_VERSION)
- $(CP) $(PKG_BUILD_DIR)/modobj*/ipsec.$(LINUX_KMOD_SUFFIX) $(IDIR_KMOD_OPENSWAN)/lib/modules/$(LINUX_VERSION)/
- $(IPKG_BUILD) $(IDIR_KMOD_OPENSWAN) $(PACKAGE_DIR)
diff --git a/openwrt/target/linux/package/openswan/ipkg/kmod-openswan.control b/openwrt/target/linux/package/openswan/ipkg/kmod-openswan.control
deleted file mode 100644
index f06c80c..0000000
--- a/openwrt/target/linux/package/openswan/ipkg/kmod-openswan.control
+++ /dev/null
@@ -1,4 +0,0 @@
-Package: kmod-openswan
-Priority: optional
-Section: net
-Description: Openswan IPSec kernel module
diff --git a/openwrt/target/linux/package/openswan/patches/101-arp_header.patch b/openwrt/target/linux/package/openswan/patches/101-arp_header.patch
deleted file mode 100644
index 7375f65..0000000
--- a/openwrt/target/linux/package/openswan/patches/101-arp_header.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -Nur openswan-2.4.5rc5/linux/net/ipsec/ipsec_tunnel.c openswan-2.4.5rc5.patched/linux/net/ipsec/ipsec_tunnel.c
---- openswan-2.4.5rc5/linux/net/ipsec/ipsec_tunnel.c 2005-11-22 05:11:52.000000000 +0100
-+++ openswan-2.4.5rc5.patched/linux/net/ipsec/ipsec_tunnel.c 2006-03-29 01:13:35.000000000 +0200
-@@ -33,6 +33,7 @@
- #include <linux/types.h> /* size_t */
- #include <linux/interrupt.h> /* mark_bh */
-
-+#include <net/arp.h>
- #include <net/tcp.h>
- #include <net/udp.h>
- #include <linux/skbuff.h>
diff --git a/openwrt/target/linux/package/shfs/Config.in b/openwrt/target/linux/package/shfs/Config.in
deleted file mode 100644
index 61bd54b..0000000
--- a/openwrt/target/linux/package/shfs/Config.in
+++ /dev/null
@@ -1,22 +0,0 @@
-config BR2_PACKAGE_KMOD_SHFS
- prompt "kmod-shfs......................... Shell FileSystem kernel module (ShFS) kernel module"
- tristate
- default m if CONFIG_DEVEL
- help
- ShFS is a simple and easy to use Linux kernel module which
- allows you to mount remote filesystems using a plain shell
- (SSH) connection. When using ShFS, you can access all remote
- files just like the local ones, only the access is governed
- through the transport security of SSH.
-
- ShFS supports some nice features:
-
- * file cache for access speedup
- * perl and shell code for the remote (server) side
- * could preserve uid/gid (root connection)
- * number of remote host platforms (Linux, Solaris, Cygwin, ...)
- * Linux kernel 2.4.10+ and 2.6
- * arbitrary command used for connection (instead of SSH)
- * persistent connection (reconnect after SSH dies)
-
- http://shfs.sourceforge.net/
diff --git a/openwrt/target/linux/package/shfs/Makefile b/openwrt/target/linux/package/shfs/Makefile
deleted file mode 100644
index 4625bdb..0000000
--- a/openwrt/target/linux/package/shfs/Makefile
+++ /dev/null
@@ -1,46 +0,0 @@
-# $Id$
-
-include $(TOPDIR)/rules.mk
-include ../../rules.mk
-
-PKG_NAME:=shfs
-PKG_VERSION:=0.35
-PKG_RELEASE:=2
-PKG_MD5SUM:=016f49d71bc32eee2b5d11fc1600cfbe
-
-PKG_SOURCE_URL:=@SF/shfs
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_CAT:=zcat
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
-
-include $(TOPDIR)/package/rules.mk
-
-$(eval $(call PKG_template,KMOD_SHFS,kmod-shfs,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE))))
-
-$(PKG_BUILD_DIR)/.configured:
- touch $@
-
-$(PKG_BUILD_DIR)/.built:
- rm -rf $(PKG_INSTALL_DIR)
- mkdir -p $(PKG_INSTALL_DIR)
- $(MAKE) -C $(PKG_BUILD_DIR) \
- ARCH="$(LINUX_KARCH)" \
- CROSS_COMPILE="$(TARGET_CROSS)" \
- PATH="$(TARGET_PATH)" \
- OFLAGS="$(TARGET_CFLAGS)" \
- CC="$(TARGET_CC)" \
- LINKER="$(TARGET_CC)" \
- KERNEL="$(LINUX_VERSION)" \
- KERNEL_SOURCES="$(LINUX_DIR)" \
- ROOT="$(PKG_INSTALL_DIR)" \
- module module-install
- touch $@
-
-$(IPKG_KMOD_SHFS):
- install -m0755 -d $(IDIR_KMOD_SHFS)/lib/modules/$(LINUX_VERSION)
- $(CP) $(PKG_INSTALL_DIR)/lib/modules/$(LINUX_VERSION)/kernel/fs/shfs/shfs.$(LINUX_KMOD_SUFFIX) \
- $(IDIR_KMOD_SHFS)/lib/modules/$(LINUX_VERSION)/
- $(IPKG_BUILD) $(IDIR_KMOD_SHFS) $(PACKAGE_DIR)
-
diff --git a/openwrt/target/linux/package/shfs/ipkg/kmod-shfs.control b/openwrt/target/linux/package/shfs/ipkg/kmod-shfs.control
deleted file mode 100644
index 240efe6..0000000
--- a/openwrt/target/linux/package/shfs/ipkg/kmod-shfs.control
+++ /dev/null
@@ -1,4 +0,0 @@
-Package: kmod-shfs
-Priority: optional
-Section: sys
-Description: SHell FileSystem Linux kernel module
diff --git a/openwrt/target/linux/package/shfs/patches/101-kmod_build.patch b/openwrt/target/linux/package/shfs/patches/101-kmod_build.patch
deleted file mode 100644
index 1170103..0000000
--- a/openwrt/target/linux/package/shfs/patches/101-kmod_build.patch
+++ /dev/null
@@ -1,98 +0,0 @@
---- shfs-0.35-orig/shfs/Linux-2.4/Makefile 2004-06-01 15:16:19.000000000 +0200
-+++ shfs-0.35-2/shfs/Linux-2.4/Makefile 2005-04-09 02:34:35.000000000 +0200
-@@ -1,3 +1,13 @@
-+#
-+# the original Makefile was trashed and replaced by this one
-+# The main reason is that loadable modules should be built with
-+# the same compile flags the kernel was built with, so we'd better
-+# let the kernel tree build the module for us, like that :
-+#
-+# make -C $(KERNEL_DIR) SUBDIRS="$(shell pwd)" modules
-+# make -C $(KERNEL_DIR) SUBDIRS="$(shell pwd)" modules_install
-+#
-+
- ifndef KERNEL
- KERNEL=$(shell uname -r)
- endif
-@@ -10,67 +24,29 @@
- KERNEL_SOURCES=${MODULESDIR}/build
- endif
-
--ifeq (${MODVERSIONS},detect)
-- ifeq ($(shell test -e ${KERNEL_SOURCES}/include/linux/modversions.h; echo $$?),0)
-- MODVERSIONS=yes
-- endif
--endif
--
--ifeq (${MODVERSIONS},yes)
--MVER=-DMODVERSIONS -DEXPORT_SYMTAB
--endif
--
--LINVER=linux-${KERNEL}
--
--ALL_TARGETS := shfs.o
--
--SEARCHDIRS := -I- -I. -I${KERNEL_SOURCES}/include #-I/usr/src/linux/include/
-+all: all-y
-
--CC := gcc
--CFLAGS = -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -Wall ${SEARCHDIRS} -DMODULE ${MVER} -D__KERNEL__ -DLINUX
--LINKER := ld
--LDFLAGS = -r
--LOADLIBES :=
-+O_TARGET := shfs.o
-
--all: ${ALL_TARGETS}
-+shfs-objs := dcache.o dir.o fcache.o file.o inode.o ioctl.o proc.o shell.o symlink.o
-
--%.o: %.c $(wildcard *.h)
-- ${CC} ${CFLAGS} -c $< -o $@
-+obj-y := $(shfs-objs)
-+obj-m := $(O_TARGET)
-
--shfs.o: dcache.o dir.o fcache.o file.o inode.o ioctl.o proc.o shell.o symlink.o
-- ${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LOADLIBES}
--
--tidy:
-- ${RM} core dcache.o dir.o fcache.o file.o inode.o ioctl.o proc.o shell.o symlink.o
--
--clean: tidy patch-clean
-- ${RM} shfs.o
-+-include $(TOPDIR)/Rules.make
-
-+all-y:
-+ make -C ${KERNEL_SOURCES} TOPDIR="${KERNEL_SOURCES}" SUBDIRS="$(shell pwd)" modules
-+
- install: shfs.o
- rm -f ${MODULESDIR}/kernel/fs/shfs/shfs.o
- install -m644 -b -D shfs.o ${MODULESDIR}/kernel/fs/shfs/shfs.o
-- if [ -x /sbin/depmod -a "${ROOT}" = "/" ]; then /sbin/depmod -aq; fi
-
- uninstall:
- rm -rf ${MODULESDIR}/kernel/fs/shfs
-- if [ -x /sbin/depmod -a "${ROOT}" = "/" ]; then /sbin/depmod -aq; fi
-
--patch:
-- rm -rf ${LINVER} ${LINVER}.orig; mkdir ${LINVER};
-- for i in Documentation fs/shfs include/linux; do \
-- mkdir -p ${LINVER}/$$i; \
-- done
-- cp ${KERNEL_SOURCES}/Documentation/Configure.help ${LINVER}/Documentation
-- cp ${KERNEL_SOURCES}/fs/{Makefile,Config.in} ${LINVER}/fs
-- cp -r ${LINVER} ${LINVER}.orig
-- cp ../../Changelog *.c shfs_debug.h proc.h ${LINVER}/fs/shfs/
-- cp shfs.h shfs_fs* ${LINVER}/include/linux/
-- (cd ${LINVER}; patch -p1 <../kernel-config.diff)
-- find . -type f -name "*.orig" -print | xargs rm -f
-- diff -urN ${LINVER}.orig ${LINVER} >${LINVER}.diff; true
--
--patch-clean:
-- rm -rf ${LINVER} ${LINVER}.orig;
-- rm -f ${LINVER}.diff
--
--.PHONY : all tidy clean install uninstall patch patch-clean
-+clean:
-+ rm -f core *.o *.a *.s
-+
-+shfs.o: $(shfs-objs)
-+
diff --git a/openwrt/target/linux/package/shfs/patches/102-gcc4_fix.patch b/openwrt/target/linux/package/shfs/patches/102-gcc4_fix.patch
deleted file mode 100644
index c4fd366..0000000
--- a/openwrt/target/linux/package/shfs/patches/102-gcc4_fix.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-diff -ur shfs-0.35/shfs/Linux-2.6/dir.c shfs-0.35-new/shfs/Linux-2.6/dir.c
---- shfs-0.35/shfs/Linux-2.6/dir.c 2004-06-01 09:16:19.000000000 -0400
-+++ shfs-0.35-new/shfs/Linux-2.6/dir.c 2005-02-11 18:12:00.000000000 -0500
-@@ -19,6 +19,8 @@
- #include "shfs_debug.h"
- #include "proc.h"
-
-+static struct dentry_operations shfs_dentry_operations;
-+
- static int
- shfs_dir_open(struct inode *inode, struct file *filp)
- {
-diff -ur shfs-0.35/shfs/Linux-2.6/shfs_fs.h shfs-0.35-new/shfs/Linux-2.6/shfs_fs.h
---- shfs-0.35/shfs/Linux-2.6/shfs_fs.h 2004-06-01 09:16:19.000000000 -0400
-+++ shfs-0.35-new/shfs/Linux-2.6/shfs_fs.h 2005-02-11 18:12:03.000000000 -0500
-@@ -50,7 +50,6 @@
- #define ROUND_TO_MINS(x) do { (x).tv_sec = ((x).tv_sec / 60) * 60; (x).tv_nsec = 0; } while (0)
-
- /* shfs/dir.c */
--extern struct dentry_operations shfs_dentry_operations;
- extern struct file_operations shfs_dir_operations;
- extern struct inode_operations shfs_dir_inode_operations;
- extern void shfs_new_dentry(struct dentry *dentry);
diff --git a/openwrt/target/linux/package/shfs/patches/103-dentry.patch b/openwrt/target/linux/package/shfs/patches/103-dentry.patch
deleted file mode 100644
index 83a406a..0000000
--- a/openwrt/target/linux/package/shfs/patches/103-dentry.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -urN shfs-0.35.orig/shfs/Linux-2.6/dcache.c shfs-0.35/shfs/Linux-2.6/dcache.c
---- shfs-0.35.orig/shfs/Linux-2.6/dcache.c 2004-06-01 09:16:19.000000000 -0400
-+++ shfs-0.35/shfs/Linux-2.6/dcache.c 2006-03-25 07:08:57.950752296 -0500
-@@ -68,7 +68,7 @@
- spin_lock(&dcache_lock);
- next = parent->d_subdirs.next;
- while (next != &parent->d_subdirs) {
-- dentry = list_entry(next, struct dentry, d_child);
-+ dentry = list_entry(next, struct dentry, d_u.d_child);
- dentry->d_fsdata = NULL;
- shfs_age_dentry(info, dentry);
- next = next->next;
-@@ -101,7 +101,7 @@
- spin_lock(&dcache_lock);
- next = parent->d_subdirs.next;
- while (next != &parent->d_subdirs) {
-- dent = list_entry(next, struct dentry, d_child);
-+ dent = list_entry(next, struct dentry, d_u.d_child);
- if ((unsigned long)dent->d_fsdata == fpos) {
- if (dent->d_inode)
- dget_locked(dent);
diff --git a/openwrt/target/linux/package/spca5xx/Config.in b/openwrt/target/linux/package/spca5xx/Config.in
deleted file mode 100644
index 6d50482..0000000
--- a/openwrt/target/linux/package/spca5xx/Config.in
+++ /dev/null
@@ -1,9 +0,0 @@
-config BR2_PACKAGE_KMOD_SPCA5XX
- prompt "kmod-spca5xx...................... Kernel driver for SPCA5XX based USB cameras"
- tristate
- default m if CONFIG_DEVEL
- help
- Kernel driver for SPCA5XX based USB cameras
-
- http://mxhaard.free.fr/
-
diff --git a/openwrt/target/linux/package/spca5xx/Makefile b/openwrt/target/linux/package/spca5xx/Makefile
deleted file mode 100644
index fa2605d..0000000
--- a/openwrt/target/linux/package/spca5xx/Makefile
+++ /dev/null
@@ -1,40 +0,0 @@
-# $Id$
-
-include $(TOPDIR)/rules.mk
-include ../../rules.mk
-
-PKG_NAME:=spca5xx
-PKG_VERSION:=20060301
-PKG_RELEASE:=1
-PKG_MD5SUM:=4160e03c408ac254111febacf058b88a
-
-PKG_SOURCE_URL:=http://mxhaard.free.fr/spca50x/Download/
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_CAT:=zcat
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
-
-include $(TOPDIR)/package/rules.mk
-
-$(eval $(call PKG_template,KMOD_SPCA5XX,kmod-spca5xx,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE))))
-
-$(PKG_BUILD_DIR)/.configured:
- touch $@
-
-$(PKG_BUILD_DIR)/.built:
- $(MAKE) -C $(LINUX_DIR) \
- ARCH="$(LINUX_KARCH)" \
- CROSS_COMPILE="$(TARGET_CROSS)" \
- KERNELVERSION="$(KERNEL)" \
- SUBDIRS="$(PKG_BUILD_DIR)" \
- modules
- touch $@
-
-$(IPKG_KMOD_SPCA5XX):
- install -m0755 -d $(IDIR_KMOD_SPCA5XX)/lib/modules/$(LINUX_VERSION)
- $(CP) $(PKG_BUILD_DIR)/spca5xx.$(LINUX_KMOD_SUFFIX) \
- $(IDIR_KMOD_SPCA5XX)/lib/modules/$(LINUX_VERSION)/
- $(RSTRIP_KMOD) $(IDIR_KMOD_SPCA5XX)
- $(IPKG_BUILD) $(IDIR_KMOD_SPCA5XX) $(PACKAGE_DIR)
-
diff --git a/openwrt/target/linux/package/spca5xx/ipkg/kmod-spca5xx.control b/openwrt/target/linux/package/spca5xx/ipkg/kmod-spca5xx.control
deleted file mode 100644
index 1563eb4..0000000
--- a/openwrt/target/linux/package/spca5xx/ipkg/kmod-spca5xx.control
+++ /dev/null
@@ -1,5 +0,0 @@
-Package: kmod-spca5xx
-Priority: optional
-Section: sys
-Depends: kmod-videodev, kmod-usb-core
-Description: Kernel driver for SPCA5XX based USB cameras
diff --git a/openwrt/target/linux/package/spca5xx/patches/01-kmod-build.patch b/openwrt/target/linux/package/spca5xx/patches/01-kmod-build.patch
deleted file mode 100644
index 304df92..0000000
--- a/openwrt/target/linux/package/spca5xx/patches/01-kmod-build.patch
+++ /dev/null
@@ -1,177 +0,0 @@
-diff -Nur spca5xx-20051212/Makefile spca5xx-20051212.patched/Makefile
---- spca5xx-20051212/Makefile 2005-12-10 17:05:51.000000000 +0100
-+++ spca5xx-20051212.patched/Makefile 2005-12-25 02:41:29.910720750 +0100
-@@ -33,7 +33,9 @@
- DEFINES += -DCONFIG_USB_SPCA5XX_MODULE=1 -DMODULE -D__KERNEL__
- DEFINES += -DVID_HARDWARE_SPCA5XX=0xFF -DSPCA5XX_VERSION=\"$(VERSION)\"
-
--ifneq ($(shell uname -r | cut -d. -f1,2), 2.4)
-+KERNELVERSION=$(shell uname -r | cut -d. -f1,2)
-+
-+ifneq ($(KERNELVERSION), 2.4)
-
- ifneq ($(KERNELRELEASE),) # We were called by kbuild
- CFLAGS += $(DEFINES)
-@@ -68,152 +70,16 @@
-
- else # kernel version test
-
--#############################################################################
--# For Linux 2.4 users.
--# Change the following lines according to your system configuration.
--# It is important to configure your particular source tree ("make dep") before
--# compiling this module!
--#############################################################################
--###
--# This makefile will build the spca50x driver module external to the kernel
--# source tree. It makes it easier to swap kernels.
--
--
--KERNEL_VERSION = `uname -r`
--
--###
--# Location of the header files (most importantly the config files)
--# for the kernel you want to build the module against.
--# This should be correct for the currently installed kernel on your machine.
--KINCLUDE = /lib/modules/$(KERNEL_VERSION)/build/include
--KERNEL_ACFILE = $(KINCLUDE)/linux/autoconf.h
--KERNEL_MODVERSIONSFILE = $(KINCLUDE)/linux/modversions.h
--MODULE_INSTALLDIR = /lib/modules/$(KERNEL_VERSION)/kernel/drivers/usb/
--
--# Detect module versioning support
--ifneq ($(strip $(shell grep 'define CONFIG_MODVERSIONS 1' $(KERNEL_ACFILE))),)
-- DEFINES += -DMODVERSIONS -include $(KERNEL_MODVERSIONSFILE)
--endif
--
--# Detect SMP support
--ifneq ($(strip $(shell grep 'define CONFIG_SMP 1' $(KERNEL_ACFILE))),)
-- DEFINES += -D__SMP__ -DSMP
--endif
--
--# Setup the tools
--CC = gcc
--LD = ld
--
--# Setup compiler warnings
--WARNINGS = -Wall -Wpointer-arith
--WARNINGS += -Wcast-align -Wwrite-strings -Wstrict-prototypes
--WARNINGS += -Wuninitialized -Wreturn-type -Wunused -Wparentheses
--
--# Setup compiler flags
--CFLAGS = -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe
--CFLAGS += -mpreferred-stack-boundary=2
--CFLAGS += -I$(KINCLUDE) -Idrivers/usb
--
--# Setup link flags
--LDFLAGS = --strip-debug -r
--
--# Setup the list of files to be included in a distribution
--DIST_FILES = CHANGELOG \
-- README \
-- Makefile \
-- drivers/usb/Config.in \
-- drivers/usb/spcadecoder.c \
-- drivers/usb/spcadecoder.h \
-- drivers/usb/spcagamma.h \
-- drivers/usb/spcaCompat.h \
-- drivers/usb/spcausb.h \
-- drivers/usb/spca500_init.h \
-- drivers/usb/spca501_init.h \
-- drivers/usb/sp5xxfw2.dat \
-- drivers/usb/sp5xxfw2.h \
-- drivers/usb/spca505_init.h \
-- drivers/usb/spca506.h \
-- drivers/usb/spca508_init.h \
-- drivers/usb/spca561.h \
-- drivers/usb/sonix.h \
-- drivers/usb/cs2102.h \
-- drivers/usb/hv7131b.h \
-- drivers/usb/icm105a.h \
-- drivers/usb/hv7131c.h \
-- drivers/usb/hdcs2020.h \
-- drivers/usb/pb0330.h \
-- drivers/usb/tas5130c.h \
-- drivers/usb/zc3xx.h\
-- drivers/usb/tv8532.h\
-- drivers/usb/cxlib.h\
-- drivers/usb/sn9cxxx.h\
-- drivers/usb/cx11646.h\
-- drivers/usb/pac207.h\
-- drivers/usb/spca5xx.c \
-- drivers/usb/spca5xx.h
--
--OBJS = drivers/usb/spcadecoder.o \
-- drivers/usb/spca5xx.o
--
--BINARY = spca5xx.o
--
--###
--# Targets follow here
--
--binary: $(OBJS)
-- @echo Linking $(BINARY)
-- @$(LD) $(LDFLAGS) -o $(BINARY) $(OBJS)
--
--install: binary
-- @echo Installing.. Your root password may be required.
-- su -c "make install-root"
--
--install-root:
-- @echo Installing..
-- @mkdir -p /lib/modules/`uname -r`/kernel/drivers/usb
-- @rm -f /lib/modules/`uname -r`/kernel/drivers/usb/spca50x.o
-- @rm -f /lib/modules/`uname -r`/kernel/drivers/usb/et61x.o
-- @cp spca5xx.o /lib/modules/`uname -r`/kernel/drivers/usb/spca5xx.o
-- @/sbin/depmod
--
--dist: clean binary
-- @echo Making distributable archives
-- @rm -f spca5xx-src-$(VERSION).tar.gz
-- @tar zcf spca5xx-src-$(VERSION).tar.gz $(DIST_FILES)
-- @rm -f spca5xx-module-$(VERSION).tar.gz
-- @cp $(BINARY) spca5xx-$(VERSION).o
-- @tar zcf spca5xx-module-$(VERSION).tar.gz spca5xx-$(VERSION).o README
-- @rm spca5xx-$(VERSION).o
--
--.c.o: Makefile $*.c
-- @echo Compiling $*.c
-- @$(CC) $(CFLAGS) $(WARNINGS) $(DEFINES) -c $*.c -o $*.o
--
--###
--# Dependencies follow here
--
--drivers/usb/spca5xx.o: drivers/usb/spca5xx.h \
-- drivers/usb/spcaCompat.h \
-- drivers/usb/spcausb.h \
-- drivers/usb/sonix.h \
-- drivers/usb/spca500_init.h \
-- drivers/usb/spca501_init.h \
-- drivers/usb/sp5xxfw2.h \
-- drivers/usb/spca505_init.h \
-- drivers/usb/spca506.h \
-- drivers/usb/spca508_init.h \
-- drivers/usb/spca561.h \
-- drivers/usb/zc3xx.h\
-- drivers/usb/tv8532.h\
-- drivers/usb/cx11646.h\
-- drivers/usb/mr97311.h\
-- drivers/usb/sn9cxxx.h\
-- drivers/usb/pac207.h\
--
--
--drivers/usb/spcadecoder.o: drivers/usb/spcadecoder.h \
-- drivers/usb/spcagamma.h \
--
-+EXTRA_CFLAGS += $(DEFINES)
-+
-+spca5xx-objs := drivers/usb/spca5xx.o drivers/usb/spcadecoder.o
-+
-+obj-m += spca5xx.o
-+obj-y := $(spca5xx-objs)
-+
-+O_TARGET := $(obj-m)
-+
-+-include $(TOPDIR)/Rules.make
-
- endif # End kernel version test
-
diff --git a/openwrt/target/linux/package/switch/Config.in b/openwrt/target/linux/package/switch/Config.in
deleted file mode 100644
index 407d5de..0000000
--- a/openwrt/target/linux/package/switch/Config.in
+++ /dev/null
@@ -1,11 +0,0 @@
-config BR2_PACKAGE_KMOD_SWITCH
- prompt "kmod-switch....................... Kernel driver for ROBO and ADMTEK SWITCH"
- tristate
- default y if BR2_LINUX_2_6_BRCM || BR2_LINUX_2_4_BRCM
- default m if CONFIG_DEVEL
- default n
- help
- Kernel driver for ROBO and ADMTEK switches.
-
- http://www.openwrt.org
-
diff --git a/openwrt/target/linux/package/switch/Makefile b/openwrt/target/linux/package/switch/Makefile
deleted file mode 100644
index 812fccb..0000000
--- a/openwrt/target/linux/package/switch/Makefile
+++ /dev/null
@@ -1,37 +0,0 @@
-# $Id$
-
-include $(TOPDIR)/rules.mk
-include ../../rules.mk
-
-PKG_NAME := kmod-switch
-PKG_RELEASE := 1
-PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
-
-include $(TOPDIR)/package/rules.mk
-
-$(eval $(call PKG_template,KMOD_SWITCH,$(PKG_NAME),$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE))))
-
-$(PKG_BUILD_DIR)/.prepared:
- mkdir -p $(PKG_BUILD_DIR)
- $(CP) ./src/* $(PKG_BUILD_DIR)/
- touch $@
-
-$(PKG_BUILD_DIR)/.configured:
- touch $@
-
-$(PKG_BUILD_DIR)/.built:
- $(MAKE) -C "$(LINUX_DIR)" \
- CROSS_COMPILE="$(TARGET_CROSS)" \
- ARCH="$(LINUX_KARCH)" \
- PATH="$(TARGET_PATH)" \
- SUBDIRS="$(PKG_BUILD_DIR)" \
- EXTRA_CFLAGS="-DBCMGPIO2" \
- modules
- touch $@
-
-$(IPKG_KMOD_SWITCH):
- install -m0755 -d $(IDIR_KMOD_SWITCH)/lib/modules/$(LINUX_VERSION)
- $(CP) $(PKG_BUILD_DIR)/*.$(LINUX_KMOD_SUFFIX) \
- $(IDIR_KMOD_SWITCH)/lib/modules/$(LINUX_VERSION)
- $(IPKG_BUILD) $(IDIR_KMOD_SWITCH) $(PACKAGE_DIR)
-
diff --git a/openwrt/target/linux/package/switch/ipkg/kmod-switch.control b/openwrt/target/linux/package/switch/ipkg/kmod-switch.control
deleted file mode 100644
index db8a368..0000000
--- a/openwrt/target/linux/package/switch/ipkg/kmod-switch.control
+++ /dev/null
@@ -1,4 +0,0 @@
-Package: kmod-switch
-Priority: optional
-Section: sys
-Description: switch driver for robo/admtek switch
diff --git a/openwrt/target/linux/package/switch/src/Makefile b/openwrt/target/linux/package/switch/src/Makefile
deleted file mode 100644
index 4c5f911..0000000
--- a/openwrt/target/linux/package/switch/src/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-# $Id$
-#
-# Makefile for switch driver
-#
-# Copyright (C) 2005 Felix Fietkau <nbd@openwrt.org>
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version
-# 2 of the License, or (at your option) any later version.
-#
-
-obj-m := switch-core.o switch-adm.o switch-robo.o
-
-ifeq ($(MAKING_MODULES),1)
-export-objs := switch-core.o
-
--include $(TOPDIR)/Rules.make
-endif
diff --git a/openwrt/target/linux/package/switch/src/etc53xx.h b/openwrt/target/linux/package/switch/src/etc53xx.h
deleted file mode 100644
index 12d94a5..0000000
--- a/openwrt/target/linux/package/switch/src/etc53xx.h
+++ /dev/null
@@ -1,620 +0,0 @@
-/*
- * Broadcom Home Gateway Reference Design
- * BCM53xx Register definitions
- *
- * Copyright 2004, Broadcom Corporation
- * All Rights Reserved.
- *
- * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
- * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
- * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
- * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
- * $Id: etc53xx.h,v 1.1 2005/05/14 13:15:46 nbd Exp $
- */
-
-#ifndef __BCM535M_H_
-#define __BCM535M_H_
-
-/* ROBO embedded device type */
-#define ROBO_DEV_5380 1
-#define ROBO_DEV_5365 2
-#define ROBO_DEV_5350 3
-
-/* BCM5325m GLOBAL PAGE REGISTER MAP */
-#ifndef _CFE_
-#pragma pack(1)
-#endif
-
-/* BCM5325m Serial Management Port (SMP) Page offsets */
-#define ROBO_CTRL_PAGE 0x00 /* Control registers */
-#define ROBO_STAT_PAGE 0x01 /* Status register */
-#define ROBO_MGMT_PAGE 0x02 /* Management Mode registers */
-#define ROBO_MIB_AC_PAGE 0x03 /* MIB Autocast registers */
-#define ROBO_ARLCTRL_PAGE 0x04 /* ARL Control Registers */
-#define ROBO_ARLIO_PAGE 0x05 /* ARL Access Registers */
-#define ROBO_FRAMEBUF_PAGE 0x06 /* Management frame access registers */
-#define ROBO_MEM_ACCESS_PAGE 0x08 /* Memory access registers */
-
-/* PHY Registers */
-#define ROBO_PORT0_MII_PAGE 0x10 /* Port 0 MII Registers */
-#define ROBO_PORT1_MII_PAGE 0x11 /* Port 1 MII Registers */
-#define ROBO_PORT2_MII_PAGE 0x12 /* Port 2 MII Registers */
-#define ROBO_PORT3_MII_PAGE 0x13 /* Port 3 MII Registers */
-#define ROBO_PORT4_MII_PAGE 0x14 /* Port 4 MII Registers */
-/* (start) registers only for BCM5380 */
-#define ROBO_PORT5_MII_PAGE 0x15 /* Port 5 MII Registers */
-#define ROBO_PORT6_MII_PAGE 0x16 /* Port 6 MII Registers */
-#define ROBO_PORT7_MII_PAGE 0x17 /* Port 7 MII Registers */
-/* (end) registers only for BCM5380 */
-#define ROBO_IM_PORT_PAGE 0x18 /* Inverse MII Port (to EMAC) */
-#define ROBO_ALL_PORT_PAGE 0x19 /* All ports MII Registers (broadcast)*/
-
-/* MAC Statistics registers */
-#define ROBO_PORT0_MIB_PAGE 0x20 /* Port 0 10/100 MIB Statistics */
-#define ROBO_PORT1_MIB_PAGE 0x21 /* Port 1 10/100 MIB Statistics */
-#define ROBO_PORT2_MIB_PAGE 0x22 /* Port 2 10/100 MIB Statistics */
-#define ROBO_PORT3_MIB_PAGE 0x23 /* Port 3 10/100 MIB Statistics */
-#define ROBO_PORT4_MIB_PAGE 0x24 /* Port 4 10/100 MIB Statistics */
-/* (start) registers only for BCM5380 */
-#define ROBO_PORT5_MIB_PAGE 0x25 /* Port 5 10/100 MIB Statistics */
-#define ROBO_PORT6_MIB_PAGE 0x26 /* Port 6 10/100 MIB Statistics */
-#define ROBO_PORT7_MIB_PAGE 0x27 /* Port 7 10/100 MIB Statistics */
-/* (end) registers only for BCM5380 */
-#define ROBO_IM_PORT_MIB_PAGE 0x28 /* Inverse MII Port MIB Statistics */
-
-/* Quality of Service (QoS) Registers */
-#define ROBO_QOS_PAGE 0x30 /* QoS Registers */
-
-/* VLAN Registers */
-#define ROBO_VLAN_PAGE 0x34 /* VLAN Registers */
-
-/* Note SPI Data/IO Registers not used */
-#define ROBO_SPI_DATA_IO_0_PAGE 0xf0 /* SPI Data I/O 0 */
-#define ROBO_SPI_DATA_IO_1_PAGE 0xf1 /* SPI Data I/O 1 */
-#define ROBO_SPI_DATA_IO_2_PAGE 0xf2 /* SPI Data I/O 2 */
-#define ROBO_SPI_DATA_IO_3_PAGE 0xf3 /* SPI Data I/O 3 */
-#define ROBO_SPI_DATA_IO_4_PAGE 0xf4 /* SPI Data I/O 4 */
-#define ROBO_SPI_DATA_IO_5_PAGE 0xf5 /* SPI Data I/O 5 */
-#define ROBO_SPI_DATA_IO_6_PAGE 0xf6 /* SPI Data I/O 6 */
-#define ROBO_SPI_DATA_IO_7_PAGE 0xf7 /* SPI Data I/O 7 */
-
-#define ROBO_SPI_STATUS_PAGE 0xfe /* SPI Status Registers */
-#define ROBO_PAGE_PAGE 0xff /* Page Registers */
-
-
-/* BCM5325m CONTROL PAGE (0x00) REGISTER MAP : 8bit (byte) registers */
-typedef struct _ROBO_PORT_CTRL_STRUC
-{
- unsigned char rx_disable:1; /* rx disable */
- unsigned char tx_disable:1; /* tx disable */
- unsigned char rsvd:3; /* reserved */
- unsigned char stp_state:3; /* spanning tree state */
-} ROBO_PORT_CTRL_STRUC;
-
-#define ROBO_PORT0_CTRL 0x00 /* 10/100 Port 0 Control */
-#define ROBO_PORT1_CTRL 0x01 /* 10/100 Port 1 Control */
-#define ROBO_PORT2_CTRL 0x02 /* 10/100 Port 2 Control */
-#define ROBO_PORT3_CTRL 0x03 /* 10/100 Port 3 Control */
-#define ROBO_PORT4_CTRL 0x04 /* 10/100 Port 4 Control */
-/* (start) registers only for BCM5380 */
-#define ROBO_PORT5_CTRL 0x05 /* 10/100 Port 5 Control */
-#define ROBO_PORT6_CTRL 0x06 /* 10/100 Port 6 Control */
-#define ROBO_PORT7_CTRL 0x07 /* 10/100 Port 7 Control */
-/* (end) registers only for BCM5380 */
-#define ROBO_IM_PORT_CTRL 0x08 /* 10/100 Port 8 Control */
-#define ROBO_SMP_CTRL 0x0a /* SMP Control register */
-#define ROBO_SWITCH_MODE 0x0b /* Switch Mode Control */
-#define ROBO_PORT_OVERRIDE_CTRL 0x0e /* Port state override */
-#define ROBO_PORT_OVERRIDE_RVMII (1<<4) /* Bit 4 enables RvMII */
-#define ROBO_PD_MODE_CTRL 0x0f /* Power-down mode control */
-#define ROBO_IP_MULTICAST_CTRL 0x21 /* IP Multicast control */
-
-/* BCM5325m STATUS PAGE (0x01) REGISTER MAP : 16bit/48bit registers */
-#define ROBO_HALF_DUPLEX 0
-#define ROBO_FULL_DUPLEX 1
-
-#define ROBO_LINK_STAT_SUMMARY 0x00 /* Link Status Summary: 16bit */
-#define ROBO_LINK_STAT_CHANGE 0x02 /* Link Status Change: 16bit */
-#define ROBO_SPEED_STAT_SUMMARY 0x04 /* Port Speed Summary: 16bit*/
-#define ROBO_DUPLEX_STAT_SUMMARY 0x06 /* Duplex Status Summary: 16bit */
-#define ROBO_PAUSE_STAT_SUMMARY 0x08 /* PAUSE Status Summary: 16bit */
-#define ROBO_SOURCE_ADDR_CHANGE 0x0C /* Source Address Change: 16bit */
-#define ROBO_LSA_PORT0 0x10 /* Last Source Addr, Port 0: 48bits*/
-#define ROBO_LSA_PORT1 0x16 /* Last Source Addr, Port 1: 48bits*/
-#define ROBO_LSA_PORT2 0x1c /* Last Source Addr, Port 2: 48bits*/
-#define ROBO_LSA_PORT3 0x22 /* Last Source Addr, Port 3: 48bits*/
-#define ROBO_LSA_PORT4 0x28 /* Last Source Addr, Port 4: 48bits*/
-#define ROBO_LSA_IM_PORT 0x40 /* Last Source Addr, IM Port: 48bits*/
-
-/* BCM5325m MANAGEMENT MODE REGISTERS (0x02) REGISTER MAP: 8/48 bit regs*/
-typedef struct _ROBO_GLOBAL_CONFIG_STRUC
-{
- unsigned char resetMIB:1; /* reset MIB counters */
- unsigned char rxBPDU:1; /* receive BDPU enable */
- unsigned char rsvd1:2; /* reserved */
- unsigned char MIBacHdrCtrl:1; /* MIB autocast header control */
- unsigned char MIBac:1; /* MIB autocast enable */
- unsigned char frameMgmtPort:2; /* frame management port */
-} ROBO_GLOBAL_CONFIG_STRUC;
-#define ROBO_GLOBAL_CONFIG 0x00 /* Global Management Config: 8bit*/
-#define ROBO_MGMT_PORT_ID 0x02 /* Management Port ID: 8bit*/
-#define ROBO_RMON_MIB_STEER 0x04 /* RMON Mib Steering: 16bit */
-#define ROBO_MIB_MODE_SELECT 0x04 /* MIB Mode select: 16bit (BCM5350) */
-#define ROBO_AGE_TIMER_CTRL 0x06 /* Age time control: 32bit */
-#define ROBO_MIRROR_CAP_CTRL 0x10 /* Mirror Capture : 16bit */
-#define ROBO_MIRROR_ING_CTRL 0x12 /* Mirror Ingress Control: 16bit */
-#define ROBO_MIRROR_ING_DIV_CTRL 0x14 /* Mirror Ingress Divider: 16bit */
-#define ROBO_MIRROR_ING_MAC_ADDR 0x16 /* Ingress Mirror MAC Addr: 48bit*/
-#define ROBO_MIRROR_EGR_CTRL 0x1c /* Mirror Egress Control: 16bit */
-#define ROBO_MIRROR_EGR_DIV_CTRL 0x1e /* Mirror Egress Divider: 16bit */
-#define ROBO_MIRROR_EGR_MAC_ADDR 0x20 /* Egress Mirror MAC Addr: 48bit*/
-
-/* BCM5325m MIB AUTOCAST REGISTERS (0x03) REGISTER MAP: 8/16/48 bit regs */
-#define ROBO_MIB_AC_PORT 0x00 /* MIB Autocast Port: 16bit */
-#define ROBO_MIB_AC_HDR_PTR 0x02 /* MIB Autocast Header pointer:16bit*/
-#define ROBO_MIB_AC_HDR_LEN 0x04 /* MIB Autocast Header Len: 16bit */
-#define ROBO_MIB_AC_DA 0x06 /* MIB Autocast DA: 48bit */
-#define ROBO_MIB_AC_SA 0x0c /* MIB Autocast SA: 48bit */
-#define ROBO_MIB_AC_TYPE 0x12 /* MIB Autocast Type: 16bit */
-#define ROBO_MIB_AC_RATE 0x14 /* MIB Autocast Rate: 8bit */
-#define ROBO_GET_AC_RATE(secs) ((secs)*10)
-#define ROBO_AC_RATE_MAX 0xff
-#define ROBO_AC_RATE_DEFAULT 0x64 /* 10 secs */
-typedef struct _ROBO_MIB_AC_STRUCT
-{
- unsigned char opcode:4; /* Tx MIB Autocast opcode */
- unsigned char portno:4; /* zero-based port no. */
- unsigned char portstate:8; /* port state */
- unsigned long long TxOctets;
- unsigned int TxDropPkts;
- unsigned int rsvd;
- unsigned int TxBroadcastPkts;
- unsigned int TxMulticastPkts;
- unsigned int TxUnicastPkts;
- unsigned int TxCollisions;
- unsigned int TxSingleCollision;
- unsigned int TxMultiCollision;
- unsigned int TxDeferredTransmit;
- unsigned int TxLateCollision;
- unsigned int TxExcessiveCollision;
- unsigned int TxFrameInDiscards;
- unsigned int TxPausePkts;
- unsigned int rsvd1[2];
- unsigned long long RxOctets;
- unsigned int RxUndersizePkts;
- unsigned int RxPausePkts;
- unsigned int RxPkts64Octets;
- unsigned int RxPkts64to127Octets;
- unsigned int RxPkts128to255Octets;
- unsigned int RxPkts256to511Octets;
- unsigned int RxPkts512to1023Octets;
- unsigned int RxPkts1024to1522Octets;
- unsigned int RxOversizePkts;
- unsigned int RxJabbers;
- unsigned int RxAlignmentErrors;
- unsigned int RxFCSErrors;
- unsigned long long RxGoodOctets;
- unsigned int RxDropPkts;
- unsigned int RxUnicastPkts;
- unsigned int RxMulticastPkts;
- unsigned int RxBroadcastPkts;
- unsigned int RxSAChanges;
- unsigned int RxFragments;
- unsigned int RxExcessSizeDisc;
- unsigned int RxSymbolError;
-} ROBO_MIB_AC_STRUCT;
-
-/* BCM5325m ARL CONTROL REGISTERS (0x04) REGISTER MAP: 8/16/48/64 bit regs */
-#define ROBO_ARL_CONFIG 0x00 /* ARL Global Configuration: 8bit*/
-#define ROBO_BPDU_MC_ADDR_REG 0x04 /* BPDU Multicast Address Reg:64bit*/
-#define ROBO_MULTIPORT_ADDR_1 0x10 /* Multiport Address 1: 48 bits*/
-#define ROBO_MULTIPORT_VECTOR_1 0x16 /* Multiport Vector 1: 16 bits */
-#define ROBO_MULTIPORT_ADDR_2 0x20 /* Multiport Address 2: 48 bits*/
-#define ROBO_MULTIPORT_VECTOR_2 0x26 /* Multiport Vector 2: 16 bits */
-#define ROBO_SECURE_SRC_PORT_MASK 0x30 /* Secure Source Port Mask: 16 bits*/
-#define ROBO_SECURE_DST_PORT_MASK 0x32 /* Secure Dest Port Mask: 16 bits */
-
-
-/* BCM5325m ARL IO REGISTERS (0x05) REGISTER MAP: 8/16/48/64 bit regs */
-#define ARL_TABLE_WRITE 0 /* for read/write state in control reg */
-#define ARL_TABLE_READ 1 /* for read/write state in control reg */
-#ifdef BCM5380
-#define ARL_VID_BYTES 2 /* number of bytes for VID */
-#else
-#define ARL_VID_BYTES 1 /* number of bytes for VID */
-#endif
-typedef struct _ROBO_ARL_RW_CTRL_STRUC
-{
- unsigned char ARLrw:1; /* ARL read/write (1=read) */
- unsigned char rsvd:6; /* reserved */
- unsigned char ARLStart:1; /* ARL start/done (1=start) */
-} ROBO_ARL_RW_CTRL_STRUC;
-typedef struct _ROBO_ARL_SEARCH_CTRL_STRUC
-{
- unsigned char valid:1; /* ARL search result valid */
- unsigned char rsvd:6; /* reserved */
- unsigned char ARLStart:1; /* ARL start/done (1=start) */
-} ROBO_ARL_SEARCH_CTRL_STRUC;
-typedef struct _ROBO_ARL_ENTRY_CTRL_STRUC
-{
- unsigned char portID:4; /* port id */
- unsigned char chipID:2; /* chip id */
- unsigned char rsvd:5; /* reserved */
- unsigned char prio:2; /* priority */
- unsigned char age:1; /* age */
- unsigned char staticEn:1; /* static */
- unsigned char valid:1; /* valid */
-} ROBO_ARL_ENTRY_CTRL_STRUC;
-typedef struct _ROBO_ARL_SEARCH_RESULT_CTRL_STRUC
-{
- unsigned char portID:4; /* port id */
- unsigned char rsvd:1; /* reserved */
- unsigned char vid:8; /* vlan id */
- unsigned char age:1; /* age */
- unsigned char staticEn:1; /* static */
- unsigned char valid:1; /* valid */
-} ROBO_ARL_SEARCH_RESULT_CTRL_STRUC;
-typedef struct _ROBO_ARL_ENTRY_MAC_STRUC
-{
- unsigned char macBytes[6]; /* MAC address */
-} ROBO_ARL_ENTRY_MAC_STRUC;
-
-typedef struct _ROBO_ARL_ENTRY_STRUC
-{
- ROBO_ARL_ENTRY_MAC_STRUC mac; /* MAC address */
- ROBO_ARL_ENTRY_CTRL_STRUC ctrl; /* control bits */
-} ROBO_ARL_ENTRY_STRUC;
-
-typedef struct _ROBO_ARL_SEARCH_RESULT_STRUC
-{
- ROBO_ARL_ENTRY_MAC_STRUC mac; /* MAC address */
- ROBO_ARL_SEARCH_RESULT_CTRL_STRUC ctrl; /* control bits */
-} ROBO_ARL_SEARCH_RESULT_STRUC;
-
-/* multicast versions of ARL entry structs */
-typedef struct _ROBO_ARL_ENTRY_MCAST_CTRL_STRUC
-{
- unsigned int portMask:12;/* multicast port mask */
- unsigned char prio:1; /* priority */
- unsigned char gigPort:1; /* gigabit port 1 mask */
- unsigned char staticEn:1; /* static */
- unsigned char valid:1; /* valid */
-} ROBO_ARL_ENTRY_MCAST_CTRL_STRUC;
-typedef struct _ROBO_ARL_SEARCH_RESULT_MCAST_CTRL_STRUC
-{
- unsigned int portMask:13; /* multicast port mask */
- unsigned char age:1; /* age */
- unsigned char staticEn:1; /* static */
- unsigned char valid:1; /* valid */
-} ROBO_ARL_SEARCH_RESULT_MCAST_CTRL_STRUC;
-/* BCM5350 extension register */
-typedef struct _ROBO_ARL_SEARCH_RESULT_EXTENSION
-{
- unsigned int prio:2; /* priority */
- unsigned int portMask:1; /* MSB (MII) of port mask for multicast */
- unsigned int reserved:5;
-} ROBO_ARL_SEARCH_RESULT_EXTENSION;
-
-typedef struct _ROBO_ARL_ENTRY_MCAST_STRUC
-{
- ROBO_ARL_ENTRY_MAC_STRUC mac; /* MAC address */
- ROBO_ARL_ENTRY_MCAST_CTRL_STRUC ctrl; /* control bits */
-} ROBO_ARL_ENTRY_MCAST_STRUC;
-typedef struct _ROBO_ARL_SEARCH_RESULT_MCAST_STRUC
-{
- ROBO_ARL_ENTRY_MAC_STRUC mac; /* MAC address */
- ROBO_ARL_SEARCH_RESULT_MCAST_CTRL_STRUC ctrl; /* control bits */
-} ROBO_ARL_SEARCH_RESULT_MCAST_STRUC;
-
-#define ROBO_ARL_RW_CTRL 0x00 /* ARL Read/Write Control : 8bit */
-#define ROBO_ARL_MAC_ADDR_IDX 0x02 /* MAC Address Index: 48bit */
-#define ROBO_ARL_VID_TABLE_IDX 0x08 /* VID Table Address Index: 8bit */
-#define ROBO_ARL_ENTRY0 0x10 /* ARL Entry 0 : 64 bit */
-#define ROBO_ARL_ENTRY1 0x18 /* ARL Entry 1 : 64 bit */
-#define ROBO_ARL_SEARCH_CTRL 0x20 /* ARL Search Control: 8bit */
-#define ROBO_ARL_SEARCH_ADDR 0x22 /* ARL Search Address: 16bit */
-#define ROBO_ARL_SEARCH_RESULT 0x24 /* ARL Search Result: 64bit */
-#define ROBO_ARL_SEARCH_RESULT_EXT 0x2c /* ARL Search Result Extension (5350): 8bit */
-#define ROBO_ARL_VID_ENTRY0 0x30 /* ARL VID Entry 0: 64bit */
-#define ROBO_ARL_VID_ENTRY1 0x32 /* ARL VID Entry 1: 64bit */
-
-/* BCM5325m MANAGEMENT FRAME REGISTERS (0x6) REGISTER MAP: 8/16 bit regs */
-#define ROBO_MGMT_FRAME_RD_DATA 0x00 /* Management Frame Read Data :8bit*/
-#define ROBO_MGMT_FRAME_WR_DATA 0x01 /* Management Frame Write Data:8bit*/
-#define ROBO_MGMT_FRAME_WR_CTRL 0x02 /* Write Control: 16bit */
-#define ROBO_MGMT_FRAME_RD_STAT 0x04 /* Read Status: 16bit */
-
-/* BCM5325m MEMORY ACCESS REGISTERS (Page 0x08) REGISTER MAP: 32 bit regs */
-#define MEM_TABLE_READ 1 /* for read/write state in mem access reg */
-#define MEM_TABLE_WRITE 0 /* for read/write state in mem access reg */
-#define MEM_TABLE_ACCESS_START 1 /* for mem access read/write start */
-#define MEM_TABLE_ACCESS_DONE 0 /* for mem access read/write done */
-#define VLAN_TABLE_ADDR 0x3800 /* BCM5380 only */
-#ifdef BCM5380
-#define NUM_ARL_TABLE_ENTRIES 4096 /* number of entries in ARL table */
-#define NUM_VLAN_TABLE_ENTRIES 2048 /* number of entries in VLAN table */
-#define ARL_TABLE_ADDR 0 /* offset of ARL table start */
-#else
-#define NUM_ARL_TABLE_ENTRIES 2048 /* number of entries in ARL table */
-#define NUM_VLAN_TABLE_ENTRIES 256 /* number of entries in VLAN table */
-#define ARL_TABLE_ADDR 0x3800 /* offset of ARL table start */
-/* corresponding values for 5350 */
-#define NUM_ARL_TABLE_ENTRIES_5350 1024 /* number of entries in ARL table (5350) */
-#define NUM_VLAN_TABLE_ENTRIES_5350 16 /* number of entries in VLAN table */
-#define ARL_TABLE_ADDR_5350 0x1c00 /* offset of ARL table start (5350) */
-#endif
-typedef struct _ROBO_MEM_ACCESS_CTRL_STRUC
-{
- unsigned int memAddr:14; /* 64-bit memory address */
- unsigned char rsvd:4; /* reserved */
- unsigned char readEn:1; /* read enable (0 == write) */
- unsigned char startDone:1;/* memory access start/done */
- unsigned int rsvd1:12; /* reserved */
-} ROBO_MEM_ACCESS_CTRL_STRUC;
-typedef struct _ROBO_MEM_ACCESS_DATA_STRUC
-{
- unsigned int memData[2]; /* 64-bit data */
- unsigned short rsvd; /* reserved */
-} ROBO_MEM_ACCESS_DATA_STRUC;
-
-#ifdef BCM5380
-typedef struct _ROBO_ARL_TABLE_DATA_STRUC
-{
- unsigned char MACaddr[6]; /* MAC addr */
- unsigned int portID:4; /* port ID */
- unsigned int chipID:2; /* chip ID */
- unsigned int rsvd:6; /* reserved */
- unsigned int highPrio:1; /* high priority address */
- unsigned int age:1; /* entry accessed/learned since ageing process */
- unsigned int staticAddr:1;/* entry is static */
- unsigned int valid:1; /* entry is valid */
- unsigned int vid:12; /* vlan id */
- unsigned int rsvd2:4; /* reserved */
-} ROBO_ARL_TABLE_DATA_STRUC;
-#else
-typedef struct _ROBO_ARL_TABLE_DATA_STRUC
-{
- unsigned char MACaddr[6]; /* MAC addr */
- unsigned int portID:4; /* port ID */
- unsigned int chipID:2; /* chip ID */
- unsigned int rsvd:7; /* reserved */
- unsigned int age:1; /* entry accessed/learned since ageing process */
- unsigned int staticAddr:1;/* entry is static */
- unsigned int valid:1; /* entry is valid */
-} ROBO_ARL_TABLE_DATA_STRUC;
-#endif
-
-/* multicast format*/
-typedef struct _ROBO_ARL_TABLE_MCAST_DATA_STRUC
-{
- unsigned char MACaddr[6]; /* MAC addr */
- unsigned int portMask:12;/* multicast port mask */
- unsigned char prio:1; /* priority */
- unsigned char gigPort:1; /* gigabit port 1 mask */
- unsigned char staticEn:1; /* static */
- unsigned char valid:1; /* valid */
- unsigned int vid:12; /* vlan id */
- unsigned int rsvd2:4; /* reserved */
-} ROBO_ARL_TABLE_MCAST_DATA_STRUC;
-#define ROBO_MEM_ACCESS_CTRL 0x00 /* Memory Read/Write Control :32bit*/
-#define ROBO_MEM_ACCESS_DATA 0x04 /* Memory Read/Write Data:64bit*/
-
-/* BCM5325m SWITCH PORT (0x10-18) REGISTER MAP: 8/16 bit regs */
-typedef struct _ROBO_MII_CTRL_STRUC
-{
- unsigned char rsvd:8; /* reserved */
- unsigned char duplex:1; /* duplex mode */
- unsigned char restartAN:1;/* restart auto-negotiation */
- unsigned char rsvd1:1; /* reserved */
- unsigned char powerDown:1;/* power down */
- unsigned char ANenable:1; /* auto-negotiation enable */
- unsigned char speed:1; /* forced speed selection */
- unsigned char loopback:1; /* loopback */
- unsigned char reset:1; /* reset */
-} ROBO_MII_CTRL_STRUC;
-typedef struct _ROBO_MII_AN_ADVERT_STRUC
-{
- unsigned char selector:5; /* advertise selector field */
- unsigned char T10BaseT:1; /* advertise 10BaseT */
- unsigned char T10BaseTFull:1; /* advertise 10BaseT, full duplex */
- unsigned char T100BaseX:1; /* advertise 100BaseX */
- unsigned char T100BaseXFull:1;/* advertise 100BaseX full duplex */
- unsigned char noT4:1; /* do not advertise T4 */
- unsigned char pause:1; /* advertise pause for full duplex */
- unsigned char rsvd:2; /* reserved */
- unsigned char remoteFault:1; /* transmit remote fault */
- unsigned char rsvd1:1; /* reserved */
- unsigned char nextPage:1; /* nex page operation supported */
-} ROBO_MII_AN_ADVERT_STRUC;
-#define ROBO_MII_CTRL 0x00 /* Port MII Control */
-#define ROBO_MII_STAT 0x02 /* Port MII Status */
-/* Fields of link status register */
-#define ROBO_MII_STAT_JABBER (1<<1) /* Jabber detected */
-#define ROBO_MII_STAT_LINK (1<<2) /* Link status */
-
-#define ROBO_MII_PHYID_HI 0x04 /* Port PHY ID High */
-#define ROBO_MII_PHYID_LO 0x06 /* Port PHY ID Low */
-#define ROBO_MII_ANA_REG 0x08 /* MII Auto-Neg Advertisement */
-#define ROBO_MII_ANP_REG 0x0a /* MII Auto-Neg Partner Ability */
-#define ROBO_MII_AN_EXP_REG 0x0c /* MII Auto-Neg Expansion */
-#define ROBO_MII_AN_NP_REG 0x0e /* MII next page */
-#define ROBO_MII_ANP_NP_REG 0x10 /* MII Partner next page */
-#define ROBO_MII_100BX_AUX_CTRL 0x20 /* 100BASE-X Auxiliary Control */
-#define ROBO_MII_100BX_AUX_STAT 0x22 /* 100BASE-X Auxiliary Status */
-#define ROBO_MII_100BX_RCV_ERR_CTR 0x24 /* 100BASE-X Receive Error Ctr */
-#define ROBO_MII_100BX_RCV_FS_ERR 0x26 /* 100BASE-X Rcv False Sense Ctr */
-#define ROBO_MII_AUX_CTRL 0x30 /* Auxiliary Control/Status */
-/* Fields of Auxiliary control register */
-#define ROBO_MII_AUX_CTRL_FD (1<<0) /* Full duplex link detected*/
-#define ROBO_MII_AUX_CTRL_SP100 (1<<1) /* Speed 100 indication */
-#define ROBO_MII_AUX_STATUS 0x32 /* Aux Status Summary */
-#define ROBO_MII_CONN_STATUS 0x34 /* Aux Connection Status */
-#define ROBO_MII_AUX_MODE2 0x36 /* Aux Mode 2 */
-#define ROBO_MII_AUX_ERR_STATUS 0x38 /* Aux Error and General Status */
-#define ROBO_MII_AUX_MULTI_PHY 0x3c /* Aux Multiple PHY Register*/
-#define ROBO_MII_BROADCOM_TEST 0x3e /* Broadcom Test Register */
-
-
-/* BCM5325m PORT MIB REGISTERS (Pages 0x20-0x24,0x28) REGISTER MAP: 64/32 */
-/* Tranmit Statistics */
-#define ROBO_MIB_TX_OCTETS 0x00 /* 64b: TxOctets */
-#define ROBO_MIB_TX_DROP_PKTS 0x08 /* 32b: TxDropPkts */
-#define ROBO_MIB_TX_BC_PKTS 0x10 /* 32b: TxBroadcastPkts */
-#define ROBO_MIB_TX_MC_PKTS 0x14 /* 32b: TxMulticastPkts */
-#define ROBO_MIB_TX_UC_PKTS 0x18 /* 32b: TxUnicastPkts */
-#define ROBO_MIB_TX_COLLISIONS 0x1c /* 32b: TxCollisions */
-#define ROBO_MIB_TX_SINGLE_COLLISIONS 0x20 /* 32b: TxSingleCollision */
-#define ROBO_MIB_TX_MULTI_COLLISIONS 0x24 /* 32b: TxMultiCollision */
-#define ROBO_MIB_TX_DEFER_TX 0x28 /* 32b: TxDeferred Transmit */
-#define ROBO_MIB_TX_LATE_COLLISIONS 0x2c /* 32b: TxLateCollision */
-#define ROBO_MIB_EXCESS_COLLISIONS 0x30 /* 32b: TxExcessiveCollision*/
-#define ROBO_MIB_FRAME_IN_DISCARDS 0x34 /* 32b: TxFrameInDiscards */
-#define ROBO_MIB_TX_PAUSE_PKTS 0x38 /* 32b: TxPausePkts */
-
-/* Receive Statistics */
-#define ROBO_MIB_RX_OCTETS 0x44 /* 64b: RxOctets */
-#define ROBO_MIB_RX_UNDER_SIZE_PKTS 0x4c /* 32b: RxUndersizePkts(runts)*/
-#define ROBO_MIB_RX_PAUSE_PKTS 0x50 /* 32b: RxPausePkts */
-#define ROBO_MIB_RX_PKTS_64 0x54 /* 32b: RxPkts64Octets */
-#define ROBO_MIB_RX_PKTS_65_TO_127 0x58 /* 32b: RxPkts64to127Octets*/
-#define ROBO_MIB_RX_PKTS_128_TO_255 0x5c /* 32b: RxPkts128to255Octets*/
-#define ROBO_MIB_RX_PKTS_256_TO_511 0x60 /* 32b: RxPkts256to511Octets*/
-#define ROBO_MIB_RX_PKTS_512_TO_1023 0x64 /* 32b: RxPkts512to1023Octets*/
-#define ROBO_MIB_RX_PKTS_1024_TO_1522 0x68 /* 32b: RxPkts1024to1522Octets*/
-#define ROBO_MIB_RX_OVER_SIZE_PKTS 0x6c /* 32b: RxOversizePkts*/
-#define ROBO_MIB_RX_JABBERS 0x70 /* 32b: RxJabbers*/
-#define ROBO_MIB_RX_ALIGNMENT_ERRORS 0x74 /* 32b: RxAlignmentErrors*/
-#define ROBO_MIB_RX_FCS_ERRORS 0x78 /* 32b: RxFCSErrors */
-#define ROBO_MIB_RX_GOOD_OCTETS 0x7c /* 32b: RxGoodOctets */
-#define ROBO_MIB_RX_DROP_PKTS 0x84 /* 32b: RxDropPkts */
-#define ROBO_MIB_RX_UC_PKTS 0x88 /* 32b: RxUnicastPkts */
-#define ROBO_MIB_RX_MC_PKTS 0x8c /* 32b: RxMulticastPkts */
-#define ROBO_MIB_RX_BC_PKTS 0x90 /* 32b: RxBroadcastPkts */
-#define ROBO_MIB_RX_SA_CHANGES 0x94 /* 32b: RxSAChanges */
-#define ROBO_MIB_RX_FRAGMENTS 0x98 /* 32b: RxFragments */
-#define ROBO_MIB_RX_EXCESS_SZ_DISC 0x9c /* 32b: RxExcessSizeDisc*/
-#define ROBO_MIB_RX_SYMBOL_ERROR 0xa0 /* 32b: RxSymbolError */
-
-/* BCM5350 MIB Statistics */
-/* Group 0 */
-#define ROBO_MIB_TX_GOOD_PKTS 0x00 /* 16b: TxGoodPkts */
-#define ROBO_MIB_TX_UNICAST_PKTS 0x02 /* 16b: TxUnicastPkts */
-#define ROBO_MIB_RX_GOOD_PKTS 0x04 /* 16b: RxGoodPkts */
-#define ROBO_MIB_RX_GOOD_UNICAST_PKTS 0x06 /* 16b: RxGoodUnicastPkts */
-/* Group 1 */
-#define ROBO_MIB_TX_COLLISION 0x00 /* 16b: TxCollision */
-#define ROBO_MIB_TX_OCTETS_5350 0x02 /* 16b: TxOctets */
-#define ROBO_MIB_RX_FCS_ERRORS_5350 0x04 /* 16b: RxFCSErrors */
-#define ROBO_MIB_RX_GOOD_OCTETS_5350 0x06 /* 16b: RxGoodOctets */
-
-/* BCM5325m QoS REGISTERS (Page 0x30) REGISTER MAP: 8/16 */
-#define ROBO_QOS_CTRL 0x00 /* 16b: QoS Control Register */
-#define ROBO_QOS_LOCAL_WEIGHT_CTRL 0x10 /* 8b: Local HQ/LQ Weight Register*/
-#define ROBO_QOS_CPU_WEIGHT_CTRL 0x12 /* 8b: CPU HQ/LQ Weight Register*/
-#define ROBO_QOS_PAUSE_ENA 0x13 /* 16b: Qos Pause Enable Register*/
-#define ROBO_QOS_PRIO_THRESHOLD 0x15 /* 8b: Priority Threshold Register*/
-#define ROBO_QOS_RESERVED 0x16 /* 8b: Qos Reserved Register */
-
-/* BCM5325m VLAN REGISTERS (Page 0x34) REGISTER MAP: 8/16bit */
-typedef struct _ROBO_VLAN_CTRL0_STRUC
-{
- unsigned char frameControlP:2; /* 802.1P frame control */
- unsigned char frameControlQ:2; /* 802.1Q frame control */
- unsigned char dropMissedVID:1; /* enable drop missed VID packet */
- unsigned char vidMacHash:1; /* VID_MAC hash enable */
- unsigned char vidMacCheck:1; /* VID_MAC check enable */
- unsigned char VLANen:1; /* 802.1Q VLAN enable */
-} ROBO_VLAN_CTRL0_STRUC;
-#define VLAN_TABLE_WRITE 1 /* for read/write state in table access reg */
-#define VLAN_TABLE_READ 0 /* for read/write state in table access reg */
-#define VLAN_ID_HIGH_BITS 0 /* static high bits in table access reg */
-#define VLAN_ID_MAX 255 /* max VLAN id */
-#define VLAN_ID_MAX5350 15 /* max VLAN id (5350) */
-#define VLAN_ID_MASK VLAN_ID_MAX /* VLAN id mask */
-#ifdef BCM5380
-#define VLAN_UNTAG_SHIFT 13 /* for postioning untag bits in write reg */
-#define VLAN_VALID 0x4000000 /* valid bit in write reg */
-#else
-#define VLAN_UNTAG_SHIFT 7 /* for postioning untag bits in write reg */
-#define VLAN_VALID 0x4000 /* valid bit in write reg */
-/* corresponding values for 5350 */
-#define VLAN_UNTAG_SHIFT_5350 6 /* for postioning untag bits in write reg */
-#define VLAN_VALID_5350 0x00100000 /* valid bit in write reg */
-#endif
-typedef struct _ROBO_VLAN_TABLE_ACCESS_STRUC
-{
- unsigned char VLANid:8; /* VLAN ID (low 8 bits) */
- unsigned char VLANidHi:4; /* VLAN ID (fixed upper portion) */
- unsigned char readWriteState:1; /* read/write state (write = 1) */
- volatile unsigned char readWriteEnable:1; /* table read/write enable */
- unsigned char rsvd:2; /* reserved */
-} ROBO_VLAN_TABLE_ACCESS_STRUC;
-#ifdef BCM5380
-typedef struct _ROBO_VLAN_READ_WRITE_STRUC
-{
- unsigned int VLANgroup:13;/* VLAN group mask */
- unsigned int VLANuntag:13;/* VLAN untag enable mask */
- unsigned char valid:1; /* valid */
- unsigned char rsvd:5; /* reserved */
-} ROBO_VLAN_READ_WRITE_STRUC;
-#else
-typedef struct _ROBO_VLAN_READ_WRITE_STRUC
-{
- unsigned char VLANgroup:7; /* VLAN group mask */
- unsigned char VLANuntag:7; /* VLAN untag enable mask */
- unsigned char valid:1; /* valid */
- unsigned char rsvd:1; /* reserved */
-} ROBO_VLAN_READ_WRITE_STRUC;
-typedef struct _ROBO_VLAN_READ_WRITE_STRUC_5350
-{
- unsigned char VLANgroup:6; /* VLAN group mask */
- unsigned char VLANuntag:6; /* VLAN untag enable mask */
- unsigned char highVID:8; /* upper bits of vid */
- unsigned char valid:1; /* valid */
- unsigned int rsvd:11; /* reserved */
-} ROBO_VLAN_READ_WRITE_STRUC_5350;
-#endif
-#define ROBO_VLAN_CTRL0 0x00 /* 8b: VLAN Control 0 Register */
-#define ROBO_VLAN_CTRL1 0x01 /* 8b: VLAN Control 1 Register */
-#define ROBO_VLAN_CTRL2 0x02 /* 8b: VLAN Control 2 Register */
-#define ROBO_VLAN_CTRL3 0x03 /* 8b: VLAN Control 3 Register */
-#define ROBO_VLAN_CTRL4 0x04 /* 8b: VLAN Control 4 Register */
-#define ROBO_VLAN_CTRL5 0x05 /* 8b: VLAN Control 5 Register */
-#define ROBO_VLAN_TABLE_ACCESS 0x08 /* 14b: VLAN Table Access Register */
-#define ROBO_VLAN_TABLE_ACCESS_5350 0x06 /* 14b: VLAN Table Access Register (5350) */
-#define ROBO_VLAN_WRITE 0x0a /* 15b: VLAN Write Register */
-#define ROBO_VLAN_WRITE_5350 0x08 /* 15b: VLAN Write Register (5350) */
-#define ROBO_VLAN_READ 0x0c /* 15b: VLAN Read Register */
-#define ROBO_VLAN_PORT0_DEF_TAG 0x10 /* 16b: VLAN Port 0 Default Tag Register */
-#define ROBO_VLAN_PORT1_DEF_TAG 0x12 /* 16b: VLAN Port 1 Default Tag Register */
-#define ROBO_VLAN_PORT2_DEF_TAG 0x14 /* 16b: VLAN Port 2 Default Tag Register */
-#define ROBO_VLAN_PORT3_DEF_TAG 0x16 /* 16b: VLAN Port 3 Default Tag Register */
-#define ROBO_VLAN_PORT4_DEF_TAG 0x18 /* 16b: VLAN Port 4 Default Tag Register */
-#define ROBO_VLAN_PORTMII_DEF_TAG 0x1a /* 16b: VLAN Port MII Default Tag Register */
-/* 5380 only */
-#define ROBO_VLAN_PORT5_DEF_TAG 0x1a /* 16b: VLAN Port 5 Default Tag Register */
-#define ROBO_VLAN_PORT6_DEF_TAG 0x1c /* 16b: VLAN Port 6 Default Tag Register */
-#define ROBO_VLAN_PORT7_DEF_TAG 0x1e /* 16b: VLAN Port 7 Default Tag Register */
-
-/* obsolete */
-#define ROBO_VLAN_PORT0_CTRL 0x00 /* 16b: Port 0 VLAN Register */
-#define ROBO_VLAN_PORT1_CTRL 0x02 /* 16b: Port 1 VLAN Register */
-#define ROBO_VLAN_PORT2_CTRL 0x04 /* 16b: Port 2 VLAN Register */
-#define ROBO_VLAN_PORT3_CTRL 0x06 /* 16b: Port 3 VLAN Register */
-#define ROBO_VLAN_PORT4_CTRL 0x08 /* 16b: Port 4 VLAN Register */
-#define ROBO_VLAN_IM_PORT_CTRL 0x10 /* 16b: Inverse MII Port VLAN Reg */
-#define ROBO_VLAN_SMP_PORT_CTRL 0x12 /* 16b: Serial Port VLAN Register */
-#define ROBO_VLAN_PORTSPI_DEF_TAG 0x1c /* 16b: VLAN Port SPI Default Tag Register */
-#define ROBO_VLAN_PRIORITY_REMAP 0x20 /* 24b: VLAN Priority Re-Map Register */
-
-#ifndef _CFE_
-#pragma pack()
-#endif
-
-
-#endif /* !__BCM535M_H_ */
-
-
-
-
-
diff --git a/openwrt/target/linux/package/switch/src/gpio.h b/openwrt/target/linux/package/switch/src/gpio.h
deleted file mode 100644
index 8257600..0000000
--- a/openwrt/target/linux/package/switch/src/gpio.h
+++ /dev/null
@@ -1,45 +0,0 @@
-#ifndef __GPIO_H
-#define __GPIO_H
-
-#if defined(BCMGPIO2)
-
-#ifdef LINUX_2_4
-#define sbh bcm947xx_sbh
-extern void *bcm947xx_sbh;
-#else
-extern void *sbh;
-#endif
-
-extern __u32 sb_gpioin(void *sbh);
-extern __u32 sb_gpiointpolarity(void *sbh, __u32 mask, __u32 val, __u8 prio);
-extern __u32 sb_gpiointmask(void *sbh, __u32 mask, __u32 val, __u8 prio);
-extern __u32 sb_gpioouten(void *sbh, __u32 mask, __u32 val, __u8 prio);
-extern __u32 sb_gpioout(void *sbh, __u32 mask, __u32 val, __u8 prio);
-
-#define gpioin() sb_gpioin(sbh)
-#define gpiointpolarity(mask,val) sb_gpiointpolarity(sbh, mask, val, 0)
-#define gpiointmask(mask,val) sb_gpiointmask(sbh, mask, val, 0)
-#define gpioouten(mask,val) sb_gpioouten(sbh, mask, val, 0)
-#define gpioout(mask,val) sb_gpioout(sbh, mask, val, 0)
-
-#elif defined(BCMGPIO)
-
-#define sbh bcm947xx_sbh
-extern void *bcm947xx_sbh;
-extern __u32 sb_gpioin(void *sbh);
-extern __u32 sb_gpiointpolarity(void *sbh, __u32 mask, __u32 val);
-extern __u32 sb_gpiointmask(void *sbh, __u32 mask, __u32 val);
-extern __u32 sb_gpioouten(void *sbh, __u32 mask, __u32 val);
-extern __u32 sb_gpioout(void *sbh, __u32 mask, __u32 val);
-
-#define gpioin() sb_gpioin(sbh)
-#define gpiointpolarity(mask,val) sb_gpiointpolarity(sbh, mask, val)
-#define gpiointmask(mask,val) sb_gpiointmask(sbh, mask, val)
-#define gpioouten(mask,val) sb_gpioouten(sbh, mask, val)
-#define gpioout(mask,val) sb_gpioout(sbh, mask, val)
-
-#else
-#error Unsupported/unknown GPIO configuration
-#endif
-
-#endif /* __GPIO_H */
diff --git a/openwrt/target/linux/package/switch/src/switch-adm.c b/openwrt/target/linux/package/switch/src/switch-adm.c
deleted file mode 100644
index 8d27120..0000000
--- a/openwrt/target/linux/package/switch/src/switch-adm.c
+++ /dev/null
@@ -1,571 +0,0 @@
-/*
- * ADMTEK Adm6996 switch configuration module
- *
- * Copyright (C) 2005 Felix Fietkau <nbd@nbd.name>
- *
- * Partially based on Broadcom Home Networking Division 10/100 Mbit/s
- * Ethernet Device Driver (from Montavista 2.4.20_mvl31 Kernel).
- * Copyright (C) 2004 Broadcom Corporation
- *
- * adm_rreg function from adm6996
- * Copyright (C) 2004 Nikki Chumakov <nikki@gattaca.ru>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
- */
-
-#include <linux/config.h>
-#include <linux/module.h>
-#include <linux/init.h>
-#include <linux/if.h>
-#include <linux/if_arp.h>
-#include <linux/sockios.h>
-#include <linux/delay.h>
-#include <asm/uaccess.h>
-
-#include "switch-core.h"
-#include "gpio.h"
-
-#define DRIVER_NAME "adm6996"
-#define DRIVER_VERSION "0.01"
-
-static int eecs = 0;
-static int eesk = 0;
-static int eedi = 0;
-static int eerc = 0;
-static int force = 0;
-
-MODULE_AUTHOR("Felix Fietkau <openwrt@nbd.name>");
-MODULE_LICENSE("GPL");
-MODULE_PARM(eecs, "i");
-MODULE_PARM(eesk, "i");
-MODULE_PARM(eedi, "i");
-MODULE_PARM(eerc, "i");
-MODULE_PARM(force, "i");
-
-/* Minimum timing constants */
-#define EECK_EDGE_TIME 3 /* 3us - max(adm 2.5us, 93c 1us) */
-#define EEDI_SETUP_TIME 1 /* 1us - max(adm 10ns, 93c 400ns) */
-#define EECS_SETUP_TIME 1 /* 1us - max(adm no, 93c 200ns) */
-
-/* Handy macros for writing fixed length values */
-#define adm_write8(cs, b) { __u8 val = (__u8) (b); adm_write(cs, &val, sizeof(val)*8); }
-#define adm_write16(cs, w) { __u16 val = hton16(w); adm_write(cs, (__u8 *)&val, sizeof(val)*8); }
-#define adm_write32(cs, i) { uint32 val = hton32(i); adm_write(cs, (__u8 *)&val, sizeof(val)*8); }
-
-#define atoi(str) simple_strtoul(((str != NULL) ? str : ""), NULL, 0)
-
-#if defined(BCMGPIO2) || defined(BCMGPIO)
-extern char *nvram_get(char *name);
-
-/* Return gpio pin number assigned to the named pin */
-/*
-* Variable should be in format:
-*
-* gpio<N>=pin_name
-*
-* 'def_pin' is returned if there is no such variable found.
-*/
-static unsigned int getgpiopin(char *pin_name, unsigned int def_pin)
-{
- char name[] = "gpioXXXX";
- char *val;
- unsigned int pin;
-
- /* Go thru all possibilities till a match in pin name */
- for (pin = 0; pin < 16; pin ++) {
- sprintf(name, "gpio%d", pin);
- val = nvram_get(name);
- if (val && !strcmp(val, pin_name))
- return pin;
- }
- return def_pin;
-}
-#endif
-
-
-static void adm_write(int cs, char *buf, unsigned int bits)
-{
- int i, len = (bits + 7) / 8;
- __u8 mask;
-
- gpioout(eecs, (cs ? eecs : 0));
- udelay(EECK_EDGE_TIME);
-
- /* Byte assemble from MSB to LSB */
- for (i = 0; i < len; i++) {
- /* Bit bang from MSB to LSB */
- for (mask = 0x80; mask && bits > 0; mask >>= 1, bits --) {
- /* Clock low */
- gpioout(eesk, 0);
- udelay(EECK_EDGE_TIME);
-
- /* Output on rising edge */
- gpioout(eedi, ((mask & buf[i]) ? eedi : 0));
- udelay(EEDI_SETUP_TIME);
-
- /* Clock high */
- gpioout(eesk, eesk);
- udelay(EECK_EDGE_TIME);
- }
- }
-
- /* Clock low */
- gpioout(eesk, 0);
- udelay(EECK_EDGE_TIME);
-
- if (cs)
- gpioout(eecs, 0);
-}
-
-
-static void adm_read(int cs, char *buf, unsigned int bits)
-{
- int i, len = (bits + 7) / 8;
- __u8 mask;
-
- gpioout(eecs, (cs ? eecs : 0));
- udelay(EECK_EDGE_TIME);
-
- /* Byte assemble from MSB to LSB */
- for (i = 0; i < len; i++) {
- __u8 byte;
-
- /* Bit bang from MSB to LSB */
- for (mask = 0x80, byte = 0; mask && bits > 0; mask >>= 1, bits --) {
- __u8 gp;
-
- /* Clock low */
- gpioout(eesk, 0);
- udelay(EECK_EDGE_TIME);
-
- /* Input on rising edge */
- gp = gpioin();
- if (gp & eedi)
- byte |= mask;
-
- /* Clock high */
- gpioout(eesk, eesk);
- udelay(EECK_EDGE_TIME);
- }
-
- *buf++ = byte;
- }
-
- /* Clock low */
- gpioout(eesk, 0);
- udelay(EECK_EDGE_TIME);
-
- if (cs)
- gpioout(eecs, 0);
-}
-
-
-/* Enable outputs with specified value to the chip */
-static void adm_enout(__u8 pins, __u8 val)
-{
- /* Prepare GPIO output value */
- gpioout(pins, val);
-
- /* Enable GPIO outputs */
- gpioouten(pins, pins);
- udelay(EECK_EDGE_TIME);
-}
-
-
-/* Disable outputs to the chip */
-static void adm_disout(__u8 pins)
-{
- /* Disable GPIO outputs */
- gpioouten(pins, 0);
- udelay(EECK_EDGE_TIME);
-}
-
-
-/* Advance clock(s) */
-static void adm_adclk(int clocks)
-{
- int i;
- for (i = 0; i < clocks; i++) {
- /* Clock high */
- gpioout(eesk, eesk);
- udelay(EECK_EDGE_TIME);
-
- /* Clock low */
- gpioout(eesk, 0);
- udelay(EECK_EDGE_TIME);
- }
-}
-
-static __u32 adm_rreg(__u8 table, __u8 addr)
-{
- /* cmd: 01 10 T DD R RRRRRR */
- __u8 bits[6] = {
- 0xFF, 0xFF, 0xFF, 0xFF,
- (0x06 << 4) | ((table & 0x01) << 3 | (addr&64)>>6),
- ((addr&62)<<2)
- };
-
- __u8 rbits[4];
-
- /* Enable GPIO outputs with all pins to 0 */
- adm_enout((__u8)(eecs | eesk | eedi), 0);
-
- adm_write(0, bits, 46);
- adm_disout((__u8)(eedi));
- adm_adclk(2);
- adm_read (0, rbits, 32);
-
- /* Extra clock(s) required per datasheet */
- adm_adclk(2);
-
- /* Disable GPIO outputs */
- adm_disout((__u8)(eecs | eesk));
-
- if (!table) /* EEPROM has 16-bit registers, but pumps out two registers in one request */
- return (addr & 0x01 ? (rbits[0]<<8) | rbits[1] : (rbits[2]<<8) | (rbits[3]));
- else
- return (rbits[0]<<24) | (rbits[1]<<16) | (rbits[2]<<8) | rbits[3];
-}
-
-
-
-/* Write chip configuration register */
-/* Follow 93c66 timing and chip's min EEPROM timing requirement */
-void
-adm_wreg(__u8 addr, __u16 val)
-{
- /* cmd(27bits): sb(1) + opc(01) + addr(bbbbbbbb) + data(bbbbbbbbbbbbbbbb) */
- __u8 bits[4] = {
- (0x05 << 5) | (addr >> 3),
- (addr << 5) | (__u8)(val >> 11),
- (__u8)(val >> 3),
- (__u8)(val << 5)
- };
-
- /* Enable GPIO outputs with all pins to 0 */
- adm_enout((__u8)(eecs | eesk | eedi), 0);
-
- /* Write cmd. Total 27 bits */
- adm_write(1, bits, 27);
-
- /* Extra clock(s) required per datasheet */
- adm_adclk(2);
-
- /* Disable GPIO outputs */
- adm_disout((__u8)(eecs | eesk | eedi));
-}
-
-
-/* Port configuration registers */
-static int port_conf[] = { 0x01, 0x03, 0x05, 0x07, 0x08, 0x09 };
-
-/* Bits in VLAN port mapping */
-static int vlan_ports[] = { 1 << 0, 1 << 2, 1 << 4, 1 << 6, 1 << 7, 1 << 8 };
-
-static int handle_vlan_port_read(void *driver, char *buf, int nr)
-{
- int ports, i, c, len = 0;
-
- if ((nr < 0) || (nr > 15))
- return 0;
-
- /* Get VLAN port map */
- ports = adm_rreg(0, 0x13 + nr);
-
- for (i = 0; i <= 5; i++) {
- if (ports & vlan_ports[i]) {
- c = adm_rreg(0, port_conf[i]);
-
- len += sprintf(buf + len, "%d", i);
- if (c & (1 << 4)) {
- buf[len++] = 't';
- if (((c & (0xf << 10)) >> 10) == nr)
- buf[len++] = '*';
- } else if (i == 5)
- buf[len++] = 'u';
-
- buf[len++] = '\t';
- }
- }
- len += sprintf(buf + len, "\n");
-
- return len;
-}
-
-static int handle_vlan_port_write(void *driver, char *buf, int nr)
-{
- int i, cfg, ports;
- switch_driver *d = (switch_driver *) driver;
- switch_vlan_config *c = switch_parse_vlan(d, buf);
-
- if (c == NULL)
- return -1;
-
- ports = adm_rreg(0, 0x13 + nr);
- for (i = 0; i < d->ports; i++) {
- if (c->port & (1 << i)) {
- ports |= vlan_ports[i];
-
- cfg = adm_rreg(0, port_conf[i]);
-
- /* Tagging */
- if (c->untag & (1 << i))
- cfg &= ~(1 << 4);
- else
- cfg |= (1 << 4);
-
- if ((c->untag | c->pvid) & (1 << i)) {
- cfg = (cfg & ~(0xf << 10)) | (nr << 10);
- }
-
- adm_wreg(port_conf[i], (__u16) cfg);
- } else {
- ports &= ~(vlan_ports[i]);
- }
- }
- adm_wreg(0x13 + nr, (__u16) ports);
-
- return 0;
-}
-
-static int handle_port_enable_read(void *driver, char *buf, int nr)
-{
- return sprintf(buf, "%d\n", ((adm_rreg(0, port_conf[nr]) & (1 << 5)) ? 0 : 1));
-}
-
-static int handle_port_enable_write(void *driver, char *buf, int nr)
-{
- int reg = adm_rreg(0, port_conf[nr]);
-
- if (buf[0] == '0')
- reg |= (1 << 5);
- else if (buf[0] == '1')
- reg &= ~(1 << 5);
- else return -1;
-
- adm_wreg(port_conf[nr], (__u16) reg);
- return 0;
-}
-
-static int handle_port_media_read(void *driver, char *buf, int nr)
-{
- int len;
- int media = 0;
- int reg = adm_rreg(0, port_conf[nr]);
-
- if (reg & (1 << 1))
- media |= SWITCH_MEDIA_AUTO;
- if (reg & (1 << 2))
- media |= SWITCH_MEDIA_100;
- if (reg & (1 << 3))
- media |= SWITCH_MEDIA_FD;
-
- len = switch_print_media(buf, media);
- return len + sprintf(buf + len, "\n");
-}
-
-static int handle_port_media_write(void *driver, char *buf, int nr)
-{
- int media = switch_parse_media(buf);
- int reg = adm_rreg(0, port_conf[nr]);
-
- if (media < 0)
- return -1;
-
- reg &= ~((1 << 1) | (1 << 2) | (1 << 3));
- if (media & SWITCH_MEDIA_AUTO)
- reg |= 1 << 1;
- if (media & SWITCH_MEDIA_100)
- reg |= 1 << 2;
- if (media & SWITCH_MEDIA_FD)
- reg |= 1 << 3;
-
- adm_wreg(port_conf[nr], reg);
-
- return 0;
-}
-
-static int handle_vlan_enable_read(void *driver, char *buf, int nr)
-{
- return sprintf(buf, "%d\n", ((adm_rreg(0, 0x11) & (1 << 5)) ? 1 : 0));
-}
-
-static int handle_vlan_enable_write(void *driver, char *buf, int nr)
-{
- int reg = adm_rreg(0, 0x11);
-
- if (buf[0] == '1')
- reg |= (1 << 5);
- else if (buf[0] == '0')
- reg &= ~(1 << 5);
- else return -1;
-
- adm_wreg(0x11, (__u16) reg);
- return 0;
-}
-
-static int handle_reset(void *driver, char *buf, int nr)
-{
- int i;
- u32 cfg;
-
- /*
- * Reset sequence: RC high->low(100ms)->high(30ms)
- *
- * WAR: Certain boards don't have the correct power on
- * reset logic therefore we must explicitly perform the
- * sequence in software.
- */
- if (eerc) {
- /* Keep RC high for at least 20ms */
- adm_enout(eerc, eerc);
- for (i = 0; i < 20; i ++)
- udelay(1000);
- /* Keep RC low for at least 100ms */
- adm_enout(eerc, 0);
- for (i = 0; i < 100; i++)
- udelay(1000);
- /* Set default configuration */
- adm_enout((__u8)(eesk | eedi), eesk);
- /* Keep RC high for at least 30ms */
- adm_enout(eerc, eerc);
- for (i = 0; i < 30; i++)
- udelay(1000);
- /* Leave RC high and disable GPIO outputs */
- adm_disout((__u8)(eecs | eesk | eedi));
-
- }
-
- /* set up initial configuration for cpu port */
- cfg = (0x8000 | /* Auto MDIX */
- (0xf << 10) | /* PVID */
- (1 << 4) | /* Tagging */
- 0xf); /* full duplex, 100Mbps, auto neg, flow ctrl */
- adm_wreg(port_conf[5], cfg);
-
- /* vlan mode select register (0x11): vlan on, mac clone */
- adm_wreg(0x11, 0xff30);
-
- return 0;
-}
-
-static int handle_registers(void *driver, char *buf, int nr)
-{
- int i, len = 0;
-
- for (i = 0; i <= 0x33; i++) {
- len += sprintf(buf + len, "0x%02x: 0x%04x\n", i, adm_rreg(0, i));
- }
-
- return len;
-}
-
-static int handle_counters(void *driver, char *buf, int nr)
-{
- int i, len = 0;
-
- for (i = 0; i <= 0x3c; i++) {
- len += sprintf(buf + len, "0x%02x: 0x%08x\n", i, adm_rreg(1, i));
- }
-
- return len;
-}
-
-static int detect_adm()
-{
- int ret = 0;
-
-#if defined(BCMGPIO2) || defined(BCMGPIO)
- int boardflags = atoi(nvram_get("boardflags"));
-
- if ((boardflags & 0x80) || force) {
- ret = 1;
-
- eecs = getgpiopin("adm_eecs", 2);
- eesk = getgpiopin("adm_eesk", 3);
- eedi = getgpiopin("adm_eedi", 4);
- eerc = getgpiopin("adm_rc", 0);
-
- } else if ((strcmp(nvram_get("boardtype") ?: "", "bcm94710dev") == 0) &&
- (strncmp(nvram_get("boardnum") ?: "", "42", 2) == 0)) {
- /* WRT54G v1.1 hack */
- eecs = 2;
- eesk = 3;
- eedi = 5;
-
- ret = 1;
- } else
- printk("BFL_ENETADM not set in boardflags. Use force=1 to ignore.\n");
-
- if (eecs)
- eecs = (1 << eecs);
- if (eesk)
- eesk = (1 << eesk);
- if (eedi)
- eedi = (1 << eedi);
- if (eerc)
- eerc = (1 << eerc);
-#else
- ret = 1;
-#endif
-
- return ret;
-}
-
-static int __init adm_init()
-{
- switch_config cfg[] = {
- {"registers", handle_registers, NULL},
- {"counters", handle_counters, NULL},
- {"reset", NULL, handle_reset},
- {"enable_vlan", handle_vlan_enable_read, handle_vlan_enable_write},
- {NULL, NULL, NULL}
- };
- switch_config port[] = {
- {"enable", handle_port_enable_read, handle_port_enable_write},
- {"media", handle_port_media_read, handle_port_media_write},
- {NULL, NULL, NULL}
- };
- switch_config vlan[] = {
- {"ports", handle_vlan_port_read, handle_vlan_port_write},
- {NULL, NULL, NULL}
- };
- switch_driver driver = {
- name: DRIVER_NAME,
- version: DRIVER_VERSION,
- interface: "eth0",
- ports: 6,
- cpuport: 5,
- vlans: 16,
- driver_handlers: cfg,
- port_handlers: port,
- vlan_handlers: vlan,
- };
-
- if (!detect_adm())
- return -ENODEV;
-
- return switch_register_driver(&driver);
-}
-
-static void __exit adm_exit()
-{
- switch_unregister_driver(DRIVER_NAME);
-}
-
-
-module_init(adm_init);
-module_exit(adm_exit);
diff --git a/openwrt/target/linux/package/switch/src/switch-core.c b/openwrt/target/linux/package/switch/src/switch-core.c
deleted file mode 100644
index 6b59b9b..0000000
--- a/openwrt/target/linux/package/switch/src/switch-core.c
+++ /dev/null
@@ -1,466 +0,0 @@
-/*
- * switch-core.c
- *
- * Copyright (C) 2005 Felix Fietkau <openwrt@nbd.name>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id: $
- *
- * Basic doc of driver's /proc interface:
- * /proc/switch/<interface>/
- * registers: read-only
- * counters: read-only
- * reset: write causes hardware reset
- * enable_vlan: "0", "1"
- * port/<port-number>/
- * enabled: "0", "1"
- * media: "AUTO", "100FD", "100HD", "10FD", "10HD"
- * vlan/<port-number>/
- * ports: same syntax as for nvram's vlan*ports (eg. "1 2 3 4 5*")
- */
-
-#include <linux/config.h>
-#include <linux/module.h>
-#include <linux/init.h>
-#include <asm/uaccess.h>
-#include <linux/proc_fs.h>
-#include <linux/list.h>
-
-#include "switch-core.h"
-
-static int drv_num = 0;
-static struct proc_dir_entry *switch_root;
-switch_driver drivers;
-
-typedef struct {
- struct list_head list;
- struct proc_dir_entry *parent;
- int nr;
- void *driver;
- switch_config handler;
-} switch_proc_handler;
-
-typedef struct {
- struct proc_dir_entry *driver_dir, *port_dir, *vlan_dir;
- struct proc_dir_entry **ports, **vlans;
- switch_proc_handler data;
- int nr;
-} switch_priv;
-
-static ssize_t switch_proc_read(struct file *file, char *buf, size_t count, loff_t *ppos);
-static ssize_t switch_proc_write(struct file *file, const char *buf, size_t count, void *data);
-
-static struct file_operations switch_proc_fops = {
- read: switch_proc_read,
- write: switch_proc_write
-};
-
-static ssize_t switch_proc_read(struct file *file, char *buf, size_t count, loff_t *ppos)
-{
-#ifdef LINUX_2_4
- struct inode *inode = file->f_dentry->d_inode;
- struct proc_dir_entry *dent = inode->u.generic_ip;
-#else
- struct proc_dir_entry *dent = PDE(file->f_dentry->d_inode);
-#endif
- char *page;
- int len = 0;
-
- if ((page = kmalloc(SWITCH_MAX_BUFSZ, GFP_KERNEL)) == NULL)
- return -ENOBUFS;
-
- if (dent->data != NULL) {
- switch_proc_handler *handler = (switch_proc_handler *) dent->data;
- if (handler->handler.read != NULL)
- len += handler->handler.read(handler->driver, page + len, handler->nr);
- }
- len += 1;
-
- if (*ppos < len) {
- len = min_t(int, len - *ppos, count);
- if (copy_to_user(buf, (page + *ppos), len)) {
- kfree(page);
- return -EFAULT;
- }
- *ppos += len;
- } else {
- len = 0;
- }
-
- return len;
-}
-
-
-static ssize_t switch_proc_write(struct file *file, const char *buf, size_t count, void *data)
-{
-#ifdef LINUX_2_4
- struct inode *inode = file->f_dentry->d_inode;
- struct proc_dir_entry *dent = inode->u.generic_ip;
-#else
- struct proc_dir_entry *dent = PDE(file->f_dentry->d_inode);
-#endif
- char *page;
- int ret = -EINVAL;
-
- if ((page = kmalloc(count + 1, GFP_KERNEL)) == NULL)
- return -ENOBUFS;
-
- if (copy_from_user(page, buf, count)) {
- kfree(page);
- return -EINVAL;
- }
- page[count] = 0;
-
- if (dent->data != NULL) {
- switch_proc_handler *handler = (switch_proc_handler *) dent->data;
- if (handler->handler.write != NULL) {
- if ((ret = handler->handler.write(handler->driver, page, handler->nr)) >= 0)
- ret = count;
- }
- }
-
- kfree(page);
- return ret;
-}
-
-static int handle_driver_name(void *driver, char *buf, int nr)
-{
- char *name = ((switch_driver *) driver)->name;
- return sprintf(buf, "%s\n", name);
-}
-
-static int handle_driver_version(void *driver, char *buf, int nr)
-{
- char *version = ((switch_driver *) driver)->version;
- strcpy(buf, version);
- return sprintf(buf, "%s\n", version);
-}
-
-static void add_handler(switch_driver *driver, switch_config *handler, struct proc_dir_entry *parent, int nr)
-{
- switch_priv *priv = (switch_priv *) driver->data;
- struct proc_dir_entry *p;
- int mode;
-
- switch_proc_handler *tmp;
- tmp = (switch_proc_handler *) kmalloc(sizeof(switch_proc_handler), GFP_KERNEL);
- INIT_LIST_HEAD(&tmp->list);
- tmp->parent = parent;
- tmp->nr = nr;
- tmp->driver = driver;
- memcpy(&tmp->handler, handler, sizeof(switch_config));
- list_add(&tmp->list, &priv->data.list);
-
- mode = 0;
- if (handler->read != NULL) mode |= S_IRUSR;
- if (handler->write != NULL) mode |= S_IWUSR;
-
- if ((p = create_proc_entry(handler->name, mode, parent)) != NULL) {
- p->data = (void *) tmp;
- p->proc_fops = &switch_proc_fops;
- }
-}
-
-static inline void add_handlers(switch_driver *driver, switch_config *handlers, struct proc_dir_entry *parent, int nr)
-{
- int i;
-
- for (i = 0; handlers[i].name != NULL; i++) {
- add_handler(driver, &(handlers[i]), parent, nr);
- }
-}
-
-static void remove_handlers(switch_priv *priv)
-{
- struct list_head *pos, *q;
- switch_proc_handler *tmp;
-
- list_for_each_safe(pos, q, &priv->data.list) {
- tmp = list_entry(pos, switch_proc_handler, list);
- list_del(pos);
- remove_proc_entry(tmp->handler.name, tmp->parent);
- kfree(tmp);
- }
-}
-
-
-static void do_unregister(switch_driver *driver)
-{
- char buf[4];
- int i;
- switch_priv *priv = (switch_priv *) driver->data;
-
- remove_handlers(priv);
-
- for(i = 0; priv->ports[i] != NULL; i++) {
- sprintf(buf, "%d", i);
- remove_proc_entry(buf, priv->port_dir);
- }
- kfree(priv->ports);
- remove_proc_entry("port", priv->driver_dir);
-
- for(i = 0; priv->vlans[i] != NULL; i++) {
- sprintf(buf, "%d", i);
- remove_proc_entry(buf, priv->vlan_dir);
- }
- kfree(priv->vlans);
- remove_proc_entry("vlan", priv->driver_dir);
-
- remove_proc_entry(driver->interface, switch_root);
-
- if (priv->nr == (drv_num - 1))
- drv_num--;
-
- kfree(priv);
-}
-
-switch_config global_driver_handlers[] = {
- {"driver", handle_driver_name, NULL},
- {"version", handle_driver_version, NULL},
- {NULL, NULL, NULL}
-};
-
-static int do_register(switch_driver *driver)
-{
- switch_priv *priv;
- int i;
- char buf[4];
-
- if ((priv = kmalloc(sizeof(switch_priv), GFP_KERNEL)) == NULL)
- return -ENOBUFS;
- driver->data = (void *) priv;
-
- INIT_LIST_HEAD(&priv->data.list);
-
- priv->nr = drv_num++;
- priv->driver_dir = proc_mkdir(driver->interface, switch_root);
- if (driver->driver_handlers != NULL) {
- add_handlers(driver, driver->driver_handlers, priv->driver_dir, 0);
- add_handlers(driver, global_driver_handlers, priv->driver_dir, 0);
- }
-
- priv->port_dir = proc_mkdir("port", priv->driver_dir);
- priv->ports = kmalloc((driver->ports + 1) * sizeof(struct proc_dir_entry *), GFP_KERNEL);
- for (i = 0; i < driver->ports; i++) {
- sprintf(buf, "%d", i);
- priv->ports[i] = proc_mkdir(buf, priv->port_dir);
- if (driver->port_handlers != NULL)
- add_handlers(driver, driver->port_handlers, priv->ports[i], i);
- }
- priv->ports[i] = NULL;
-
- priv->vlan_dir = proc_mkdir("vlan", priv->driver_dir);
- priv->vlans = kmalloc((driver->vlans + 1) * sizeof(struct proc_dir_entry *), GFP_KERNEL);
- for (i = 0; i < driver->vlans; i++) {
- sprintf(buf, "%d", i);
- priv->vlans[i] = proc_mkdir(buf, priv->vlan_dir);
- if (driver->vlan_handlers != NULL)
- add_handlers(driver, driver->vlan_handlers, priv->vlans[i], i);
- }
- priv->vlans[i] = NULL;
-
-
- return 0;
-}
-
-static inline int isspace(char c) {
- switch(c) {
- case ' ':
- case 0x09:
- case 0x0a:
- case 0x0d:
- return 1;
- default:
- return 0;
- }
-}
-
-#define toupper(c) (islower(c) ? ((c) ^ 0x20) : (c))
-#define islower(c) (((unsigned char)((c) - 'a')) < 26)
-
-int switch_parse_media(char *buf)
-{
- char *str = buf;
- while (*buf != 0) {
- *buf = toupper(*buf);
- buf++;
- }
-
- if (strncmp(str, "AUTO", 4) == 0)
- return SWITCH_MEDIA_AUTO;
- else if (strncmp(str, "100FD", 5) == 0)
- return SWITCH_MEDIA_100 | SWITCH_MEDIA_FD;
- else if (strncmp(str, "100HD", 5) == 0)
- return SWITCH_MEDIA_100;
- else if (strncmp(str, "10FD", 4) == 0)
- return SWITCH_MEDIA_FD;
- else if (strncmp(str, "10HD", 4) == 0)
- return 0;
- else return -1;
-}
-
-int switch_print_media(char *buf, int media)
-{
- int len = 0;
-
- if (media & SWITCH_MEDIA_AUTO)
- len = sprintf(buf, "Auto");
- else if (media == (SWITCH_MEDIA_100 | SWITCH_MEDIA_FD))
- len = sprintf(buf, "100FD");
- else if (media == SWITCH_MEDIA_100)
- len = sprintf(buf, "100HD");
- else if (media == SWITCH_MEDIA_FD)
- len = sprintf(buf, "10FD");
- else if (media == 0)
- len = sprintf(buf, "10HD");
- else
- len = sprintf(buf, "Invalid");
-
- return len;
-}
-
-switch_vlan_config *switch_parse_vlan(switch_driver *driver, char *buf)
-{
- switch_vlan_config *c;
- int j, u, p, s;
-
- c = kmalloc(sizeof(switch_vlan_config), GFP_KERNEL);
- memset(c, 0, sizeof(switch_vlan_config));
-
- while (isspace(*buf)) buf++;
- j = 0;
- while (*buf >= '0' && *buf <= '9') {
- j *= 10;
- j += *buf++ - '0';
-
- u = ((j == driver->cpuport) ? 0 : 1);
- p = 0;
- s = !(*buf >= '0' && *buf <= '9');
-
- if (s) {
- while (s && !isspace(*buf) && (*buf != 0)) {
- switch(*buf) {
- case 'u':
- u = 1;
- break;
- case 't':
- u = 0;
- break;
- case '*':
- p = 1;
- break;
- }
- buf++;
- }
- c->port |= (1 << j);
- if (u)
- c->untag |= (1 << j);
- if (p)
- c->pvid |= (1 << j);
-
- j = 0;
- }
-
- while (isspace(*buf)) buf++;
- }
- if (*buf != 0) return NULL;
-
- c->port &= (1 << driver->ports) - 1;
- c->untag &= (1 << driver->ports) - 1;
- c->pvid &= (1 << driver->ports) - 1;
-
- return c;
-}
-
-
-int switch_register_driver(switch_driver *driver)
-{
- struct list_head *pos;
- switch_driver *new;
- int ret;
-
- list_for_each(pos, &drivers.list) {
- if (strcmp(list_entry(pos, switch_driver, list)->name, driver->name) == 0) {
- printk("Switch driver '%s' already exists in the kernel\n", driver->name);
- return -EINVAL;
- }
- if (strcmp(list_entry(pos, switch_driver, list)->interface, driver->interface) == 0) {
- printk("There is already a switch registered on the device '%s'\n", driver->interface);
- return -EINVAL;
- }
- }
-
- new = kmalloc(sizeof(switch_driver), GFP_KERNEL);
- memcpy(new, driver, sizeof(switch_driver));
- new->name = strdup(driver->name);
- new->interface = strdup(driver->interface);
-
- if ((ret = do_register(new)) < 0) {
- kfree(new->name);
- kfree(new);
- return ret;
- }
- INIT_LIST_HEAD(&new->list);
- list_add(&new->list, &drivers.list);
-
- return 0;
-}
-
-void switch_unregister_driver(char *name) {
- struct list_head *pos, *q;
- switch_driver *tmp;
-
- list_for_each_safe(pos, q, &drivers.list) {
- tmp = list_entry(pos, switch_driver, list);
- if (strcmp(tmp->name, name) == 0) {
- do_unregister(tmp);
- list_del(pos);
- kfree(tmp->name);
- kfree(tmp);
-
- return;
- }
- }
-}
-
-static int __init switch_init()
-{
- if ((switch_root = proc_mkdir("switch", NULL)) == NULL) {
- printk("%s: proc_mkdir failed.\n", __FILE__);
- return -ENODEV;
- }
-
- INIT_LIST_HEAD(&drivers.list);
-
- return 0;
-}
-
-static void __exit switch_exit()
-{
- remove_proc_entry("switch", NULL);
-}
-
-MODULE_AUTHOR("Felix Fietkau <openwrt@nbd.name>");
-MODULE_LICENSE("GPL");
-
-EXPORT_SYMBOL(switch_register_driver);
-EXPORT_SYMBOL(switch_unregister_driver);
-EXPORT_SYMBOL(switch_parse_vlan);
-EXPORT_SYMBOL(switch_parse_media);
-EXPORT_SYMBOL(switch_print_media);
-
-module_init(switch_init);
-module_exit(switch_exit);
diff --git a/openwrt/target/linux/package/switch/src/switch-core.h b/openwrt/target/linux/package/switch/src/switch-core.h
deleted file mode 100644
index 5292469..0000000
--- a/openwrt/target/linux/package/switch/src/switch-core.h
+++ /dev/null
@@ -1,59 +0,0 @@
-#ifndef __SWITCH_CORE_H
-#define __SWITCH_CORE_H
-
-#include <linux/version.h>
-#include <linux/list.h>
-#define SWITCH_MAX_BUFSZ 4096
-
-#define SWITCH_MEDIA_AUTO 1
-#define SWITCH_MEDIA_100 2
-#define SWITCH_MEDIA_FD 4
-
-#ifndef KERNEL_VERSION
-#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
-#endif
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-#define LINUX_2_4
-#endif
-
-typedef int (*switch_handler)(void *driver, char *buf, int nr);
-
-typedef struct {
- char *name;
- switch_handler read, write;
-} switch_config;
-
-typedef struct {
- struct list_head list;
- char *name;
- char *version;
- char *interface;
- int cpuport;
- int ports;
- int vlans;
- switch_config *driver_handlers, *port_handlers, *vlan_handlers;
- void *data;
- void *priv;
-} switch_driver;
-
-typedef struct {
- u32 port, untag, pvid;
-} switch_vlan_config;
-
-
-extern int switch_register_driver(switch_driver *driver);
-extern void switch_unregister_driver(char *name);
-extern switch_vlan_config *switch_parse_vlan(switch_driver *driver, char *buf);
-extern int switch_parse_media(char *buf);
-extern int switch_print_media(char *buf, int media);
-
-static inline char *strdup(char *str)
-{
- char *new = kmalloc(strlen(str) + 1, GFP_KERNEL);
- strcpy(new, str);
- return new;
-}
-
-
-#endif
diff --git a/openwrt/target/linux/package/switch/src/switch-robo.c b/openwrt/target/linux/package/switch/src/switch-robo.c
deleted file mode 100644
index eb93f4b..0000000
--- a/openwrt/target/linux/package/switch/src/switch-robo.c
+++ /dev/null
@@ -1,480 +0,0 @@
-/*
- * Broadcom BCM5325E/536x switch configuration module
- *
- * Copyright (C) 2005 Felix Fietkau <nbd@nbd.name>
- * Based on 'robocfg' by Oleg I. Vdovikin
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
- */
-
-#include <linux/config.h>
-#include <linux/module.h>
-#include <linux/init.h>
-#include <linux/if.h>
-#include <linux/if_arp.h>
-#include <linux/sockios.h>
-#include <linux/ethtool.h>
-#include <linux/mii.h>
-#include <asm/uaccess.h>
-
-#include "switch-core.h"
-#include "etc53xx.h"
-
-#define DRIVER_NAME "bcm53xx"
-#define DRIVER_VERSION "0.01"
-
-#define ROBO_PHY_ADDR 0x1E /* robo switch phy address */
-
-/* MII registers */
-#define REG_MII_PAGE 0x10 /* MII Page register */
-#define REG_MII_ADDR 0x11 /* MII Address register */
-#define REG_MII_DATA0 0x18 /* MII Data register 0 */
-
-#define REG_MII_PAGE_ENABLE 1
-#define REG_MII_ADDR_WRITE 1
-#define REG_MII_ADDR_READ 2
-
-/* Private et.o ioctls */
-#define SIOCGETCPHYRD (SIOCDEVPRIVATE + 9)
-#define SIOCSETCPHYWR (SIOCDEVPRIVATE + 10)
-
-static char *device;
-static int use_et = 0;
-static int is_5350 = 0;
-static struct ifreq ifr;
-static struct net_device *dev;
-static unsigned char port[6] = { 0, 1, 2, 3, 4, 8 };
-
-static int do_ioctl(int cmd, void *buf)
-{
- mm_segment_t old_fs = get_fs();
- int ret;
-
- if (buf != NULL)
- ifr.ifr_data = (caddr_t) buf;
-
- set_fs(KERNEL_DS);
- ret = dev->do_ioctl(dev, &ifr, cmd);
- set_fs(old_fs);
-
- return ret;
-}
-
-static u16 mdio_read(__u16 phy_id, __u8 reg)
-{
- if (use_et) {
- int args[2] = { reg };
-
- if (phy_id != ROBO_PHY_ADDR) {
- printk(
- "Access to real 'phy' registers unavaliable.\n"
- "Upgrade kernel driver.\n");
-
- return 0xffff;
- }
-
-
- if (do_ioctl(SIOCGETCPHYRD, &args) < 0) {
- printk("[%s:%d] SIOCGETCPHYRD failed!\n", __FILE__, __LINE__);
- return 0xffff;
- }
-
- return args[1];
- } else {
- struct mii_ioctl_data *mii = (struct mii_ioctl_data *) &ifr.ifr_data;
- mii->phy_id = phy_id;
- mii->reg_num = reg;
-
- if (do_ioctl(SIOCGMIIREG, NULL) < 0) {
- printk("[%s:%d] SIOCGMIIREG failed!\n", __FILE__, __LINE__);
-
- return 0xffff;
- }
-
- return mii->val_out;
- }
-}
-
-static void mdio_write(__u16 phy_id, __u8 reg, __u16 val)
-{
- if (use_et) {
- int args[2] = { reg, val };
-
- if (phy_id != ROBO_PHY_ADDR) {
- printk(
- "Access to real 'phy' registers unavaliable.\n"
- "Upgrade kernel driver.\n");
-
- return;
- }
-
- if (do_ioctl(SIOCSETCPHYWR, args) < 0) {
- printk("[%s:%d] SIOCGETCPHYWR failed!\n", __FILE__, __LINE__);
- return;
- }
- } else {
- struct mii_ioctl_data *mii = (struct mii_ioctl_data *)&ifr.ifr_data;
-
- mii->phy_id = phy_id;
- mii->reg_num = reg;
- mii->val_in = val;
-
- if (do_ioctl(SIOCSMIIREG, NULL) < 0) {
- printk("[%s:%d] SIOCSMIIREG failed!\n", __FILE__, __LINE__);
- return;
- }
- }
-}
-
-static int robo_reg(__u8 page, __u8 reg, __u8 op)
-{
- int i = 3;
-
- /* set page number */
- mdio_write(ROBO_PHY_ADDR, REG_MII_PAGE,
- (page << 8) | REG_MII_PAGE_ENABLE);
-
- /* set register address */
- mdio_write(ROBO_PHY_ADDR, REG_MII_ADDR,
- (reg << 8) | op);
-
- /* check if operation completed */
- while (i--) {
- if ((mdio_read(ROBO_PHY_ADDR, REG_MII_ADDR) & 3) == 0)
- return 0;
- }
-
- printk("[%s:%d] timeout in robo_reg!\n", __FILE__, __LINE__);
-
- return 0;
-}
-
-static void robo_read(__u8 page, __u8 reg, __u16 *val, int count)
-{
- int i;
-
- robo_reg(page, reg, REG_MII_ADDR_READ);
-
- for (i = 0; i < count; i++)
- val[i] = mdio_read(ROBO_PHY_ADDR, REG_MII_DATA0 + i);
-}
-
-static __u16 robo_read16(__u8 page, __u8 reg)
-{
- robo_reg(page, reg, REG_MII_ADDR_READ);
-
- return mdio_read(ROBO_PHY_ADDR, REG_MII_DATA0);
-}
-
-static __u32 robo_read32(__u8 page, __u8 reg)
-{
- robo_reg(page, reg, REG_MII_ADDR_READ);
-
- return mdio_read(ROBO_PHY_ADDR, REG_MII_DATA0) +
- (mdio_read(ROBO_PHY_ADDR, REG_MII_DATA0 + 1) << 16);
-}
-
-static void robo_write16(__u8 page, __u8 reg, __u16 val16)
-{
- /* write data */
- mdio_write(ROBO_PHY_ADDR, REG_MII_DATA0, val16);
-
- robo_reg(page, reg, REG_MII_ADDR_WRITE);
-}
-
-static void robo_write32(__u8 page, __u8 reg, __u32 val32)
-{
- /* write data */
- mdio_write(ROBO_PHY_ADDR, REG_MII_DATA0, val32 & 65535);
- mdio_write(ROBO_PHY_ADDR, REG_MII_DATA0 + 1, val32 >> 16);
-
- robo_reg(page, reg, REG_MII_ADDR_WRITE);
-}
-
-/* checks that attached switch is 5325E/5350 */
-static int robo_vlan5350()
-{
- /* set vlan access id to 15 and read it back */
- __u16 val16 = 15;
- robo_write16(ROBO_VLAN_PAGE, ROBO_VLAN_TABLE_ACCESS_5350, val16);
-
- /* 5365 will refuse this as it does not have this reg */
- return (robo_read16(ROBO_VLAN_PAGE, ROBO_VLAN_TABLE_ACCESS_5350) == val16);
-}
-
-
-
-static int robo_probe(char *devname)
-{
- struct ethtool_drvinfo info;
- int i;
- __u32 phyid;
-
- printk("Probing device %s: ", devname);
- strcpy(ifr.ifr_name, devname);
-
- if ((dev = dev_get_by_name(devname)) == NULL) {
- printk("No such device\n");
- return 1;
- }
-
- info.cmd = ETHTOOL_GDRVINFO;
- if (do_ioctl(SIOCETHTOOL, (void *) &info) < 0) {
- printk("SIOCETHTOOL: not supported\n");
- return 1;
- }
-
- /* try access using MII ioctls - get phy address */
- if (do_ioctl(SIOCGMIIPHY, NULL) < 0) {
- use_et = 1;
- } else {
- /* got phy address check for robo address */
- struct mii_ioctl_data *mii = (struct mii_ioctl_data *) &ifr.ifr_data;
- if (mii->phy_id != ROBO_PHY_ADDR) {
- printk("Invalid phy address (%d)\n", mii->phy_id);
- return 1;
- }
- }
-
- phyid = mdio_read(ROBO_PHY_ADDR, 0x2) |
- (mdio_read(ROBO_PHY_ADDR, 0x3) << 16);
-
- if (phyid == 0xffffffff || phyid == 0x55210022) {
- printk("No Robo switch in managed mode found\n");
- return 1;
- }
-
- is_5350 = robo_vlan5350();
-
- printk("found!\n");
- return 0;
-}
-
-
-static int handle_vlan_port_read(void *driver, char *buf, int nr)
-{
- __u16 val16;
- int len = 0;
- int j;
-
- val16 = (nr) /* vlan */ | (0 << 12) /* read */ | (1 << 13) /* enable */;
-
- if (is_5350) {
- u32 val32;
- robo_write16(ROBO_VLAN_PAGE, ROBO_VLAN_TABLE_ACCESS_5350, val16);
- /* actual read */
- val32 = robo_read32(ROBO_VLAN_PAGE, ROBO_VLAN_READ);
- if ((val32 & (1 << 20)) /* valid */) {
- for (j = 0; j < 6; j++) {
- if (val32 & (1 << j)) {
- len += sprintf(buf + len, "%d", j);
- if (val32 & (1 << (j + 6))) {
- if (j == 5) buf[len++] = 'u';
- } else {
- buf[len++] = 't';
- if (robo_read16(ROBO_VLAN_PAGE, ROBO_VLAN_PORT0_DEF_TAG + (j << 1)) == nr)
- buf[len++] = '*';
- }
- buf[len++] = '\t';
- }
- }
- len += sprintf(buf + len, "\n");
- }
- } else {
- robo_write16(ROBO_VLAN_PAGE, ROBO_VLAN_TABLE_ACCESS, val16);
- /* actual read */
- val16 = robo_read16(ROBO_VLAN_PAGE, ROBO_VLAN_READ);
- if ((val16 & (1 << 14)) /* valid */) {
- for (j = 0; j < 6; j++) {
- if (val16 & (1 << j)) {
- len += sprintf(buf + len, "%d", j);
- if (val16 & (1 << (j + 7))) {
- if (j == 5) buf[len++] = 'u';
- } else {
- buf[len++] = 't';
- if (robo_read16(ROBO_VLAN_PAGE, ROBO_VLAN_PORT0_DEF_TAG + (j << 1)) == nr)
- buf[len++] = '*';
- }
- buf[len++] = '\t';
- }
- }
- len += sprintf(buf + len, "\n");
- }
- }
-
- buf[len] = '\0';
-
- return len;
-}
-
-static int handle_vlan_port_write(void *driver, char *buf, int nr)
-{
- switch_driver *d = (switch_driver *) driver;
- switch_vlan_config *c = switch_parse_vlan(d, buf);
- int j;
- __u16 val16;
-
- if (c == NULL)
- return -EINVAL;
-
- for (j = 0; j < d->ports; j++) {
- if ((c->untag | c->pvid) & (1 << j))
- /* change default vlan tag */
- robo_write16(ROBO_VLAN_PAGE, ROBO_VLAN_PORT0_DEF_TAG + (j << 1), nr);
- }
-
- /* write config now */
- val16 = (nr) /* vlan */ | (1 << 12) /* write */ | (1 << 13) /* enable */;
- if (is_5350) {
- robo_write32(ROBO_VLAN_PAGE, ROBO_VLAN_WRITE_5350,
- (1 << 20) /* valid */ | (c->untag << 6) | c->port);
- robo_write16(ROBO_VLAN_PAGE, ROBO_VLAN_TABLE_ACCESS_5350, val16);
- } else {
- robo_write16(ROBO_VLAN_PAGE, ROBO_VLAN_WRITE,
- (1 << 14) /* valid */ | (c->untag << 7) | c->port);
- robo_write16(ROBO_VLAN_PAGE, ROBO_VLAN_TABLE_ACCESS, val16);
- }
-
- return 0;
-}
-
-#define set_switch(state) \
- robo_write16(ROBO_CTRL_PAGE, ROBO_SWITCH_MODE, (robo_read16(ROBO_CTRL_PAGE, ROBO_SWITCH_MODE) & ~2) | (state ? 2 : 0));
-
-static int handle_enable_read(void *driver, char *buf, int nr)
-{
- return sprintf(buf, "%d\n", (((robo_read16(ROBO_CTRL_PAGE, ROBO_SWITCH_MODE) & 2) == 2) ? 1 : 0));
-}
-
-static int handle_enable_write(void *driver, char *buf, int nr)
-{
- set_switch(buf[0] == '1');
-
- return 0;
-}
-
-static int handle_enable_vlan_read(void *driver, char *buf, int nr)
-{
- return sprintf(buf, "%d\n", (((robo_read16(ROBO_VLAN_PAGE, ROBO_VLAN_CTRL0) & (1 << 7)) == (1 << 7)) ? 1 : 0));
-}
-
-static int handle_enable_vlan_write(void *driver, char *buf, int nr)
-{
- int disable = ((buf[0] != '1') ? 1 : 0);
-
- robo_write16(ROBO_VLAN_PAGE, ROBO_VLAN_CTRL0, disable ? 0 :
- (1 << 7) /* 802.1Q VLAN */ | (3 << 5) /* mac check and hash */);
- robo_write16(ROBO_VLAN_PAGE, ROBO_VLAN_CTRL1, disable ? 0 :
- (1 << 1) | (1 << 2) | (1 << 3) /* RSV multicast */);
- robo_write16(ROBO_VLAN_PAGE, ROBO_VLAN_CTRL4, disable ? 0 :
- (1 << 6) /* drop invalid VID frames */);
- robo_write16(ROBO_VLAN_PAGE, ROBO_VLAN_CTRL5, disable ? 0 :
- (1 << 3) /* drop miss V table frames */);
-
- return 0;
-}
-
-static int handle_reset(void *driver, char *buf, int nr)
-{
- switch_driver *d = (switch_driver *) driver;
- switch_vlan_config *c = switch_parse_vlan(d, buf);
- int j;
- __u16 val16;
-
- if (c == NULL)
- return -EINVAL;
-
- /* disable switching */
- set_switch(0);
-
- /* reset vlans */
- for (j = 0; j <= (is_5350 ? VLAN_ID_MAX5350 : VLAN_ID_MAX); j++) {
- /* write config now */
- val16 = (j) /* vlan */ | (1 << 12) /* write */ | (1 << 13) /* enable */;
- if (is_5350)
- robo_write32(ROBO_VLAN_PAGE, ROBO_VLAN_WRITE_5350, 0);
- else
- robo_write16(ROBO_VLAN_PAGE, ROBO_VLAN_WRITE, 0);
- robo_write16(ROBO_VLAN_PAGE, (is_5350 ? ROBO_VLAN_TABLE_ACCESS_5350 : ROBO_VLAN_TABLE_ACCESS), val16);
- }
-
- /* reset ports to a known good state */
- for (j = 0; j < d->ports; j++) {
- robo_write16(ROBO_CTRL_PAGE, port[j], 0x0000);
- robo_write16(ROBO_VLAN_PAGE, ROBO_VLAN_PORT0_DEF_TAG + (j << 1), 0);
- }
-
- /* enable switching */
- set_switch(1);
-
- /* enable vlans */
- handle_enable_vlan_write(driver, "1", 0);
-
- return 0;
-}
-
-static int __init robo_init()
-{
- int notfound = 1;
-
- device = strdup("ethX");
- for (device[3] = '0'; (device[3] <= '3') && notfound; device[3]++) {
- notfound = robo_probe(device);
- }
- device[3]--;
-
- if (notfound) {
- kfree(device);
- return -ENODEV;
- } else {
- switch_config cfg[] = {
- {"enable", handle_enable_read, handle_enable_write},
- {"enable_vlan", handle_enable_vlan_read, handle_enable_vlan_write},
- {"reset", NULL, handle_reset},
- {NULL, NULL, NULL}
- };
- switch_config vlan[] = {
- {"ports", handle_vlan_port_read, handle_vlan_port_write},
- {NULL, NULL, NULL}
- };
- switch_driver driver = {
- name: DRIVER_NAME,
- version: DRIVER_VERSION,
- interface: device,
- cpuport: 5,
- ports: 6,
- vlans: 16,
- driver_handlers: cfg,
- port_handlers: NULL,
- vlan_handlers: vlan,
- };
-
- return switch_register_driver(&driver);
- }
-}
-
-static void __exit robo_exit()
-{
- switch_unregister_driver(DRIVER_NAME);
- kfree(device);
-}
-
-
-MODULE_AUTHOR("Felix Fietkau <openwrt@nbd.name>");
-MODULE_LICENSE("GPL");
-
-module_init(robo_init);
-module_exit(robo_exit);
diff --git a/openwrt/target/linux/package/ueagle-atm/Config.in b/openwrt/target/linux/package/ueagle-atm/Config.in
deleted file mode 100644
index 17b619c..0000000
--- a/openwrt/target/linux/package/ueagle-atm/Config.in
+++ /dev/null
@@ -1,10 +0,0 @@
-config BR2_PACKAGE_KMOD_UEAGLE_ATM
- prompt "kmod-ueagle-atm.................... Kernel driver for Eagle 8051 based USB ADSL modems"
- tristate
- depends BR2_LINUX_2_6_BRCM
- default m if CONFIG_DEVEL
- help
- Kernel driver for Eagle 8051 USB ADSL modems
-
- http://www.eagle-usb.org
-
diff --git a/openwrt/target/linux/package/ueagle-atm/Makefile b/openwrt/target/linux/package/ueagle-atm/Makefile
deleted file mode 100644
index 3872727..0000000
--- a/openwrt/target/linux/package/ueagle-atm/Makefile
+++ /dev/null
@@ -1,42 +0,0 @@
-# $Id: Makefile 2767 2005-12-25 02:10:14Z wbx $
-
-include $(TOPDIR)/rules.mk
-include ../../rules.mk
-
-PKG_NAME:=ueagle-atm
-PKG_VERSION:=1.0d1
-PKG_RELEASE:=1
-PKG_MD5SUM:=5da1fceb15168f4c7ad407a3e38ddecb
-
-PKG_SOURCE_URL:=http://castet.matthieu.free.fr/eagle/release/
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_CAT:=zcat
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
-
-include $(TOPDIR)/package/rules.mk
-
-$(eval $(call PKG_template,KMOD_UEAGLE_ATM,kmod-ueagle-atm,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel-$(LINUX_VERSION)-$(BOARD) ($(LINUX_RELEASE))))
-
-$(PKG_BUILD_DIR)/.configured:
- touch $@
-
-$(PKG_BUILD_DIR)/.built:
- $(MAKE) -C $(PKG_BUILD_DIR) \
- ARCH="$(LINUX_KARCH)" \
- CROSS_COMPILE="$(TARGET_CROSS)" \
- TARGET="$(HAL_TARGET)" \
- KERNELDIR="$(LINUX_DIR)" \
- all
- touch $@
-
-$(IPKG_KMOD_UEAGLE_ATM):
- install -m0755 -d $(IDIR_KMOD_UEAGLE_ATM)/lib/modules/$(LINUX_VERSION) $(IDIR_KMOD_UEAGLE_ATM)/etc/modules.d
- install -m0644 ./files/$(PKG_NAME).modules $(IDIR_KMOD_UEAGLE_ATM)/etc/modules.d/10-$(PKG_NAME)
- $(CP) $(PKG_BUILD_DIR)/driver/ueagle-atm.$(LINUX_KMOD_SUFFIX) \
- $(PKG_BUILD_DIR)/usbatm_iso/usbatm.$(LINUX_KMOD_SUFFIX) \
- $(IDIR_KMOD_UEAGLE_ATM)/lib/modules/$(LINUX_VERSION)/
- $(RSTRIP_KMOD) $(IDIR_KMOD_UEAGLE_ATM)
- $(IPKG_BUILD) $(IDIR_KMOD_UEAGLE_ATM) $(PACKAGE_DIR)
-
diff --git a/openwrt/target/linux/package/ueagle-atm/files/ueagle-atm.modules b/openwrt/target/linux/package/ueagle-atm/files/ueagle-atm.modules
deleted file mode 100644
index 6343f50..0000000
--- a/openwrt/target/linux/package/ueagle-atm/files/ueagle-atm.modules
+++ /dev/null
@@ -1,2 +0,0 @@
-usbatm
-ueagle-atm
diff --git a/openwrt/target/linux/package/ueagle-atm/ipkg/kmod-ueagle-atm.control b/openwrt/target/linux/package/ueagle-atm/ipkg/kmod-ueagle-atm.control
deleted file mode 100644
index 9659aa0..0000000
--- a/openwrt/target/linux/package/ueagle-atm/ipkg/kmod-ueagle-atm.control
+++ /dev/null
@@ -1,5 +0,0 @@
-Package: kmod-ueagle-atm
-Priority: optional
-Section: sys
-Depends: kmod-usb-core
-Description: Kernel driver for Eagle 8051 based USB ADSL modems
diff --git a/openwrt/target/linux/package/ueagle-atm/patches/100-compile_fix.patch b/openwrt/target/linux/package/ueagle-atm/patches/100-compile_fix.patch
deleted file mode 100644
index b8e70a2..0000000
--- a/openwrt/target/linux/package/ueagle-atm/patches/100-compile_fix.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -Nur ueagle-atm-1.0d1/driver/ueagle.c ueagle-atm-1.0d1.patched/driver/ueagle.c
---- ueagle-atm-1.0d1/driver/ueagle.c 2005-11-19 18:36:04.000000000 +0100
-+++ ueagle-atm-1.0d1.patched/driver/ueagle.c 2006-03-29 02:03:43.000000000 +0200
-@@ -1652,7 +1652,6 @@
- * USB driver descriptor
- */
- static struct usb_driver uea_driver = {
-- .owner = THIS_MODULE,
- .name = "ueagle-atm",
- .id_table = uea_ids,
- .probe = uea_probe,
diff --git a/openwrt/target/linux/package/wlcompat/Config.in b/openwrt/target/linux/package/wlcompat/Config.in
deleted file mode 100644
index 1e5f5e7..0000000
--- a/openwrt/target/linux/package/wlcompat/Config.in
+++ /dev/null
@@ -1,17 +0,0 @@
-config BR2_PACKAGE_KMOD_WLCOMPAT
- prompt "kmod-wlcompat..................... Wrapper providing Wireless Extensions for Broadcom wl module"
- tristate
- default y
- depends BR2_PACKAGE_KMOD_BRCM_WL || BR2_PACKAGE_KMOD_BRCM_WL2
- help
- A wrapper module, that provides Wireless Extension support for the
- proprietary Broadcom wl module.
-
-config BR2_PACKAGE_KMOD_WLCOMPAT_DEBUG
- prompt "kmod-wlcompat-debug............... Wrapper providing Wireless Extensions for Broadcom wl module (debug)"
- tristate
- default m
- depends BR2_PACKAGE_KMOD_BRCM_WL || BR2_PACKAGE_KMOD_BRCM_WL2
- help
- A wrapper module, that provides Wireless Extension support for the
- proprietary Broadcom wl module. (debug version)
diff --git a/openwrt/target/linux/package/wlcompat/Makefile b/openwrt/target/linux/package/wlcompat/Makefile
deleted file mode 100644
index cdc02ea..0000000
--- a/openwrt/target/linux/package/wlcompat/Makefile
+++ /dev/null
@@ -1,43 +0,0 @@
-# $Id$
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME := kmod-wlcompat
-PKG_RELEASE := 3
-PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
-
-include $(TOPDIR)/package/rules.mk
-
-$(eval $(call PKG_template,KMOD_WLCOMPAT,$(PKG_NAME),$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE))))
-$(eval $(call PKG_template,KMOD_WLCOMPAT_DEBUG,$(PKG_NAME)-debug,$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE))))
-
-WLCOMPAT_FLAGS:=$(TARGET_CFLAGS) -D__KERNEL__ -fno-strict-aliasing -fno-common -fomit-frame-pointer -G 0 \
- -mno-abicalls -fno-pic -finline-limit=100000 -mabi=32 -march=mips32 -Wa,-32 -Wa,-march=mips32 \
- -Wa,-mips32 -Wa,--trap -DMODULE -mlong-calls -fno-common -I. -I linux-2.4 -funsigned-char -nostdinc \
- -iwithprefix include -I$(LINUX_DIR)/include -I$(LINUX_DIR)/include/asm/gcc -I$(STAGING_DIR)/usr/include -c
-
-$(PKG_BUILD_DIR)/.prepared:
- mkdir -p $(PKG_BUILD_DIR)
- touch $@
-
-$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/wlcompat.o $(PKG_BUILD_DIR)/wlcompat-debug.o
- touch $@
-
-$(PKG_BUILD_DIR)/wlcompat.o: $(PKG_BUILD_DIR)/.prepared
- $(TARGET_CC) $(WLCOMPAT_FLAGS) -o $@ wlcompat.c
-
-$(PKG_BUILD_DIR)/wlcompat-debug.o: $(PKG_BUILD_DIR)/.prepared
- $(TARGET_CC) -DDEBUG $(WLCOMPAT_FLAGS) -o $@ wlcompat.c
-
-$(IPKG_KMOD_WLCOMPAT): $(PKG_BUILD_DIR)/wlcompat.o
- mkdir -p $(IDIR_KMOD_WLCOMPAT)/etc/modules.d
- echo "wlcompat" > $(IDIR_KMOD_WLCOMPAT)/etc/modules.d/30-wlcompat
- mkdir -p $(IDIR_KMOD_WLCOMPAT)/lib/modules/$(LINUX_VERSION)
- $(CP) $(PKG_BUILD_DIR)/wlcompat.o $(IDIR_KMOD_WLCOMPAT)/lib/modules/$(LINUX_VERSION)/
- $(IPKG_BUILD) $(IDIR_KMOD_WLCOMPAT) $(PACKAGE_DIR)
-
-$(IPKG_KMOD_WLCOMPAT_DEBUG): $(PKG_BUILD_DIR)/wlcompat-debug.o
- mkdir -p $(IDIR_KMOD_WLCOMPAT_DEBUG)/lib/modules/$(LINUX_VERSION)
- $(CP) $(PKG_BUILD_DIR)/wlcompat-debug.o $(IDIR_KMOD_WLCOMPAT_DEBUG)/lib/modules/$(LINUX_VERSION)/
- $(IPKG_BUILD) $(IDIR_KMOD_WLCOMPAT_DEBUG) $(PACKAGE_DIR)
-
diff --git a/openwrt/target/linux/package/wlcompat/ipkg/kmod-wlcompat-debug.control b/openwrt/target/linux/package/wlcompat/ipkg/kmod-wlcompat-debug.control
deleted file mode 100644
index 583b05b..0000000
--- a/openwrt/target/linux/package/wlcompat/ipkg/kmod-wlcompat-debug.control
+++ /dev/null
@@ -1,5 +0,0 @@
-Package: kmod-wlcompat-debug
-Priority: optional
-Section: sys
-Depends: kmod-brcm-wl
-Description: Compatibility module for using the Wireless Extension with broadcom's wl (debug)
diff --git a/openwrt/target/linux/package/wlcompat/ipkg/kmod-wlcompat.control b/openwrt/target/linux/package/wlcompat/ipkg/kmod-wlcompat.control
deleted file mode 100644
index b985717..0000000
--- a/openwrt/target/linux/package/wlcompat/ipkg/kmod-wlcompat.control
+++ /dev/null
@@ -1,5 +0,0 @@
-Package: kmod-wlcompat
-Priority: optional
-Section: sys
-Depends: kmod-brcm-wl
-Description: Compatibility module for using the Wireless Extension with broadcom's wl
diff --git a/openwrt/target/linux/package/wlcompat/wlcompat.c b/openwrt/target/linux/package/wlcompat/wlcompat.c
deleted file mode 100644
index 1540a21..0000000
--- a/openwrt/target/linux/package/wlcompat/wlcompat.c
+++ /dev/null
@@ -1,1021 +0,0 @@
-/*
- * wlcompat.c
- *
- * Copyright (C) 2005 Mike Baker,
- * Felix Fietkau <openwrt@nbd.name>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id$
- */
-
-
-#include <linux/config.h>
-#include <linux/module.h>
-#include <linux/init.h>
-#include <linux/if_arp.h>
-#include <asm/uaccess.h>
-#include <linux/wireless.h>
-
-#include <net/iw_handler.h>
-#include <wlioctl.h>
-
-static struct net_device *dev;
-static unsigned short bss_force;
-static struct iw_statistics wstats;
-char buf[WLC_IOCTL_MAXLEN];
-
-/* The frequency of each channel in MHz */
-const long channel_frequency[] = {
- 2412, 2417, 2422, 2427, 2432, 2437, 2442,
- 2447, 2452, 2457, 2462, 2467, 2472, 2484
-};
-#define NUM_CHANNELS ( sizeof(channel_frequency) / sizeof(channel_frequency[0]) )
-
-typedef struct internal_wsec_key {
- uint8 index; // 0x00
- uint8 unknown_1; // 0x01
- uint8 type; // 0x02
- uint8 unknown_2[7]; // 0x03
- uint8 len; // 0x0a
- uint8 pad[3];
- char data[32]; // 0x0e
-} wkey;
-
-
-static int wlcompat_private_ioctl(struct net_device *dev,
- struct iw_request_info *info,
- union iwreq_data *wrqu,
- char *extra);
-#ifdef DEBUG
-void print_buffer(int len, unsigned char *buf);
-#endif
-
-static int wl_ioctl(struct net_device *dev, int cmd, void *buf, int len)
-{
- mm_segment_t old_fs = get_fs();
- struct ifreq ifr;
- int ret;
- wl_ioctl_t ioc;
- ioc.cmd = cmd;
- ioc.buf = buf;
- ioc.len = len;
- strncpy(ifr.ifr_name, dev->name, IFNAMSIZ);
- ifr.ifr_data = (caddr_t) &ioc;
- set_fs(KERNEL_DS);
- ret = dev->do_ioctl(dev,&ifr,SIOCDEVPRIVATE);
- set_fs (old_fs);
- return ret;
-}
-
-static int wl_set_val(struct net_device *dev, char *var, void *val, int len)
-{
- char buf[128];
- int buf_len;
- int ret;
-
- /* check for overflow */
- if ((buf_len = strlen(var)) + 1 + len > sizeof(buf))
- return -1;
-
- strcpy(buf, var);
- buf_len += 1;
-
- /* append int value onto the end of the name string */
- memcpy(&(buf[buf_len]), val, len);
- buf_len += len;
-
- ret = wl_ioctl(dev, WLC_SET_VAR, buf, buf_len);
- return ret;
-}
-
-static int wl_get_val(struct net_device *dev, char *var, void *val, int len)
-{
- char buf[128];
- int buf_len;
- int ret;
-
- /* check for overflow */
- if ((buf_len = strlen(var)) + 1 > sizeof(buf) || len > sizeof(buf))
- return -1;
-
- strcpy(buf, var);
- if (ret = wl_ioctl(dev, WLC_GET_VAR, buf, buf_len + len))
- return ret;
-
- memcpy(val, buf, len);
- return 0;
-}
-
-int get_primary_key(struct net_device *dev)
-{
- int key, val;
-
- for (key = val = 0; (key < 4) && (val == 0); key++) {
- val = key;
- if (wl_ioctl(dev, WLC_GET_KEY_PRIMARY, &val, sizeof(val)) < 0)
- return -EINVAL;
- }
- return key;
-}
-
-
-static int wlcompat_ioctl_getiwrange(struct net_device *dev,
- char *extra)
-{
- int i, k;
- struct iw_range *range;
-
- range = (struct iw_range *) extra;
- bzero(extra, sizeof(struct iw_range));
-
- range->we_version_compiled = WIRELESS_EXT;
- range->we_version_source = WIRELESS_EXT;
-
- range->min_nwid = range->max_nwid = 0;
-
- range->num_channels = NUM_CHANNELS;
- k = 0;
- for (i = 0; i < NUM_CHANNELS; i++) {
- range->freq[k].i = i + 1;
- range->freq[k].m = channel_frequency[i] * 100000;
- range->freq[k].e = 1;
- k++;
- if (k >= IW_MAX_FREQUENCIES)
- break;
- }
- range->num_frequency = k;
- range->sensitivity = 3;
-
- /* nbd: don't know what this means, but other drivers set it this way */
- range->pmp_flags = IW_POWER_PERIOD;
- range->pmt_flags = IW_POWER_TIMEOUT;
- range->pm_capa = IW_POWER_PERIOD | IW_POWER_TIMEOUT | IW_POWER_UNICAST_R;
-
- range->min_pmp = 0;
- range->max_pmp = 65535000;
- range->min_pmt = 0;
- range->max_pmt = 65535 * 1000;
-
- range->max_qual.qual = 0;
- range->max_qual.level = 0;
- range->max_qual.noise = 0;
-
- range->min_rts = 0;
- if (wl_ioctl(dev, WLC_GET_RTS, &range->max_rts, sizeof(int)) < 0)
- range->max_rts = 2347;
-
- range->min_frag = 256;
-
- if (wl_ioctl(dev, WLC_GET_FRAG, &range->max_frag, sizeof(int)) < 0)
- range->max_frag = 2346;
-
- range->txpower_capa = IW_TXPOW_DBM;
-
- return 0;
-}
-
-
-static int wlcompat_set_scan(struct net_device *dev,
- struct iw_request_info *info,
- union iwreq_data *wrqu,
- char *extra)
-{
- int ap = 0, oldap = 0;
- wl_scan_params_t params;
-
- memset(&params, 0, sizeof(params));
-
- /* use defaults (same parameters as wl scan) */
- memset(&params.bssid, 0xff, sizeof(params.bssid));
- params.bss_type = DOT11_BSSTYPE_ANY;
- params.scan_type = -1;
- params.nprobes = -1;
- params.active_time = -1;
- params.passive_time = -1;
- params.home_time = -1;
-
- /* can only scan in STA mode */
- wl_ioctl(dev, WLC_GET_AP, &oldap, sizeof(oldap));
- if (oldap > 0)
- wl_ioctl(dev, WLC_SET_AP, &ap, sizeof(ap));
-
- if (wl_ioctl(dev, WLC_SCAN, &params, 64) < 0)
- return -EINVAL;
-
- if (oldap > 0)
- wl_ioctl(dev, WLC_SET_AP, &oldap, sizeof(oldap));
-
- return 0;
-}
-
-
-struct iw_statistics *wlcompat_get_wireless_stats(struct net_device *dev)
-{
- wl_bss_info_t *bss_info = (wl_bss_info_t *) buf;
- get_pktcnt_t pkt;
- unsigned int rssi, noise, ap;
-
- memset(&wstats, 0, sizeof(wstats));
- memset(&pkt, 0, sizeof(pkt));
- memset(buf, 0, sizeof(buf));
- bss_info->version = 0x2000;
- wl_ioctl(dev, WLC_GET_BSS_INFO, bss_info, WLC_IOCTL_MAXLEN);
- wl_ioctl(dev, WLC_GET_PKTCNTS, &pkt, sizeof(pkt));
-
- rssi = 0;
- if ((wl_ioctl(dev, WLC_GET_AP, &ap, sizeof(ap)) < 0) || ap) {
- if (wl_ioctl(dev, WLC_GET_PHY_NOISE, &noise, sizeof(noise)) < 0)
- noise = 0;
- } else {
- // somehow the structure doesn't fit here
- rssi = buf[82];
- noise = buf[84];
- }
- rssi = (rssi == 0 ? 1 : rssi);
- wstats.qual.updated = 0x10;
- if (rssi <= 1)
- wstats.qual.updated |= 0x20;
- if (noise <= 1)
- wstats.qual.updated |= 0x40;
-
- if ((wstats.qual.updated & 0x60) == 0x60)
- return NULL;
-
- wstats.qual.level = rssi;
- wstats.qual.noise = noise;
- wstats.discard.misc = pkt.rx_bad_pkt;
- wstats.discard.retries = pkt.tx_bad_pkt;
-
- return &wstats;
-}
-
-static int wlcompat_get_scan(struct net_device *dev,
- struct iw_request_info *info,
- union iwreq_data *wrqu,
- char *extra)
-{
- wl_scan_results_t *results = (wl_scan_results_t *) buf;
- wl_bss_info_t *bss_info;
- char *info_ptr;
- char *current_ev = extra;
- char *current_val;
- char *end_buf = extra + IW_SCAN_MAX_DATA;
- struct iw_event iwe;
- int i, j;
- int rssi, noise;
-
- results->buflen = WLC_IOCTL_MAXLEN - sizeof(wl_scan_results_t);
-
- if (wl_ioctl(dev, WLC_SCAN_RESULTS, buf, WLC_IOCTL_MAXLEN) < 0)
- return -EAGAIN;
-
- bss_info = &(results->bss_info[0]);
- info_ptr = (char *) bss_info;
- for (i = 0; i < results->count; i++) {
-
- /* send the cell address (must be sent first) */
- iwe.cmd = SIOCGIWAP;
- iwe.u.ap_addr.sa_family = ARPHRD_ETHER;
- memcpy(&iwe.u.ap_addr.sa_data, &bss_info->BSSID, sizeof(bss_info->BSSID));
- current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, IW_EV_ADDR_LEN);
-
- /* send the ESSID */
- iwe.cmd = SIOCGIWESSID;
- iwe.u.data.length = bss_info->SSID_len;
- if (iwe.u.data.length > IW_ESSID_MAX_SIZE)
- iwe.u.data.length = IW_ESSID_MAX_SIZE;
- iwe.u.data.flags = 1;
- current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, bss_info->SSID);
-
- /* send frequency/channel info */
- iwe.cmd = SIOCGIWFREQ;
- iwe.u.freq.e = 0;
- iwe.u.freq.m = bss_info->channel;
- current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, IW_EV_FREQ_LEN);
-
- /* add quality statistics */
- iwe.cmd = IWEVQUAL;
- iwe.u.qual.qual = 0;
- iwe.u.qual.level = bss_info->RSSI;
- iwe.u.qual.noise = bss_info->phy_noise;
- current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, IW_EV_QUAL_LEN);
-
- /* send rate information */
- iwe.cmd = SIOCGIWRATE;
- current_val = current_ev + IW_EV_LCP_LEN;
- iwe.u.bitrate.fixed = iwe.u.bitrate.disabled = 0;
-
- for(j = 0 ; j < bss_info->rateset.count ; j++) {
- iwe.u.bitrate.value = ((bss_info->rateset.rates[j] & 0x7f) * 500000);
- current_val = iwe_stream_add_value(current_ev, current_val, end_buf, &iwe, IW_EV_PARAM_LEN);
- }
- if((current_val - current_ev) > IW_EV_LCP_LEN)
- current_ev = current_val;
-
- info_ptr += sizeof(wl_bss_info_t);
- if (bss_info->ie_length % 4)
- info_ptr += bss_info->ie_length + 4 - (bss_info->ie_length % 4);
- else
- info_ptr += bss_info->ie_length;
- bss_info = (wl_bss_info_t *) info_ptr;
- }
-
- wrqu->data.length = (current_ev - extra);
- wrqu->data.flags = 0;
-
- return 0;
-}
-
-static int wlcompat_ioctl(struct net_device *dev,
- struct iw_request_info *info,
- union iwreq_data *wrqu,
- char *extra)
-{
- switch (info->cmd) {
- case SIOCGIWNAME:
- strcpy(wrqu->name, "IEEE 802.11-DS");
- break;
- case SIOCGIWFREQ:
- {
- channel_info_t ci;
-
- if (wl_ioctl(dev,WLC_GET_CHANNEL, &ci, sizeof(ci)) < 0)
- return -EINVAL;
-
- wrqu->freq.m = ci.target_channel;
- wrqu->freq.e = 0;
- break;
- }
- case SIOCSIWFREQ:
- {
- if (wrqu->freq.m == -1) {
- wrqu->freq.m = 0;
- if (wl_ioctl(dev, WLC_SET_CHANNEL, &wrqu->freq.m, sizeof(int)) < 0)
- return -EINVAL;
- } else {
- if (wrqu->freq.e == 1) {
- int channel = 0;
- int f = wrqu->freq.m / 100000;
- while ((channel < NUM_CHANNELS + 1) && (f != channel_frequency[channel]))
- channel++;
-
- if (channel == NUM_CHANNELS) // channel not found
- return -EINVAL;
-
- wrqu->freq.e = 0;
- wrqu->freq.m = channel + 1;
- }
- if ((wrqu->freq.e == 0) && (wrqu->freq.m < 1000)) {
- if (wl_ioctl(dev, WLC_SET_CHANNEL, &wrqu->freq.m, sizeof(int)) < 0)
- return -EINVAL;
- } else {
- return -EINVAL;
- }
- }
- break;
- }
- case SIOCSIWAP:
- {
- int ap = 0;
- int infra = 0;
- rw_reg_t reg;
-
- memset(&reg, 0, sizeof(reg));
-
- if (wrqu->ap_addr.sa_family != ARPHRD_ETHER)
- return -EINVAL;
-
- if (wl_ioctl(dev, WLC_GET_AP, &ap, sizeof(ap)) < 0)
- return -EINVAL;
-
- if (wl_ioctl(dev, WLC_GET_INFRA, &infra, sizeof(infra)) < 0)
- return -EINVAL;
-
- if (!infra) {
- wl_ioctl(dev, WLC_SET_BSSID, wrqu->ap_addr.sa_data, 6);
-
- reg.size = 4;
- reg.byteoff = 0x184;
- reg.val = bss_force << 16 | bss_force;
- wl_ioctl(dev, WLC_W_REG, &reg, sizeof(reg));
-
- reg.byteoff = 0x180;
- wl_ioctl(dev, WLC_R_REG, &reg, sizeof(reg));
- reg.val = bss_force << 16;
- wl_ioctl(dev, WLC_W_REG, &reg, sizeof(reg));
- }
-
- if (wl_ioctl(dev, ((ap || !infra) ? WLC_SET_BSSID : WLC_REASSOC), wrqu->ap_addr.sa_data, 6) < 0)
- return -EINVAL;
-
- break;
- }
- case SIOCGIWAP:
- {
-#ifdef DEBUG
- rw_reg_t reg;
- memset(&reg, 0, sizeof(reg));
-
- reg.size = 4;
- reg.byteoff = 0x184;
- wl_ioctl(dev, WLC_R_REG, &reg, sizeof(reg));
- printk("bss time = 0x%08x", reg.val);
-
- reg.byteoff = 0x180;
- wl_ioctl(dev, WLC_R_REG, &reg, sizeof(reg));
- printk("%08x\n", reg.val);
-#endif
-
- wrqu->ap_addr.sa_family = ARPHRD_ETHER;
- if (wl_ioctl(dev,WLC_GET_BSSID,wrqu->ap_addr.sa_data,6) < 0)
- return -EINVAL;
- break;
- }
- case SIOCGIWESSID:
- {
- wlc_ssid_t ssid;
-
- if (wl_ioctl(dev,WLC_GET_SSID, &ssid, sizeof(wlc_ssid_t)) < 0)
- return -EINVAL;
-
- wrqu->essid.flags = wrqu->data.flags = 1;
- wrqu->essid.length = wrqu->data.length = ssid.SSID_len + 1;
- memcpy(extra,ssid.SSID,ssid.SSID_len + 1);
- break;
- }
- case SIOCSIWESSID:
- {
- wlc_ssid_t ssid;
- memset(&ssid, 0, sizeof(ssid));
- ssid.SSID_len = strlen(extra);
- if (ssid.SSID_len > WLC_ESSID_MAX_SIZE)
- ssid.SSID_len = WLC_ESSID_MAX_SIZE;
- memcpy(ssid.SSID, extra, ssid.SSID_len);
- if (wl_ioctl(dev, WLC_SET_SSID, &ssid, sizeof(ssid)) < 0)
- return -EINVAL;
- break;
- }
- case SIOCGIWRTS:
- {
- if (wl_ioctl(dev,WLC_GET_RTS,&(wrqu->rts.value),sizeof(int)) < 0)
- return -EINVAL;
- break;
- }
- case SIOCSIWRTS:
- {
- if (wl_ioctl(dev,WLC_SET_RTS,&(wrqu->rts.value),sizeof(int)) < 0)
- return -EINVAL;
- break;
- }
- case SIOCGIWFRAG:
- {
- if (wl_ioctl(dev,WLC_GET_FRAG,&(wrqu->frag.value),sizeof(int)) < 0)
- return -EINVAL;
- break;
- }
- case SIOCSIWFRAG:
- {
- if (wl_ioctl(dev,WLC_SET_FRAG,&(wrqu->frag.value),sizeof(int)) < 0)
- return -EINVAL;
- break;
- }
- case SIOCGIWTXPOW:
- {
- int radio, override;
-
- wl_ioctl(dev, WLC_GET_RADIO, &radio, sizeof(int));
-
- if (wl_get_val(dev, "qtxpower", &(wrqu->txpower.value), sizeof(int)) < 0)
- return -EINVAL;
-
- override = (wrqu->txpower.value & WL_TXPWR_OVERRIDE) == WL_TXPWR_OVERRIDE;
- wrqu->txpower.value &= ~WL_TXPWR_OVERRIDE;
- if (!override && (wrqu->txpower.value > 76))
- wrqu->txpower.value = 76;
- wrqu->txpower.value /= 4;
-
- wrqu->txpower.fixed = 0;
- wrqu->txpower.disabled = radio;
- wrqu->txpower.flags = IW_TXPOW_DBM;
- break;
- }
- case SIOCSIWTXPOW:
- {
- /* This is weird: WLC_SET_RADIO with 1 as argument disables the radio */
- int radio = wrqu->txpower.disabled;
-
- wl_ioctl(dev, WLC_SET_RADIO, &radio, sizeof(int));
-
- if (!wrqu->txpower.disabled && (wrqu->txpower.value > 0)) {
- int value;
-
- if (wl_get_val(dev, "qtxpower", &value, sizeof(int)) < 0)
- return -EINVAL;
-
- value &= WL_TXPWR_OVERRIDE;
- wrqu->txpower.value *= 4;
- wrqu->txpower.value |= value;
-
- if (wrqu->txpower.flags != IW_TXPOW_DBM)
- return -EINVAL;
-
- if (wrqu->txpower.value > 0)
- if (wl_set_val(dev, "qtxpower", &(wrqu->txpower.value), sizeof(int)) < 0)
- return -EINVAL;
- }
- break;
- }
- case SIOCSIWENCODE:
- {
- int val = 0, wep = 1, wrestrict = 1;
- int index = (wrqu->data.flags & IW_ENCODE_INDEX) - 1;
-
- if (index < 0)
- index = get_primary_key(dev);
-
- if (wrqu->data.flags & IW_ENCODE_DISABLED) {
- wep = 0;
- if (wl_ioctl(dev, WLC_SET_WSEC, &wep, sizeof(val)) < 0)
- return -EINVAL;
- return 0;
- }
-
- if (wl_ioctl(dev, WLC_SET_WSEC, &wep, sizeof(val)) < 0)
- return -EINVAL;
-
- if (wrqu->data.flags & IW_ENCODE_OPEN)
- wrestrict = 0;
-
- if (wrqu->data.pointer && (wrqu->data.length > 0) && (wrqu->data.length <= 16)) {
- wl_wsec_key_t key;
- memset(&key, 0, sizeof(key));
-
- key.flags = WL_PRIMARY_KEY;
- key.len = wrqu->data.length;
- key.index = index;
- memcpy(key.data, wrqu->data.pointer, wrqu->data.length);
-
- if (wl_ioctl(dev, WLC_SET_KEY, &key, sizeof(key)) < 0)
- return -EINVAL;
- }
-
- if (index >= 0)
- wl_ioctl(dev, WLC_SET_KEY_PRIMARY, &index, sizeof(index));
-
- if (wrestrict >= 0)
- wl_ioctl(dev, WLC_SET_WEP_RESTRICT, &wrestrict, sizeof(wrestrict));
-
- break;
- }
- case SIOCGIWENCODE:
- {
- int val;
-
- if (wl_ioctl(dev, WLC_GET_WEP, &val, sizeof(val)) < 0)
- return -EINVAL;
-
-
- if (val > 0) {
- int key = get_primary_key(dev);
-
- wrqu->data.flags = IW_ENCODE_ENABLED;
- if (key-- > 0) {
- int *info_addr;
- wkey *wep_key;
-
- info_addr = (int *) dev->priv;
- wep_key = (wkey *) ((*info_addr) + 0x2752 + (key * 0x110));
-
- wrqu->data.flags |= key + 1;
- wrqu->data.length = wep_key->len;
-
- memset(extra, 0, 16);
- memcpy(extra, wep_key->data, 16);
- } else {
- wrqu->data.flags |= IW_ENCODE_NOKEY;
- }
- } else {
- wrqu->data.flags = IW_ENCODE_DISABLED;
- }
-
- break;
- }
- case SIOCGIWRANGE:
- {
- return wlcompat_ioctl_getiwrange(dev, extra);
- break;
- }
- case SIOCSIWMODE:
- {
- int ap = -1, infra = -1, passive = 0, wet = 0;
-
- switch (wrqu->mode) {
- case IW_MODE_MONITOR:
- passive = 1;
- break;
- case IW_MODE_ADHOC:
- infra = 0;
- ap = 0;
- break;
- case IW_MODE_MASTER:
- infra = 1;
- ap = 1;
- break;
- case IW_MODE_INFRA:
- infra = 1;
- ap = 0;
- break;
- case IW_MODE_REPEAT:
- infra = 1;
- ap = 0;
- wet = 1;
- break;
-
- default:
- return -EINVAL;
- }
-
- wl_ioctl(dev, WLC_SET_PASSIVE, &passive, sizeof(passive));
- wl_ioctl(dev, WLC_SET_MONITOR, &passive, sizeof(passive));
- wl_ioctl(dev, WLC_SET_WET, &wet, sizeof(wet));
- if (ap >= 0)
- wl_ioctl(dev, WLC_SET_AP, &ap, sizeof(ap));
- if (infra >= 0)
- wl_ioctl(dev, WLC_SET_INFRA, &infra, sizeof(infra));
-
- break;
-
- }
- case SIOCGIWMODE:
- {
- int ap, infra, wet, passive;
-
- if (wl_ioctl(dev, WLC_GET_AP, &ap, sizeof(ap)) < 0)
- return -EINVAL;
- if (wl_ioctl(dev, WLC_GET_INFRA, &infra, sizeof(infra)) < 0)
- return -EINVAL;
- if (wl_ioctl(dev, WLC_GET_PASSIVE, &passive, sizeof(passive)) < 0)
- return -EINVAL;
- if (wl_ioctl(dev, WLC_GET_WET, &wet, sizeof(wet)) < 0)
- return -EINVAL;
-
- if (passive) {
- wrqu->mode = IW_MODE_MONITOR;
- } else if (!infra) {
- wrqu->mode = IW_MODE_ADHOC;
- } else {
- if (ap) {
- wrqu->mode = IW_MODE_MASTER;
- } else {
- if (wet) {
- wrqu->mode = IW_MODE_REPEAT;
- } else {
- wrqu->mode = IW_MODE_INFRA;
- }
- }
- }
- break;
- }
- default:
- {
- if (info->cmd >= SIOCIWFIRSTPRIV)
- return wlcompat_private_ioctl(dev, info, wrqu, extra);
-
- return -EINVAL;
- }
- }
-
- return 0;
-}
-
-static const iw_handler wlcompat_handler[] = {
- NULL, /* SIOCSIWCOMMIT */
- wlcompat_ioctl, /* SIOCGIWNAME */
- NULL, /* SIOCSIWNWID */
- NULL, /* SIOCGIWNWID */
- wlcompat_ioctl, /* SIOCSIWFREQ */
- wlcompat_ioctl, /* SIOCGIWFREQ */
- wlcompat_ioctl, /* SIOCSIWMODE */
- wlcompat_ioctl, /* SIOCGIWMODE */
- NULL, /* SIOCSIWSENS */
- NULL, /* SIOCGIWSENS */
- NULL, /* SIOCSIWRANGE, unused */
- wlcompat_ioctl, /* SIOCGIWRANGE */
- NULL, /* SIOCSIWPRIV */
- NULL, /* SIOCGIWPRIV */
- NULL, /* SIOCSIWSTATS */
- NULL, /* SIOCGIWSTATS */
- iw_handler_set_spy, /* SIOCSIWSPY */
- iw_handler_get_spy, /* SIOCGIWSPY */
- iw_handler_set_thrspy, /* SIOCSIWTHRSPY */
- iw_handler_get_thrspy, /* SIOCGIWTHRSPY */
- wlcompat_ioctl, /* SIOCSIWAP */
- wlcompat_ioctl, /* SIOCGIWAP */
- NULL, /* -- hole -- */
- NULL, /* SIOCGIWAPLIST */
- wlcompat_set_scan, /* SIOCSIWSCAN */
- wlcompat_get_scan, /* SIOCGIWSCAN */
- wlcompat_ioctl, /* SIOCSIWESSID */
- wlcompat_ioctl, /* SIOCGIWESSID */
- NULL, /* SIOCSIWNICKN */
- NULL, /* SIOCGIWNICKN */
- NULL, /* -- hole -- */
- NULL, /* -- hole -- */
- NULL, /* SIOCSIWRATE */
- NULL, /* SIOCGIWRATE */
- wlcompat_ioctl, /* SIOCSIWRTS */
- wlcompat_ioctl, /* SIOCGIWRTS */
- wlcompat_ioctl, /* SIOCSIWFRAG */
- wlcompat_ioctl, /* SIOCGIWFRAG */
- wlcompat_ioctl, /* SIOCSIWTXPOW */
- wlcompat_ioctl, /* SIOCGIWTXPOW */
- NULL, /* SIOCSIWRETRY */
- NULL, /* SIOCGIWRETRY */
- wlcompat_ioctl, /* SIOCSIWENCODE */
- wlcompat_ioctl, /* SIOCGIWENCODE */
-};
-
-
-#define WLCOMPAT_SET_MONITOR SIOCIWFIRSTPRIV + 0
-#define WLCOMPAT_GET_MONITOR SIOCIWFIRSTPRIV + 1
-#define WLCOMPAT_SET_TXPWR_LIMIT SIOCIWFIRSTPRIV + 2
-#define WLCOMPAT_GET_TXPWR_LIMIT SIOCIWFIRSTPRIV + 3
-#define WLCOMPAT_SET_ANTDIV SIOCIWFIRSTPRIV + 4
-#define WLCOMPAT_GET_ANTDIV SIOCIWFIRSTPRIV + 5
-#define WLCOMPAT_SET_TXANT SIOCIWFIRSTPRIV + 6
-#define WLCOMPAT_GET_TXANT SIOCIWFIRSTPRIV + 7
-#define WLCOMPAT_SET_BSS_FORCE SIOCIWFIRSTPRIV + 8
-#define WLCOMPAT_GET_BSS_FORCE SIOCIWFIRSTPRIV + 9
-
-
-static int wlcompat_private_ioctl(struct net_device *dev,
- struct iw_request_info *info,
- union iwreq_data *wrqu,
- char *extra)
-{
- int *value = (int *) wrqu->name;
-
- switch (info->cmd) {
- case WLCOMPAT_SET_MONITOR:
- {
- if (wl_ioctl(dev, WLC_SET_MONITOR, value, sizeof(int)) < 0)
- return -EINVAL;
-
- break;
- }
- case WLCOMPAT_GET_MONITOR:
- {
- if (wl_ioctl(dev, WLC_GET_MONITOR, extra, sizeof(int)) < 0)
- return -EINVAL;
-
- break;
- }
- case WLCOMPAT_SET_TXPWR_LIMIT:
- {
- int val;
-
-
- if (wl_get_val(dev, "qtxpower", &val, sizeof(int)) < 0)
- return -EINVAL;
-
- if (*extra > 0)
- val |= WL_TXPWR_OVERRIDE;
- else
- val &= ~WL_TXPWR_OVERRIDE;
-
- if (wl_set_val(dev, "qtxpower", &val, sizeof(int)) < 0)
- return -EINVAL;
-
- break;
- }
- case WLCOMPAT_GET_TXPWR_LIMIT:
- {
- if (wl_get_val(dev, "qtxpower", value, sizeof(int)) < 0)
- return -EINVAL;
-
- *value = ((*value & WL_TXPWR_OVERRIDE) == WL_TXPWR_OVERRIDE ? 1 : 0);
-
- break;
- }
- case WLCOMPAT_SET_ANTDIV:
- {
- if (wl_ioctl(dev, WLC_SET_ANTDIV, value, sizeof(int)) < 0)
- return -EINVAL;
-
- break;
- }
- case WLCOMPAT_GET_ANTDIV:
- {
- if (wl_ioctl(dev, WLC_GET_ANTDIV, extra, sizeof(int)) < 0)
- return -EINVAL;
-
- break;
- }
- case WLCOMPAT_SET_TXANT:
- {
- if (wl_ioctl(dev, WLC_SET_TXANT, value, sizeof(int)) < 0)
- return -EINVAL;
-
- break;
- }
- case WLCOMPAT_GET_TXANT:
- {
- if (wl_ioctl(dev, WLC_GET_TXANT, extra, sizeof(int)) < 0)
- return -EINVAL;
-
- break;
- }
- case WLCOMPAT_SET_BSS_FORCE:
- {
- bss_force = (unsigned short) *value;
- break;
- }
- case WLCOMPAT_GET_BSS_FORCE:
- {
- *extra = (int) bss_force;
- break;
- }
- default:
- {
- return -EINVAL;
- }
-
- }
- return 0;
-}
-
-static const struct iw_priv_args wlcompat_private_args[] =
-{
- { WLCOMPAT_SET_MONITOR,
- IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
- 0,
- "set_monitor"
- },
- { WLCOMPAT_GET_MONITOR,
- 0,
- IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
- "get_monitor"
- },
- { WLCOMPAT_SET_TXPWR_LIMIT,
- IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
- 0,
- "set_txpwr_force"
- },
- { WLCOMPAT_GET_TXPWR_LIMIT,
- 0,
- IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
- "get_txpwr_force"
- },
- { WLCOMPAT_SET_ANTDIV,
- IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
- 0,
- "set_antdiv"
- },
- { WLCOMPAT_GET_ANTDIV,
- 0,
- IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
- "get_antdiv"
- },
- { WLCOMPAT_SET_TXANT,
- IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
- 0,
- "set_txant"
- },
- { WLCOMPAT_GET_TXANT,
- 0,
- IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
- "get_txant"
- },
- { WLCOMPAT_SET_BSS_FORCE,
- IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
- 0,
- "set_bss_force"
- },
- { WLCOMPAT_GET_BSS_FORCE,
- 0,
- IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
- "get_bss_force"
- },
-};
-
-static const iw_handler wlcompat_private[] =
-{
- wlcompat_private_ioctl,
- NULL
-};
-
-
-static const struct iw_handler_def wlcompat_handler_def =
-{
- .standard = (iw_handler *) wlcompat_handler,
- .num_standard = sizeof(wlcompat_handler)/sizeof(iw_handler),
- .private = wlcompat_private,
- .num_private = 1,
- .private_args = wlcompat_private_args,
- .num_private_args = sizeof(wlcompat_private_args) / sizeof(wlcompat_private_args[0])
-};
-
-
-#ifdef DEBUG
-void print_buffer(int len, unsigned char *buf) {
- int x;
- if (buf != NULL) {
- for (x=0;x<len && x<180 ;x++) {
- if ((x % 4) == 0)
- printk(" ");
- printk("%02X",buf[x]);
- }
- } else {
- printk(" NULL");
- }
- printk("\n");
-
-}
-#endif
-static int (*old_ioctl)(struct net_device *dev, struct ifreq *ifr, int cmd);
-static int new_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) {
- int ret = 0;
- struct iwreq *iwr = (struct iwreq *) ifr;
- struct iw_request_info info;
-
-#ifdef DEBUG
- printk("dev: %s ioctl: 0x%04x\n",dev->name,cmd);
-#endif
-
- if (cmd >= SIOCIWFIRSTPRIV) {
- info.cmd = cmd;
- info.flags = 0;
- ret = wlcompat_private_ioctl(dev, &info, &(iwr->u), (char *) &(iwr->u));
-#ifdef DEBUG
- } else if (cmd==SIOCDEVPRIVATE) {
- wl_ioctl_t *ioc = (wl_ioctl_t *)ifr->ifr_data;
- unsigned char *buf = ioc->buf;
- printk(" cmd: %d buf: 0x%08x len: %d\n",ioc->cmd,&(ioc->buf),ioc->len);
- printk(" send: ->");
- print_buffer(ioc->len, buf);
- ret = old_ioctl(dev,ifr,cmd);
- printk(" recv: ->");
- print_buffer(ioc->len, buf);
- printk(" ret: %d\n", ret);
-#endif
- } else {
- ret = old_ioctl(dev,ifr,cmd);
- }
- return ret;
-}
-
-static int __init wlcompat_init()
-{
- int found = 0, i;
- char devname[4] = "wl0";
- bss_force = 0;
-
- while (!found && (dev = dev_get_by_name(devname))) {
- if ((dev->wireless_handlers == NULL) && ((wl_ioctl(dev, WLC_GET_MAGIC, &i, sizeof(i)) == 0) && i == WLC_IOCTL_MAGIC))
- found = 1;
- devname[2]++;
- }
-
- if (!found) {
- printk("No Broadcom devices found.\n");
- return -ENODEV;
- }
-
-
- old_ioctl = dev->do_ioctl;
- dev->do_ioctl = new_ioctl;
- dev->wireless_handlers = (struct iw_handler_def *)&wlcompat_handler_def;
- dev->get_wireless_stats = wlcompat_get_wireless_stats;
-#ifdef DEBUG
- printk("broadcom driver private data: 0x%08x\n", dev->priv);
-#endif
- return 0;
-}
-
-static void __exit wlcompat_exit()
-{
- dev->get_wireless_stats = NULL;
- dev->wireless_handlers = NULL;
- dev->do_ioctl = old_ioctl;
- return;
-}
-
-EXPORT_NO_SYMBOLS;
-MODULE_AUTHOR("openwrt.org");
-MODULE_LICENSE("GPL");
-
-module_init(wlcompat_init);
-module_exit(wlcompat_exit);
diff --git a/openwrt/target/linux/package/zd1211/Config.in b/openwrt/target/linux/package/zd1211/Config.in
deleted file mode 100644
index 2852c84..0000000
--- a/openwrt/target/linux/package/zd1211/Config.in
+++ /dev/null
@@ -1,11 +0,0 @@
-config BR2_PACKAGE_KMOD_ZD1211
- prompt "kmod-zd12111...................... Driver for Zydas 1211 based devices"
- tristate
- depends BR2_LINUX_2_6
- default m if CONFIG_DEVEL
- help
- Linux driver for the ZyDAS ZD1211 802.11b/g USB-WLAN-Chip.
- Initially contributed by ZyDAS, this driver is actively maintained
- by the open source community.
-
- http://zd1211.ath.cx/
diff --git a/openwrt/target/linux/package/zd1211/Makefile b/openwrt/target/linux/package/zd1211/Makefile
deleted file mode 100644
index e357af7..0000000
--- a/openwrt/target/linux/package/zd1211/Makefile
+++ /dev/null
@@ -1,49 +0,0 @@
-# $Id: Makefile 3297 2006-03-02 23:42:52Z florian $
-
-include $(TOPDIR)/rules.mk
-include ../../rules.mk
-
-PKG_NAME:=zd1211
-PKG_VERSION:=r69
-PKG_RELEASE:=1
-PKG_MD5SUM:=c14133a3d5b27927402a492e84d2467a
-
-PKG_SOURCE_URL:=http://zd1211.ath.cx/download/
-PKG_SOURCE:=$(PKG_NAME)-driver-$(PKG_VERSION).tgz
-PKG_CAT:=zcat
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-driver-$(PKG_VERSION)
-PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
-
-include $(TOPDIR)/package/rules.mk
-
-$(eval $(call PKG_template,KMOD_ZD1211,kmod-$(PKG_NAME),$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE))))
-
-$(PKG_BUILD_DIR)/.configured:
- touch $@
-
-$(PKG_BUILD_DIR)/.built:
- $(MAKE) -C $(PKG_BUILD_DIR) \
- ARCH="$(LINUX_KARCH)" \
- CROSS_COMPILE="$(TARGET_CROSS)" \
- CC="$(TARGET_CC)" \
- CPP="$(TARGET_CC)" \
- LD="$(TARGET_CROSS)ld" \
- STAGING_DIR=$(STAGING_DIR) \
- KERNELVERSION="$(KERNEL)" \
- MODPATH="$(MODULES_DIR)" \
- KERNEL_SOURCE="$(LINUX_DIR)" \
- all
- $(TARGET_CC) $(PKG_BUILD_DIR)/apdbg.c -o $(PKG_BUILD_DIR)/apdbg
- touch $@
-
-$(IPKG_KMOD_ZD1211):
- install -m0755 -d $(IDIR_KMOD_ZD1211)/lib/modules/$(LINUX_VERSION) \
- $(IDIR_KMOD_ZD1211)/usr/sbin
- $(CP) $(PKG_BUILD_DIR)/zd1211.$(LINUX_KMOD_SUFFIX) \
- $(IDIR_KMOD_ZD1211)/lib/modules/$(LINUX_VERSION)/
- $(CP) $(PKG_BUILD_DIR)/apdbg $(IDIR_KMOD_ZD1211)/usr/sbin/
- $(CP) $(PKG_BUILD_DIR)/sta $(IDIR_KMOD_ZD1211)/usr/sbin/$(PKG_NAME)-sta
- $(RSTRIP_KMOD) $(IDIR_KMOD_ZD1211)
- $(IPKG_BUILD) $(IDIR_KMOD_ZD1211) $(PACKAGE_DIR)
-
diff --git a/openwrt/target/linux/package/zd1211/ipkg/kmod-zd1211.control b/openwrt/target/linux/package/zd1211/ipkg/kmod-zd1211.control
deleted file mode 100644
index 314fc91..0000000
--- a/openwrt/target/linux/package/zd1211/ipkg/kmod-zd1211.control
+++ /dev/null
@@ -1,4 +0,0 @@
-Package: kmod-zd1211
-Section: net
-Description: Driver for Zydas 1211 based devices.
-Priority: optional