move a few unmaintained packages from trunk to /packages
authorFelix Fietkau <nbd@openwrt.org>
Sun, 7 Oct 2012 12:50:15 +0000 (12:50 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 7 Oct 2012 12:50:15 +0000 (12:50 +0000)
SVN-Revision: 33634

220 files changed:
package/bridge-utils/Makefile [deleted file]
package/bridge-utils/patches/001-libbridge_cflags.patch [deleted file]
package/crda/Makefile [deleted file]
package/crda/files/hotplug.rule [deleted file]
package/crda/patches/101-make_crypto_use_optional.patch [deleted file]
package/goldfish-qemu/Makefile [deleted file]
package/goldfish-qemu/patches/100-darwin_fix.patch [deleted file]
package/goldfish-qemu/patches/110-single_image.patch [deleted file]
package/goldfish-qemu/skins/HVGA/arrow_down.png [deleted file]
package/goldfish-qemu/skins/HVGA/arrow_left.png [deleted file]
package/goldfish-qemu/skins/HVGA/arrow_right.png [deleted file]
package/goldfish-qemu/skins/HVGA/arrow_up.png [deleted file]
package/goldfish-qemu/skins/HVGA/back.png [deleted file]
package/goldfish-qemu/skins/HVGA/device.png [deleted file]
package/goldfish-qemu/skins/HVGA/end.png [deleted file]
package/goldfish-qemu/skins/HVGA/home.png [deleted file]
package/goldfish-qemu/skins/HVGA/key.png [deleted file]
package/goldfish-qemu/skins/HVGA/keyboard.png [deleted file]
package/goldfish-qemu/skins/HVGA/layout [deleted file]
package/goldfish-qemu/skins/HVGA/menu.png [deleted file]
package/goldfish-qemu/skins/HVGA/power.png [deleted file]
package/goldfish-qemu/skins/HVGA/select.png [deleted file]
package/goldfish-qemu/skins/HVGA/send.png [deleted file]
package/goldfish-qemu/skins/HVGA/spacebar.png [deleted file]
package/goldfish-qemu/skins/HVGA/volume_down.png [deleted file]
package/goldfish-qemu/skins/HVGA/volume_up.png [deleted file]
package/libipfix/Makefile [deleted file]
package/libipfix/extra/append-wprobe-ie.pl [deleted file]
package/libipfix/extra/wprobe-ie.txt [deleted file]
package/libipfix/patches/100-openimp_sync.patch [deleted file]
package/libipfix/patches/110-wprobe_ie.patch [deleted file]
package/libipfix/patches/120-ipfixmisc.patch [deleted file]
package/madwifi/Config.in [deleted file]
package/madwifi/Makefile [deleted file]
package/madwifi/files/etc/hotplug.d/net/10-madwifi [deleted file]
package/madwifi/files/lib/wifi/madwifi.sh [deleted file]
package/madwifi/files/lib/wifi/madwifi_countrycodes.txt [deleted file]
package/madwifi/patches/102-multicall_binary.patch [deleted file]
package/madwifi/patches/104-autocreate_none.patch [deleted file]
package/madwifi/patches/105-ratectl_attach.patch [deleted file]
package/madwifi/patches/106-get_arch.patch [deleted file]
package/madwifi/patches/111-minstrel_crash.patch [deleted file]
package/madwifi/patches/113-no_ibss_pwrsave.patch [deleted file]
package/madwifi/patches/122-replayfail_workaround.patch [deleted file]
package/madwifi/patches/123-ccmp_checks.patch [deleted file]
package/madwifi/patches/124-linux24_compat.patch [deleted file]
package/madwifi/patches/126-rxerr_frames.patch [deleted file]
package/madwifi/patches/200-no_debug.patch [deleted file]
package/madwifi/patches/201-debug_fix.patch [deleted file]
package/madwifi/patches/202-debug_variables.patch [deleted file]
package/madwifi/patches/300-napi_polling.patch [deleted file]
package/madwifi/patches/305-pureg_fix.patch [deleted file]
package/madwifi/patches/309-micfail_detect.patch [deleted file]
package/madwifi/patches/310-noise_get.patch [deleted file]
package/madwifi/patches/311-bssid_alloc.patch [deleted file]
package/madwifi/patches/312-erpupdate.patch [deleted file]
package/madwifi/patches/317-bmask.patch [deleted file]
package/madwifi/patches/323-dfs_optional.patch [deleted file]
package/madwifi/patches/324-alignment.patch [deleted file]
package/madwifi/patches/325-channel_spam.patch [deleted file]
package/madwifi/patches/327-queue.patch [deleted file]
package/madwifi/patches/330-beaconcal.patch [deleted file]
package/madwifi/patches/331-memory_alloc.patch [deleted file]
package/madwifi/patches/332-reset_beacons.patch [deleted file]
package/madwifi/patches/333-apscan_mode.patch [deleted file]
package/madwifi/patches/334-input.patch [deleted file]
package/madwifi/patches/340-maxrate.patch [deleted file]
package/madwifi/patches/341-minrate.patch [deleted file]
package/madwifi/patches/342-performance.patch [deleted file]
package/madwifi/patches/343-txqueue_races.patch [deleted file]
package/madwifi/patches/344-minstrel_failcnt.patch [deleted file]
package/madwifi/patches/345-minstrel_sampling.patch [deleted file]
package/madwifi/patches/346-protmode_trig.patch [deleted file]
package/madwifi/patches/347-tuning.patch [deleted file]
package/madwifi/patches/348-ackcts.patch [deleted file]
package/madwifi/patches/349-reset.patch [deleted file]
package/madwifi/patches/350-wisoc_softled.patch [deleted file]
package/madwifi/patches/351-scanlist.patch [deleted file]
package/madwifi/patches/352-ani_fix.patch [deleted file]
package/madwifi/patches/353-devid.patch [deleted file]
package/madwifi/patches/354-lantiq_eeprom.patch [deleted file]
package/madwifi/patches/355-eap_auth_disassoc.patch [deleted file]
package/madwifi/patches/356-hidden_ssid.patch [deleted file]
package/madwifi/patches/357-bgscan_thresh.patch [deleted file]
package/madwifi/patches/358-ignore_broken_bssid.patch [deleted file]
package/madwifi/patches/359-disable_reassoc.patch [deleted file]
package/madwifi/patches/360-sta_nodes.patch [deleted file]
package/madwifi/patches/361-bmiss_handling.patch [deleted file]
package/madwifi/patches/362-rssithr.patch [deleted file]
package/madwifi/patches/363-fix_turbo.patch [deleted file]
package/madwifi/patches/364-memory_alloc.patch [deleted file]
package/madwifi/patches/365-turbo_channelsearch.patch [deleted file]
package/madwifi/patches/366-bstuck_thresh.patch [deleted file]
package/madwifi/patches/367-roaming.patch [deleted file]
package/madwifi/patches/368-sta_ie_preserve.patch [deleted file]
package/madwifi/patches/369-mlme_assoc.patch [deleted file]
package/madwifi/patches/370-wdsvap.patch [deleted file]
package/madwifi/patches/372-queue_vif.patch [deleted file]
package/madwifi/patches/373-sanity_check.patch [deleted file]
package/madwifi/patches/374-nbtt_fix.patch [deleted file]
package/madwifi/patches/375-atim_tsf_update.patch [deleted file]
package/madwifi/patches/377-disable_vlan_code.patch [deleted file]
package/madwifi/patches/378-adhoc_crash_fix.patch [deleted file]
package/madwifi/patches/379-invalid_rate_fix.patch [deleted file]
package/madwifi/patches/380-noderef_hack.patch [deleted file]
package/madwifi/patches/381-ibss_modes.patch [deleted file]
package/madwifi/patches/382-relax_bintval.patch [deleted file]
package/madwifi/patches/383-ibss_hostap.patch [deleted file]
package/madwifi/patches/384-hwdetect.patch [deleted file]
package/madwifi/patches/385-antenna_fix.patch [deleted file]
package/madwifi/patches/386-acl_crashfix.patch [deleted file]
package/madwifi/patches/387-maxassoc.patch [deleted file]
package/madwifi/patches/388-apsta_fix.patch [deleted file]
package/madwifi/patches/389-autochannel.patch [deleted file]
package/madwifi/patches/390-frame_type.patch [deleted file]
package/madwifi/patches/391-vap_auth.patch [deleted file]
package/madwifi/patches/392-remove_wds_nodetracking.patch [deleted file]
package/madwifi/patches/393-mbss_vap_auth.patch [deleted file]
package/madwifi/patches/394-probereq.patch [deleted file]
package/madwifi/patches/395-ath_ff_unmap.patch [deleted file]
package/madwifi/patches/396-napi_ff_fix.patch [deleted file]
package/madwifi/patches/400-new_hal.patch [deleted file]
package/madwifi/patches/401-changeset_r3602.patch [deleted file]
package/madwifi/patches/402-changeset_r3603.patch [deleted file]
package/madwifi/patches/403-changeset_r3605.patch [deleted file]
package/madwifi/patches/404-linux24_fix.patch [deleted file]
package/madwifi/patches/405-retransmit_check.patch [deleted file]
package/madwifi/patches/406-monitor_r3711.patch [deleted file]
package/madwifi/patches/407-new_athinfo.patch [deleted file]
package/madwifi/patches/408-changeset_r3337.patch [deleted file]
package/madwifi/patches/409-wext_compat.patch [deleted file]
package/madwifi/patches/410-ar231x_2.6.28.patch [deleted file]
package/madwifi/patches/411-autochannel_multi.patch [deleted file]
package/madwifi/patches/412-fragmentation_fix.patch [deleted file]
package/madwifi/patches/413-rxorn.patch [deleted file]
package/madwifi/patches/414-txpower.patch [deleted file]
package/madwifi/patches/415-chan_switch.patch [deleted file]
package/madwifi/patches/416-wprobe.patch [deleted file]
package/madwifi/patches/417-beacon_txpower.patch [deleted file]
package/madwifi/patches/419-skb_unmap_crash.patch [deleted file]
package/madwifi/patches/420-diversity_fix.patch [deleted file]
package/madwifi/patches/421-channel_handling.patch [deleted file]
package/madwifi/patches/422-confchange_reset.patch [deleted file]
package/madwifi/patches/423-phyerr_handling.patch [deleted file]
package/madwifi/patches/424-timing.patch [deleted file]
package/madwifi/patches/425-rc_rexmit.patch [deleted file]
package/madwifi/patches/426-header_len.patch [deleted file]
package/madwifi/patches/427-ignore_eeprom_ff.patch [deleted file]
package/madwifi/patches/430-use_netdev_priv.patch [deleted file]
package/madwifi/patches/431-compile_fixes.patch [deleted file]
package/madwifi/patches/432-netdev_ops.patch [deleted file]
package/madwifi/patches/433-backport_remove_irq_none.patch [deleted file]
package/madwifi/patches/434-name-alloc-fix.patch [deleted file]
package/madwifi/patches/435-ibss_neighbor_fix.patch [deleted file]
package/madwifi/patches/436-injection_checks.patch [deleted file]
package/madwifi/patches/437-sysctl_cleanup.patch [deleted file]
package/madwifi/patches/438-poweroffset_sysctl.patch [deleted file]
package/madwifi/patches/439-wlanconfig_stack_usage.patch [deleted file]
package/madwifi/patches/440-wme_cleanup.patch [deleted file]
package/madwifi/patches/441-fix_ibss_node_handling.patch [deleted file]
package/madwifi/patches/442-ibss_rx_filter.patch [deleted file]
package/madwifi/patches/443-tx_drop_counter.patch [deleted file]
package/madwifi/patches/444-beacon_update_war.patch [deleted file]
package/madwifi/patches/445-fix_ps_sta_count.patch [deleted file]
package/madwifi/patches/446-single_module.patch [deleted file]
package/madwifi/patches/447-sta_reconnect.patch [deleted file]
package/madwifi/patches/448-beacon_handling_fixes.patch [deleted file]
package/madwifi/patches/449-fix_txbuf_leak.patch [deleted file]
package/madwifi/patches/450-calibration.patch [deleted file]
package/madwifi/patches/451-ibss_race_fix.patch [deleted file]
package/madwifi/patches/452-minstrel_no_timer.patch [deleted file]
package/madwifi/patches/453-procps.patch [deleted file]
package/madwifi/patches/454-cca.patch [deleted file]
package/madwifi/patches/455-beacon_watchdog.patch [deleted file]
package/madwifi/patches/456-rfsilent.patch [deleted file]
package/madwifi/patches/457-idletime.patch [deleted file]
package/madwifi/patches/458-ibss_wpa_none.patch [deleted file]
package/madwifi/patches/459-2.6.33_compile.patch [deleted file]
package/madwifi/patches/460-pci_softled_disable.patch [deleted file]
package/madwifi/patches/461-rx_stats_count_fix.patch [deleted file]
package/madwifi/patches/462-fix_ap_scan.patch [deleted file]
package/madwifi/patches/463-fix_txrate_display.patch [deleted file]
package/madwifi/patches/464-0dbm_txpower_fix.patch [deleted file]
package/madwifi/patches/465-mc_list-2.6.35.patch [deleted file]
package/madwifi/patches/466-2.6.38_compile.patch [deleted file]
package/madwifi/patches/470-mac_addresss_from_ath5k_platform_data.patch [deleted file]
package/madwifi/patches/471-netdev_ops_mac_mtu.patch [deleted file]
package/madwifi/patches/472-remove_11n_devids.patch [deleted file]
package/madwifi/patches/473-mutex_fix.patch [deleted file]
package/madwifi/patches/474_fix_ssid_scan_length.patch [deleted file]
package/madwifi/patches/475-2.6.39-compile.patch [deleted file]
package/madwifi/patches/476-3.0_detection_fix.patch [deleted file]
package/madwifi/patches/477-3.2_fixes.patch [deleted file]
package/madwifi/patches/478-remove_vlan_code.patch [deleted file]
package/ps3-utils/Makefile [deleted file]
package/redboot-ar231x/Makefile [deleted file]
package/redboot-ar231x/patches/010-fix-compile.patch [deleted file]
package/siit/Makefile [deleted file]
package/siit/src/Makefile [deleted file]
package/siit/src/siit.c [deleted file]
package/siit/src/siit.h [deleted file]
package/wprobe/Makefile [deleted file]
package/wprobe/files/wprobe.config [deleted file]
package/wprobe/files/wprobe.init [deleted file]
package/wprobe/src/Makefile.inc [deleted file]
package/wprobe/src/exporter/Makefile [deleted file]
package/wprobe/src/exporter/wprobe-export.c [deleted file]
package/wprobe/src/exporter/wprobe-export.h [deleted file]
package/wprobe/src/filter/README.txt [deleted file]
package/wprobe/src/filter/gen_filter.pl [deleted file]
package/wprobe/src/filter/pfc.c [deleted file]
package/wprobe/src/kernel/Makefile [deleted file]
package/wprobe/src/kernel/linux/wprobe.h [deleted file]
package/wprobe/src/kernel/wprobe-core.c [deleted file]
package/wprobe/src/kernel/wprobe-dummy.c [deleted file]
package/wprobe/src/user/Makefile [deleted file]
package/wprobe/src/user/list.h [deleted file]
package/wprobe/src/user/wprobe-lib.c [deleted file]
package/wprobe/src/user/wprobe-util.c [deleted file]
package/wprobe/src/user/wprobe.h [deleted file]

diff --git a/package/bridge-utils/Makefile b/package/bridge-utils/Makefile
deleted file mode 100644 (file)
index f87551c..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-# 
-# Copyright (C) 2006-2012 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-include $(INCLUDE_DIR)/kernel.mk
-
-PKG_NAME:=bridge-utils
-PKG_RELEASE:=1
-PKG_SOURCE_URL:=@SF/bridge
-PKG_VERSION:=1.5
-PKG_MD5SUM:=ec7b381160b340648dede58c31bb2238
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/bridge
-  SECTION:=net
-  CATEGORY:=Base system
-  TITLE:=Ethernet bridging configuration utility
-  URL:=http://bridge.sourceforge.net/
-endef
-
-define Package/bridge/description
- Manage ethernet bridging: a way to connect networks together to 
- form a larger network.
-endef
-
-CONFIGURE_ARGS += \
-       --with-linux-headers="$(LINUX_DIR)" \
-
-define Build/Prepare
-$(call Build/Prepare/Default)
-       ( cd $(PKG_BUILD_DIR) ; \
-               [ -f ./configure ] || { \
-                       ln -sf configure.in configure.ac ; \
-                       autoconf ; \
-               } \
-       )
-endef
-
-define Package/bridge/install
-       $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/brctl/brctl $(1)/usr/sbin
-endef
-
-$(eval $(call BuildPackage,bridge))
diff --git a/package/bridge-utils/patches/001-libbridge_cflags.patch b/package/bridge-utils/patches/001-libbridge_cflags.patch
deleted file mode 100644 (file)
index e35a649..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/libbridge/Makefile.in
-+++ b/libbridge/Makefile.in
-@@ -5,7 +5,7 @@ AR=ar
- RANLIB=@RANLIB@
- CC=@CC@
--CFLAGS = -Wall -g $(KERNEL_HEADERS)
-+CFLAGS = -Wall -g @CFLAGS@ $(KERNEL_HEADERS)
- prefix=@prefix@
- exec_prefix=@exec_prefix@
diff --git a/package/crda/Makefile b/package/crda/Makefile
deleted file mode 100644 (file)
index 0d075f1..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-#
-# Copyright (C) 2009-2012 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-include $(INCLUDE_DIR)/kernel.mk
-
-PKG_NAME:=crda
-PKG_RELEASE:=1
-PKG_VERSION:=1.1.2
-PKG_SOURCE_URL:=http://wireless.kernel.org/download/crda
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_MD5SUM:=5226f65aebacf94baaf820f8b4e06df4
-
-PKG_REGULATORY_NAME:=regulatory
-PKG_REGULATORY_VERSION:=2011.04.28
-PKG_REGULATORY_SOURCE_URL:=http://wireless.kernel.org/download/wireless-regdb/regulatory.bins
-PKG_REGULATORY_SOURCE:=$(PKG_REGULATORY_VERSION)-$(PKG_REGULATORY_NAME).bin
-PKG_REGULATORY_MD5SUM:=1535e98bcaba732e2f8e8f62dac6f369
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/crda
-  SECTION:=net
-  CATEGORY:=Network
-  TITLE:=Central Regulatory Domain Agent (CRDA)
-  DEPENDS:=+libnl-tiny
-  URL:=http://wireless.kernel.org/en/developers/Regulatory/CRDA
-endef
-
-define Download/wireless-regdb
-  FILE:=$(PKG_REGULATORY_SOURCE)
-  URL:=$(PKG_REGULATORY_SOURCE_URL)
-  VERSION:=$(PKG_REGULATORY_VERSION)
-  MD5SUM:=$(PKG_REGULATORY_MD5SUM)
-endef
-$(eval $(call Download,wireless-regdb))
-
-define Package/crda/description
- This is the Central Regulatory Domain Agent for Linux. It serves one
- purpose: tell Linux kernel what to enforce. In essence it is a udev
- helper for communication between the kernel and userspace. You only
- need to run this manually for debugging purposes. For manual changing
- of regulatory domains use iw (iw reg set) or wpa_supplicant (feature
- yet to be added).
-endef
-
-TARGET_CPPFLAGS := \
-       -I$(STAGING_DIR)/usr/include/libnl-tiny \
-       -D_GNU_SOURCE \
-       $(TARGET_CPPFLAGS)
-
-MAKE_FLAGS += \
-       NL1FOUND="" NL2FOUND=Y \
-       NLLIBNAME="libnl-tiny" \
-       NLLIBS="-lnl-tiny -lm" \
-       REG_BIN="$(DL_DIR)/$(PKG_REGULATORY_SOURCE)" \
-       crda
-
-define Package/crda/install
-       $(INSTALL_DIR) $(1)/sbin
-       $(INSTALL_DIR) $(1)/etc/hotplug.d
-       $(INSTALL_DIR) $(1)/etc/hotplug.d/platform
-       $(INSTALL_DIR) $(1)/usr/lib/crda
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/crda $(1)/sbin/
-       $(INSTALL_DATA) ./files/hotplug.rule $(1)/etc/hotplug.d/platform/10-regulatory
-       $(INSTALL_DATA) $(DL_DIR)/$(PKG_REGULATORY_SOURCE) $(1)/usr/lib/crda/regulatory.bin
-endef
-
-$(eval $(call BuildPackage,crda))
-
diff --git a/package/crda/files/hotplug.rule b/package/crda/files/hotplug.rule
deleted file mode 100644 (file)
index 1ec033f..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-# Copyright (C) 2009 OpenWrt.org
-
-[ change = "$ACTION" -a regulatory.0 = "$DEVICENAME" ] && {
-       /sbin/crda
-}
diff --git a/package/crda/patches/101-make_crypto_use_optional.patch b/package/crda/patches/101-make_crypto_use_optional.patch
deleted file mode 100644 (file)
index c7ace42..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/Makefile
-+++ b/Makefile
-@@ -35,7 +35,9 @@ LDLIBS += `pkg-config --libs openssl`
- reglib.o: keys-ssl.c
--else
-+endif
-+
-+ifeq ($(USE_GCRYPT),1)
- CFLAGS += -DUSE_GCRYPT
- LDLIBS += -lgcrypt
diff --git a/package/goldfish-qemu/Makefile b/package/goldfish-qemu/Makefile
deleted file mode 100644 (file)
index e5b4083..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-#
-# Copyright (C) 2006-2010 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=goldfish-qemu
-PKG_REV:=2b8ea29e2bd12f876a4d06647e6077bf72de567e
-PKG_VERSION:=20090429
-PKG_RELEASE:=1
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=git://android.git.kernel.org/platform/external/qemu
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=$(PKG_REV)
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_TARGETS:=bin
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/goldfish-qemu
-  SECTION:=emulator
-  CATEGORY:=Emulators
-  DEPENDS:=@TARGET_goldfish
-  TITLE:=A modified version of the Google Android Emulator
-  URL:=http://www.android.com/
-endef
-
-LIBSDL_PATCHED:=sdl-1.2.12-android-20080919
-
-define Download/libsdl-patched
-  FILE:=$(LIBSDL_PATCHED).tar.gz
-  URL:=http://android.git.kernel.org/pub
-  MD5SUM:=22df8cbb2ecb811938eba8410e861650
-endef
-$(eval $(call Download,libsdl-patched))
-
-Build/Exports=
-
-define Build/Prepare
-       $(call Build/Prepare/Default)
-       zcat $(DL_DIR)/$(LIBSDL_PATCHED).tar.gz | tar x -C $(PKG_BUILD_DIR)
-endef
-
-define Build/Configure
-       [ -x $(PKG_BUILD_DIR)/libsdl/bin/sdl-config ] || ( \
-               cd $(PKG_BUILD_DIR)/$(LIBSDL_PATCHED); \
-               ./android-configure --prefix=$(PKG_BUILD_DIR)/libsdl; \
-               make all install; \
-       )
-endef
-
-define Build/Compile
-       (cd $(PKG_BUILD_DIR); \
-               [ -f $(PKG_BUILD_DIR)/objs/config.make ] || \
-                       ./android-configure.sh --sdl-config=$(PKG_BUILD_DIR)/libsdl/bin/sdl-config \
-       )
-       $(MAKE) -C $(PKG_BUILD_DIR)
-endef
-
-define Package/goldfish-qemu/install
-       $(INSTALL_DIR) $(1)
-       $(CP) $(PKG_BUILD_DIR)/objs/emulator $(1)/
-       $(CP) ./skins $(1)/
-endef
-
-$(eval $(call BuildPackage,goldfish-qemu))
diff --git a/package/goldfish-qemu/patches/100-darwin_fix.patch b/package/goldfish-qemu/patches/100-darwin_fix.patch
deleted file mode 100644 (file)
index a5f56b3..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
---- a/android-configure.sh
-+++ b/android-configure.sh
-@@ -656,6 +656,9 @@ case "$CPU" in
-     *) HOST_CPU=$CPU
-     ;;
- esac
-+case "$OS" in
-+    darwin*) echo "#define _BSD       1" >> $config_h;;
-+esac
- echo "#define HOST_$HOST_CPU    1" >> $config_h
- log "Generate   : $config_h"
---- a/android/utils/display-quartz.m
-+++ b/android/utils/display-quartz.m
-@@ -34,6 +34,7 @@ get_monitor_resolution( int  *px_dpi, in
- int
- get_nearest_monitor_rect( int  *x, int  *y, int  *width, int  *height )
- {
-+#if 0
-     SDL_SysWMinfo  info;
-     NSWindow*      window;
-@@ -108,4 +109,7 @@ get_nearest_monitor_rect( int  *x, int  
-         }
-         return 0;
-     }
-+#else
-+      return -1;
-+#endif
- };
diff --git a/package/goldfish-qemu/patches/110-single_image.patch b/package/goldfish-qemu/patches/110-single_image.patch
deleted file mode 100644 (file)
index 92a9e54..0000000
+++ /dev/null
@@ -1,233 +0,0 @@
---- a/android/cmdline-option.c
-+++ b/android/cmdline-option.c
-@@ -50,16 +50,6 @@ android_parse_options( int  *pargc, char
-         char   arg2_tab[64], *arg2 = arg2_tab;
-         int    nn;
--        /* process @<name> as a special exception meaning
--         * '-avd <name>'
--         */
--        if (aread[0][0] == '@') {
--            opt->avd = aread[0]+1;
--            nargs--;
--            aread++;
--            continue;
--        }
--
-         /* anything that isn't an option past this points
-          * exits the loop
-          */
---- a/android/cmdline-options.h
-+++ b/android/cmdline-options.h
-@@ -60,21 +60,16 @@
-  */
- CFG_PARAM( sysdir,  "<dir>",  "search for system disk images in <dir>" )
--CFG_PARAM( system,  "<file>", "read initial system image from <file>" )
--CFG_PARAM( datadir, "<dir>",  "write user data into <dir>" )
--CFG_PARAM( kernel,  "<file>", "use specific emulated kernel" )
--CFG_PARAM( ramdisk, "<file>", "ramdisk image (default <system>/ramdisk.img" )
--CFG_PARAM( image,   "<file>", "obsolete, use -system <file> instead" )
--CFG_PARAM( init_data, "<file>", "initial data image (default <system>/userdata.img" )
--CFG_PARAM( initdata, "<file>", "same as '-init-data <file>'" )
--CFG_PARAM( data,     "<file>", "data image (default <datadir>/userdata-qemu.img" )
-+CFG_PARAM( system,  "<file>", "read system image from <file>, default: <system>/system.img" )
-+CFG_PARAM( data,     "<file>", "data image, default: <system>/data.img" )
-+CFG_PARAM( kernel,  "<file>", "use specific emulated kernel, default: kernel.bin" )
-+CFG_PARAM( ramdisk, "<file>", "ramdisk image (default <system>/ramdisk.bin" )
- CFG_PARAM( partition_size, "<size>", "system/data partition size in MBs" )
- CFG_PARAM( cache,    "<file>", "cache partition image (default is temporary file)" )
- CFG_FLAG ( no_cache, "disable the cache partition" )
- CFG_FLAG ( nocache,  "same as -no-cache" )
- OPT_PARAM( sdcard, "<file>", "SD card image (default <system>/sdcard.img")
- OPT_FLAG ( wipe_data, "reset the use data image (copy it from initdata)" )
--CFG_PARAM( avd, "<name>", "use a specific android virtual device" )
- CFG_PARAM( skindir, "<dir>", "search skins in <dir> (default <system>/skins)" )
- CFG_PARAM( skin, "<name>", "select a given skin" )
- CFG_FLAG ( no_skin, "don't use any emulator skin" )
---- a/android/main.c
-+++ b/android/main.c
-@@ -1606,6 +1606,7 @@ report_console( const char*  proto_port,
-  *       containing 'fileName'. this is *not* the full
-  *       path to 'fileName'.
-  */
-+
- static char*
- _getSdkImagePath( const char*  fileName )
- {
-@@ -1617,8 +1618,6 @@ _getSdkImagePath( const char*  fileName 
-     static const char* const  searchPaths[] = {
-         "",                                  /* program's directory */
--        "/lib/images",                       /* this is for SDK 1.0 */
--        "/../platforms/android-1.1/images",  /* this is for SDK 1.1 */
-         NULL
-     };
-@@ -1841,25 +1840,7 @@ int main(int argc, char **argv)
-         }
-     }
--    /* legacy support: we used to use -system <dir> and -image <file>
--     * instead of -sysdir <dir> and -system <file>, so handle this by checking
--     * whether the options point to directories or files.
--     */
--    if (opts->image != NULL) {
--        if (opts->system != NULL) {
--            if (opts->sysdir != NULL) {
--                derror( "You can't use -sysdir, -system and -image at the same time.\n"
--                        "You should probably use '-sysdir <path> -system <file>'.\n" );
--                exit(2);
--            }
--        }
--        dwarning( "Please note that -image is obsolete and that -system is now used to point\n"
--                  "to the system image. Next time, try using '-sysdir <path> -system <file>' instead.\n" );
--        opts->sysdir = opts->system;
--        opts->system = opts->image;
--        opts->image  = NULL;
--    }
--    else if (opts->system != NULL && path_is_dir(opts->system)) {
-+    if (opts->system != NULL && path_is_dir(opts->system)) {
-         if (opts->sysdir != NULL) {
-             derror( "Option -system should now be followed by a file path, not a directory one.\n"
-                     "Please use '-sysdir <path>' to point to the system directory.\n" );
-@@ -1885,49 +1866,11 @@ int main(int argc, char **argv)
-     if (opts->noskin)
-         opts->no_skin = opts->noskin;
--    if (opts->initdata) {
--        opts->init_data = opts->initdata;
--        opts->initdata  = NULL;
--    }
--
--    /* If no AVD name was given, try to find the top of the
--     * Android build tree
--     */
--    if (opts->avd == NULL) {
--        do {
--            char*  out = getenv("ANDROID_PRODUCT_OUT");
--
--            if (out == NULL || out[0] == 0)
--                break;
--
--            if (!path_exists(out)) {
--                derror("Can't access ANDROID_PRODUCT_OUT as '%s'\n"
--                    "You need to build the Android system before launching the emulator",
--                    out);
--                exit(2);
--            }
--
--            android_build_root = path_parent( out, 4 );
--            if (android_build_root == NULL || !path_exists(android_build_root)) {
--                derror("Can't find the Android build root from '%s'\n"
--                    "Please check the definition of the ANDROID_PRODUCT_OUT variable.\n"
--                    "It should point to your product-specific build output directory.\n",
--                    out );
--                exit(2);
--            }
--            android_build_out = out;
--            D( "found Android build root: %s", android_build_root );
--            D( "found Android build out:  %s", android_build_out );
--        } while (0);
--    }
-     /* if no virtual device name is given, and we're not in the
-      * Android build system, we'll need to perform some auto-detection
-      * magic :-)
-      */
--    if (opts->avd == NULL && !android_build_out) 
-     {
--        char   dataDirIsSystem = 0;
--
-         if (!opts->sysdir) {
-             opts->sysdir = _getSdkImagePath("system.img");
-             if (!opts->sysdir) {
-@@ -1945,47 +1888,30 @@ int main(int argc, char **argv)
-         }
-         if (!opts->system) {
--            opts->system = _getSdkSystemImage(opts->sysdir, "-image", "system.img");
--            D("autoconfig: -image %s", opts->image);
-+            opts->system = _getSdkSystemImage(opts->sysdir, "-system", "system.img");
-+            D("autoconfig: -system %s", opts->system);
-         }
-         if (!opts->kernel) {
--            opts->kernel = _getSdkSystemImage(opts->sysdir, "-kernel", "kernel-qemu");
-+            opts->kernel = _getSdkSystemImage(opts->sysdir, "-kernel", "kernel.bin");
-             D("autoconfig: -kernel %s", opts->kernel);
-         }
-         if (!opts->ramdisk) {
--            opts->ramdisk = _getSdkSystemImage(opts->sysdir, "-ramdisk", "ramdisk.img");
-+            opts->ramdisk = _getSdkSystemImage(opts->sysdir, "-ramdisk", "ramdisk.bin");
-             D("autoconfig: -ramdisk %s", opts->ramdisk);
-         }
--        /* if no data directory is specified, use the system directory */
--        if (!opts->datadir) {
--            opts->datadir   = qemu_strdup(opts->sysdir);
--            dataDirIsSystem = 1;
--            D("autoconfig: -datadir %s", opts->sysdir);
--        }
--
-         if (!opts->data) {
-             /* check for userdata-qemu.img in the data directory */
--            bufprint(tmp, tmpend, "%s/userdata-qemu.img", opts->datadir);
--            if (!path_exists(tmp)) {
--                derror(
--                "You did not provide the name of an Android Virtual Device\n"
--                "with the '-avd <name>' option. Read -help-avd for more information.\n\n"
--
--                "If you *really* want to *NOT* run an AVD, consider using '-data <file>'\n"
--                "to specify a data partition image file (I hope you know what you're doing).\n"
--                );
--                exit(2);
--            }
-+            bufprint(tmp, tmpend, "%s/data.img", opts->sysdir);
-             opts->data = qemu_strdup(tmp);
-             D("autoconfig: -data %s", opts->data);
-         }
--        if (!opts->sdcard && opts->datadir) {
--            bufprint(tmp, tmpend, "%s/sdcard.img", opts->datadir);
-+        if (!opts->sdcard && opts->sysdir) {
-+            bufprint(tmp, tmpend, "%s/sdcard.img", opts->sysdir);
-             if (path_exists(tmp)) {
-                 opts->sdcard = qemu_strdup(tmp);
-                 D("autoconfig: -sdcard %s", opts->sdcard);
-@@ -2029,19 +1955,6 @@ int main(int argc, char **argv)
-     android_avdParams->skinName     = opts->skin;
-     android_avdParams->skinRootPath = opts->skindir;
--    /* setup the virtual device differently depending on whether
--     * we are in the Android build system or not
--     */
--    if (opts->avd != NULL)
--    {
--        android_avdInfo = avdInfo_new( opts->avd, android_avdParams );
--        if (android_avdInfo == NULL) {
--            /* an error message has already been printed */
--            dprint("could not find virtual device named '%s'", opts->avd);
--            exit(1);
--        }
--    }
--    else
-     {
-         if (!android_build_out) {
-             android_build_out = android_build_root = opts->sysdir;
---- a/android/avd/info.c
-+++ b/android/avd/info.c
-@@ -1233,10 +1233,8 @@ _getBuildImagePaths( AvdInfo*  i, AvdInf
-      ** take care of checking the state
-      **/
-     imageLoader_set ( l, AVD_IMAGE_INITSYSTEM );
--    imageLoader_load( l, IMAGE_REQUIRED | IMAGE_DONT_LOCK );
--
--    /* force the system image to read-only status */
--    l->pState[0] = IMAGE_STATE_READONLY;
-+    l->pState[0] = IMAGE_STATE_MUSTLOCK;
-+    imageLoader_load( l, IMAGE_REQUIRED );
-     /** cache partition handling
-      **/
diff --git a/package/goldfish-qemu/skins/HVGA/arrow_down.png b/package/goldfish-qemu/skins/HVGA/arrow_down.png
deleted file mode 100644 (file)
index 19b3764..0000000
Binary files a/package/goldfish-qemu/skins/HVGA/arrow_down.png and /dev/null differ
diff --git a/package/goldfish-qemu/skins/HVGA/arrow_left.png b/package/goldfish-qemu/skins/HVGA/arrow_left.png
deleted file mode 100644 (file)
index 113e584..0000000
Binary files a/package/goldfish-qemu/skins/HVGA/arrow_left.png and /dev/null differ
diff --git a/package/goldfish-qemu/skins/HVGA/arrow_right.png b/package/goldfish-qemu/skins/HVGA/arrow_right.png
deleted file mode 100644 (file)
index ffe3356..0000000
Binary files a/package/goldfish-qemu/skins/HVGA/arrow_right.png and /dev/null differ
diff --git a/package/goldfish-qemu/skins/HVGA/arrow_up.png b/package/goldfish-qemu/skins/HVGA/arrow_up.png
deleted file mode 100644 (file)
index 81c54df..0000000
Binary files a/package/goldfish-qemu/skins/HVGA/arrow_up.png and /dev/null differ
diff --git a/package/goldfish-qemu/skins/HVGA/back.png b/package/goldfish-qemu/skins/HVGA/back.png
deleted file mode 100644 (file)
index 41034d9..0000000
Binary files a/package/goldfish-qemu/skins/HVGA/back.png and /dev/null differ
diff --git a/package/goldfish-qemu/skins/HVGA/device.png b/package/goldfish-qemu/skins/HVGA/device.png
deleted file mode 100644 (file)
index 465eb02..0000000
Binary files a/package/goldfish-qemu/skins/HVGA/device.png and /dev/null differ
diff --git a/package/goldfish-qemu/skins/HVGA/end.png b/package/goldfish-qemu/skins/HVGA/end.png
deleted file mode 100644 (file)
index 6830a60..0000000
Binary files a/package/goldfish-qemu/skins/HVGA/end.png and /dev/null differ
diff --git a/package/goldfish-qemu/skins/HVGA/home.png b/package/goldfish-qemu/skins/HVGA/home.png
deleted file mode 100644 (file)
index 7d02136..0000000
Binary files a/package/goldfish-qemu/skins/HVGA/home.png and /dev/null differ
diff --git a/package/goldfish-qemu/skins/HVGA/key.png b/package/goldfish-qemu/skins/HVGA/key.png
deleted file mode 100644 (file)
index 7a3f563..0000000
Binary files a/package/goldfish-qemu/skins/HVGA/key.png and /dev/null differ
diff --git a/package/goldfish-qemu/skins/HVGA/keyboard.png b/package/goldfish-qemu/skins/HVGA/keyboard.png
deleted file mode 100644 (file)
index bb076d3..0000000
Binary files a/package/goldfish-qemu/skins/HVGA/keyboard.png and /dev/null differ
diff --git a/package/goldfish-qemu/skins/HVGA/layout b/package/goldfish-qemu/skins/HVGA/layout
deleted file mode 100644 (file)
index 4c3d764..0000000
+++ /dev/null
@@ -1,380 +0,0 @@
-parts {
-    device {
-        background {
-            image   device.png
-        }
-        display {
-            width   320
-            height  480
-            x       31
-            y       72
-        }
-
-        buttons {
-            soft-left {
-                    image menu.png
-                    x 147
-                    y 555
-            }
-            home {
-                    image home.png
-                    x 48
-                    y 590
-            }
-            back {
-                    image back.png
-                    x 286
-                    y 590
-            }
-            dpad-up {
-                    image arrow_up.png
-                    x 140
-                    y 595
-            }
-            dpad-down {
-                    image arrow_down.png
-                    x 140
-                    y 656
-            }
-            dpad-left {
-                    image arrow_left.png
-                    x 111
-                    y 598
-            }
-            dpad-right {
-                    image arrow_right.png
-                    x 222
-                    y 598
-            }
-            dpad-center {
-                    image select.png
-                    x 142
-                    y 626
-            }
-            phone-dial {
-                    image send.png
-                    x 48
-                    y 646
-            }
-            phone-hangup {
-                    image end.png
-                    x 286
-                    y 646
-            }
-
-            power {
-                    image power.png
-                    x -38
-                    y 52
-            }
-
-            volume-up {
-                    image volume_up.png
-                    x 362
-                    y 260
-            }
-
-            volume-down {
-                    image volume_down.png
-                    x 362
-                    y 310
-            }
-        }
-    }
-
-    keyboard {
-        background {
-            image   keyboard.png
-        }
-        buttons {
-            1 {
-                image  key.png
-                x  0
-                y  0
-            }
-            2 {
-                image  key.png
-                x 37
-                y 0
-            }
-            3 {
-                image  key.png
-                x 74
-                y 0
-            }
-            4 {
-                image  key.png
-                x 111
-                y 0
-            }
-            5 {
-                image  key.png
-                x 148
-                y 0
-            }
-            6 {
-                image  key.png
-                x 185
-                y 0
-            }
-            7 {
-                image  key.png
-                x 222
-                y 0
-            }
-            8 {
-                image  key.png
-                x 259
-                y 0
-            }
-            9 {
-                image  key.png
-                x 296
-                y 0
-            }
-            0 {
-                image  key.png
-                x 333
-                y 0
-            }
-
-            q {
-                image  key.png
-                x  0
-                y  36
-            }
-            w {
-                image  key.png
-                x 37
-                y 36
-            }
-            e {
-                image  key.png
-                x 74
-                y 36
-            }
-            r {
-                image  key.png
-                x 111
-                y 36
-            }
-            t {
-                image  key.png
-                x 148
-                y 36
-            }
-            y {
-                image  key.png
-                x 185
-                y 36
-            }
-            u {
-                image  key.png
-                x 222
-                y 36
-            }
-            i {
-                image  key.png
-                x 259
-                y 36
-            }
-            o {
-                image  key.png
-                x 296
-                y 36
-            }
-            p {
-                image  key.png
-                x 333
-                y 36
-            }
-
-            a {
-                image  key.png
-                x  0
-                y  72
-            }
-            s {
-                image  key.png
-                x 37
-                y 72
-            }
-            d {
-                image  key.png
-                x 74
-                y 72
-            }
-            f {
-                image  key.png
-                x 111
-                y 72
-            }
-            g {
-                image  key.png
-                x 148
-                y 72
-            }
-            h {
-                image  key.png
-                x 185
-                y 72
-            }
-            j {
-                image  key.png
-                x 222
-                y 72
-            }
-            k {
-                image  key.png
-                x 259
-                y 72
-            }
-            l {
-                image  key.png
-                x 296
-                y 72
-            }
-            DEL {
-                image  key.png
-                x 333
-                y 72
-            }
-
-            CAP {
-                image  key.png
-                x  0
-                y  108
-            }
-            z {
-                image  key.png
-                x 37
-                y 108
-            }
-            x {
-                image  key.png
-                x 74
-                y 108
-            }
-            c {
-                image  key.png
-                x 111
-                y 108
-            }
-            v {
-                image  key.png
-                x 148
-                y 108
-            }
-            b {
-                image  key.png
-                x 185
-                y 108
-            }
-            n {
-                image  key.png
-                x 222
-                y 108
-            }
-            m {
-                image  key.png
-                x 259
-                y 108
-            }
-            PERIOD {
-                image  key.png
-                x 296
-                y 108
-            }
-            ENTER {
-                image  key.png
-                x 333
-                y 108
-            }
-
-            ALT {
-                image  key.png
-                x  0
-                y  144
-            }
-            SYM {
-                image  key.png
-                x 37
-                y 144
-            }
-            AT {
-                image  key.png
-                x 74
-                y 144
-            }
-            SPACE {
-                image  spacebar.png
-                x 111
-                y 144
-            }
-            SLASH {
-                image  key.png
-                x 259
-                y 144
-            }
-            COMMA {
-                image  key.png
-                x 296
-                y 144
-            }
-            ALT2 {
-                image  key.png
-                x 333
-                y 144
-            }
-
-        }
-    }
-}
-
-layouts {
-    portrait {
-        width     900
-        height    730
-        color     0xe0e0e0
-        event     EV_SW:0:1
-
-        part1 {
-            name    device
-            x       40
-            y       -18
-        }
-        part2 {
-            name    keyboard
-            x       480
-            y       200
-        }
-    }
-
-    landscape {
-        width     900
-        height    670
-        color     0xe0e0e0
-        event     EV_SW:0:0
-
-        part1 {
-            name      device
-            x         50
-            y         440
-            rotation  3
-        }
-        part2 {
-            name     keyboard
-            x        250
-            y        470
-        }
-    }
-}
-
-keyboard {
-    charmap qwerty2
-}
-
-network {
-    speed  full
-    delay  none
-}
diff --git a/package/goldfish-qemu/skins/HVGA/menu.png b/package/goldfish-qemu/skins/HVGA/menu.png
deleted file mode 100644 (file)
index e81d8ab..0000000
Binary files a/package/goldfish-qemu/skins/HVGA/menu.png and /dev/null differ
diff --git a/package/goldfish-qemu/skins/HVGA/power.png b/package/goldfish-qemu/skins/HVGA/power.png
deleted file mode 100644 (file)
index 5894288..0000000
Binary files a/package/goldfish-qemu/skins/HVGA/power.png and /dev/null differ
diff --git a/package/goldfish-qemu/skins/HVGA/select.png b/package/goldfish-qemu/skins/HVGA/select.png
deleted file mode 100644 (file)
index 803d493..0000000
Binary files a/package/goldfish-qemu/skins/HVGA/select.png and /dev/null differ
diff --git a/package/goldfish-qemu/skins/HVGA/send.png b/package/goldfish-qemu/skins/HVGA/send.png
deleted file mode 100644 (file)
index f547c88..0000000
Binary files a/package/goldfish-qemu/skins/HVGA/send.png and /dev/null differ
diff --git a/package/goldfish-qemu/skins/HVGA/spacebar.png b/package/goldfish-qemu/skins/HVGA/spacebar.png
deleted file mode 100644 (file)
index 19fe604..0000000
Binary files a/package/goldfish-qemu/skins/HVGA/spacebar.png and /dev/null differ
diff --git a/package/goldfish-qemu/skins/HVGA/volume_down.png b/package/goldfish-qemu/skins/HVGA/volume_down.png
deleted file mode 100644 (file)
index f8a88de..0000000
Binary files a/package/goldfish-qemu/skins/HVGA/volume_down.png and /dev/null differ
diff --git a/package/goldfish-qemu/skins/HVGA/volume_up.png b/package/goldfish-qemu/skins/HVGA/volume_up.png
deleted file mode 100644 (file)
index 940457f..0000000
Binary files a/package/goldfish-qemu/skins/HVGA/volume_up.png and /dev/null differ
diff --git a/package/libipfix/Makefile b/package/libipfix/Makefile
deleted file mode 100644 (file)
index e4c9315..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-# 
-# Copyright (C) 2006 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=libipfix
-PKG_VERSION:=r51
-PKG_RELEASE:=1
-
-PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
-PKG_MD5SUM:=0e5b2871ea20ac48eda3f6006c5dba28
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME).$(PKG_VERSION)
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/libipfix
-  SECTION:=libs
-  CATEGORY:=Libraries
-  TITLE:=IP Flow Information Export Library
-  URL:=http://www.fokus.fraunhofer.de/de/net/more_about/download/ipfixlib.html
-  BUILDONLY:=1
-endef
-
-TARGET_CFLAGS += \
-       -ffunction-sections -fdata-sections
-
-define Build/Compile
-       $(MAKE) -C $(PKG_BUILD_DIR) \
-               CCOPT="$(TARGET_CFLAGS) -I$(BUILD_DIR)/linux/include" \
-               prefix="$(PKG_INSTALL_DIR)/usr" \
-               exec_prefix="$(PKG_INSTALL_DIR)/usr" \
-               all install
-       $(TARGET_CROSS)ranlib $(PKG_INSTALL_DIR)/usr/lib/libipfix.a
-       $(TARGET_CROSS)ranlib $(PKG_INSTALL_DIR)/usr/lib/libipfixmisc.a
-endef
-
-define Build/InstallDev
-       $(INSTALL_DIR) $(1)
-       $(CP) $(PKG_INSTALL_DIR)/* $(1)/
-endef
-
-$(eval $(call BuildPackage,libipfix))
diff --git a/package/libipfix/extra/append-wprobe-ie.pl b/package/libipfix/extra/append-wprobe-ie.pl
deleted file mode 100644 (file)
index 8bb658b..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-use strict;
-
-my @fields = (
-       [ "_n", "UINT", " - Number of samples", 4 ],
-       [ "_s", "UINT", " - Sum of samples", 8 ],
-       [ "_ss", "UINT", " - Sum of squared samples", 8 ],
-);
-
-my $file = $ARGV[0] or die "Syntax: $0 <file> <start>\n";
--f $file or die "File not found\n";
-my $start = $ARGV[1];
-$start =~ /^\d+$/ or die "Invalid start number";
-open FILE, "<$file" or die "Can't open file";
-while (<FILE>) {
-       /^(%?)(\w+),\s*(\w+),\s*(.+)$/ and do {
-               my $counter = $1;
-               my $rfield = $2;
-               my $nfield = $3;
-               my $descr = $4;
-               my @f;
-               if ($counter) {
-                       @f = [ "", "UINT", "", 4];
-               } else {
-                       @f = @fields;
-               }
-               foreach my $f (@f) {
-                       my $nr = $start++;
-                       my $n = $f->[0];
-                       my $N = uc $n;
-                       my $ftype = $f->[1];
-                       my $fdesc = $f->[2];
-                       my $size = $f->[3];
-                       print "$nr, IPFIX_FT_WPROBE_$rfield$N, $size, IPFIX_CODING_$ftype, \"$nfield$n\", \"$descr$fdesc\"\n";
-               }
-       };
-}
-close FILE;
-
diff --git a/package/libipfix/extra/wprobe-ie.txt b/package/libipfix/extra/wprobe-ie.txt
deleted file mode 100644 (file)
index 26d64d2..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-NOISE, global_noise, wprobe global noice floor
-PHY_BUSY, global_phy_busy, wprobe global airtime total
-PHY_RX, global_phy_rx, wprobe global airtime total from rx-frame
-PHY_TX, global_phy_tx, wprobe global airtime total from tx-frame
-RSSI, link_rssi, wprobe link received signal strength indication
-SIGNAL, link_signal, wprobe link signal strength in dB
-IEEE_RX_RATE, link_ieee_rx_rate, wprobe link IEEE 802.11 RX data rate
-IEEE_TX_RATE, link_ieee_tx_rate, wprobe link IEEE 802.11 TX data rate
-RETRANSMIT_200, link_retransmit_200, wprobe link total retransmissions per packet - <200 bytes
-RETRANSMIT_400, link_retransmit_400, wprobe link total retransmissions per packet - <400 bytes
-RETRANSMIT_800, link_retransmit_800, wprobe link total retransmissions per packet - <800 bytes
-RETRANSMIT_1600, link_retransmit_1600, wprobe link total retransmissions per packet - >800 bytes
-%FRAMES, global_frames, wprobe global number of 802.11 frames seen
-%PROBEREQ, global_probereq, wprobe global number of 802.11 probe requests seen
diff --git a/package/libipfix/patches/100-openimp_sync.patch b/package/libipfix/patches/100-openimp_sync.patch
deleted file mode 100644 (file)
index 5b6e2e3..0000000
+++ /dev/null
@@ -1,474 +0,0 @@
---- a/lib/ipfix.c
-+++ b/lib/ipfix.c
-@@ -37,6 +37,9 @@ $$LIC$$
- #ifdef SCTPSUPPORT
- #include <netinet/sctp.h>
- #endif
-+#ifndef NOTHREADS
-+#include <pthread.h>
-+#endif
- #include <fcntl.h>
- #include <netdb.h>
-@@ -123,6 +126,18 @@ static uint16_t           g_lasttid;    
- static ipfix_datarecord_t g_data = { NULL, NULL, 0 }; /* ipfix_export */
- static ipfix_field_t      *g_ipfix_fields;
-+#ifndef NOTHREADS
-+static pthread_mutex_t    g_mutex;
-+#define mod_lock()        { \
-+                            if ( pthread_mutex_lock( &g_mutex ) !=0 ) \
-+                                mlogf( 0, "[ipfix] mutex_lock() failed: %s\n", \
-+                                       strerror( errno ) ); \
-+                          }
-+#define mod_unlock()      {  pthread_mutex_unlock( &g_mutex ); }
-+#else
-+#define mod_lock()
-+#define mod_unlock()
-+#endif
- /*----- prototypes -------------------------------------------------------*/
-@@ -133,6 +148,7 @@ int  _ipfix_send_message( ipfix_t *ifh, 
-                           ipfix_message_t *message );
- int  _ipfix_write_msghdr( ipfix_t *ifh, ipfix_message_t *msg, iobuf_t *buf );
- void _ipfix_disconnect( ipfix_collector_t *col );
-+int  _ipfix_export_flush( ipfix_t *ifh );
- /* name      : do_writeselect
-@@ -576,16 +592,18 @@ int ipfix_decode_float( void *in, void *
- int ipfix_snprint_float( char *str, size_t size, void *data, size_t len )
- {
--    float tmp32;
--    double tmp64;
-+    uint32_t tmp32;
-+    uint64_t tmp64;
-     switch ( len ) {
-       case 4:
--          ipfix_decode_float( data, &tmp32, 4);
--          return snprintf( str, size, "%f", tmp32 );
-+          memcpy( &tmp32, data, len );
-+          tmp32 = htonl( tmp32 );
-+          return snprintf( str, size, "%f", (float)tmp32 );
-       case 8:
--          ipfix_decode_float( data, &tmp64, 8);
--          return snprintf( str, size, "%lf", tmp64);
-+          memcpy( &tmp64, data, len );
-+          tmp64 = HTONLL( tmp64 );
-+          return snprintf( str, size, "%lf", (double)tmp64 );
-       default:
-           break;
-     }
-@@ -682,12 +700,19 @@ int ipfix_get_eno_ieid( char *field, int
-  * parameters:
-  * remarks:     init module, read field type info.
-  */
--int ipfix_init ( void )
-+int ipfix_init( void )
- {
-     if ( g_tstart ) {
-         ipfix_cleanup();
-     }
-+#ifndef NOTHREADS
-+    if ( pthread_mutex_init( &g_mutex, NULL ) !=0 ) {
-+        mlogf( 0, "[ipfix] pthread_mutex_init() failed: %s\n",
-+               strerror(errno) );
-+        return -1;
-+    }
-+#endif
-     g_tstart = time(NULL);
-     signal( SIGPIPE, SIG_IGN );
-     g_lasttid = 255;
-@@ -806,6 +831,9 @@ void ipfix_cleanup ( void )
-     g_data.maxfields = 0;
-     g_data.lens  = NULL;
-     g_data.addrs = NULL;
-+#ifndef NOTHREADS
-+    (void)pthread_mutex_destroy( &g_mutex );
-+#endif
- }
- int _ipfix_connect ( ipfix_collector_t *col )
-@@ -1465,7 +1493,7 @@ int _ipfix_write_template( ipfix_t      
-       default:
-           /* check space */
-           if ( tsize+ifh->offset > IPFIX_DEFAULT_BUFLEN ) {
--              if ( ipfix_export_flush( ifh ) < 0 )
-+              if ( _ipfix_export_flush( ifh ) < 0 )
-                   return -1;
-               if ( tsize+ifh->offset > IPFIX_DEFAULT_BUFLEN )
-                   return -1;
-@@ -1474,6 +1502,8 @@ int _ipfix_write_template( ipfix_t      
-           /* write template prior to data */
-           if ( ifh->offset > 0 ) {
-               memmove( ifh->buffer + tsize, ifh->buffer, ifh->offset );
-+              if ( ifh->cs_tid )
-+                  ifh->cs_header += tsize;
-           }
-           buf = ifh->buffer;
-@@ -1615,8 +1645,11 @@ int ipfix_open( ipfix_t **ipfixh, int so
-         return -1;
-     }
-     node->ifh   = i;
-+
-+    mod_lock();
-     node->next  = g_ipfixlist;
-     g_ipfixlist = node;
-+    mod_unlock();
-     *ipfixh = i;
-     return 0;
-@@ -1633,7 +1666,8 @@ void ipfix_close( ipfix_t *h )
-     {
-         ipfix_node_t *l, *n;
--        ipfix_export_flush( h );
-+        mod_lock();
-+        _ipfix_export_flush( h );
-         while( h->collectors )
-             _ipfix_drop_collector( (ipfix_collector_t**)&h->collectors );
-@@ -1659,6 +1693,7 @@ void ipfix_close( ipfix_t *h )
- #endif
-         free(h->buffer);
-         free(h);
-+        mod_unlock();
-     }
- }
-@@ -2156,6 +2191,22 @@ void ipfix_release_template( ipfix_t *if
-     ipfix_delete_template( ifh, templ );
- }
-+static void _finish_cs( ipfix_t *ifh )
-+{
-+    size_t   buflen;
-+    uint8_t  *buf;
-+
-+    /* finish current dataset */
-+    if ( (buf=ifh->cs_header) ==NULL )
-+        return;
-+    buflen = 0;
-+    INSERTU16( buf+buflen, buflen, ifh->cs_tid );
-+    INSERTU16( buf+buflen, buflen, ifh->cs_bytes );
-+    ifh->cs_bytes = 0;
-+    ifh->cs_header = NULL;
-+    ifh->cs_tid = 0;
-+}
-+
- int ipfix_export( ipfix_t *ifh, ipfix_template_t *templ, ... )
- {
-     int       i;
-@@ -2199,13 +2250,14 @@ int ipfix_export( ipfix_t *ifh, ipfix_te
-                                g_data.addrs, g_data.lens );
- }
--int ipfix_export_array( ipfix_t          *ifh,
--                        ipfix_template_t *templ,
--                        int              nfields,
--                        void             **fields,
--                        uint16_t         *lengths )
-+static int
-+_ipfix_export_array( ipfix_t          *ifh,
-+                     ipfix_template_t *templ,
-+                     int              nfields,
-+                     void             **fields,
-+                     uint16_t         *lengths )
- {
--    int               i;
-+    int               i, newset_f=0;
-     size_t            buflen, datasetlen;
-     uint8_t           *p, *buf;
-@@ -2249,7 +2301,19 @@ int ipfix_export_array( ipfix_t         
-     /** get size of data set, check space
-      */
--    for ( i=0, datasetlen=4; i<nfields; i++ ) {
-+    if ( templ->tid == ifh->cs_tid ) {
-+        newset_f = 0;
-+        datasetlen = 0;
-+    }
-+    else {
-+        if ( ifh->cs_tid > 0 ) {
-+            _finish_cs( ifh );
-+        }
-+        newset_f = 1;
-+        datasetlen = 4;
-+    }
-+
-+    for ( i=0; i<nfields; i++ ) {
-         if ( templ->fields[i].flength == IPFIX_FT_VARLEN ) {
-             if ( lengths[i]>254 )
-                 datasetlen += 3;
-@@ -2263,21 +2327,29 @@ int ipfix_export_array( ipfix_t         
-         }
-         datasetlen += lengths[i];
-     }
--    if ( ((ifh->offset + datasetlen) > IPFIX_DEFAULT_BUFLEN )
--         && (ipfix_export_flush( ifh ) <0) ) {
--        return -1;
-+
-+    if ( (ifh->offset + datasetlen) > IPFIX_DEFAULT_BUFLEN ) {
-+        if ( ifh->cs_tid )
-+            _finish_cs( ifh );
-+        newset_f = 1;
-+
-+        if ( _ipfix_export_flush( ifh ) <0 )
-+            return -1;
-     }
--    /* fill buffer
--     */
-+    /* fill buffer */
-     buf    = (uint8_t*)(ifh->buffer) + ifh->offset;
-     buflen = 0;
--    /* insert data set
--     */
--    ifh->nrecords ++;
--    INSERTU16( buf+buflen, buflen, templ->tid );
--    INSERTU16( buf+buflen, buflen, datasetlen );
-+    if ( newset_f ) {
-+        /* insert data set
-+         */
-+        ifh->cs_bytes = 0;
-+        ifh->cs_header = buf;
-+        ifh->cs_tid = templ->tid;
-+        INSERTU16( buf+buflen, buflen, templ->tid );
-+        INSERTU16( buf+buflen, buflen, 4 );
-+    }
-     /* insert data record
-      */
-@@ -2303,7 +2375,9 @@ int ipfix_export_array( ipfix_t         
-         buflen += lengths[i];
-     }
-+    ifh->nrecords ++;
-     ifh->offset += buflen;
-+    ifh->cs_bytes += buflen;
-     if ( ifh->version == IPFIX_VERSION )
-         ifh->seqno ++;
-     return 0;
-@@ -2313,7 +2387,7 @@ int ipfix_export_array( ipfix_t         
-  * parameters:
-  * remarks:     rewrite this func!
-  */
--int ipfix_export_flush( ipfix_t *ifh )
-+int _ipfix_export_flush( ipfix_t *ifh )
- {
-     iobuf_t           *buf;
-     ipfix_collector_t *col;
-@@ -2322,8 +2396,14 @@ int ipfix_export_flush( ipfix_t *ifh )
-     if ( (ifh==NULL) || (ifh->offset==0) )
-         return 0;
--    if ( (buf=_ipfix_getbuf()) ==NULL )
-+    if ( ifh->cs_tid > 0 ) {
-+        /* finish current dataset */
-+        _finish_cs( ifh );
-+    }
-+
-+    if ( (buf=_ipfix_getbuf()) ==NULL ) {
-         return -1;
-+    }
- #ifdef DEBUG
-     mlogf( 0, "[ipfix_export_flush] msg has %d records, %d bytes\n",
-@@ -2350,3 +2430,30 @@ int ipfix_export_flush( ipfix_t *ifh )
-     _ipfix_freebuf( buf );
-     return ret;
- }
-+
-+int ipfix_export_array( ipfix_t          *ifh,
-+                        ipfix_template_t *templ,
-+                        int              nfields,
-+                        void             **fields,
-+                        uint16_t         *lengths )
-+{
-+    int ret;
-+
-+    mod_lock();
-+    ret = _ipfix_export_array( ifh, templ, nfields, fields, lengths );
-+    mod_unlock();
-+
-+    return ret;
-+}
-+
-+int ipfix_export_flush( ipfix_t *ifh )
-+{
-+    int ret;
-+
-+    mod_lock();
-+    ret = _ipfix_export_flush( ifh );
-+    mod_unlock();
-+
-+    return ret;
-+}
-+
---- a/lib/ipfix.h
-+++ b/lib/ipfix.h
-@@ -142,6 +142,12 @@ typedef struct
-     int         nrecords;         /* no. of records in buffer */
-     size_t      offset;           /* output buffer fill level */
-     uint32_t    seqno;            /* sequence no. of next message */
-+
-+    /* experimental */
-+    int        cs_tid;            /* template id of current dataset */
-+    int        cs_bytes;          /* size of current set */
-+    uint8_t    *cs_header;        /* start of current set */
-+
- } ipfix_t;
- /** exporter funcs
---- a/lib/ipfix_col.c
-+++ b/lib/ipfix_col.c
-@@ -897,6 +897,8 @@ int ipfix_decode_datarecord( ipfixt_node
-             return -1;
-         }
-+        n->ipfixt->fields[i].elem->decode(p,p,len);
-+
-         data->lens[i]  = len;
-         data->addrs[i] = p;
-@@ -907,7 +909,7 @@ int ipfix_decode_datarecord( ipfixt_node
-     return 0;
- }
--static void do_free_datarecord( ipfix_datarecord_t   *data )
-+void ipfix_free_datarecord( ipfix_datarecord_t   *data )
- { 
-     if ( data ) {
-         if ( data->addrs )
-@@ -925,6 +927,7 @@ int ipfix_parse_msg( ipfix_input_t *inpu
-     ipfix_hdr_t          hdr;                  /* ipfix packet header */
-     ipfixs_node_t        *s;
-     ipfix_datarecord_t   data = { NULL, NULL, 0 };
-+    ipfixe_node_t        *e;
-     uint8_t              *buf;                 /* ipfix payload */
-     uint16_t             setid, setlen;        /* set id, set lenght */
-     int                  i, nread, offset;     /* counter */
-@@ -1042,6 +1045,12 @@ int ipfix_parse_msg( ipfix_input_t *inpu
-                 err_flag = 1;
-             } 
-             else {
-+                for ( e=g_exporter; e!=NULL; e=e->next ) {
-+                    if ( e->elem->export_dset )
-+                        (void) e->elem->export_dset( t, buf+nread, setlen,
-+                                                     e->elem->data );
-+                }
-+
-                 /** read data records
-                  */
-                 for ( offset=nread, bytesleft=setlen; bytesleft>4; ) {
-@@ -1076,11 +1085,11 @@ int ipfix_parse_msg( ipfix_input_t *inpu
-         goto errend;
-  end:
--    do_free_datarecord( &data );
-+    ipfix_free_datarecord( &data );
-     return nread;
-  errend:
--    do_free_datarecord( &data );
-+    ipfix_free_datarecord( &data );
-     return -1;
- }
-@@ -1093,7 +1102,7 @@ void process_client_tcp( int fd, int mas
-     tcp_conn_t   *tcon = (tcp_conn_t*)data;
-     char         *func = "process_client_tcp";
--    mlogf( 3,  "[%s] fd %d mask %d called.\n", func, fd, mask );
-+    mlogf( 4,  "[%s] fd %d mask %d called.\n", func, fd, mask );
-     /** read ipfix header 
-      */
---- a/lib/ipfix_col.h
-+++ b/lib/ipfix_col.h
-@@ -88,6 +88,7 @@ typedef struct ipfix_col_info
-     int (*export_newsource)(ipfixs_node_t*,void*);
-     int (*export_newmsg)(ipfixs_node_t*,ipfix_hdr_t*,void*);
-     int (*export_trecord)(ipfixs_node_t*,ipfixt_node_t*,void*);
-+    int (*export_dset)(ipfixt_node_t*,uint8_t*,size_t,void*);
-     int (*export_drecord)(ipfixs_node_t*,ipfixt_node_t*,
-                           ipfix_datarecord_t*,void*);
-     void (*export_cleanup)(void*);
---- a/lib/ipfix_col_files.c
-+++ b/lib/ipfix_col_files.c
-@@ -68,7 +68,7 @@ static int export_newsource_file( ipfixs
-             return -1;
-         }
-         snprintf( s->fname+strlen(s->fname), PATH_MAX-strlen(s->fname),
--                  "/%u", s->odid );
-+                  "/%u", (unsigned int)s->odid );
-         if ( (access( s->fname, R_OK ) <0 )
-              && (mkdir( s->fname, S_IRWXU ) <0) ) {
-             mlogf( 0, "[%s] cannot access dir '%s': %s\n",
---- a/lib/ipfix_FOKUS_IEs.txt
-+++ b/lib/ipfix_FOKUS_IEs.txt
-@@ -24,6 +24,8 @@
- 196, IPFIX_FT_PKTID,                4, IPFIX_CODING_UINT, "pktId", "FOKUS packet id"
- 197, IPFIX_FT_STARTTIME,            4, IPFIX_CODING_INT, "startTime", "FOKUS interval start"
- 198, IPFIX_FT_ENDTIME,              4, IPFIX_CODING_INT, "endTime", "FOKUS interval end"
-+199, IPFIX_FT_RTT_USEC,             8, IPFIX_CODING_UINT, "rtt_usec", "FOKUS rtt in us"
-+
- 300, IPFIX_FT_FLOWCREATIONTIMEUSEC, 4, IPFIX_CODING_INT, "flowCreationTimeUsec", "FOKUS flow start usec fraction"
- 301, IPFIX_FT_FLOWENDTIMEUSEC,      4, IPFIX_CODING_INT, "flowEndTimeUsec", "FOKUS flow end usec fraction"
- 303, IPFIX_FT_TC_PACKETS,           4, IPFIX_CODING_UINT, "tcPackets", "DAIDALOS Packets seen"
-@@ -39,3 +41,48 @@
- 313, IPFIX_FT_OWDVARMIN_NSEC,       4, IPFIX_CODING_INT, "owdvarmin_nsec", "FOKUS minimum owd variance in ns"
- 314, IPFIX_FT_OWDVARMAX_NSEC,       4, IPFIX_CODING_INT, "owdvarmax_nsec", "FOKUS maximum ow variance in ns"
-+# Project INTERSECTION
-+315, IPFIX_FT_SOURCEIPV4FANOUT,     4, IPFIX_CODING_UINT,"sourceIPv4FanOut", "FOKUS IPv4 fanout"
-+316, IPFIX_FT_DESTINATIONIPV4FANIN, 4, IPFIX_CODING_UINT,"destinationIPv4FanIn", "FOKUS IPv4 fanin"
-+
-+# Project PRISM
-+
-+330, IPFIX_FT_PR_SESSIONID,   4, IPFIX_CODING_UINT, "sessionId", "PRISM Session ID"
-+331, IPFIX_FT_PR_TRANSACTIONID, 4, IPFIX_CODING_UINT, "transactionId", "PRISM Transaction ID"
-+332, IPFIX_FT_PR_ENCRYPTEDDATA, 65535, IPFIX_CODING_STRING, "encryptedData", "PRISM encrypted data"
-+333, IPFIX_FT_PR_DECRYPTIONKEY, 65535, IPFIX_CODING_STRING, "decryptionKey", "PRISM decryption key"
-+334, IPFIX_FT_PR_KEYSHARE,      65535, IPFIX_CODING_STRING, "keyShare", "PRISM key share"
-+335, IPFIX_FT_PR_KEYSHAREADP,   65535, IPFIX_CODING_STRING, "keyShareAdp", "PRISM key share ADP"
-+336, IPFIX_FT_PR_INITVECTOR,    65535, IPFIX_CODING_STRING, "cryptoInitVector", "PRISM crypto init vector"
-+
-+
-+# these information elements have been defined by FOKUS for the Oracle project
-+
-+402, IPFIX_FT_ORsignalBandwidth, 4, IPFIX_CODING_UINT, "ORsignalBandwidth", "signal bandwidth" 
-+403, IPFIX_FT_ORsignalPower, 2, IPFIX_CODING_UINT, "ORsignalPower", "ERIP" 
-+404, IPFIX_FT_ORmodulationType, 2, IPFIX_CODING_UINT, "ORmodulationType", "AM/FM,.."
-+405, IPFIX_FT_ORsymbolRate, 2, IPFIX_CODING_UINT, "ORsymbolRate", "symbol rate"
-+406, IPFIX_FT_ORmodulationOrder, 1, IPFIX_CODING_UINT, "ORmodulationOrder", "number of levels"
-+407, IPFIX_FT_ORrolloffFactor, 2, IPFIX_CODING_UINT, "ORrolloffFactor", "roll of factor"
-+408, IPFIX_FT_ORgeopositionLon, 4, IPFIX_CODING_UINT, "ORgeopositionLon", "GPS coordinate, resolution 1 cm"
-+409, IPFIX_FT_ORgeopositionLat, 4, IPFIX_CODING_UINT, "ORgeopositionLat", "GPS coordinate, resolution 1 cm"
-+410, IPFIX_FT_ORgeopositionElev, 4, IPFIX_CODING_UINT, "ORgeopositionElev", "GPS coordinate, resolution 1 cm"
-+411, IPFIX_FT_ORpolicyRecord, 65535, IPFIX_CODING_STRING, "ORpolicyRecord", "policy record has variable length, First 8 bits in data describe the length (in bytes) of the field"
-+420, IPFIX_FT_channel_status, 1, IPFIX_CODING_UINT, "channel_status", vacancy of the scanned channel (1: channel busy, 0: channel idle)"
-+421, IPFIX_FT_sensing_value, 2, IPFIX_CODING_UINT, "sensing_value", "Cost function output"
-+422, IPFIX_FT_sensing_threshold, 2, IPFIX_CODING_UINT, "sensing_threshold", "Decision threshold"
-+423, IPFIX_FT_OR_terminal_id, 1, IPFIX_CODING_UINT, "OR_terminal_id", "terminal identifier"
-+424, IPFIX_FT_OR_terminal_id_list, 65535, IPFIX_CODING_STRING, "OR_terminal_id_list", "terminal identifier list"
-+425, IPFIX_FT_Infrastructure_network_id, 1, IPFIX_CODING_UINT, "Infrastructure_network_id", "network identifier"
-+426, IPFIX_FT_Infrastructure_network_type, 1, IPFIX_CODING_UINT, "Infrastructure_network_type", "network type (GSM - 1, UMTS - 2, WiMAX - 3, WiFi - 4)" 
-+427, IPFIX_FT_Battery_lifetime_min, 1, IPFIX_CODING_UINT, "Battery_lifetime_min", "expected battery lifetime to provide requested services or functionalities, in minutes"
-+428, IPFIX_FT_Battery_lifetime_h, 1, IPFIX_CODING_UINT, "Battery_lifetime_h", "expected battery lifetime to provide requested services or functionalities, in hours"
-+429, IPFIX_FT_Battery_status, 1, IPFIX_CODING_UINT, "Battery_status", "expected battery lifetime to provide requested services or functionalities, 1 bit status flag, values 1 or 0"
-+430, IPFIX_FT_Cell_id_number, 4, IPFIX_CODING_UINT, "Cell_id_number", "16-32 bit cell id number, identifier"
-+431, IPFIX_FT_Spectral_allocation_vector, 1, IPFIX_CODING_UINT, "Spectral_allocation_vector", "binary vector to indicate whether a band is free 1 bit 0 or not 1 bit 1"
-+432, IPFIX_FT_Spectral_allocation_profile, 2, IPFIX_CODING_UINT, "Spectral_allocation_profile", "received power spectral density vs. frequency to indicate spectral activity in the band of interest (8-16 bits per discrete frequency value)"
-+433, IPFIX_FT_Center_frequency, 2, IPFIX_CODING_UINT, "Center_frequency", "Center frequency of the sensed band"
-+434, IPFIX_FT_Bandwidth_of_CAP, 2, IPFIX_CODING_UINT, "Bandwidth_of_CAP", "Bandwidth of the spectral allocation profile"
-+435, IPFIX_FT_ORmodulation, 1, IPFIX_CODING_UINT, "ORmodulation", "CREST factor"
-+436, IPFIX_FT_ORprofileRecord, 65535, IPFIX_CODING_STRING, "ORprofileRecord", "profile record has variable length, First 8 bits in data describe the length (in bytes) of the field"
-+
diff --git a/package/libipfix/patches/110-wprobe_ie.patch b/package/libipfix/patches/110-wprobe_ie.patch
deleted file mode 100644 (file)
index 5e37280..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
---- a/lib/ipfix_FOKUS_IEs.txt
-+++ b/lib/ipfix_FOKUS_IEs.txt
-@@ -86,3 +86,41 @@
- 435, IPFIX_FT_ORmodulation, 1, IPFIX_CODING_UINT, "ORmodulation", "CREST factor"
- 436, IPFIX_FT_ORprofileRecord, 65535, IPFIX_CODING_STRING, "ORprofileRecord", "profile record has variable length, First 8 bits in data describe the length (in bytes) of the field"
-+500, IPFIX_FT_WPROBE_NOISE_N, 4, IPFIX_CODING_UINT, "global_noise_n", "wprobe global noice floor - Number of samples"
-+501, IPFIX_FT_WPROBE_NOISE_S, 8, IPFIX_CODING_UINT, "global_noise_s", "wprobe global noice floor - Sum of samples"
-+502, IPFIX_FT_WPROBE_NOISE_SS, 8, IPFIX_CODING_UINT, "global_noise_ss", "wprobe global noice floor - Sum of squared samples"
-+503, IPFIX_FT_WPROBE_PHY_BUSY_N, 4, IPFIX_CODING_UINT, "global_phy_busy_n", "wprobe global airtime total - Number of samples"
-+504, IPFIX_FT_WPROBE_PHY_BUSY_S, 8, IPFIX_CODING_UINT, "global_phy_busy_s", "wprobe global airtime total - Sum of samples"
-+505, IPFIX_FT_WPROBE_PHY_BUSY_SS, 8, IPFIX_CODING_UINT, "global_phy_busy_ss", "wprobe global airtime total - Sum of squared samples"
-+506, IPFIX_FT_WPROBE_PHY_RX_N, 4, IPFIX_CODING_UINT, "global_phy_rx_n", "wprobe global airtime total from rx-frame - Number of samples"
-+507, IPFIX_FT_WPROBE_PHY_RX_S, 8, IPFIX_CODING_UINT, "global_phy_rx_s", "wprobe global airtime total from rx-frame - Sum of samples"
-+508, IPFIX_FT_WPROBE_PHY_RX_SS, 8, IPFIX_CODING_UINT, "global_phy_rx_ss", "wprobe global airtime total from rx-frame - Sum of squared samples"
-+509, IPFIX_FT_WPROBE_PHY_TX_N, 4, IPFIX_CODING_UINT, "global_phy_tx_n", "wprobe global airtime total from tx-frame - Number of samples"
-+510, IPFIX_FT_WPROBE_PHY_TX_S, 8, IPFIX_CODING_UINT, "global_phy_tx_s", "wprobe global airtime total from tx-frame - Sum of samples"
-+511, IPFIX_FT_WPROBE_PHY_TX_SS, 8, IPFIX_CODING_UINT, "global_phy_tx_ss", "wprobe global airtime total from tx-frame - Sum of squared samples"
-+512, IPFIX_FT_WPROBE_RSSI_N, 4, IPFIX_CODING_UINT, "link_rssi_n", "wprobe link received signal strength indication - Number of samples"
-+513, IPFIX_FT_WPROBE_RSSI_S, 8, IPFIX_CODING_UINT, "link_rssi_s", "wprobe link received signal strength indication - Sum of samples"
-+514, IPFIX_FT_WPROBE_RSSI_SS, 8, IPFIX_CODING_UINT, "link_rssi_ss", "wprobe link received signal strength indication - Sum of squared samples"
-+515, IPFIX_FT_WPROBE_SIGNAL_N, 4, IPFIX_CODING_UINT, "link_signal_n", "wprobe link signal strength in dB - Number of samples"
-+516, IPFIX_FT_WPROBE_SIGNAL_S, 8, IPFIX_CODING_UINT, "link_signal_s", "wprobe link signal strength in dB - Sum of samples"
-+517, IPFIX_FT_WPROBE_SIGNAL_SS, 8, IPFIX_CODING_UINT, "link_signal_ss", "wprobe link signal strength in dB - Sum of squared samples"
-+518, IPFIX_FT_WPROBE_IEEE_RX_RATE_N, 4, IPFIX_CODING_UINT, "link_ieee_rx_rate_n", "wprobe link IEEE 802.11 RX data rate - Number of samples"
-+519, IPFIX_FT_WPROBE_IEEE_RX_RATE_S, 8, IPFIX_CODING_UINT, "link_ieee_rx_rate_s", "wprobe link IEEE 802.11 RX data rate - Sum of samples"
-+520, IPFIX_FT_WPROBE_IEEE_RX_RATE_SS, 8, IPFIX_CODING_UINT, "link_ieee_rx_rate_ss", "wprobe link IEEE 802.11 RX data rate - Sum of squared samples"
-+521, IPFIX_FT_WPROBE_IEEE_TX_RATE_N, 4, IPFIX_CODING_UINT, "link_ieee_tx_rate_n", "wprobe link IEEE 802.11 TX data rate - Number of samples"
-+522, IPFIX_FT_WPROBE_IEEE_TX_RATE_S, 8, IPFIX_CODING_UINT, "link_ieee_tx_rate_s", "wprobe link IEEE 802.11 TX data rate - Sum of samples"
-+523, IPFIX_FT_WPROBE_IEEE_TX_RATE_SS, 8, IPFIX_CODING_UINT, "link_ieee_tx_rate_ss", "wprobe link IEEE 802.11 TX data rate - Sum of squared samples"
-+524, IPFIX_FT_WPROBE_RETRANSMIT_200_N, 4, IPFIX_CODING_UINT, "link_retransmit_200_n", "wprobe link total retransmissions per packet - <200 bytes - Number of samples"
-+525, IPFIX_FT_WPROBE_RETRANSMIT_200_S, 8, IPFIX_CODING_UINT, "link_retransmit_200_s", "wprobe link total retransmissions per packet - <200 bytes - Sum of samples"
-+526, IPFIX_FT_WPROBE_RETRANSMIT_200_SS, 8, IPFIX_CODING_UINT, "link_retransmit_200_ss", "wprobe link total retransmissions per packet - <200 bytes - Sum of squared samples"
-+527, IPFIX_FT_WPROBE_RETRANSMIT_400_N, 4, IPFIX_CODING_UINT, "link_retransmit_400_n", "wprobe link total retransmissions per packet - <400 bytes - Number of samples"
-+528, IPFIX_FT_WPROBE_RETRANSMIT_400_S, 8, IPFIX_CODING_UINT, "link_retransmit_400_s", "wprobe link total retransmissions per packet - <400 bytes - Sum of samples"
-+529, IPFIX_FT_WPROBE_RETRANSMIT_400_SS, 8, IPFIX_CODING_UINT, "link_retransmit_400_ss", "wprobe link total retransmissions per packet - <400 bytes - Sum of squared samples"
-+530, IPFIX_FT_WPROBE_RETRANSMIT_800_N, 4, IPFIX_CODING_UINT, "link_retransmit_800_n", "wprobe link total retransmissions per packet - <800 bytes - Number of samples"
-+531, IPFIX_FT_WPROBE_RETRANSMIT_800_S, 8, IPFIX_CODING_UINT, "link_retransmit_800_s", "wprobe link total retransmissions per packet - <800 bytes - Sum of samples"
-+532, IPFIX_FT_WPROBE_RETRANSMIT_800_SS, 8, IPFIX_CODING_UINT, "link_retransmit_800_ss", "wprobe link total retransmissions per packet - <800 bytes - Sum of squared samples"
-+533, IPFIX_FT_WPROBE_RETRANSMIT_1600_N, 4, IPFIX_CODING_UINT, "link_retransmit_1600_n", "wprobe link total retransmissions per packet - >800 bytes - Number of samples"
-+534, IPFIX_FT_WPROBE_RETRANSMIT_1600_S, 8, IPFIX_CODING_UINT, "link_retransmit_1600_s", "wprobe link total retransmissions per packet - >800 bytes - Sum of samples"
-+535, IPFIX_FT_WPROBE_RETRANSMIT_1600_SS, 8, IPFIX_CODING_UINT, "link_retransmit_1600_ss", "wprobe link total retransmissions per packet - >800 bytes - Sum of squared samples"
-+536, IPFIX_FT_WPROBE_FRAMES, 4, IPFIX_CODING_UINT, "global_frames", "wprobe global number of 802.11 frames seen"
-+537, IPFIX_FT_WPROBE_PROBEREQ, 4, IPFIX_CODING_UINT, "global_probereq", "wprobe global number of 802.11 probe requests seen"
diff --git a/package/libipfix/patches/120-ipfixmisc.patch b/package/libipfix/patches/120-ipfixmisc.patch
deleted file mode 100644 (file)
index e3f5a05..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-Index: libipfix.r51/lib/Makefile.in
-===================================================================
---- libipfix.r51.orig/lib/Makefile.in  2008-08-05 15:15:23.000000000 +0200
-+++ libipfix.r51/lib/Makefile.in       2012-06-05 19:26:34.061692890 +0200
-@@ -41,7 +41,7 @@
- INCLS = -I. -I..
- CFLAGS = $(CCOPT) $(INCLS) $(DEFS)
--TARGETS = libmisc.a libipfix.a
-+TARGETS = libipfixmisc.a libipfix.a
- OBJS = ipfix.o ipfix_col.o ipfix_print.o \
-        ipfix_col_files.o ipfix_col_db.o @IPFIX_DB_OBJ@ @IPFIX_SSL_OBJ@
- DEPHDR = ipfix.h ipfix_def.h ipfix_fields.h ipfix_def_fokus.h ipfix_fields_fokus.h
-@@ -60,11 +60,11 @@
- install:
-       @[ -d ${libdir} ] || (mkdir -p ${libdir}; chmod 755 ${libdir})
-       $(INSTALL_DATA) libipfix.a ${libdir}/
--      $(INSTALL_DATA) libmisc.a ${libdir}/
-+      $(INSTALL_DATA) libipfixmisc.a ${libdir}/
-       @[ -d ${includedir} ] || (mkdir -p ${includedir}; chmod 755 ${includedir})
-       $(INSTALL_HEADER) ipfix*.h mlog.h mpoll.h ${includedir}/
--libmisc.a: $(MISCOBJS) Makefile
-+libipfixmisc.a: $(MISCOBJS) Makefile
-       @rm -f $@
-       $(AR) rc $@ $(MISCOBJS) 
diff --git a/package/madwifi/Config.in b/package/madwifi/Config.in
deleted file mode 100644 (file)
index 7b72eb8..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-menu "Configuration"
-       depends on PACKAGE_kmod-madwifi
-
-config MADWIFI_DEBUG
-       bool "Enable compilation of debugging features"
-       depends on DEVEL
-       default n
-
-config MADWIFI_COMPRESSION
-       bool "Enable Atheros Super A/G Compression"
-       depends !TARGET_ar71xx
-       default n
-       help
-         Enables Atheros Super A/G Hardware Compression Engine.
-
-config MADWIFI_SINGLE_MODULE
-       bool "Combine driver and net80211 into a single module"
-       default y
-       help
-         This option combines all driver and stack related code (except for HAL)
-         into a single module, thus saving space and removing unnecessary kernel
-         exports
-
-choice
-       prompt "Rate control algorithm selection"
-       default MADWIFI_RCA_MINSTREL
-       help
-         This option controls how MadWifi chooses its bitrate.
-
-config MADWIFI_RCA_MINSTREL
-       bool "Use the Minstrel rate control algorithm"
-       help
-         This code is takes a wandering minstrel approach. Wander around the
-         different rates, singing wherever you can. And then, look at the
-         performance, and make a choice. Note that the wandering minstrel will
-         always wander in directions where he/she feels he/she will get paid
-         the best for his/her work.
-
-config MADWIFI_RCA_SAMPLERATE
-       bool "Use the SampleRate rate control algorithm"
-       help
-         SampleRate decides on the transmission bit-rate based on the past
-         history of performance; it keeps a record of the number of successive
-         failures, the number of successful transmits and the total transmission
-         time along with the destination for that bit-rate. Stale samples are
-         removed based on a EWMA windowing mechanism. If in the sampling
-         process, no successful acknowledgment is received or the number of
-         packets sent is multiple of 10 on a specific link, it transmits the
-         packet with the highest rate which has not failed 4 successive times.
-         Other than that it transmits packets at the rate which has the lowest
-         average transmission time.
-
-endchoice
-
-endmenu
diff --git a/package/madwifi/Makefile b/package/madwifi/Makefile
deleted file mode 100644 (file)
index f915f56..0000000
+++ /dev/null
@@ -1,266 +0,0 @@
-#
-# Copyright (C) 2006-2009 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-include $(INCLUDE_DIR)/kernel.mk
-
-PKG_NAME:=madwifi
-
-PKG_REV:=3314
-PKG_VERSION:=r$(PKG_REV)
-PKG_RELEASE:=6
-
-PKG_SOURCE_PROTO:=svn
-PKG_SOURCE_VERSION:=$(PKG_REV)
-PKG_SOURCE_SUBDIR:=$(if $(PKG_BRANCH),$(PKG_BRANCH),madwifi-trunk)-$(PKG_VERSION)
-PKG_SOURCE_URL:=http://madwifi-project.org/svn/madwifi/$(if $(PKG_BRANCH),branches/$(PKG_BRANCH),trunk)
-PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
-PKG_MIRROR_MD5SUM:=086b026d1c1561be8a949b79b0931404
-
-PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(if $(PKG_BRANCH),$(PKG_BRANCH),madwifi-trunk)-$(PKG_VERSION)
-
-HAL_VERSION:=20090508
-HAL_FILE:=ath_hal-$(HAL_VERSION).tgz
-HAL_MD5SUM:=4ab7ae8bdb96c0be388c98bf8f92d5ca
-
-PKG_BUILD_DEPENDS:=wprobe
-
-include $(INCLUDE_DIR)/package.mk
-
-ifdef CONFIG_MADWIFI_COMPRESSION
-  COMPRESSION:=1
-else
-  COMPRESSION:=0
-endif
-
-define Download/hal
-  FILE:=$(HAL_FILE)
-  URL:=http://mirror2.openwrt.org/sources
-  MD5SUM:=$(HAL_MD5SUM)
-endef
-$(eval $(call Download,hal))
-
-
-ifneq ($(CONFIG_TARGET_atheros),)
-  BUS:=AHB
-else
-  ifneq ($(CONFIG_PCI_SUPPORT),)
-    BUS:=PCI
-  endif
-endif
-
-ifneq ($(CONFIG_CPU_MIPS32_R2),)
-  ifeq ($(ARCH),mips)
-    HAL_TARGET:=mips32r2-be-elf
-  endif
-  ifeq ($(ARCH),mipsel)
-    HAL_TARGET:=mips32r2-le-elf
-  endif
-else
-  ifeq ($(ARCH),mips)
-    HAL_TARGET:=mips32-be-elf
-  endif
-  ifeq ($(ARCH),mipsel)
-    HAL_TARGET:=mips32-le-elf
-  endif
-endif
-ifeq ($(ARCH),i386)
-  HAL_TARGET:=i386-elf
-endif
-ifeq ($(ARCH),i686)
-  HAL_TARGET:=i386-elf
-endif
-ifeq ($(ARCH),armeb)
-  HAL_TARGET:=xscale-be-elfgnueabi
-endif
-ifeq ($(ARCH),arm)
-  HAL_TARGET:=xscale-le-elfgnueabi
-  ifeq ($(BOARD),cns21xx)
-    HAL_TARGET:=armv4-le-elfgnueabi
-  endif
-  ifeq ($(BOARD),cns3xxx)
-    HAL_TARGET:=arm11-le-elfgnueabi
-  endif
-  ifeq ($(BOARD),gemini)
-    HAL_TARGET:=armv4-le-elfgnueabi
-  endif
-endif
-ifeq ($(ARCH),powerpc)
-  HAL_TARGET:=powerpc-be-elf
-endif
-ifneq ($(CONFIG_TARGET_atheros),)
-  HAL_TARGET:=wisoc
-endif
-
-ifdef CONFIG_MADWIFI_RCA_MINSTREL
-  RATE_CONTROL:=minstrel
-endif
-
-ifdef CONFIG_MADWIFI_RCA_ONOE
-  RATE_CONTROL:=onoe
-endif
-
-ifdef CONFIG_MADWIFI_RCA_AMRR
-  RATE_CONTROL:=amrr
-endif
-
-ifdef CONFIG_MADWIFI_RCA_SAMPLERATE
-  RATE_CONTROL:=sample
-endif
-
-ifneq ($(CONFIG_MADWIFI_SINGLE_MODULE),)
-MADWIFI_FILES:= $(PKG_BUILD_DIR)/ath_hal/ath_hal.ko
-else
-MADWIFI_FILES:= \
-       $(PKG_BUILD_DIR)/net80211/wlan.ko \
-       $(PKG_BUILD_DIR)/net80211/wlan_scan_ap.ko \
-       $(PKG_BUILD_DIR)/net80211/wlan_scan_sta.ko \
-       $(PKG_BUILD_DIR)/ath_hal/ath_hal.ko \
-       $(PKG_BUILD_DIR)/ath_rate/$(RATE_CONTROL)/ath_rate_$(RATE_CONTROL).ko \
-       $(PKG_BUILD_DIR)/net80211/wlan_acl.ko \
-       $(PKG_BUILD_DIR)/net80211/wlan_ccmp.ko \
-       $(PKG_BUILD_DIR)/net80211/wlan_tkip.ko \
-       $(PKG_BUILD_DIR)/net80211/wlan_wep.ko \
-       $(PKG_BUILD_DIR)/net80211/wlan_xauth.ko
-endif
-
-ifneq ($(CONFIG_MADWIFI_SINGLE_MODULE),)
-  MADWIFI_AUTOLOAD:= ath_hal
-else
-  MADWIFI_AUTOLOAD:= \
-       wlan \
-       wlan_scan_ap \
-       wlan_scan_sta \
-       ath_hal \
-       ath_rate_$(RATE_CONTROL) \
-       wlan_acl \
-       wlan_ccmp \
-       wlan_tkip \
-       wlan_wep \
-       wlan_xauth
-endif
-
-ifeq ($(findstring AHB,$(BUS)),AHB)
-  MADWIFI_FILES+= $(PKG_BUILD_DIR)/ath/ath_ahb.ko
-  MADWIFI_AUTOLOAD+= ath_ahb
-endif
-ifeq ($(findstring PCI,$(BUS)),PCI)
-  MADWIFI_FILES+= $(PKG_BUILD_DIR)/ath/ath_pci.ko
-  MADWIFI_AUTOLOAD+= ath_pci
-endif
-
-MADWIFI_APPLETS:=80211stats athchans athkey athstats wlanconfig ath_info madwifi_multi
-ifdef CONFIG_MADWIFI_DEBUG
-  MADWIFI_APPLETS += athdebug 80211debug
-endif
-
-define KernelPackage/madwifi
-  SUBMENU:=Wireless Drivers
-  TITLE:=Driver for Atheros wireless chipsets
-  URL:=http://madwifi-project.org/
-  DEPENDS:=+wireless-tools @PCI_SUPPORT @(!(TARGET_avr32||TARGET_cobalt||TARGET_ep93xx||TARGET_etrax||TARGET_octeon||TARGET_pxcab||TARGET_sibyte)||BROKEN) +@DRIVER_WEXT_SUPPORT
-  FILES:=$(MADWIFI_FILES)
-  AUTOLOAD:=$(call AutoLoad,50,$(MADWIFI_AUTOLOAD))
-  MENU:=1
-endef
-
-define KernelPackage/madwifi/description
- This package contains a driver for Atheros 802.11a/b/g chipsets.
-endef
-
-define KernelPackage/madwifi/config
-       source "$(SOURCE)/Config.in"
-endef
-
-MADWIFI_INC = \
-       -I$(PKG_BUILD_DIR) \
-       -I$(PKG_BUILD_DIR)/include \
-       -I$(PKG_BUILD_DIR)/hal \
-       -I$(PKG_BUILD_DIR)/ath \
-       -I$(PKG_BUILD_DIR)/ath_hal \
-       -I$(PKG_BUILD_DIR)/net80211 \
-       -I$(STAGING_DIR)/usr/include/wprobe \
-       -include $(PKG_BUILD_DIR)/include/compat.h
-
-MAKE_ARGS:= \
-       PATH="$(TARGET_PATH)" \
-       ARCH="$(LINUX_KARCH)" \
-       ARCH-y="$(LINUX_KARCH)" \
-       CROSS_COMPILE="$(TARGET_CROSS)" \
-       TARGET="$(HAL_TARGET)" \
-       TOOLPREFIX="$(KERNEL_CROSS)" \
-       TOOLPATH="$(KERNEL_CROSS)" \
-       KERNELPATH="$(LINUX_DIR)" \
-       LDOPTS="--no-warn-mismatch " \
-       ATH_RATE="$(RATE_CONTROL)" \
-       ATH_CAP_SUPERG_COMP="$(COMPRESSION)" \
-       DO_MULTI=1 \
-       SINGLE_MODULE=$(if $(CONFIG_MADWIFI_SINGLE_MODULE),1) \
-       INCS="$(MADWIFI_INC)" \
-       $(if $(CONFIG_MADWIFI_DEBUG),,DEBUG=) WARNINGS="-Wno-unused"
-
-MAKE_VARS:= \
-       COPTS="-DATH_REVERSE_ENGINEERING=1" \
-
-define Build/Prepare/HAL
-       rm -rf $(PKG_BUILD_DIR)/tmp
-       mkdir -p $(PKG_BUILD_DIR)/tmp
-       tar xvzf $(DL_DIR)/$(HAL_FILE) -C $(PKG_BUILD_DIR)/tmp
-       $(CP) $(PKG_BUILD_DIR)/tmp/ath_hal*/* $(PKG_BUILD_DIR)/hal/
-       rm -rf $(PKG_BUILD_DIR)/tmp
-endef
-
-define Build/Prepare
-       $(call Build/Prepare/Default)
-       $(call Build/Prepare/HAL)
-       # patch cflags
-       $(SED) 's, -E[LB],,' \
-               -e 's, -mips2,,' \
-               -e 's, -mapcs-32,,' \
-               -e 's, -mlong-calls,,' \
-               $(PKG_BUILD_DIR)/hal/public/*.inc
-       $(SED) 's,march=armv4,march=armv5te,' \
-               $(PKG_BUILD_DIR)/hal/public/xscale*.inc
-endef
-
-ifeq ($(findstring AHB,$(BUS)),AHB)
-  define Build/Compile/ahb
-       $(MAKE_VARS) $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_ARGS) BUS="AHB" modules
-       $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_ARGS) CFLAGS="$(TARGET_CFLAGS)" tools
-  endef
-endif
-
-ifeq ($(findstring PCI,$(BUS)),PCI)
-  define Build/Compile/pci
-       $(MAKE_VARS) $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_ARGS) BUS="PCI" modules
-       $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_ARGS) CFLAGS="$(TARGET_CFLAGS)" tools
-  endef
-endif
-
-define Build/Configure
-       $(SED) 's,-E[LB] ,,g' $(PKG_BUILD_DIR)/hal/public/*.inc
-endef
-
-define Build/Compile
-       $(call Build/Compile/ahb)
-       $(call Build/Compile/pci)
-endef
-
-define Build/InstallDev
-       mkdir -p $(1)/usr/include/madwifi
-       $(CP) $(PKG_BUILD_DIR)/include $(1)/usr/include/madwifi/
-       mkdir -p $(1)/usr/include/madwifi/net80211
-       $(CP) $(PKG_BUILD_DIR)/net80211/*.h $(1)/usr/include/madwifi/net80211/
-endef
-
-define KernelPackage/madwifi/install
-       $(INSTALL_DIR) $(1)/usr/sbin
-       $(CP) ./files/* $(1)/
-       $(CP) $(foreach applet,$(MADWIFI_APPLETS),$(PKG_BUILD_DIR)/tools/$(applet)) $(1)/usr/sbin/
-endef
-
-$(eval $(call KernelPackage,madwifi))
diff --git a/package/madwifi/files/etc/hotplug.d/net/10-madwifi b/package/madwifi/files/etc/hotplug.d/net/10-madwifi
deleted file mode 100644 (file)
index f5afce3..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-if [ "$ACTION" = "add" -o "$ACTION" = "register" ]; then
-       case "$INTERFACE" in
-               ath*.sta*)
-                       local BASEIF="${INTERFACE%%\.*}"
-
-                       include /lib/network
-                       scan_interfaces
-                       local CONFIG="$(find_config "$BASEIF")" 
-                       [ -n "$CONFIG" ] && setup_interface "$INTERFACE" "$CONFIG"
-               ;;
-       esac
-fi
diff --git a/package/madwifi/files/lib/wifi/madwifi.sh b/package/madwifi/files/lib/wifi/madwifi.sh
deleted file mode 100755 (executable)
index 2e37325..0000000
+++ /dev/null
@@ -1,498 +0,0 @@
-#!/bin/sh
-append DRIVERS "atheros"
-
-find_atheros_phy() {
-       local device="$1"
-
-       local macaddr="$(config_get "$device" macaddr | tr 'A-Z' 'a-z')"
-       config_get phy "$device" phy
-       [ -z "$phy" -a -n "$macaddr" ] && {
-               cd /proc/sys/dev
-               for phy in $(ls -d wifi* 2>&-); do
-                       [ "$macaddr" = "$(cat /sys/class/net/${phy}/address)" ] || continue
-                       config_set "$device" phy "$phy"
-                       break
-               done
-               config_get phy "$device" phy
-       }
-       [ -n "$phy" -a -d "/proc/sys/dev/$phy" ] || {
-               echo "phy for wifi device $1 not found"
-               return 1
-       }
-       [ -z "$macaddr" ] && {
-               config_set "$device" macaddr "$(cat /sys/class/net/${phy}/address)"
-       }
-       return 0
-}
-
-scan_atheros() {
-       local device="$1"
-       local wds
-       local adhoc ahdemo sta ap monitor disabled
-
-       [ ${device%[0-9]} = "wifi" ] && config_set "$device" phy "$device"
-
-       local ifidx=0
-       
-       config_get vifs "$device" vifs
-       for vif in $vifs; do
-               config_get_bool disabled "$vif" disabled 0
-               [ $disabled = 0 ] || continue
-
-               local vifname
-               [ $ifidx -gt 0 ] && vifname="ath${device#radio}-$ifidx" || vifname="ath${device#radio}"
-
-               config_get ifname "$vif" ifname
-               config_set "$vif" ifname "${ifname:-$vifname}"
-               
-               config_get mode "$vif" mode
-               case "$mode" in
-                       adhoc|ahdemo|sta|ap|monitor)
-                               append $mode "$vif"
-                       ;;
-                       wds)
-                               config_get ssid "$vif" ssid
-                               [ -z "$ssid" ] && continue
-
-                               config_set "$vif" wds 1
-                               config_set "$vif" mode sta
-                               mode="sta"
-                               addr="$ssid"
-                               ${addr:+append $mode "$vif"}
-                       ;;
-                       *) echo "$device($vif): Invalid mode, ignored."; continue;;
-               esac
-
-               ifidx=$(($ifidx + 1))
-       done
-
-       case "${adhoc:+1}:${sta:+1}:${ap:+1}" in
-               # valid mode combinations
-               1::) wds="";;
-               1::1);;
-               :1:1)config_set "$device" nosbeacon 1;; # AP+STA, can't use beacon timers for STA
-               :1:);;
-               ::1);;
-               ::);;
-               *) echo "$device: Invalid mode combination in config"; return 1;;
-       esac
-
-       config_set "$device" vifs "${sta:+$sta }${ap:+$ap }${adhoc:+$adhoc }${ahdemo:+$ahdemo }${wds:+$wds }${monitor:+$monitor}"
-}
-
-
-disable_atheros() (
-       local device="$1"
-
-       find_atheros_phy "$device" || return 0
-       config_get phy "$device" phy
-
-       set_wifi_down "$device"
-
-       include /lib/network
-       cd /proc/sys/net
-       for dev in *; do
-               grep "$phy" "$dev/%parent" >/dev/null 2>/dev/null && {
-                       [ -f "/var/run/wifi-${dev}.pid" ] &&
-                               kill "$(cat "/var/run/wifi-${dev}.pid")"
-                       ifconfig "$dev" down
-                       unbridge "$dev"
-                       wlanconfig "$dev" destroy
-               }
-       done
-       return 0
-)
-
-enable_atheros() {
-       local device="$1"
-
-       find_atheros_phy "$device" || return 0
-       config_get phy "$device" phy
-
-       config_get regdomain "$device" regdomain
-       [ -n "$regdomain" ] && echo "$regdomain" > /proc/sys/dev/$phy/regdomain
-
-       config_get country "$device" country
-       case "$country" in
-               [A-Za-z]*) country=`grep -i "$country" /lib/wifi/madwifi_countrycodes.txt |cut -d " " -f 2`;;
-               [0-9]*) ;;
-               *) country="" ;;
-       esac
-       [ -n "$country" ] && echo "$country" > /proc/sys/dev/$phy/countrycode
-
-       config_get_bool outdoor "$device" outdoor "0"
-       echo "$outdoor" > /proc/sys/dev/$phy/outdoor
-
-       config_get channel "$device" channel
-       config_get vifs "$device" vifs
-       config_get txpower "$device" txpower
-
-       [ auto = "$channel" ] && channel=0
-
-       config_get_bool antdiv "$device" diversity
-       config_get antrx "$device" rxantenna
-       config_get anttx "$device" txantenna
-       config_get_bool softled "$device" softled
-       config_get antenna "$device" antenna
-
-       devname="$(cat /proc/sys/dev/$phy/dev_name)"
-       local antgpio=
-       local invert=
-       case "$devname" in
-               NanoStation2) antgpio=7; invert=1;;
-               NanoStation5) antgpio=1; invert=1;;
-               "NanoStation Loco2") antgpio=2;;
-               "NanoStation Loco5")
-                       case "$antenna" in
-                               horizontal) antdiv=0; anttx=1; antrx=1;;
-                               vertical) antdiv=0; anttx=2; antrx=2;;
-                               *) antdiv=1; anttx=0; antrx=0;;
-                       esac
-               ;;
-       esac
-       if [ -n "$invert" ]; then
-               _set="clear"
-               _clear="set"
-       else
-               _set="set"
-               _clear="clear"
-       fi
-       if [ -n "$antgpio" ]; then
-               softled=0
-               case "$devname" in
-                       "NanoStation Loco2")
-                               antdiv=0
-                               antrx=1
-                               anttx=1
-                               case "$antenna" in
-                                       horizontal) gpioval=0;;
-                                       *) gpioval=1;;
-                               esac
-                       ;;
-                       *)
-                               case "$antenna" in
-                                       external) antdiv=0; antrx=1; anttx=1; gpioval=1;;
-                                       horizontal) antdiv=0; antrx=1; anttx=1; gpioval=0;;
-                                       vertical) antdiv=0; antrx=2; anttx=2; gpioval=0;;
-                                       auto) antdiv=1; antrx=0; anttx=0; gpioval=0;;
-                               esac
-                       ;;
-               esac
-
-               [ -x "$(which gpioctl 2>/dev/null)" ] || antenna=
-               gpioctl "dirout" "$antgpio" >/dev/null 2>&1
-               case "$gpioval" in
-                       0)
-                               gpioctl "$_clear" "$antgpio" >/dev/null 2>&1
-                       ;;
-                       1)
-                               gpioctl "$_set" "$antgpio" >/dev/null 2>&1
-                       ;;
-               esac
-       fi
-
-       [ -n "$antdiv" ] && sysctl -w dev."$phy".diversity="$antdiv" >&-
-       [ -n "$antrx" ] && sysctl -w dev."$phy".rxantenna="$antrx" >&-
-       [ -n "$anttx" ] && sysctl -w dev."$phy".txantenna="$anttx" >&-
-       [ -n "$softled" ] && sysctl -w dev."$phy".softled="$softled" >&-
-
-       config_get distance "$device" distance
-       [ -n "$distance" ] && sysctl -w dev."$phy".distance="$distance" >&-
-
-       for vif in $vifs; do
-               local start_hostapd= vif_txpower= nosbeacon=
-               config_get ifname "$vif" ifname
-               config_get enc "$vif" encryption
-               config_get eap_type "$vif" eap_type
-               config_get mode "$vif" mode
-
-               case "$mode" in
-                       sta) config_get_bool nosbeacon "$device" nosbeacon;;
-                       adhoc) config_get_bool nosbeacon "$vif" sw_merge 1;;
-               esac
-
-               [ "$nosbeacon" = 1 ] || nosbeacon=""
-               ifname=$(wlanconfig "$ifname" create nounit wlandev "$phy" wlanmode "$mode" ${nosbeacon:+nosbeacon})
-               [ $? -ne 0 ] && {
-                       echo "enable_atheros($device): Failed to set up $mode vif $ifname" >&2
-                       continue
-               }
-               config_set "$vif" ifname "$ifname"
-
-               config_get hwmode "$device" hwmode
-               [ -z "$hwmode" ] && config_get hwmode "$device" mode
-
-               pureg=0
-               case "$hwmode" in
-                       *b) hwmode=11b;;
-                       *bg) hwmode=11g;;
-                       *g) hwmode=11g; pureg=1;;
-                       *gdt) hwmode=11gdt;;
-                       *a) hwmode=11a;;
-                       *adt) hwmode=11adt;;
-                       *ast) hwmode=11ast;;
-                       *fh) hwmode=fh;;
-                       *) hwmode=auto;;
-               esac
-               iwpriv "$ifname" mode "$hwmode"
-               iwpriv "$ifname" pureg "$pureg"
-
-               iwconfig "$ifname" channel "$channel" >/dev/null 2>/dev/null 
-
-               config_get_bool hidden "$vif" hidden 0
-               iwpriv "$ifname" hide_ssid "$hidden"
-
-               config_get ff "$vif" ff
-               if [ -n "$ff" ]; then
-                       iwpriv "$ifname" ff "$ff"
-               fi
-
-               config_get wds "$vif" wds
-               case "$wds" in
-                       1|on|enabled) wds=1;;
-                       *) wds=0;;
-               esac
-               iwpriv "$ifname" wds "$wds" >/dev/null 2>&1
-
-               [ "$mode" = ap -a "$wds" = 1 ] && {
-                       config_get_bool wdssep "$vif" wdssep 1
-                       [ -n "$wdssep" ] && iwpriv "$ifname" wdssep "$wdssep"
-               }
-
-               case "$enc" in
-                       wep*)
-                               case "$enc" in
-                                       *shared*) iwpriv "$ifname" authmode 2;;
-                                       *)        iwpriv "$ifname" authmode 1;;
-                               esac
-                               for idx in 1 2 3 4; do
-                                       config_get key "$vif" "key${idx}"
-                                       iwconfig "$ifname" enc "[$idx]" "${key:-off}"
-                               done
-                               config_get key "$vif" key
-                               key="${key:-1}"
-                               case "$key" in
-                                       [1234]) iwconfig "$ifname" enc "[$key]";;
-                                       *) iwconfig "$ifname" enc "$key";;
-                               esac
-                       ;;
-                       psk*|wpa*)
-                               start_hostapd=1
-                               config_get key "$vif" key
-                       ;;
-               esac
-
-               case "$mode" in
-                       sta|adhoc|ahdemo)
-                               config_get addr "$vif" bssid
-                               [ -z "$addr" ] || { 
-                                       iwconfig "$ifname" ap "$addr"
-                               }
-                       ;;
-               esac
-
-               config_get_bool uapsd "$vif" uapsd 0
-               iwpriv "$ifname" uapsd "$uapsd"
-
-               config_get_bool bgscan "$vif" bgscan
-               [ -n "$bgscan" ] && iwpriv "$ifname" bgscan "$bgscan"
-
-               config_get rate "$vif" rate
-               [ -n "$rate" ] && iwconfig "$ifname" rate "${rate%%.*}"
-
-               config_get mcast_rate "$vif" mcast_rate
-               [ -n "$mcast_rate" ] && iwpriv "$ifname" mcast_rate "${mcast_rate%%.*}"
-
-               config_get frag "$vif" frag
-               [ -n "$frag" ] && iwconfig "$ifname" frag "${frag%%.*}"
-
-               config_get rts "$vif" rts
-               [ -n "$rts" ] && iwconfig "$ifname" rts "${rts%%.*}"
-
-               config_get_bool comp "$vif" compression 0
-               iwpriv "$ifname" compression "$comp" >/dev/null 2>&1
-
-               config_get minrate "$vif" minrate
-               [ -n "$minrate" ] && iwpriv "$ifname" minrate "$minrate"
-
-               config_get maxrate "$vif" maxrate
-               [ -n "$maxrate" ] && iwpriv "$ifname" maxrate "$maxrate"
-
-               config_get_bool burst "$vif" bursting
-               [ -n "$burst" ] && iwpriv "$ifname" burst "$burst"
-
-               config_get_bool wmm "$vif" wmm
-               [ -n "$wmm" ] && iwpriv "$ifname" wmm "$wmm"
-
-               config_get_bool xr "$vif" xr
-               [ -n "$xr" ] && iwpriv "$ifname" xr "$xr"
-
-               config_get_bool ar "$vif" ar
-               [ -n "$ar" ] && iwpriv "$ifname" ar "$ar"
-
-               config_get_bool beacon_power "$vif" beacon_power
-               [ -n "$beacon_power" ] && iwpriv "$ifname" beacon_pwr "$beacon_power"
-
-               config_get_bool doth "$vif" doth 0
-               [ -n "$doth" ] && iwpriv "$ifname" doth "$doth"
-
-               config_get_bool probereq "$vif" probereq
-               [ -n "$probereq" ] && iwpriv "$ifname" probereq "$probereq"
-
-               config_get maclist "$vif" maclist
-               [ -n "$maclist" ] && {
-                       # flush MAC list
-                       iwpriv "$ifname" maccmd 3
-                       for mac in $maclist; do
-                               iwpriv "$ifname" addmac "$mac"
-                       done
-               }
-
-               config_get macpolicy "$vif" macpolicy
-               case "$macpolicy" in
-                       allow)
-                               iwpriv "$ifname" maccmd 1
-                       ;;
-                       deny)
-                               iwpriv "$ifname" maccmd 2
-                       ;;
-                       *)
-                               # default deny policy if mac list exists
-                               [ -n "$maclist" ] && iwpriv "$ifname" maccmd 2
-                       ;;
-               esac
-
-               ifconfig "$ifname" up
-
-               local net_cfg bridge
-               net_cfg="$(find_net_config "$vif")"
-               [ -z "$net_cfg" ] || {
-                       bridge="$(bridge_interface "$net_cfg")"
-                       config_set "$vif" bridge "$bridge"
-                       start_net "$ifname" "$net_cfg"
-               }
-
-               config_get ssid "$vif" ssid
-               [ -n "$ssid" ] && {
-                       iwconfig "$ifname" essid on
-                       iwconfig "$ifname" essid ${ssid:+-- }"$ssid"
-               }
-
-               set_wifi_up "$vif" "$ifname"
-
-               # TXPower settings only work if device is up already
-               # while atheros hardware theoretically is capable of per-vif (even per-packet) txpower
-               # adjustment it does not work with the current atheros hal/madwifi driver
-
-               config_get vif_txpower "$vif" txpower
-               # use vif_txpower (from wifi-iface) instead of txpower (from wifi-device) if
-               # the latter doesn't exist
-               txpower="${txpower:-$vif_txpower}"
-               [ -z "$txpower" ] || iwconfig "$ifname" txpower "${txpower%%.*}"
-
-               case "$mode" in
-                       ap)
-                               config_get_bool isolate "$vif" isolate 0
-                               iwpriv "$ifname" ap_bridge "$((isolate^1))"
-
-                               if [ -n "$start_hostapd" ] && eval "type hostapd_setup_vif" 2>/dev/null >/dev/null; then
-                                       hostapd_setup_vif "$vif" madwifi || {
-                                               echo "enable_atheros($device): Failed to set up hostapd for interface $ifname" >&2
-                                               # make sure this wifi interface won't accidentally stay open without encryption
-                                               ifconfig "$ifname" down
-                                               wlanconfig "$ifname" destroy
-                                               continue
-                                       }
-                               fi
-                       ;;
-                       wds|sta)
-                               if eval "type wpa_supplicant_setup_vif" 2>/dev/null >/dev/null; then
-                                       wpa_supplicant_setup_vif "$vif" wext || {
-                                               echo "enable_atheros($device): Failed to set up wpa_supplicant for interface $ifname" >&2
-                                               ifconfig "$ifname" down
-                                               wlanconfig "$ifname" destroy
-                                               continue
-                                       }
-                               fi
-                       ;;
-                       adhoc)
-                               if eval "type wpa_supplicant_setup_vif" 2>/dev/null >/dev/null; then
-                                       wpa_supplicant_setup_vif "$vif" madwifi || {
-                                               echo "enable_atheros($device): Failed to set up wpa"
-                                               ifconfig "$ifname" down
-                                               wlanconfig "$ifname" destroy
-                                               continue
-                                       }
-                               fi
-               esac
-       done
-}
-
-check_atheros_device() {
-       [ ${1%[0-9]} = "wifi" ] && config_set "$1" phy "$1"
-       config_get phy "$1" phy
-       [ -z "$phy" ] && {
-               find_atheros_phy "$1" >/dev/null || return 0
-               config_get phy "$1" phy
-       }
-       [ "$phy" = "$dev" ] && found=1
-}
-
-
-detect_atheros() {
-       devidx=0
-       config_load wireless
-       while :; do
-               config_get type "radio$devidx" type
-               [ -n "$type" ] || break
-               devidx=$(($devidx + 1))
-       done
-       cd /proc/sys/dev
-       [ -d ath ] || return
-       for dev in $(ls -d wifi* 2>&-); do
-               found=0
-               config_foreach check_atheros_device wifi-device
-               [ "$found" -gt 0 ] && continue
-
-               devname="$(cat /proc/sys/dev/$dev/dev_name)"
-               case "$devname" in
-                       "NanoStation Loco2")
-                               EXTRA_DEV="
-# Ubiquiti NanoStation Loco2 features
-       option antenna  vertical # (horizontal|vertical)
-"
-                       ;;
-                       "NanoStation Loco5")
-                               EXTRA_DEV="
-# Ubiquiti NanoStation Loco5 features
-       option antenna  auto # (auto|horizontal|vertical)
-"
-                       ;;
-                       NanoStation*)
-                               EXTRA_DEV="
-# Ubiquiti NanoStation features
-       option antenna  auto # (auto|horizontal|vertical|external)
-"
-                       ;;
-               esac
-
-               cat <<EOF
-config wifi-device  radio$devidx
-       option type     atheros
-       option channel  auto
-       option macaddr  $(cat /sys/class/net/${dev}/address)
-$EXTRA_DEV
-       # REMOVE THIS LINE TO ENABLE WIFI:
-       option disabled 1
-
-config wifi-iface
-       option device   radio$devidx
-       option network  lan
-       option mode     ap
-       option ssid     OpenWrt
-       option encryption none
-
-EOF
-       devidx=$(($devidx + 1))
-       done
-}
diff --git a/package/madwifi/files/lib/wifi/madwifi_countrycodes.txt b/package/madwifi/files/lib/wifi/madwifi_countrycodes.txt
deleted file mode 100644 (file)
index 624048b..0000000
+++ /dev/null
@@ -1,239 +0,0 @@
-AF 4
-AL 8
-DZ 12
-AS 16
-AD 20
-AO 24
-AI 660
-AQ 10
-AG 28
-AR 32
-AM 51
-AW 533
-AU 36
-AT 40
-AZ 31
-BS 44
-BH 48
-BD 50
-BB 52
-BY 112
-BE 56
-BZ 84
-BJ 204
-BM 60
-BT 64
-BO 68
-BA 70
-BW 72
-BV 74
-BR 76
-IO 86
-VG 92
-BN 96
-BG 100
-BF 854
-BI 108
-KH 116
-CM 120
-CA 124
-CV 132
-KY 136
-CF 140
-TD 148
-CL 152
-CN 156
-CX 162
-CC 166
-CO 170
-KM 174
-CD 180
-CG 178
-CK 184
-CR 188
-CI 384
-CU 192
-CY 196
-CZ 203
-DK 208
-DJ 262
-DM 212
-DO 214
-EC 218
-EG 818
-SV 222
-GQ 226
-ER 232
-EE 233
-ET 231
-FO 234
-FK 238
-FJ 242
-FI 246
-FR 250
-GF 254
-PF 258
-TF 260
-GA 266
-GM 270
-GE 268
-DE 276
-GH 288
-GI 292
-GR 300
-GL 304
-GD 308
-GP 312
-GU 316
-GT 320
-GN 324
-GW 624
-GY 328
-HT 332
-HM 334
-VA 336
-HN 340
-HK 344
-HR 191
-HU 348
-IS 352
-IN 356
-ID 360
-IR 364
-IQ 368
-IE 372
-IL 376
-IT 380
-JM 388
-JP 392
-JO 400
-KZ 398
-KE 404
-KI 296
-KP 408
-KR 410
-KW 414
-KG 417
-LA 418
-LV 428
-LB 422
-LS 426
-LR 430
-LY 434
-LI 438
-LT 440
-LU 442
-MO 446
-MK 807
-MG 450
-MW 454
-MY 458
-MV 462
-ML 466
-MT 470
-MH 584
-MQ 474
-MR 478
-MU 480
-YT 175
-MX 484
-FM 583
-MD 498
-MC 492
-MN 496
-MS 500
-MA 504
-MZ 508
-MM 104
-NA 516
-NR 520
-NP 524
-AN 530
-NL 528
-NC 540
-NZ 554
-NI 558
-NE 562
-NG 566
-NU 570
-NF 574
-MP 580
-NO 578
-OM 512
-PK 586
-PW 585
-PS 275
-PA 591
-PG 598
-PY 600
-PE 604
-PH 608
-PN 612
-PL 616
-PT 620
-PR 630
-QA 634
-RE 638
-RO 642
-RU 643
-RW 646
-SH 654
-KN 659
-LC 662
-PM 666
-VC 670
-WS 882
-SM 674
-ST 678
-SA 682
-SN 686
-CS 891
-SC 690
-SL 694
-SG 702
-SK 703
-SI 705
-SB 90
-SO 706
-ZA 710
-GS 239
-ES 724
-LK 144
-SD 736
-SR 740
-SJ 744
-SZ 748
-SE 752
-CH 756
-SY 760
-TW 158
-TJ 762
-TZ 834
-TH 764
-TL 626
-TG 768
-TK 772
-TO 776
-TT 780
-TN 788
-TR 792
-TM 795
-TC 796
-TV 798
-VI 850
-UG 800
-UA 804
-AE 784
-GB 826
-UM 581
-US 840
-UY 858
-UZ 860
-VU 548
-VE 862
-VN 704
-WF 876
-EH 732
-YE 887
-ZM 894
-ZW 716
diff --git a/package/madwifi/patches/102-multicall_binary.patch b/package/madwifi/patches/102-multicall_binary.patch
deleted file mode 100644 (file)
index 887a462..0000000
+++ /dev/null
@@ -1,315 +0,0 @@
---- a/tools/80211debug.c
-+++ b/tools/80211debug.c
-@@ -48,6 +48,7 @@
- #include <ctype.h>
- #include <getopt.h>
- #include <err.h>
-+#include "do_multi.h"
- #undef ARRAY_SIZE
- #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
-@@ -185,7 +186,7 @@ sysctlbyname(const char *oid0, void *old
- #endif /* __linux__ */
- int
--main(int argc, char *argv[])
-+CMD(a80211debug)(int argc, char *argv[])
- {
-       const char *ifname = "ath0";
-       const char *cp, *tp;
---- a/tools/80211stats.c
-+++ b/tools/80211stats.c
-@@ -59,6 +59,7 @@
- #include "net80211/ieee80211.h"
- #include "net80211/ieee80211_crypto.h"
- #include "net80211/ieee80211_ioctl.h"
-+#include "do_multi.h"
- #ifndef SIOCG80211STATS
- #define       SIOCG80211STATS (SIOCDEVPRIVATE + 2)
-@@ -240,7 +241,7 @@ print_sta_stats(FILE *fd, const u_int8_t
- }
- int
--main(int argc, char *argv[])
-+CMD(a80211stats)(int argc, char *argv[])
- {
-       int c, len;
-       struct ieee80211req_sta_info *si;
---- a/tools/athchans.c
-+++ b/tools/athchans.c
-@@ -58,6 +58,7 @@
- #include "net80211/ieee80211.h"
- #include "net80211/ieee80211_crypto.h"
- #include "net80211/ieee80211_ioctl.h"
-+#include "do_multi.h"
- static        int s = -1;
- static const char *progname;
-@@ -140,8 +141,9 @@ usage(void)
- }
- #define       MAXCHAN ((int)(sizeof(struct ieee80211req_chanlist) * NBBY))
-+
- int
--main(int argc, char *argv[])
-+CMD(athchans)(int argc, char *argv[])
- {
-       const char *ifname = "wifi0";
-       struct ieee80211req_chanlist chanlist;
---- a/tools/athctrl.c
-+++ b/tools/athctrl.c
-@@ -52,6 +52,7 @@
- #include <err.h>
- #include <net/if.h>
-+#include "do_multi.h"
- static int
- setsysctrl(const char *dev, const char *control , u_long value)
-@@ -88,7 +89,7 @@ static void usage(void)
- }
- int
--main(int argc, char *argv[])
-+CMD(athctrl)(int argc, char *argv[])
- {
-       char device[IFNAMSIZ + 1];
-       int distance = -1;
---- a/tools/athdebug.c
-+++ b/tools/athdebug.c
-@@ -51,6 +51,7 @@
- #include <ctype.h>
- #include <getopt.h>
- #include <err.h>
-+#include "do_multi.h"
- #undef ARRAY_SIZE
- #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
-@@ -194,7 +195,7 @@ sysctlbyname(const char *oid0, void *old
- #endif /* __linux__ */
- int
--main(int argc, char *argv[])
-+CMD(athdebug)(int argc, char *argv[])
- {
- #ifdef __linux__
-       const char *ifname = "wifi0";
---- a/tools/athkey.c
-+++ b/tools/athkey.c
-@@ -58,6 +58,7 @@
- #include "net80211/ieee80211.h"
- #include "net80211/ieee80211_crypto.h"
- #include "net80211/ieee80211_ioctl.h"
-+#include "do_multi.h"
- static int s = -1;
- static const char *progname;
-@@ -213,8 +214,7 @@ usage(void)
-       exit(-1);
- }
--int
--main(int argc, char *argv[])
-+int CMD(athkey)(int argc, char *argv[])
- {
-       const char *ifname = "wifi0";
-       struct ieee80211req_key setkey;
---- a/tools/athstats.c
-+++ b/tools/athstats.c
-@@ -65,6 +65,7 @@
- #undef ARRAY_SIZE
- #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
-+#include "do_multi.h"
- static const struct {
-       u_int           phyerr;
-@@ -228,7 +229,7 @@ catchalarm(int signo)
- }
- int
--main(int argc, char *argv[])
-+CMD(athstats)(int argc, char *argv[])
- {
- #ifdef __linux__
-       const char *ifname = "wifi0";
---- /dev/null
-+++ b/tools/do_multi.c
-@@ -0,0 +1,33 @@
-+#include <string.h>
-+#include <libgen.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);
-+    if(strcmp(progname, "ath_info") == 0)
-+      ret =  athinfo_init(argc, argv);
-+
-+    return ret;
-+}
---- /dev/null
-+++ b/tools/do_multi.h
-@@ -0,0 +1,15 @@
-+#ifdef DO_MULTI
-+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[]);
-+int athinfo_init(int argc, char *argv[]);
-+
-+#define CMD(name) name##_init
-+#else
-+#define CMD(name) main
-+#endif
---- a/tools/Makefile
-+++ b/tools/Makefile
-@@ -46,56 +46,55 @@ ifeq ($(HAL),)
- HAL=   $(TOP)/hal
- endif
-+all: compile
--ALL=  athstats 80211stats athkey athchans athctrl \
-+ALLPROGS=     athstats 80211stats athkey athchans athctrl \
-       athdebug 80211debug wlanconfig ath_info
--all:  $(ALL)
-+OBJS= $(patsubst %,%.o,$(ALLPROGS))
--INCS= -I. -I$(HAL) -I$(TOP) -I$(ATH_HAL)
-+INCS= -I. -I../ath -I$(HAL) -I$(TOP) -I$(ATH_HAL)
- CFLAGS=       -g -O2 -Wall
- ALL_CFLAGS= $(CFLAGS) $(INCS)
- LDFLAGS=
--all:  $(ALL)
--athstats: athstats.c
--      $(CC) -o athstats $(ALL_CFLAGS) -I$(TOP)/ath $(LDFLAGS) athstats.c
--80211stats: 80211stats.c
--      $(CC) -o 80211stats $(ALL_CFLAGS) $(LDFLAGS) 80211stats.c
--athkey: athkey.c
--      $(CC) -o athkey $(ALL_CFLAGS) $(LDFLAGS) athkey.c
--athchans: athchans.c
--      $(CC) -o athchans $(ALL_CFLAGS) $(LDFLAGS) athchans.c
--athctrl: athctrl.c
--      $(CC) -o athctrl $(ALL_CFLAGS) $(LDFLAGS) athctrl.c
--athdebug: athdebug.c
--      $(CC) -o athdebug $(ALL_CFLAGS) $(LDFLAGS) athdebug.c
--wlanconfig: wlanconfig.c
--      $(CC) -o wlanconfig $(ALL_CFLAGS) $(LDFLAGS) wlanconfig.c
--80211debug: 80211debug.c
--      $(CC) -o 80211debug $(ALL_CFLAGS) $(LDFLAGS) 80211debug.c
--ath_info: ath_info.c
--      $(CC) -o ath_info $(CFLAGS) ath_info.c
-+ifneq ($(DO_MULTI),)
-+ALL_CFLAGS += -DDO_MULTI=1
-+%.o: %.c
-+      ${CC} $(ALL_CFLAGS) -c -o $@  $<
-+
-+madwifi_multi: $(OBJS) do_multi.o
-+      $(CC) -o $@ $^
-+
-+compile: madwifi_multi
-+      for i in $(ALLPROGS); do \
-+              ln -s -f madwifi_multi $$i; \
-+      done
-+else
-+$(ALLPROGS):
-+      $(CC) $(ALL_CFLAGS) -o $@ $@.c
-+
-+compile: $(ALLPROGS)
-+endif
- install: $(ALL) 
-       install -d $(DESTDIR)$(BINDIR)
--      for i in $(ALL); do \
-+      for i in $(ALLPROGS) $(if $(DO_MULTI),madwifi_multi); do \
-               install $$i $(DESTDIR)$(BINDIR)/$$i; \
--              $(STRIP) $(DESTDIR)$(BINDIR)/$$i; \
-       done
-       install -d $(DESTDIR)$(MANDIR)/man8
-       install -m 0644 man/*.8 $(DESTDIR)$(MANDIR)/man8
-       install $(TOP)/scripts/madwifi-unload $(DESTDIR)$(BINDIR)/madwifi-unload
- uninstall:
--      for i in $(ALL); do \
-+      for i in $(ALLPROGS) $(if $(DO_MULTI),madwifi_multi); do \
-               rm -f $(DESTDIR)$(BINDIR)/$$i; \
-       done
--      for i in $(ALL:=.8); do \
--              rm -f $(DESTDIR)$(MANDIR)/man8/$$i; \
-+      for i in $(ALLPROGS); do \
-+              rm -f $(DESTDIR)$(MANDIR)/man8/$$i.8; \
-       done
- clean:
--      rm -f $(ALL) core a.out
-+      rm -f $(ALLPROGS) madwifi_multi *.o core a.out
---- a/tools/wlanconfig.c
-+++ b/tools/wlanconfig.c
-@@ -61,6 +61,7 @@
- #include "net80211/ieee80211.h"
- #include "net80211/ieee80211_crypto.h"
- #include "net80211/ieee80211_ioctl.h"
-+#include "do_multi.h"
- /*
-  * These are taken from ieee80211_node.h
-@@ -100,7 +101,7 @@ size_t strlcat(char *, const char *, siz
- static int verbose = 0;
- int
--main(int argc, char *argv[])
-+CMD(wlanconfig)(int argc, char *argv[])
- {
-       const char *ifname, *cmd;
-       unsigned char bnounit = 0;
---- a/tools/ath_info.c
-+++ b/tools/ath_info.c
-@@ -98,6 +98,7 @@
- #include <sys/mman.h>
- #include <endian.h>
- #include <byteswap.h>
-+#include "do_multi.h"
- #undef ARRAY_SIZE
- #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
-@@ -738,7 +739,8 @@ static void usage(const char *n)
-               "unlawful radio transmissions!\n\n");
- }
--int main(int argc, char *argv[])
-+int
-+CMD(athinfo)(int argc, char *argv[])
- {
-       u_int32_t dev_addr;
-       u_int16_t eeprom_header, srev, phy_rev_5ghz, phy_rev_2ghz;
diff --git a/package/madwifi/patches/104-autocreate_none.patch b/package/madwifi/patches/104-autocreate_none.patch
deleted file mode 100644 (file)
index b2181b6..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/ath/if_ath.c
-+++ b/ath/if_ath.c
-@@ -516,7 +516,7 @@ ath_attach(u_int16_t devid, struct net_d
-       HAL_STATUS status;
-       int error = 0;
-       unsigned int i;
--      int autocreatemode = IEEE80211_M_STA;
-+      int autocreatemode = -1;
-       u_int8_t csz;
-       sc->devid = devid;
diff --git a/package/madwifi/patches/105-ratectl_attach.patch b/package/madwifi/patches/105-ratectl_attach.patch
deleted file mode 100644 (file)
index 80aad83..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/net80211/ieee80211_rate.c
-+++ b/net80211/ieee80211_rate.c
-@@ -100,8 +100,18 @@ struct ath_ratectrl *ieee80211_rate_atta
-               ieee80211_load_module(buf);
-       if (!ratectls[id].attach) {
--              printk(KERN_ERR "Error loading module \"%s\"\n", buf);
--              return NULL;
-+              /* pick the first available rate control module */
-+              printk(KERN_INFO "Rate control module \"%s\" not available\n", buf);
-+              for (id = 0; id < IEEE80211_RATE_MAX - 1; id++) {
-+                      if (ratectls[id].attach)
-+                              break;
-+              }
-+              if (!ratectls[id].attach) {
-+                      printk(KERN_ERR "No rate control module available");
-+                      return NULL;
-+              } else {
-+                      printk(KERN_INFO "Using \"%s\" instead.\n", module_names[id]);
-+              }
-       }
-       ctl = ratectls[id].attach(sc);
diff --git a/package/madwifi/patches/106-get_arch.patch b/package/madwifi/patches/106-get_arch.patch
deleted file mode 100644 (file)
index 3140f36..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
---- a/scripts/get_arch.mk
-+++ b/scripts/get_arch.mk
-@@ -36,11 +36,14 @@ ifeq (,$(ARCH-y))
- $(Cannot determine ARCH)
- endif
-+# Allow ARCH to be x86
-+ifneq (,$(CONFIG_X86))
-+ifeq (x86,$(ARCH))
-+ARCH-y = $(ARCH)
-+endif
-+endif
-+
- # Don't allow ARCH to be overridden by a different value.
- ifeq (,$(ARCH))
- ARCH = $(ARCH-y)
--else
--ifneq ($(ARCH),$(ARCH-y))
--$(error ARCH mismatch: supplied "$(ARCH)", determined "$(ARCH-y)")
--endif
- endif
diff --git a/package/madwifi/patches/111-minstrel_crash.patch b/package/madwifi/patches/111-minstrel_crash.patch
deleted file mode 100644 (file)
index 975bc4e..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/ath_rate/minstrel/minstrel.c
-+++ b/ath_rate/minstrel/minstrel.c
-@@ -393,6 +393,9 @@ ath_rate_get_mrr(struct ath_softc *sc, s
-               struct minstrel_node *sn = ATH_NODE_MINSTREL(an);
-               int rc1, rc2, rc3;         /* Index into the rate table, so for example, it is  0..11 */
-+              if (sn->num_rates <= 0)
-+                      return;
-+
-               if (sn->is_sampling) {
-                       sn->is_sampling = 0;
-                       if (sn->rs_sample_rate_slower)
diff --git a/package/madwifi/patches/113-no_ibss_pwrsave.patch b/package/madwifi/patches/113-no_ibss_pwrsave.patch
deleted file mode 100644 (file)
index af23ceb..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/net80211/ieee80211_scan.c
-+++ b/net80211/ieee80211_scan.c
-@@ -291,7 +291,8 @@ scan_restart_pwrsav(unsigned long arg)
-       struct ieee80211com *ic = vap->iv_ic;
-       int delay;
--      ieee80211_sta_pwrsave(vap, 1);
-+      if (vap->iv_opmode != IEEE80211_M_IBSS)
-+          ieee80211_sta_pwrsave(vap, 1);
-       /*
-        * Use an initial 1ms delay to ensure the null
-        * data frame has a chance to go out.
diff --git a/package/madwifi/patches/122-replayfail_workaround.patch b/package/madwifi/patches/122-replayfail_workaround.patch
deleted file mode 100644 (file)
index c4eb28c..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/net80211/ieee80211_linux.c
-+++ b/net80211/ieee80211_linux.c
-@@ -331,6 +331,9 @@ ieee80211_notify_replay_failure(struct i
-               k->wk_cipher->ic_name, k->wk_keyix,
-               (unsigned long long)rsc);
-+      /* disabled for now due to bogus events for unknown reasons */
-+      return;
-+
-       /* TODO: needed parameters: count, keyid, key type, src address, TSC */
-       snprintf(buf, sizeof(buf), "%s(keyid=%d %scast addr=" MAC_FMT ")", tag,
-               k->wk_keyix,
diff --git a/package/madwifi/patches/123-ccmp_checks.patch b/package/madwifi/patches/123-ccmp_checks.patch
deleted file mode 100644 (file)
index 6178a3f..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
---- a/net80211/ieee80211_crypto_ccmp.c
-+++ b/net80211/ieee80211_crypto_ccmp.c
-@@ -115,6 +115,7 @@ ccmp_attach(struct ieee80211vap *vap, st
- /* This function (crypto_alloc_foo might sleep. Therefore:
-  * Context: process
-  */
-+#ifdef CONFIG_CRYPTO
- #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
-       ctx->cc_tfm = crypto_alloc_tfm("aes", 0);
- #else
-@@ -123,7 +124,8 @@ ccmp_attach(struct ieee80211vap *vap, st
-       if (IS_ERR(ctx->cc_tfm))
-               ctx->cc_tfm = NULL;
- #endif
--      
-+#endif
-+
-       if (ctx->cc_tfm == NULL) {
-               IEEE80211_DPRINTF(vap, IEEE80211_MSG_CRYPTO,
-                               "%s: unable to load kernel AES crypto support\n",
-@@ -138,12 +140,14 @@ ccmp_detach(struct ieee80211_key *k)
- {
-       struct ccmp_ctx *ctx = k->wk_private;
-+#ifdef CONFIG_CRYPTO
-       if (ctx->cc_tfm != NULL)
- #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
-               crypto_free_tfm(ctx->cc_tfm);
- #else
-               crypto_free_cipher(ctx->cc_tfm);
- #endif
-+#endif
-       FREE(ctx, M_DEVBUF);
-       _MOD_DEC_USE(THIS_MODULE);
-@@ -169,7 +173,9 @@ ccmp_setkey(struct ieee80211_key *k)
-                       return 0;
-               }
-+#ifdef CONFIG_CRYPTO
-               crypto_cipher_setkey(ctx->cc_tfm, k->wk_key, k->wk_keylen);
-+#endif
-       }
-       return 1;
-@@ -324,6 +330,7 @@ xor_block(u8 *b, const u8 *a, size_t len
- static void
- rijndael_encrypt(struct crypto_cipher *tfm, const void *src, void *dst)
- {
-+#ifdef CONFIG_CRYPTO
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
-       crypto_cipher_encrypt_one(tfm, dst, src);
- #else
-@@ -339,6 +346,7 @@ rijndael_encrypt(struct crypto_cipher *t
-       sg_dst.length = AES_BLOCK_LEN;
-       crypto_cipher_encrypt(tfm, &sg_dst, &sg_src, AES_BLOCK_LEN);
- #endif
-+#endif
- }
- /*
-@@ -475,6 +483,9 @@ ccmp_encrypt(struct ieee80211_key *key,
-       uint8_t *mic, *pos;
-       u_int space;
-+      if (ctx->cc_tfm == NULL)
-+              return 0;
-+
-       ctx->cc_vap->iv_stats.is_crypto_ccmp++;
-       skb = skb0;
-@@ -589,6 +600,9 @@ ccmp_decrypt(struct ieee80211_key *key,
-       uint8_t *pos, *mic;
-       u_int space;
-+      if (ctx->cc_tfm == NULL)
-+              return 0;
-+
-       ctx->cc_vap->iv_stats.is_crypto_ccmp++;
-       skb = skb0;
---- a/Makefile
-+++ b/Makefile
-@@ -192,11 +192,4 @@ endif
-           exit 1; \
-       fi
-       
--      @# check crypto support is enabled
--      @if [ -z "$(CONFIG_CRYPTO)" ]; then \
--          echo "FAILED"; \
--          echo "Please enable crypto API."; \
--          exit 1; \
--      fi
--      
-       @echo "ok."
diff --git a/package/madwifi/patches/124-linux24_compat.patch b/package/madwifi/patches/124-linux24_compat.patch
deleted file mode 100644 (file)
index 88601a4..0000000
+++ /dev/null
@@ -1,202 +0,0 @@
---- a/ath/if_athvar.h
-+++ b/ath/if_athvar.h
-@@ -126,6 +126,11 @@ typedef void irqreturn_t;
- #define ATH_GET_NETDEV_DEV(ndev)      ((ndev)->class_dev.dev)
- #endif
-+#ifndef NETDEV_TX_OK
-+#define NETDEV_TX_OK    0
-+#define NETDEV_TX_BUSY  1
-+#endif
-+
- #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,23)
- static inline struct net_device *_alloc_netdev(int sizeof_priv, const char *mask,
-                                              void (*setup)(struct net_device *))
---- a/ath/if_ath_radar.c
-+++ b/ath/if_ath_radar.c
-@@ -92,6 +92,13 @@
- #define nofloat_pct(_value, _pct) \
-       ( (_value * (1000 + _pct)) / 1000 )
-+#ifndef list_for_each_entry_reverse
-+#define list_for_each_entry_reverse(pos, head, member)                        \
-+      for (pos = list_entry((head)->prev, typeof(*pos), member);      \
-+           prefetch(pos->member.prev), &pos->member != (head);        \
-+           pos = list_entry(pos->member.prev, typeof(*pos), member))
-+#endif
-+
- struct radar_pattern_specification {
-       /* The name of the rule/specification (i.e. what did we detect) */
-       const char *name;
---- a/ath/if_ath.c
-+++ b/ath/if_ath.c
-@@ -4705,6 +4705,46 @@ ath_beacon_setup(struct ath_softc *sc, s
- #undef USE_SHPREAMBLE
- }
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)
-+static inline int atomic_cmpxchg(atomic_t *v, int old, int new)
-+{
-+      int ret;
-+      unsigned long flags;
-+
-+      local_irq_save(flags);
-+      ret = v->counter;
-+      if (likely(ret == old))
-+              v->counter = new;
-+      local_irq_restore(flags);
-+
-+      return ret;
-+}
-+
-+/**
-+ * atomic_add_unless - add unless the number is a given value
-+ * @v: pointer of type atomic_t
-+ * @a: the amount to add to v...
-+ * @u: ...unless v is equal to u.
-+ *
-+ * Atomically adds @a to @v, so long as it was not @u.
-+ * Returns non-zero if @v was not @u, and zero otherwise.
-+ */
-+static __inline__ int atomic_add_unless(atomic_t *v, int a, int u)
-+{
-+      int c, old;
-+      c = atomic_read(v);
-+      for (;;) {
-+              if (unlikely(c == (u)))
-+                      break;
-+              old = atomic_cmpxchg((v), c, c + (a));
-+              if (likely(old == c))
-+                      break;
-+              c = old;
-+      }
-+      return c != (u);
-+}
-+#endif
-+
- /*
-  * Generate beacon frame and queue cab data for a VAP.
-  */
---- /dev/null
-+++ b/net80211/sort.c
-@@ -0,0 +1,120 @@
-+/*
-+ * A fast, small, non-recursive O(nlog n) sort for the Linux kernel
-+ *
-+ * Jan 23 2005  Matt Mackall <mpm@selenic.com>
-+ */
-+
-+#include <linux/kernel.h>
-+#include <linux/module.h>
-+#include <linux/slab.h>
-+
-+static void u32_swap(void *a, void *b, int size)
-+{
-+      u32 t = *(u32 *)a;
-+      *(u32 *)a = *(u32 *)b;
-+      *(u32 *)b = t;
-+}
-+
-+static void generic_swap(void *a, void *b, int size)
-+{
-+      char t;
-+
-+      do {
-+              t = *(char *)a;
-+              *(char *)a++ = *(char *)b;
-+              *(char *)b++ = t;
-+      } while (--size > 0);
-+}
-+
-+/**
-+ * sort - sort an array of elements
-+ * @base: pointer to data to sort
-+ * @num: number of elements
-+ * @size: size of each element
-+ * @cmp: pointer to comparison function
-+ * @swap: pointer to swap function or NULL
-+ *
-+ * This function does a heapsort on the given array. You may provide a
-+ * swap function optimized to your element type.
-+ *
-+ * Sorting time is O(n log n) both on average and worst-case. While
-+ * qsort is about 20% faster on average, it suffers from exploitable
-+ * O(n*n) worst-case behavior and extra memory requirements that make
-+ * it less suitable for kernel use.
-+ */
-+
-+static void sort(void *base, size_t num, size_t size,
-+        int (*cmp)(const void *, const void *),
-+        void (*swap)(void *, void *, int size))
-+{
-+      /* pre-scale counters for performance */
-+      int i = (num/2 - 1) * size, n = num * size, c, r;
-+
-+      if (!swap)
-+              swap = (size == 4 ? u32_swap : generic_swap);
-+
-+      /* heapify */
-+      for ( ; i >= 0; i -= size) {
-+              for (r = i; r * 2 + size < n; r  = c) {
-+                      c = r * 2 + size;
-+                      if (c < n - size && cmp(base + c, base + c + size) < 0)
-+                              c += size;
-+                      if (cmp(base + r, base + c) >= 0)
-+                              break;
-+                      swap(base + r, base + c, size);
-+              }
-+      }
-+
-+      /* sort */
-+      for (i = n - size; i >= 0; i -= size) {
-+              swap(base, base + i, size);
-+              for (r = 0; r * 2 + size < i; r = c) {
-+                      c = r * 2 + size;
-+                      if (c < i - size && cmp(base + c, base + c + size) < 0)
-+                              c += size;
-+                      if (cmp(base + r, base + c) >= 0)
-+                              break;
-+                      swap(base + r, base + c, size);
-+              }
-+      }
-+}
-+
-+EXPORT_SYMBOL(sort);
-+
-+#if 0
-+/* a simple boot-time regression test */
-+
-+int cmpint(const void *a, const void *b)
-+{
-+      return *(int *)a - *(int *)b;
-+}
-+
-+static int sort_test(void)
-+{
-+      int *a, i, r = 1;
-+
-+      a = kmalloc(1000 * sizeof(int), GFP_KERNEL);
-+      BUG_ON(!a);
-+
-+      printk("testing sort()\n");
-+
-+      for (i = 0; i < 1000; i++) {
-+              r = (r * 725861) % 6599;
-+              a[i] = r;
-+      }
-+
-+      sort(a, 1000, sizeof(int), cmpint, NULL);
-+
-+      for (i = 0; i < 999; i++)
-+              if (a[i] > a[i+1]) {
-+                      printk("sort() failed!\n");
-+                      break;
-+              }
-+
-+      kfree(a);
-+
-+      return 0;
-+}
-+
-+module_init(sort_test);
-+#endif
diff --git a/package/madwifi/patches/126-rxerr_frames.patch b/package/madwifi/patches/126-rxerr_frames.patch
deleted file mode 100644 (file)
index 762a7bc..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/ath/if_ath.c
-+++ b/ath/if_ath.c
-@@ -6474,8 +6474,9 @@ ath_rx_tasklet(TQUEUE_ARG data)
-                       /*
-                        * Reject error frames if we have no vaps that
-                        * are operating in monitor mode.
-+                       * Reject empty frames as well
-                        */
--                      if (sc->sc_nmonvaps == 0)
-+                      if ((sc->sc_nmonvaps == 0) || (rs->rs_datalen == 0))
-                               goto rx_next;
-               }
- rx_accept:
diff --git a/package/madwifi/patches/200-no_debug.patch b/package/madwifi/patches/200-no_debug.patch
deleted file mode 100644 (file)
index 3f46ec8..0000000
+++ /dev/null
@@ -1,408 +0,0 @@
---- a/ath/if_ath.c
-+++ b/ath/if_ath.c
-@@ -42,7 +42,6 @@
-  * This software is derived from work of Atsushi Onoe; his contribution
-  * is greatly appreciated.
-  */
--#define       AR_DEBUG
- #include "if_ath_debug.h"
- #include "opt_ah.h"
-@@ -368,8 +367,10 @@ static unsigned int ath_get_dfs_cac_time
- static void ath_set_dfs_cac_time(struct ieee80211com *, unsigned int seconds);
- static unsigned int ath_test_radar(struct ieee80211com *);
--static unsigned int ath_dump_hal_map(struct ieee80211com *ic);
-+#ifdef AR_DEBUG
-+static unsigned int ath_dump_hal_map(struct ieee80211com *ic);
-+#endif
- static u_int32_t ath_get_clamped_maxtxpower(struct ath_softc *sc);
- static u_int32_t ath_set_clamped_maxtxpower(struct ath_softc *sc, 
-               u_int32_t new_clamped_maxtxpower);
-@@ -520,9 +521,11 @@ ath_attach(u_int16_t devid, struct net_d
-       u_int8_t csz;
-       sc->devid = devid;
-+#ifdef AR_DEBUG
-       ath_debug_global = (ath_debug & ATH_DEBUG_GLOBAL);
-       sc->sc_debug     = (ath_debug & ~ATH_DEBUG_GLOBAL);
-       DPRINTF(sc, ATH_DEBUG_ANY, "%s: devid 0x%x\n", __func__, devid);
-+#endif
-       /* Allocate space for dynamically determined maximum VAP count */
-       sc->sc_bslot = 
-@@ -1038,8 +1041,9 @@ ath_attach(u_int16_t devid, struct net_d
-       ic->ic_vap_delete = ath_vap_delete;
-       ic->ic_test_radar           = ath_test_radar;
-+#ifdef AR_DEBUG
-       ic->ic_dump_hal_map         = ath_dump_hal_map;
--
-+#endif
-       ic->ic_set_dfs_testmode     = ath_set_dfs_testmode;
-       ic->ic_get_dfs_testmode     = ath_get_dfs_testmode;
-@@ -1297,12 +1301,14 @@ ath_vap_create(struct ieee80211com *ic,
-               /* If no default VAP debug flags are passed, allow a few to
-                * transfer down from the driver to new VAPs so we can have load
-                * time debugging for VAPs too. */
-+#ifdef AR_DEBUG
-               vap->iv_debug = 0 |
-                       ((sc->sc_debug & ATH_DEBUG_RATE) ? IEEE80211_MSG_XRATE  : 0) | 
-                       ((sc->sc_debug & ATH_DEBUG_XMIT) ? IEEE80211_MSG_OUTPUT : 0) | 
-                       ((sc->sc_debug & ATH_DEBUG_RECV) ? IEEE80211_MSG_INPUT  : 0) |
-                       0
-                       ;
-+#endif
-       }
-       ic->ic_debug = (sc->sc_default_ieee80211_debug & IEEE80211_MSG_IC);
-@@ -10496,9 +10502,11 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl
-                               /* XXX validate? */
-                               sc->sc_ledpin = val;
-                               break;
-+#ifdef AR_DEBUG
-                       case ATH_DEBUG:
-                               sc->sc_debug     = (val & ~ATH_DEBUG_GLOBAL);
-                               ath_debug_global = (val &  ATH_DEBUG_GLOBAL);
-+#endif
-                               break;
-                       case ATH_TXANTENNA:
-                               /*
-@@ -10918,9 +10926,11 @@ ath_dynamic_sysctl_register(struct ath_s
-       }
-       /* initialize values */
-+#ifdef AR_DEBUG
-       ath_debug_global = (ath_debug & ATH_DEBUG_GLOBAL);
-       sc->sc_debug     = (ath_debug & ~ATH_DEBUG_GLOBAL);
-       sc->sc_default_ieee80211_debug = ieee80211_debug;
-+#endif
-       sc->sc_txantenna = 0;           /* default to auto-selection */
-       sc->sc_txintrperiod = ATH_TXQ_INTR_PERIOD;
- }
-@@ -11762,6 +11772,7 @@ ath_test_radar(struct ieee80211com *ic)
- }
- /* This is called by a private ioctl (iwpriv) to dump the HAL obfuscation table */
-+#ifdef AR_DEBUG
- static unsigned int
- ath_dump_hal_map(struct ieee80211com *ic)
- {
-@@ -11770,7 +11781,7 @@ ath_dump_hal_map(struct ieee80211com *ic
-       ath_hal_dump_map(sc->sc_ah);
-       return 0;
- }
--
-+#endif
- /* If we are shutting down or blowing off the DFS channel availability check
-  * then we call this to stop the behavior before we take the rest of the
-  * necessary actions (such as a DFS reaction to radar). */
---- a/ath_rate/amrr/amrr.c
-+++ b/ath_rate/amrr/amrr.c
-@@ -70,7 +70,9 @@
- #include "amrr.h"
-+#ifdef AR_DEBUG
- #define       AMRR_DEBUG
-+#endif
- #ifdef AMRR_DEBUG
- #define       DPRINTF(sc, _fmt, ...) do {                                     \
-       if (sc->sc_debug & 0x10)                                        \
---- a/ath_rate/minstrel/minstrel.c
-+++ b/ath_rate/minstrel/minstrel.c
-@@ -117,7 +117,9 @@
- #include "minstrel.h"
-+#ifdef AR_DEBUG
- #define       MINSTREL_DEBUG
-+#endif
- #ifdef MINSTREL_DEBUG
- enum {
-               ATH_DEBUG_RATE          = 0x00000010    /* rate control */
---- a/ath_rate/onoe/onoe.c
-+++ b/ath_rate/onoe/onoe.c
-@@ -66,7 +66,9 @@
- #include "onoe.h"
-+#ifdef AR_DEBUG
- #define       ONOE_DEBUG
-+#endif
- #ifdef ONOE_DEBUG
- enum {
-       ATH_DEBUG_RATE  = 0x00000010,   /* rate control */
---- a/ath_rate/sample/sample.c
-+++ b/ath_rate/sample/sample.c
-@@ -68,7 +68,9 @@
- #include "sample.h"
--#define       SAMPLE_DEBUG
-+#ifdef AR_DEBUG
-+#define SAMPLE_DEBUG
-+#endif
- #ifdef SAMPLE_DEBUG
- enum {
-       ATH_DEBUG_RATE          = 0x00000010,   /* rate control */
---- a/tools/do_multi.c
-+++ b/tools/do_multi.c
-@@ -10,16 +10,20 @@ main(int argc, char *argv[])
-     progname = basename(argv[0]);
-+#ifdef AR_DEBUG
-     if(strcmp(progname, "80211debug") == 0)
-       ret = a80211debug_init(argc, argv);
-+#endif
-     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);
-+#ifdef AR_DEBUG
-     if(strcmp(progname, "athdebug") == 0)
-       ret =  athdebug_init(argc, argv);
-+#endif
-     if(strcmp(progname, "athkey") == 0)
-       ret =  athkey_init(argc, argv);
-     if(strcmp(progname, "athstats") == 0)
---- a/tools/Makefile
-+++ b/tools/Makefile
-@@ -48,14 +48,16 @@ endif
- all: compile
-+DEBUG = -DAR_DEBUG
-+
- ALLPROGS=     athstats 80211stats athkey athchans athctrl \
--      athdebug 80211debug wlanconfig ath_info
-+      $(if $(DEBUG),athdebug 80211debug) wlanconfig ath_info
- OBJS= $(patsubst %,%.o,$(ALLPROGS))
- INCS= -I. -I../ath -I$(HAL) -I$(TOP) -I$(ATH_HAL)
- CFLAGS=       -g -O2 -Wall
--ALL_CFLAGS= $(CFLAGS) $(INCS)
-+ALL_CFLAGS= $(CFLAGS) $(INCS) $(DEBUG)
- LDFLAGS=
---- a/net80211/ieee80211_linux.h
-+++ b/net80211/ieee80211_linux.h
-@@ -29,8 +29,6 @@
- #ifndef _NET80211_IEEE80211_LINUX_H_
- #define _NET80211_IEEE80211_LINUX_H_
--#define       IEEE80211_DEBUG
--#define       IEEE80211_DEBUG_REFCNT                  /* Node reference count debugging */
- /* #define ATH_DEBUG_SPINLOCKS */             /* announce before spinlocking */
- #include <linux/wireless.h>
---- a/Makefile.inc
-+++ b/Makefile.inc
-@@ -147,8 +147,9 @@ ATH_RATE=  $(TOP)/ath_rate
- # 
- TOOLS=  $(TOP)/tools 
--WARNINGS = -Werror
--COPTS+= $(WARNINGS)
-+WARNINGS = -Wno-unused
-+# DEBUG = -DAR_DEBUG -DIEEE80211_DEBUG
-+COPTS+= $(WARNINGS) $(DEBUG)
- INCS= -include $(TOP)/include/compat.h -I$(TOP)/include
- # TARGET defines the target platform architecture. It must match one of
---- a/ath/if_ath_radar.c
-+++ b/ath/if_ath_radar.c
-@@ -19,8 +19,6 @@
-  * $Id: if_ath_radar.c 2464 2007-06-15 22:51:56Z mtaylor $
-  */
- #include "opt_ah.h"
--
--#define       AR_DEBUG
- #include "if_ath_debug.h"
- #ifndef AUTOCONF_INCLUDED
-@@ -56,8 +54,6 @@
- #include <net80211/if_llc.h>
- #endif
--#define       AR_DEBUG
--
- #include "net80211/if_athproto.h"
- #include "if_athvar.h"
---- a/ath/if_ath_hal.h
-+++ b/ath/if_ath_hal.h
-@@ -1081,6 +1081,7 @@ static inline HAL_BOOL ath_hal_disable(s
-            tail -f /var/log/messages | sed -f hal_unmangle.sed 
-  */
-+#ifdef AR_DEBUG
- static inline void ath_hal_dump_map(struct ath_hal *ah)
- {
- #ifdef CONFIG_KALLSYMS
-@@ -1345,7 +1346,7 @@ static inline void ath_hal_dump_map(stru
- #endif                                /* #ifndef CONFIG_KALLSYMS */
- }
--
-+#endif
- #include "if_ath_hal_wrappers.h"
- #endif                                /* #ifndef _IF_ATH_HAL_H_ */
---- a/net80211/ieee80211_var.h
-+++ b/net80211/ieee80211_var.h
-@@ -492,9 +492,10 @@ struct ieee80211com {
-       /* inject a fake radar signal -- used while on a 802.11h DFS channels */
-       unsigned int (*ic_test_radar)(struct ieee80211com *);
-+#ifdef AR_DEBUG
-       /* dump HAL */
-       unsigned int (*ic_dump_hal_map)(struct ieee80211com *);
--
-+#endif
-       /* DFS channel availability check time (in seconds) */
-       void (*ic_set_dfs_cac_time)(struct ieee80211com *, unsigned int);
-       unsigned int (*ic_get_dfs_cac_time)(struct ieee80211com *);
---- a/net80211/ieee80211_wireless.c
-+++ b/net80211/ieee80211_wireless.c
-@@ -1548,6 +1548,7 @@ ieee80211_get_txcont_power(struct net_de
-       return 0;
- }
-+#ifdef AR_DEBUG
- static int 
- ieee80211_ioctl_hal_map(struct net_device *dev, struct iw_request_info *info,
-        void *w, char *extra)
-@@ -1558,7 +1559,7 @@ ieee80211_ioctl_hal_map(struct net_devic
-        params[0] = ic->ic_dump_hal_map(ic);
-        return 0;
- }
--
-+#endif
- static int
- ieee80211_ioctl_radar(struct net_device *dev, struct iw_request_info *info,
-@@ -5258,8 +5259,10 @@ static const struct iw_priv_args ieee802
-         IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,   "getwmmparams" },
-       { IEEE80211_IOCTL_RADAR,
-         0, 0, "doth_radar" },
-+#ifdef AR_DEBUG
-       { IEEE80211_IOCTL_HALMAP,
-         0, 0, "dump_hal_map" },
-+#endif
-       /*
-        * These depends on sub-ioctl support which added in version 12.
-        */
-@@ -5695,7 +5698,9 @@ static const iw_handler ieee80211_priv_h
-       set_priv(IEEE80211_IOCTL_SETMLME, ieee80211_ioctl_setmlme),
-       set_priv(IEEE80211_IOCTL_SETKEY, ieee80211_ioctl_setkey),
-       set_priv(IEEE80211_IOCTL_DELKEY, ieee80211_ioctl_delkey),
-+#ifdef AR_DEBUG
-       set_priv(IEEE80211_IOCTL_HALMAP, ieee80211_ioctl_hal_map),
-+#endif
-       set_priv(IEEE80211_IOCTL_ADDMAC, ieee80211_ioctl_addmac),
-       set_priv(IEEE80211_IOCTL_DELMAC, ieee80211_ioctl_delmac),
-       set_priv(IEEE80211_IOCTL_WDSADDMAC, ieee80211_ioctl_wdsmac),
---- a/ath/if_ath_debug.h
-+++ b/ath/if_ath_debug.h
-@@ -54,6 +54,10 @@ enum {
-       ATH_DEBUG_GLOBAL        = (ATH_DEBUG_SKB|ATH_DEBUG_SKB_REF)
- };
-+#define       EPRINTF(_sc, _fmt, ...) \
-+              printk(KERN_ERR "%s: %s: " _fmt, \
-+                      SC_DEV_NAME(_sc), __func__, ## __VA_ARGS__)
-+
- #ifdef AR_DEBUG
- /* DEBUG-ONLY DEFINITIONS */
-@@ -68,20 +72,9 @@ enum {
-               ath_keyprint((_sc), __func__, _ix, _hk, _mac);          \
- } while (0)
--#else /* #ifdef AR_DEBUG */
--
--#define       DFLAG_ISSET(sc, _m)             0
--#define       DPRINTF(sc, _m, _fmt, ...)
--#define       KEYPRINTF(sc, k, ix, mac)
--
--#endif /* #ifdef AR_DEBUG */
- #define       IFF_DUMPPKTS(_sc, _m)   DFLAG_ISSET((_sc), (_m))
--#define       EPRINTF(_sc, _fmt, ...) \
--              printk(KERN_ERR "%s: %s: " _fmt, \
--                      SC_DEV_NAME(_sc), __func__, ## __VA_ARGS__)
--
- #define       WPRINTF(_sc, _fmt, ...) \
-               printk(KERN_WARNING "%s: %s: " _fmt, \
-                       SC_DEV_NAME(_sc), __func__, ## __VA_ARGS__)
-@@ -89,5 +82,14 @@ enum {
- #define       IPRINTF(_sc, _fmt, ...) \
-               printk(KERN_INFO "%s: %s: " _fmt, \
-                       SC_DEV_NAME(_sc), __func__, ## __VA_ARGS__)
-+#else
-+#define       DFLAG_ISSET(sc, _m)             0
-+#define       DPRINTF(sc, _m, _fmt, ...)
-+#define       KEYPRINTF(sc, k, ix, mac)
-+#define WPRINTF(...)
-+#define IPRINTF(...)
-+#define IFF_DUMPPKTS(...) 0
-+
-+#endif
- #endif /* #ifndef _IF_ATH_DEBUG_H_ */
---- a/net80211/ieee80211_node.c
-+++ b/net80211/ieee80211_node.c
-@@ -920,6 +920,9 @@ node_cleanup(struct ieee80211_node *ni)
-       ni->ni_rxkeyoff = 0;
- }
-+#ifndef IEEE80211_DEBUG
-+#define node_print_message(...) do {} while(0)
-+#else
- static void node_print_message(
-               u_int32_t flags,
-               int show_counter, 
-@@ -972,7 +975,7 @@ static void node_print_message(
-                       adjusted_refcount);
-       va_end(args);
- }
--EXPORT_SYMBOL(node_print_message);
-+#endif
- static void
- #ifdef IEEE80211_DEBUG_REFCNT
---- a/ath/if_ath_pci.c
-+++ b/ath/if_ath_pci.c
-@@ -134,8 +134,10 @@ ath_pci_probe(struct pci_dev *pdev, cons
-       u16 vdevice;
-       int i;
--      if (pci_enable_device(pdev))
-+      if (pci_enable_device(pdev)) {
-+              printk(KERN_ERR "%s: failed to enable PCI device\n", dev_info);
-               return -EIO;
-+      }
-       /* XXX 32-bit addressing only */
-       if (pci_set_dma_mask(pdev, 0xffffffff)) {
-@@ -244,8 +246,10 @@ ath_pci_probe(struct pci_dev *pdev, cons
-               sc->aps_sc.sc_ledpin = 1;
-       }
--      if (ath_attach(vdevice, dev, NULL) != 0)
-+      if ((i = ath_attach(vdevice, dev, NULL)) != 0) {
-+              printk(KERN_ERR "%s: ath_attach failed: %d\n", dev_info, i);
-               goto bad4;
-+      }
-       athname = ath_hal_probe(id->vendor, vdevice);
-       printk(KERN_INFO "%s: %s: %s: mem=0x%lx, irq=%d\n",
diff --git a/package/madwifi/patches/201-debug_fix.patch b/package/madwifi/patches/201-debug_fix.patch
deleted file mode 100644 (file)
index bcfbba8..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/ath_hal/ah_os.c
-+++ b/ath_hal/ah_os.c
-@@ -65,7 +65,7 @@
- #include <ah_os.h>
- #ifdef AH_DEBUG
--static        int ath_hal_debug = 0;
-+static        int ath_hal_debug = 99;
- #endif
- int   ath_hal_dma_beacon_response_time = 2;   /* in TUs */
-@@ -327,6 +327,8 @@ EXPORT_SYMBOL(OS_MARK);
-  * useful for debugging and figuring out, which hal function sets which 
-  * registers */
- char *ath_hal_func = NULL;
-+EXPORT_SYMBOL(ath_hal_func);
-+
- #endif
- /*
diff --git a/package/madwifi/patches/202-debug_variables.patch b/package/madwifi/patches/202-debug_variables.patch
deleted file mode 100644 (file)
index 33e6efa..0000000
+++ /dev/null
@@ -1,204 +0,0 @@
---- a/ath/if_ath.c
-+++ b/ath/if_ath.c
-@@ -453,8 +453,8 @@ MODULE_PARM_DESC(autocreate, "Create ath
- MODULE_PARM_DESC(ratectl, "Rate control algorithm [amrr|minstrel|onoe|sample], "
-               "defaults to '" DEF_RATE_CTL "'");
--static int    ath_debug = 0;
- #ifdef AR_DEBUG
-+static int    ath_debug = 0;
- #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,52))
- MODULE_PARM(ath_debug, "i");
- #else
-@@ -465,8 +465,8 @@ static void ath_printrxbuf(const struct
- static void ath_printtxbuf(const struct ath_buf *, int);
- #endif /* defined(AR_DEBUG) */
--static int    ieee80211_debug = 0;
- #ifdef AR_DEBUG
-+static int    ieee80211_debug = 0;
- #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,52))
- MODULE_PARM(ieee80211_debug, "i");
- #else
-@@ -1565,7 +1565,9 @@ ath_vap_delete(struct ieee80211vap *vap)
- void
- ath_suspend(struct net_device *dev)
- {
-+#ifdef AR_DEBUG
-       struct ath_softc *sc = dev->priv;
-+#endif
-       DPRINTF(sc, ATH_DEBUG_ANY, "flags=%x\n", dev->flags);
-       ath_stop(dev);
-@@ -1574,7 +1576,9 @@ ath_suspend(struct net_device *dev)
- void
- ath_resume(struct net_device *dev)
- {
-+#ifdef AR_DEBUG
-       struct ath_softc *sc = dev->priv;
-+#endif
-       DPRINTF(sc, ATH_DEBUG_ANY, "flags=%x\n", dev->flags);
-       ath_init(dev);
-@@ -4019,7 +4023,9 @@ static void
- ath_key_update_begin(struct ieee80211vap *vap)
- {
-       struct net_device *dev = vap->iv_ic->ic_dev;
-+#ifdef AR_DEBUG
-       struct ath_softc *sc = dev->priv;
-+#endif
-       DPRINTF(sc, ATH_DEBUG_KEYCACHE, "Begin\n");
-       /*
-@@ -4040,7 +4046,9 @@ static void
- ath_key_update_end(struct ieee80211vap *vap)
- {
-       struct net_device *dev = vap->iv_ic->ic_dev;
-+#ifdef AR_DEBUG
-       struct ath_softc *sc = dev->priv;
-+#endif
-       DPRINTF(sc, ATH_DEBUG_KEYCACHE, "End\n");
-       netif_wake_queue(dev);
-@@ -6218,7 +6226,9 @@ ath_recv_mgmt(struct ieee80211vap * vap,
-       struct sk_buff *skb, int subtype, int rssi, u_int64_t rtsf)
- {
-       struct ath_softc *sc = vap->iv_ic->ic_dev->priv;
-+#ifdef AR_DEBUG
-         struct ieee80211_frame *wh = (struct ieee80211_frame *)skb->data;
-+#endif
-       struct ieee80211_node * ni = ni_or_null;
-       u_int64_t hw_tsf, beacon_tsf;
-       u_int32_t hw_tu, beacon_tu, intval;
-@@ -8382,7 +8392,9 @@ ath_tx_timeout(struct net_device *dev)
- static void
- ath_tx_draintxq(struct ath_softc *sc, struct ath_txq *txq)
- {
-+#ifdef AR_DEBUG
-       struct ath_hal *ah = sc->sc_ah;
-+#endif
-       struct ath_buf *bf;
-       /*
-        * NB: this assumes output has been stopped and
-@@ -11002,6 +11014,7 @@ ath_announce(struct net_device *dev)
-               strncat(m, b, MLEN);
-       }
-       strncat(m, "\n", MLEN);
-+#ifdef AR_DEBUG
-       if (1 /* bootverbose */) {
-               unsigned int i;
-               for (i = 0; i <= WME_AC_VO; i++) {
-@@ -11014,6 +11027,7 @@ ath_announce(struct net_device *dev)
-                       sc->sc_cabq->axq_qnum);
-               IPRINTF(sc, "Use hw queue %u for beacons\n", sc->sc_bhalq);
-       }
-+#endif
- #undef HAL_MODE_DUALBAND
- }
-  
---- a/ath/if_ath_radar.c
-+++ b/ath/if_ath_radar.c
-@@ -156,7 +156,9 @@ static struct radar_pattern_specificatio
- #endif
- };
-+#ifdef AR_DEBUG
- static u_int32_t interval_to_frequency(u_int32_t pri);
-+#endif
- /* Returns true if radar detection is enabled. */
- int ath_radar_is_enabled(struct ath_softc *sc)
-@@ -229,7 +231,9 @@ int ath_radar_update(struct ath_softc *s
- {
-       struct ath_hal *ah = sc->sc_ah;
-+#ifdef AR_DEBUG
-       struct net_device *dev = sc->sc_dev;
-+#endif
-       struct ieee80211com *ic = &sc->sc_ic;
-       int required = 0;
-@@ -366,6 +370,7 @@ static struct ath_rp *pulse_prev(struct
- #define MR_FAIL_MIN_PERIOD    4
- #define MR_FAIL_MAX_PERIOD    5
-+#ifdef AR_DEBUG
- static const char* get_match_result_desc(u_int32_t code) {
-       switch (code) {
-       case MR_MATCH:
-@@ -384,6 +389,7 @@ static const char* get_match_result_desc
-               return "unknown";
-       }
- }
-+#endif
- static int32_t match_radar(
-       u_int32_t matched, 
-@@ -775,7 +781,10 @@ static HAL_BOOL rp_analyse_short_pulse(
-       struct ath_softc *sc, struct ath_rp *last_pulse, 
-       u_int32_t *index, u_int32_t *pri, u_int32_t *matching_pulses, 
-       u_int32_t *missed_pulses, u_int32_t *noise_pulses)
--{ struct net_device *dev = sc->sc_dev;
-+{
-+#ifdef AR_DEBUG
-+      struct net_device *dev = sc->sc_dev;
-+#endif
-       int i;
-       int best_index = -1;
-       unsigned int best_matched = 0;
-@@ -1217,6 +1226,7 @@ static HAL_BOOL rp_analyse_short_pulse(
-       return (-1 != best_index) ? AH_TRUE : AH_FALSE;
- }
-+#ifdef AR_DEBUG
- static u_int32_t interval_to_frequency(u_int32_t interval)
- {
-       /* Calculate BRI from PRI */
-@@ -1224,6 +1234,7 @@ static u_int32_t interval_to_frequency(u
-       /* Round to nearest multiple of 50 */
-       return frequency + ((frequency % 50) >= 25 ? 50 : 0) - (frequency % 50);
- }
-+#endif
- #ifdef ATH_RADAR_LONG_PULSE
- static const char* get_longpulse_desc(int lp) {
-@@ -1580,7 +1591,9 @@ void ath_rp_done(struct ath_softc *sc)
- void ath_rp_record(struct ath_softc *sc, u_int64_t tsf, u_int8_t rssi, 
-                           u_int8_t width, HAL_BOOL is_simulated)
- {
-+#ifdef AR_DEBUG
-       struct net_device *dev = sc->sc_dev;
-+#endif
-       struct ath_rp *pulse;
-       DPRINTF(sc, ATH_DEBUG_DOTHPULSES, "%s: ath_rp_record: "
---- a/ath_rate/minstrel/minstrel.c
-+++ b/ath_rate/minstrel/minstrel.c
-@@ -931,7 +931,9 @@ ath_proc_read_nodes(struct ieee80211vap
-                           (struct ieee80211_node_table *) &vap->iv_ic->ic_sta;
-               unsigned int x = 0;
-               unsigned int this_tp, this_prob, this_eprob;
-+#ifdef AR_DEBUG
-                       struct ath_softc *sc = vap->iv_ic->ic_dev->priv;;
-+#endif
-               IEEE80211_NODE_TABLE_LOCK_IRQ(nt);
-               TAILQ_FOREACH(ni, &nt->nt_node, ni_list) {
---- a/net80211/ieee80211_scan_ap.c
-+++ b/net80211/ieee80211_scan_ap.c
-@@ -731,6 +731,7 @@ pick_channel(struct ieee80211_scan_state
-       sort(chans, ss_last, sizeof(*chans), pc_cmp, pc_swap);
-+#ifdef IEEE80211_DEBUG
-       for (i = 0; i < ss_last; i++) {
-               int chan = ieee80211_chan2ieee(ic, chans[i].chan);
-@@ -742,6 +743,7 @@ pick_channel(struct ieee80211_scan_state
-                               !!IEEE80211_ARE_CHANS_SAME_MODE(chans[i].chan, 
-                                       ic->ic_bsschan));
-       }
-+#endif
-       best = NULL;
-       best_rssi = 0xff; /* If signal is bigger than 0xff, we'd be melting. */
diff --git a/package/madwifi/patches/300-napi_polling.patch b/package/madwifi/patches/300-napi_polling.patch
deleted file mode 100644 (file)
index bde7684..0000000
+++ /dev/null
@@ -1,536 +0,0 @@
---- a/ath/if_ath.c
-+++ b/ath/if_ath.c
-@@ -184,7 +184,11 @@ static void ath_recv_mgmt(struct ieee802
-       struct sk_buff *, int, int, u_int64_t);
- static void ath_setdefantenna(struct ath_softc *, u_int);
- static struct ath_txq *ath_txq_setup(struct ath_softc *, int, int);
--static void ath_rx_tasklet(TQUEUE_ARG);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
-+static int ath_rx_poll(struct napi_struct *napi, int budget);
-+#else
-+static int ath_rx_poll(struct net_device *dev, int *budget);
-+#endif
- static int ath_hardstart(struct sk_buff *, struct net_device *);
- static int ath_mgtstart(struct ieee80211com *, struct sk_buff *);
- #ifdef ATH_SUPERG_COMP
-@@ -376,6 +380,9 @@ static u_int32_t ath_set_clamped_maxtxpo
-               u_int32_t new_clamped_maxtxpower);
- static u_int32_t ath_get_real_maxtxpower(struct ath_softc *sc);
-+static void ath_poll_disable(struct net_device *dev);
-+static void ath_poll_enable(struct net_device *dev);
-+
- /* calibrate every 30 secs in steady state but check every second at first. */
- static int ath_calinterval = ATH_SHORT_CALINTERVAL;
- static int ath_countrycode = CTRY_DEFAULT;    /* country code */
-@@ -547,7 +554,6 @@ ath_attach(u_int16_t devid, struct net_d
-       atomic_set(&sc->sc_txbuf_counter, 0);
--      ATH_INIT_TQUEUE(&sc->sc_rxtq,     ath_rx_tasklet,       dev);
-       ATH_INIT_TQUEUE(&sc->sc_txtq,     ath_tx_tasklet,       dev);
-       ATH_INIT_TQUEUE(&sc->sc_bmisstq,  ath_bmiss_tasklet,    dev);
-       ATH_INIT_TQUEUE(&sc->sc_bstucktq, ath_bstuck_tasklet,   dev);
-@@ -821,6 +827,12 @@ ath_attach(u_int16_t devid, struct net_d
-       dev->set_mac_address = ath_set_mac_address;
-       dev->change_mtu = ath_change_mtu;
-       dev->tx_queue_len = ATH_TXBUF - ATH_TXBUF_MGT_RESERVED;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
-+      netif_napi_add(dev, &sc->sc_napi, ath_rx_poll, 64);
-+#else
-+      dev->poll = ath_rx_poll;
-+      dev->weight = 64;
-+#endif
- #ifdef USE_HEADERLEN_RESV
-       dev->hard_header_len += sizeof(struct ieee80211_qosframe) +
-                               sizeof(struct llc) +
-@@ -2220,6 +2232,7 @@ ath_intr(int irq, void *dev_id, struct p
-               (status & HAL_INT_GLOBAL)       ? " HAL_INT_GLOBAL"     : ""
-               );
-+      sc->sc_isr = status;
-       status &= sc->sc_imask;                 /* discard unasked for bits */
-       /* As soon as we know we have a real interrupt we intend to service, 
-        * we will check to see if we need an initial hardware TSF reading. 
-@@ -2277,7 +2290,21 @@ ath_intr(int irq, void *dev_id, struct p
-               }
-               if (status & (HAL_INT_RX | HAL_INT_RXPHY)) {
-                       ath_uapsd_processtriggers(sc, hw_tsf);
--                      ATH_SCHEDULE_TQUEUE(&sc->sc_rxtq, &needmark);
-+                      sc->sc_isr &= ~HAL_INT_RX;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
-+                      if (netif_rx_schedule_prep(dev, &sc->sc_napi))
-+#else
-+                      if (netif_rx_schedule_prep(dev))
-+#endif
-+                      {
-+                              sc->sc_imask &= ~HAL_INT_RX;
-+                              ath_hal_intrset(ah, sc->sc_imask);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
-+                              __netif_rx_schedule(dev, &sc->sc_napi);
-+#else
-+                              __netif_rx_schedule(dev);
-+#endif
-+                      }
-               }
-               if (status & HAL_INT_TX) {
- #ifdef ATH_SUPERG_DYNTURBO
-@@ -2303,6 +2330,11 @@ ath_intr(int irq, void *dev_id, struct p
-                               }
-                       }
- #endif
-+                      /* disable transmit interrupt */
-+                      sc->sc_isr &= ~HAL_INT_TX;
-+                      ath_hal_intrset(ah, sc->sc_imask & ~HAL_INT_TX);
-+                      sc->sc_imask &= ~HAL_INT_TX;
-+
-                       ATH_SCHEDULE_TQUEUE(&sc->sc_txtq, &needmark);
-               }
-               if (status & HAL_INT_BMISS) {
-@@ -2515,6 +2547,7 @@ ath_init(struct net_device *dev)
-       if (sc->sc_tx99 != NULL)
-               sc->sc_tx99->start(sc->sc_tx99);
- #endif
-+      ath_poll_enable(dev);
- done:
-       ATH_UNLOCK(sc);
-@@ -2555,6 +2588,9 @@ ath_stop_locked(struct net_device *dev)
-               if (sc->sc_tx99 != NULL)
-                       sc->sc_tx99->stop(sc->sc_tx99);
- #endif
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
-+              ath_poll_disable(dev);
-+#endif
-               netif_stop_queue(dev);  /* XXX re-enabled by ath_newstate */
-               dev->flags &= ~IFF_RUNNING;     /* NB: avoid recursion */
-               ieee80211_stop_running(ic);     /* stop all VAPs */
-@@ -4013,12 +4049,47 @@ ath_key_set(struct ieee80211vap *vap, co
-       return ath_keyset(sc, k, mac, vap->iv_bss);
- }
-+static void ath_poll_disable(struct net_device *dev)
-+{
-+      struct ath_softc *sc = dev->priv;
-+
-+      /*
-+       * XXX Using in_softirq is not right since we might
-+       * be called from other soft irq contexts than
-+       * ath_rx_poll
-+       */
-+      if (!in_softirq()) {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
-+              napi_disable(&sc->sc_napi);
-+#else
-+              netif_poll_disable(dev);
-+#endif
-+      }
-+}
-+
-+static void ath_poll_enable(struct net_device *dev)
-+{
-+      struct ath_softc *sc = dev->priv;
-+
-+      /* NB: see above */
-+      if (!in_softirq()) {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
-+              napi_enable(&sc->sc_napi);
-+#else
-+              netif_poll_enable(dev);
-+#endif
-+      }
-+}
-+
-+
- /*
-  * Block/unblock tx+rx processing while a key change is done.
-  * We assume the caller serializes key management operations
-  * so we only need to worry about synchronization with other
-  * uses that originate in the driver.
-  */
-+#define       IS_UP(_dev) \
-+      (((_dev)->flags & (IFF_RUNNING|IFF_UP)) == (IFF_RUNNING|IFF_UP))
- static void
- ath_key_update_begin(struct ieee80211vap *vap)
- {
-@@ -4032,14 +4103,9 @@ ath_key_update_begin(struct ieee80211vap
-        * When called from the rx tasklet we cannot use
-        * tasklet_disable because it will block waiting
-        * for us to complete execution.
--       *
--       * XXX Using in_softirq is not right since we might
--       * be called from other soft irq contexts than
--       * ath_rx_tasklet.
-        */
--      if (!in_softirq())
--              tasklet_disable(&sc->sc_rxtq);
--      netif_stop_queue(dev);
-+      if (IS_UP(vap->iv_dev))
-+              netif_stop_queue(dev);
- }
- static void
-@@ -4051,9 +4117,9 @@ ath_key_update_end(struct ieee80211vap *
- #endif
-       DPRINTF(sc, ATH_DEBUG_KEYCACHE, "End\n");
--      netif_wake_queue(dev);
--      if (!in_softirq())              /* NB: see above */
--              tasklet_enable(&sc->sc_rxtq);
-+
-+      if (IS_UP(vap->iv_dev))
-+              netif_wake_queue(dev);
- }
- /*
-@@ -6360,15 +6426,25 @@ ath_setdefantenna(struct ath_softc *sc,
-       sc->sc_rxotherant = 0;
- }
--static void
--ath_rx_tasklet(TQUEUE_ARG data)
-+static int
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
-+ath_rx_poll(struct napi_struct *napi, int budget)
-+#else
-+ath_rx_poll(struct net_device *dev, int *budget)
-+#endif
- {
- #define       PA2DESC(_sc, _pa) \
-       ((struct ath_desc *)((caddr_t)(_sc)->sc_rxdma.dd_desc + \
-               ((_pa) - (_sc)->sc_rxdma.dd_desc_paddr)))
--      struct net_device *dev = (struct net_device *)data;
--      struct ath_buf *bf;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
-+      struct ath_softc *sc = container_of(napi, struct ath_softc, sc_napi);
-+      struct net_device *dev = sc->sc_dev;
-+      u_int rx_limit = budget;
-+#else
-       struct ath_softc *sc = dev->priv;
-+      u_int rx_limit = min(dev->quota, *budget);
-+#endif
-+      struct ath_buf *bf;
-       struct ieee80211com *ic = &sc->sc_ic;
-       struct ath_hal *ah = sc ? sc->sc_ah : NULL;
-       struct ath_desc *ds;
-@@ -6378,8 +6454,10 @@ ath_rx_tasklet(TQUEUE_ARG data)
-       unsigned int len;
-       int type;
-       u_int phyerr;
-+      u_int processed = 0, early_stop = 0;
-       DPRINTF(sc, ATH_DEBUG_RX_PROC, "invoked\n");
-+process_rx_again:
-       do {
-               bf = STAILQ_FIRST(&sc->sc_rxbuf);
-               if (bf == NULL) {               /* XXX ??? can this happen */
-@@ -6403,6 +6481,15 @@ ath_rx_tasklet(TQUEUE_ARG data)
-                       /* NB: never process the self-linked entry at the end */
-                       break;
-               }
-+
-+              if (rx_limit-- < 2) {
-+                      early_stop = 1;
-+                      break;
-+              }
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
-+              processed++;
-+#endif
-+
-               skb = bf->bf_skb;
-               if (skb == NULL) {
-                       EPRINTF(sc, "Dropping; buffer contains NULL skbuff.\n");
-@@ -6450,6 +6537,7 @@ ath_rx_tasklet(TQUEUE_ARG data)
-                               sc->sc_stats.ast_rx_phyerr++;
-                               phyerr = rs->rs_phyerr & 0x1f;
-                               sc->sc_stats.ast_rx_phy[phyerr]++;
-+                              goto rx_next;
-                       }
-                       if (rs->rs_status & HAL_RXERR_DECRYPT) {
-                               /*
-@@ -6645,9 +6733,39 @@ rx_next:
-               STAILQ_INSERT_TAIL(&sc->sc_rxbuf, bf, bf_list);
-               ATH_RXBUF_UNLOCK_IRQ(sc);
-       } while (ath_rxbuf_init(sc, bf) == 0);
-+      if (!early_stop) {
-+              unsigned long flags;
-+              /* Check if more data is received while we were
-+               * processing the descriptor chain.
-+               */
-+              local_irq_save(flags);
-+              if (sc->sc_isr & HAL_INT_RX) {
-+                      u_int64_t hw_tsf = ath_hal_gettsf64(ah);
-+                      sc->sc_isr &= ~HAL_INT_RX;
-+                      local_irq_restore(flags);
-+                      ath_uapsd_processtriggers(sc, hw_tsf);
-+                      goto process_rx_again;
-+              }
-+              local_irq_restore(flags);
-+      }
-+
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
-+      netif_rx_complete(dev, napi);
-+#else
-+      netif_rx_complete(dev);
-+      *budget -= processed;
-+      dev->quota -= processed;
-+#endif
-+      sc->sc_imask |= HAL_INT_RX;
-+      ath_hal_intrset(ah, sc->sc_imask);
-       /* rx signal state monitoring */
-       ath_hal_rxmonitor(ah, &sc->sc_halstats, &sc->sc_curchan);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
-+      return processed;
-+#else
-+      return early_stop;
-+#endif
- #undef PA2DESC
- }
-@@ -8298,12 +8416,24 @@ ath_tx_tasklet_q0(TQUEUE_ARG data)
- {
-       struct net_device *dev = (struct net_device *)data;
-       struct ath_softc *sc = dev->priv;
-+      unsigned long flags;
-+process_tx_again:
-       if (txqactive(sc->sc_ah, 0))
-               ath_tx_processq(sc, &sc->sc_txq[0]);
-       if (txqactive(sc->sc_ah, sc->sc_cabq->axq_qnum))
-               ath_tx_processq(sc, sc->sc_cabq);
-+      local_irq_save(flags);
-+      if (sc->sc_isr & HAL_INT_TX) {
-+              sc->sc_isr &= ~HAL_INT_TX;
-+              local_irq_restore(flags);
-+              goto process_tx_again;
-+      }
-+      sc->sc_imask |= HAL_INT_TX;
-+      ath_hal_intrset(sc->sc_ah, sc->sc_imask);
-+      local_irq_restore(flags);
-+
-       netif_wake_queue(dev);
-       if (sc->sc_softled)
-@@ -8319,7 +8449,9 @@ ath_tx_tasklet_q0123(TQUEUE_ARG data)
- {
-       struct net_device *dev = (struct net_device *)data;
-       struct ath_softc *sc = dev->priv;
-+      unsigned long flags;
-+process_tx_again:
-       /*
-        * Process each active queue.
-        */
-@@ -8340,6 +8472,16 @@ ath_tx_tasklet_q0123(TQUEUE_ARG data)
-       if (sc->sc_uapsdq && txqactive(sc->sc_ah, sc->sc_uapsdq->axq_qnum))
-               ath_tx_processq(sc, sc->sc_uapsdq);
-+      local_irq_save(flags);
-+      if (sc->sc_isr & HAL_INT_TX) {
-+              sc->sc_isr &= ~HAL_INT_TX;
-+              local_irq_restore(flags);
-+              goto process_tx_again;
-+      }
-+      sc->sc_imask |= HAL_INT_TX;
-+      ath_hal_intrset(sc->sc_ah, sc->sc_imask);
-+      local_irq_restore(flags);
-+
-       netif_wake_queue(dev);
-       if (sc->sc_softled)
-@@ -8355,13 +8497,25 @@ ath_tx_tasklet(TQUEUE_ARG data)
-       struct net_device *dev = (struct net_device *)data;
-       struct ath_softc *sc = dev->priv;
-       unsigned int i;
-+      unsigned long flags;
-       /* Process each active queue. This includes sc_cabq, sc_xrtq and
-        * sc_uapsdq */
-+process_tx_again:
-       for (i = 0; i < HAL_NUM_TX_QUEUES; i++)
-               if (ATH_TXQ_SETUP(sc, i) && txqactive(sc->sc_ah, i))
-                       ath_tx_processq(sc, &sc->sc_txq[i]);
-+      local_irq_save(flags);
-+      if (sc->sc_isr & HAL_INT_TX) {
-+              sc->sc_isr &= ~HAL_INT_TX;
-+              local_irq_restore(flags);
-+              goto process_tx_again;
-+      }
-+      sc->sc_imask |= HAL_INT_TX;
-+      ath_hal_intrset(sc->sc_ah, sc->sc_imask);
-+      local_irq_restore(flags);
-+
-       netif_wake_queue(dev);
-       if (sc->sc_softled)
-@@ -10296,9 +10450,9 @@ ath_change_mtu(struct net_device *dev, i
-       dev->mtu = mtu;
-       if ((dev->flags & IFF_RUNNING) && !sc->sc_invalid) {
-               /* NB: the rx buffers may need to be reallocated */
--              tasklet_disable(&sc->sc_rxtq);
-+              ath_poll_disable(dev);
-               error = ath_reset(dev);
--              tasklet_enable(&sc->sc_rxtq);
-+              ath_poll_enable(dev);
-       }
-       ATH_UNLOCK(sc);
---- a/ath/if_athvar.h
-+++ b/ath/if_athvar.h
-@@ -53,6 +53,10 @@
- # include     <asm/bitops.h>
- #endif
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
-+#define irqs_disabled()                       0
-+#endif
-+
- /*
-  * Deduce if tasklets are available.  If not then
-  * fall back to using the immediate work queue.
-@@ -616,6 +620,9 @@ struct ath_rp {
- struct ath_softc {
-       struct ieee80211com sc_ic;              /* NB: must be first */
-       struct net_device *sc_dev;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
-+      struct napi_struct sc_napi;
-+#endif
-       void __iomem *sc_iobase;                /* address of the device */
-       struct semaphore sc_lock;               /* dev-level lock */
-       struct net_device_stats sc_devstats;    /* device statistics */
-@@ -730,7 +737,6 @@ struct ath_softc {
-       struct ath_buf *sc_rxbufcur;            /* current rx buffer */
-       u_int32_t *sc_rxlink;                   /* link ptr in last RX desc */
-       spinlock_t sc_rxbuflock;
--      struct ATH_TQ_STRUCT sc_rxtq;           /* rx intr tasklet */
-       struct ATH_TQ_STRUCT sc_rxorntq;        /* rxorn intr tasklet */
-       u_int8_t sc_defant;                     /* current default antenna */
-       u_int8_t sc_rxotherant;                 /* RXs on non-default antenna */
-@@ -745,6 +751,7 @@ struct ath_softc {
-       u_int sc_txintrperiod;                  /* tx interrupt batching */
-       struct ath_txq sc_txq[HAL_NUM_TX_QUEUES];
-       struct ath_txq *sc_ac2q[WME_NUM_AC];    /* WME AC -> h/w qnum */
-+      HAL_INT sc_isr;                         /* unmasked ISR state */
-       struct ATH_TQ_STRUCT sc_txtq;           /* tx intr tasklet */
-       u_int8_t sc_grppoll_str[GRPPOLL_RATE_STR_LEN];
-       struct ath_descdma sc_bdma;             /* beacon descriptors */
-@@ -858,6 +865,8 @@ typedef void (*ath_callback) (struct ath
- #define       ATH_TXBUF_LOCK_CHECK(_sc)
- #endif
-+#define ATH_DISABLE_INTR              local_irq_disable
-+#define ATH_ENABLE_INTR               local_irq_enable
- #define       ATH_RXBUF_LOCK_INIT(_sc)        spin_lock_init(&(_sc)->sc_rxbuflock)
- #define       ATH_RXBUF_LOCK_DESTROY(_sc)
---- a/net80211/ieee80211_input.c
-+++ b/net80211/ieee80211_input.c
-@@ -1198,7 +1198,7 @@ ieee80211_deliver_data(struct ieee80211_
-                       /* attach vlan tag */
-                       struct ieee80211_node *ni_tmp = SKB_CB(skb)->ni;
-                       if (vlan_hwaccel_receive_skb(skb, vap->iv_vlgrp, ni->ni_vlan) == NET_RX_DROP) {
--                              /* If netif_rx dropped the packet because 
-+                              /* If netif_receive_skb dropped the packet because
-                                * device was too busy */
-                               if (ni_tmp != NULL) {
-                                       /* node reference was leaked */
-@@ -1209,8 +1209,8 @@ ieee80211_deliver_data(struct ieee80211_
-                       skb = NULL; /* SKB is no longer ours */
-               } else {
-                       struct ieee80211_node *ni_tmp = SKB_CB(skb)->ni;
--                      if (netif_rx(skb) == NET_RX_DROP) {
--                              /* If netif_rx dropped the packet because 
-+                      if (netif_receive_skb(skb) == NET_RX_DROP) {
-+                              /* If netif_receive_skb dropped the packet because
-                                * device was too busy */
-                               if (ni_tmp != NULL) {
-                                       /* node reference was leaked */
-@@ -2322,8 +2322,8 @@ forward_mgmt_to_app(struct ieee80211vap
-               skb1->protocol = __constant_htons(0x0019);  /* ETH_P_80211_RAW */
-               ni_tmp = SKB_CB(skb1)->ni;
--              if (netif_rx(skb1) == NET_RX_DROP) {
--                      /* If netif_rx dropped the packet because 
-+              if (netif_receive_skb(skb1) == NET_RX_DROP) {
-+                      /* If netif_receive_skb dropped the packet because
-                        * device was too busy */
-                       if (ni_tmp != NULL) {
-                               /* node reference was leaked */
---- a/net80211/ieee80211_monitor.c
-+++ b/net80211/ieee80211_monitor.c
-@@ -584,8 +584,8 @@ ieee80211_input_monitor(struct ieee80211
-                       skb1->protocol = 
-                               __constant_htons(0x0019); /* ETH_P_80211_RAW */
--                      if (netif_rx(skb1) == NET_RX_DROP) {
--                              /* If netif_rx dropped the packet because 
-+                      if (netif_receive_skb(skb1) == NET_RX_DROP) {
-+                              /* If netif_receive_skb dropped the packet because
-                                * device was too busy, reclaim the ref. in 
-                                * the skb. */
-                               if (SKB_CB(skb1)->ni != NULL)
---- a/net80211/ieee80211_skb.c
-+++ b/net80211/ieee80211_skb.c
-@@ -73,7 +73,7 @@
- #undef dev_queue_xmit
- #undef kfree_skb
- #undef kfree_skb_fast
--#undef netif_rx
-+#undef netif_receive_skb
- #undef pskb_copy
- #undef skb_clone
- #undef skb_copy
-@@ -638,8 +638,8 @@ int  vlan_hwaccel_receive_skb_debug(stru
-               grp, vlan_tag);
- }
--int netif_rx_debug(struct sk_buff *skb, const char* func, int line) {
--      return netif_rx(untrack_skb(skb, 0, func, line, __func__, __LINE__));
-+int netif_receive_skb_debug(struct sk_buff *skb, const char* func, int line) {
-+      return netif_receive_skb(untrack_skb(skb, 0, func, line, __func__, __LINE__));
- }
- struct sk_buff * alloc_skb_debug(unsigned int length, gfp_t gfp_mask,
-@@ -760,7 +760,7 @@ struct sk_buff * skb_copy_expand_debug(c
- }
- EXPORT_SYMBOL(vlan_hwaccel_receive_skb_debug);
--EXPORT_SYMBOL(netif_rx_debug);
-+EXPORT_SYMBOL(netif_receive_skb_debug);
- EXPORT_SYMBOL(alloc_skb_debug);
- EXPORT_SYMBOL(dev_alloc_skb_debug);
- EXPORT_SYMBOL(skb_clone_debug);
---- a/net80211/ieee80211_skb.h
-+++ b/net80211/ieee80211_skb.h
-@@ -116,7 +116,7 @@ int ieee80211_skb_references(void);
- int  vlan_hwaccel_receive_skb_debug(struct sk_buff *skb, 
-                                   struct vlan_group *grp, unsigned short vlan_tag, 
-                                   const char* func, int line);
--int netif_rx_debug(struct sk_buff *skb, const char* func, int line);
-+int netif_receive_skb_debug(struct sk_buff *skb, const char* func, int line);
- struct sk_buff * alloc_skb_debug(unsigned int length, gfp_t gfp_mask,
-                                const char *func, int line);
- struct sk_buff * dev_alloc_skb_debug(unsigned int length,
-@@ -151,7 +151,7 @@ struct sk_buff * skb_copy_expand_debug(c
- #undef dev_queue_xmit
- #undef kfree_skb
- #undef kfree_skb_fast
--#undef netif_rx
-+#undef netif_receive_skb
- #undef pskb_copy
- #undef skb_clone
- #undef skb_copy
-@@ -168,8 +168,8 @@ struct sk_buff * skb_copy_expand_debug(c
-       skb_copy_expand_debug(_skb, _newheadroom, _newtailroom, _gfp_mask, __func__, __LINE__)
- #define vlan_hwaccel_receive_skb(_skb, _grp, _tag) \
-       vlan_hwaccel_receive_skb_debug(_skb, _grp, _tag, __func__, __LINE__)
--#define netif_rx(_skb) \
--      netif_rx_debug(_skb, __func__, __LINE__)
-+#define netif_receive_skb(_skb) \
-+      netif_receive_skb_debug(_skb, __func__, __LINE__)
- #define       alloc_skb(_length, _gfp_mask) \
-       alloc_skb_debug(_length, _gfp_mask, __func__, __LINE__)
- #define       dev_alloc_skb(_length) \
diff --git a/package/madwifi/patches/305-pureg_fix.patch b/package/madwifi/patches/305-pureg_fix.patch
deleted file mode 100644 (file)
index 8adb8a7..0000000
+++ /dev/null
@@ -1,168 +0,0 @@
---- a/ath/if_ath.c
-+++ b/ath/if_ath.c
-@@ -4158,7 +4158,9 @@ ath_calcrxfilter(struct ath_softc *sc)
-               rfilt |= HAL_RX_FILTER_PROM;
-       if (ic->ic_opmode == IEEE80211_M_STA ||
-           sc->sc_opmode == HAL_M_IBSS ||      /* NB: AHDEMO too */
--          (sc->sc_nostabeacons) || sc->sc_scanning)
-+          (sc->sc_nostabeacons) || sc->sc_scanning ||
-+              ((ic->ic_opmode == IEEE80211_M_HOSTAP) &&
-+               (ic->ic_protmode != IEEE80211_PROT_NONE)))
-               rfilt |= HAL_RX_FILTER_BEACON;
-       if (sc->sc_nmonvaps > 0)
-               rfilt |= (HAL_RX_FILTER_CONTROL | HAL_RX_FILTER_BEACON |
---- a/net80211/ieee80211_input.c
-+++ b/net80211/ieee80211_input.c
-@@ -346,11 +346,12 @@ ieee80211_input(struct ieee80211vap * va
-                               bssid = wh->i_addr3;
-                       }
-                       /*
--                       * Validate the bssid.
-+                       * Validate the bssid. Let beacons get through though for 11g protection mode.
-                        */
--#ifdef ATH_SUPERG_XR
-                       if (!IEEE80211_ADDR_EQ(bssid, vap->iv_bssid) &&
--                          !IEEE80211_ADDR_EQ(bssid, dev->broadcast)) {
-+                          !IEEE80211_ADDR_EQ(bssid, dev->broadcast) &&
-+                              (subtype != IEEE80211_FC0_SUBTYPE_BEACON)) {
-+#ifdef ATH_SUPERG_XR
-                               /*
-                                * allow MGT frames to vap->iv_xrvap.
-                                * this will allow roaming between  XR and normal vaps
-@@ -366,18 +367,14 @@ ieee80211_input(struct ieee80211vap * va
-                                       vap->iv_stats.is_rx_wrongbss++;
-                                       goto out;
-                               }
--                      }
- #else
--                      if (!IEEE80211_ADDR_EQ(bssid, vap->iv_bssid) &&
--                          !IEEE80211_ADDR_EQ(bssid, dev->broadcast)) {
-                               /* not interested in */
-                               IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_INPUT,
-                                       bssid, NULL, "%s", "not to bss");
-                               vap->iv_stats.is_rx_wrongbss++;
-                               goto out;
--                      }
--
- #endif
-+                      }
-                       break;
-               case IEEE80211_M_WDS:
-                       if (skb->len < sizeof(struct ieee80211_frame_addr4)) {
-@@ -3066,7 +3063,7 @@ ieee80211_recv_mgmt(struct ieee80211vap
-       u_int8_t *frm, *efrm;
-       u_int8_t *ssid, *rates, *xrates, *suppchan, *wpa, *rsn, *wme, *ath;
-       u_int8_t rate;
--      int reassoc, resp, allocbs = 0;
-+      int reassoc, resp, allocbs = 0, has_erp = 0;
-       u_int8_t qosinfo;
-       if (ni_or_null == NULL)
-@@ -3096,11 +3093,15 @@ ieee80211_recv_mgmt(struct ieee80211vap
-                *    o station mode when associated (to collect state
-                *      updates such as 802.11g slot time), or
-                *    o adhoc mode (to discover neighbors)
-+               *    o ap mode in protection mode (beacons only)
-                * Frames otherwise received are discarded.
-                */
-               if (!((ic->ic_flags & IEEE80211_F_SCAN) ||
-                   (vap->iv_opmode == IEEE80211_M_STA && ni->ni_associd) ||
--                  vap->iv_opmode == IEEE80211_M_IBSS)) {
-+                  (vap->iv_opmode == IEEE80211_M_IBSS) ||
-+                      ((subtype == IEEE80211_FC0_SUBTYPE_BEACON) &&
-+                       (vap->iv_opmode == IEEE80211_M_HOSTAP) &&
-+                       (ic->ic_protmode != IEEE80211_PROT_NONE)))) {
-                       vap->iv_stats.is_rx_mgtdiscard++;
-                       return;
-               }
-@@ -3184,6 +3185,7 @@ ieee80211_recv_mgmt(struct ieee80211vap
-                                       break;
-                               }
-                               scan.erp = frm[2];
-+                              has_erp = 1;
-                               break;
-                       case IEEE80211_ELEMID_RSN:
-                               scan.rsn = frm;
-@@ -3421,6 +3423,20 @@ ieee80211_recv_mgmt(struct ieee80211vap
-                               ieee80211_bg_scan(vap);
-                       return;
-               }
-+
-+              /* Update AP protection mode when in 11G mode */
-+              if ((vap->iv_opmode == IEEE80211_M_HOSTAP) &&
-+                      IEEE80211_IS_CHAN_ANYG(ic->ic_curchan)) {
-+
-+                      /* Assume no ERP IE == 11b AP */
-+                      if ((!has_erp || (has_erp && (scan.erp & IEEE80211_ERP_NON_ERP_PRESENT))) &&
-+                              !(ic->ic_flags & IEEE80211_F_USEPROT)) {
-+
-+                              ic->ic_flags |= IEEE80211_F_USEPROT;
-+                              ic->ic_flags_ext |= IEEE80211_FEXT_ERPUPDATE;
-+                      }
-+              }
-+
-               /*
-                * If scanning, just pass information to the scan module.
-                */
---- a/net80211/ieee80211_node.c
-+++ b/net80211/ieee80211_node.c
-@@ -383,10 +383,16 @@ ieee80211_create_ibss(struct ieee80211va
-       /* Update country ie information */
-       ieee80211_build_countryie(ic);
--      if (IEEE80211_IS_CHAN_HALF(chan))
-+      if (IEEE80211_IS_CHAN_HALF(chan)) {
-               ni->ni_rates = ic->ic_sup_half_rates;
--      else if (IEEE80211_IS_CHAN_QUARTER(chan))
-+      } else if (IEEE80211_IS_CHAN_QUARTER(chan)) {
-               ni->ni_rates = ic->ic_sup_quarter_rates;
-+      }
-+
-+      if ((vap->iv_flags & IEEE80211_F_PUREG) &&
-+              IEEE80211_IS_CHAN_ANYG(chan)) {
-+              ieee80211_setpuregbasicrates(&ni->ni_rates);
-+      }
-       (void) ieee80211_sta_join1(PASS_NODE(ni));
- }
---- a/net80211/ieee80211_proto.c
-+++ b/net80211/ieee80211_proto.c
-@@ -595,6 +595,28 @@ static const struct ieee80211_rateset ba
-       { 4, { 2, 4, 11, 22 } },        /* IEEE80211_MODE_TURBO_G (mixed b/g) */
- };
-+static const struct ieee80211_rateset basicpureg[] = {
-+    { 7, {2, 4, 11, 22, 12, 24, 48 } },
-+};
-+
-+/*
-+ * Mark basic rates for the 11g rate table based on the pureg setting
-+ */
-+void
-+ieee80211_setpuregbasicrates(struct ieee80211_rateset *rs)
-+{
-+      int i, j;
-+
-+      for (i = 0; i < rs->rs_nrates; i++) {
-+              rs->rs_rates[i] &= IEEE80211_RATE_VAL;
-+              for (j = 0; j < basicpureg[0].rs_nrates; j++)
-+                      if (basicpureg[0].rs_rates[j] == rs->rs_rates[i]) {
-+                              rs->rs_rates[i] |= IEEE80211_RATE_BASIC;
-+                              break;
-+                      }
-+      }
-+}
-+
- /*
-  * Mark the basic rates for the 11g rate table based on the
-  * specified mode.  For 11b compatibility we mark only 11b
---- a/net80211/ieee80211_var.h
-+++ b/net80211/ieee80211_var.h
-@@ -708,6 +708,7 @@ int ieee80211_media_setup(struct ieee802
- void ieee80211_build_sc_ie(struct ieee80211com *);
- void ieee80211_dfs_action(struct ieee80211com *);
- void ieee80211_expire_channel_excl_restrictions(struct ieee80211com *);
-+void ieee80211_setpuregbasicrates(struct ieee80211_rateset *rs);
- /*
-  * Iterate through ic_channels to enumerate all distinct ic_ieee channel numbers.
diff --git a/package/madwifi/patches/309-micfail_detect.patch b/package/madwifi/patches/309-micfail_detect.patch
deleted file mode 100644 (file)
index ca4103a..0000000
+++ /dev/null
@@ -1,321 +0,0 @@
---- a/ath/if_ath.c
-+++ b/ath/if_ath.c
-@@ -6457,6 +6457,7 @@ ath_rx_poll(struct net_device *dev, int
-       int type;
-       u_int phyerr;
-       u_int processed = 0, early_stop = 0;
-+      u_int mic_fail = 0;
-       DPRINTF(sc, ATH_DEBUG_RX_PROC, "invoked\n");
- process_rx_again:
-@@ -6558,24 +6559,8 @@ process_rx_again:
-                       }
-                       if (rs->rs_status & HAL_RXERR_MIC) {
-                               sc->sc_stats.ast_rx_badmic++;
--                              /*
--                               * Do minimal work required to hand off
--                               * the 802.11 header for notification.
--                               */
--                              /* XXX frag's and QoS frames */
--                              if (len >= sizeof (struct ieee80211_frame)) {
--                                      bus_dma_sync_single(sc->sc_bdev,
--                                          bf->bf_skbaddr, len,
--                                          BUS_DMA_FROMDEVICE);
--#if 0
--/* XXX revalidate MIC, lookup ni to find VAP */
--                                      ieee80211_notify_michael_failure(ic,
--                                          (struct ieee80211_frame *)skb->data,
--                                          sc->sc_splitmic ?
--                                              rs->rs_keyix - 32 : rs->rs_keyix
--                                      );
--#endif
--                              }
-+                              mic_fail = 1;
-+                              goto rx_accept;
-                       }
-                       /*
-                        * Reject error frames if we have no vaps that
-@@ -6614,8 +6599,9 @@ rx_accept:
-               /*
-                * Finished monitor mode handling, now reject
-                * error frames before passing to other vaps
-+               * Ignore MIC failures here, as we need to recheck them
-                */
--              if (rs->rs_status != 0) {
-+              if (rs->rs_status & ~(HAL_RXERR_MIC | HAL_RXERR_DECRYPT)) {
-                       ieee80211_dev_kfree_skb(&skb);
-                       goto rx_next;
-               }
-@@ -6623,6 +6609,26 @@ rx_accept:
-               /* remove the CRC */
-               skb_trim(skb, skb->len - IEEE80211_CRC_LEN);
-+              if (mic_fail) {
-+                      /* Ignore control frames which are reported with mic error */
-+                  if ((((struct ieee80211_frame *)skb->data)->i_fc[0] &
-+                                      IEEE80211_FC0_TYPE_MASK) == IEEE80211_FC0_TYPE_CTL)
-+                              goto drop_micfail;
-+
-+                      ni = ieee80211_find_rxnode(ic, (const struct ieee80211_frame_min *) skb->data);
-+
-+                      if (ni && ni->ni_table) {
-+                              ieee80211_check_mic(ni, skb);
-+                              ieee80211_unref_node(&ni);
-+                      }
-+
-+drop_micfail:
-+                      dev_kfree_skb_any(skb);
-+                      skb = NULL;
-+                      mic_fail = 0;
-+                      goto rx_next;
-+              }
-+
-               /*
-                * From this point on we assume the frame is at least
-                * as large as ieee80211_frame_min; verify that.
-@@ -6635,6 +6641,7 @@ rx_accept:
-                       goto rx_next;
-               }
-+              /* MIC failure. Drop the packet in any case */
-               /*
-                * Normal receive.
-                */
---- a/net80211/ieee80211_crypto_ccmp.c
-+++ b/net80211/ieee80211_crypto_ccmp.c
-@@ -73,7 +73,7 @@ static int ccmp_setkey(struct ieee80211_
- static int ccmp_encap(struct ieee80211_key *, struct sk_buff *, u_int8_t);
- static int ccmp_decap(struct ieee80211_key *, struct sk_buff *, int);
- static int ccmp_enmic(struct ieee80211_key *, struct sk_buff *, int);
--static int ccmp_demic(struct ieee80211_key *, struct sk_buff *, int);
-+static int ccmp_demic(struct ieee80211_key *, struct sk_buff *, int, int);
- static const struct ieee80211_cipher ccmp = {
-       .ic_name        = "AES-CCM",
-@@ -314,7 +314,7 @@ ccmp_decap(struct ieee80211_key *k, stru
-  * Verify and strip MIC from the frame.
-  */
- static int
--ccmp_demic(struct ieee80211_key *k, struct sk_buff *skb, int hdrlen)
-+ccmp_demic(struct ieee80211_key *k, struct sk_buff *skb, int hdrlen, int force)
- {
-       return 1;
- }
---- a/net80211/ieee80211_crypto.h
-+++ b/net80211/ieee80211_crypto.h
-@@ -145,7 +145,7 @@ struct ieee80211_cipher {
-       int (*ic_encap)(struct ieee80211_key *, struct sk_buff *, u_int8_t);
-       int (*ic_decap)(struct ieee80211_key *, struct sk_buff *, int);
-       int (*ic_enmic)(struct ieee80211_key *, struct sk_buff *, int);
--      int (*ic_demic)(struct ieee80211_key *, struct sk_buff *, int);
-+      int (*ic_demic)(struct ieee80211_key *, struct sk_buff *, int, int);
- };
- extern const struct ieee80211_cipher ieee80211_cipher_none;
-@@ -163,10 +163,10 @@ struct ieee80211_key *ieee80211_crypto_d
-  */
- static __inline int
- ieee80211_crypto_demic(struct ieee80211vap *vap, struct ieee80211_key *k,
--      struct sk_buff *skb, int hdrlen)
-+      struct sk_buff *skb, int hdrlen, int force)
- {
-       const struct ieee80211_cipher *cip = k->wk_cipher;
--      return (cip->ic_miclen > 0 ? cip->ic_demic(k, skb, hdrlen) : 1);
-+      return (cip->ic_miclen > 0 ? cip->ic_demic(k, skb, hdrlen, force) : 1);
- }
- /*
---- a/net80211/ieee80211_crypto_none.c
-+++ b/net80211/ieee80211_crypto_none.c
-@@ -52,7 +52,7 @@ static int none_setkey(struct ieee80211_
- static int none_encap(struct ieee80211_key *, struct sk_buff *, u_int8_t);
- static int none_decap(struct ieee80211_key *, struct sk_buff *, int);
- static int none_enmic(struct ieee80211_key *, struct sk_buff *, int);
--static int none_demic(struct ieee80211_key *, struct sk_buff *, int);
-+static int none_demic(struct ieee80211_key *, struct sk_buff *, int, int);
- const struct ieee80211_cipher ieee80211_cipher_none = {
-       .ic_name        = "NONE",
-@@ -137,7 +137,7 @@ none_enmic(struct ieee80211_key *k, stru
- }
- static int
--none_demic(struct ieee80211_key *k, struct sk_buff *skb, int hdrlen)
-+none_demic(struct ieee80211_key *k, struct sk_buff *skb, int hdrlen, int force)
- {
-       struct ieee80211vap *vap = k->wk_private;
---- a/net80211/ieee80211_crypto_tkip.c
-+++ b/net80211/ieee80211_crypto_tkip.c
-@@ -57,7 +57,7 @@ static int tkip_setkey(struct ieee80211_
- static int tkip_encap(struct ieee80211_key *, struct sk_buff *, u_int8_t);
- static int tkip_enmic(struct ieee80211_key *, struct sk_buff *, int);
- static int tkip_decap(struct ieee80211_key *, struct sk_buff *, int);
--static int tkip_demic(struct ieee80211_key *, struct sk_buff *, int);
-+static int tkip_demic(struct ieee80211_key *, struct sk_buff *, int, int);
- static const struct ieee80211_cipher tkip  = {
-       .ic_name        = "TKIP",
-@@ -339,7 +339,7 @@ tkip_decap(struct ieee80211_key *k, stru
-  * Verify and strip MIC from the frame.
-  */
- static int
--tkip_demic(struct ieee80211_key *k, struct sk_buff *skb0, int hdrlen)
-+tkip_demic(struct ieee80211_key *k, struct sk_buff *skb0, int hdrlen, int force)
- {
-       struct tkip_ctx *ctx = k->wk_private;
-       struct sk_buff *skb;
-@@ -355,7 +355,7 @@ tkip_demic(struct ieee80211_key *k, stru
-       }
-       wh = (struct ieee80211_frame *) skb0->data;
-       /* NB: skb left pointing at last in chain */
--      if (k->wk_flags & IEEE80211_KEY_SWMIC) {
-+      if ((k->wk_flags & IEEE80211_KEY_SWMIC) || force) {
-               struct ieee80211vap *vap = ctx->tc_vap;
-               u8 mic[IEEE80211_WEP_MICLEN];
-               u8 mic0[IEEE80211_WEP_MICLEN];
---- a/net80211/ieee80211_crypto_wep.c
-+++ b/net80211/ieee80211_crypto_wep.c
-@@ -54,7 +54,7 @@ static int wep_setkey(struct ieee80211_k
- static int wep_encap(struct ieee80211_key *, struct sk_buff *, u_int8_t);
- static int wep_decap(struct ieee80211_key *, struct sk_buff *, int);
- static int wep_enmic(struct ieee80211_key *, struct sk_buff *, int);
--static int wep_demic(struct ieee80211_key *, struct sk_buff *, int);
-+static int wep_demic(struct ieee80211_key *, struct sk_buff *, int, int);
- static const struct ieee80211_cipher wep = {
-       .ic_name        = "WEP",
-@@ -244,7 +244,7 @@ wep_decap(struct ieee80211_key *k, struc
-  * Verify and strip MIC from the frame.
-  */
- static int
--wep_demic(struct ieee80211_key *k, struct sk_buff *skb, int hdrlen)
-+wep_demic(struct ieee80211_key *k, struct sk_buff *skb, int hdrlen, int force)
- {
-       return 1;
- }
---- a/net80211/ieee80211_input.c
-+++ b/net80211/ieee80211_input.c
-@@ -669,7 +669,7 @@ ieee80211_input(struct ieee80211vap * va
-                * Next strip any MSDU crypto bits.
-                */
-               if (key != NULL &&
--                  !ieee80211_crypto_demic(vap, key, skb, hdrspace)) {
-+                  !ieee80211_crypto_demic(vap, key, skb, hdrspace, 0)) {
-                       IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_INPUT,
-                               ni->ni_macaddr, "data", "%s", "demic error");
-                       IEEE80211_NODE_STAT(ni, rx_demicfail);
-@@ -4293,6 +4293,47 @@ ath_eth_type_trans(struct sk_buff *skb,
- }
- #endif
-+/*
-+ * Process a frame w/ hw detected MIC failure.
-+ * The frame will be dropped in any case.
-+ */
-+void
-+ieee80211_check_mic(struct ieee80211_node *ni, struct sk_buff *skb)
-+{
-+      struct ieee80211vap *vap = ni->ni_vap;
-+
-+      struct ieee80211_frame *wh;
-+      struct ieee80211_key *key;
-+      int hdrspace;
-+      struct ieee80211com *ic = vap->iv_ic;
-+
-+      if (skb->len < sizeof(struct ieee80211_frame_min)) {
-+              IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_ANY,
-+                  ni->ni_macaddr, NULL,
-+                  "too short (1): len %u", skb->len);
-+              vap->iv_stats.is_rx_tooshort++;
-+              return;
-+      }
-+
-+      wh = (struct ieee80211_frame *)skb->data;
-+
-+      hdrspace = ieee80211_hdrspace(ic, wh);
-+      key = ieee80211_crypto_decap(ni, skb, hdrspace);
-+      if (key == NULL) {
-+              /* NB: stats+msgs handled in crypto_decap */
-+              IEEE80211_NODE_STAT(ni, rx_wepfail);
-+              return;
-+      }
-+
-+      if (!ieee80211_crypto_demic(vap, key, skb, hdrspace, 1)) {
-+              IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_INPUT,
-+                      ni->ni_macaddr, "data", "%s", "demic error");
-+                      IEEE80211_NODE_STAT(ni, rx_demicfail);
-+      }
-+      return;
-+}
-+EXPORT_SYMBOL(ieee80211_check_mic);
-+
- #ifdef IEEE80211_DEBUG
- /*
-  * Debugging support.
---- a/net80211/ieee80211_proto.h
-+++ b/net80211/ieee80211_proto.h
-@@ -90,6 +90,7 @@ int ieee80211_iserp_rateset(struct ieee8
- void ieee80211_set11gbasicrates(struct ieee80211_rateset *, enum ieee80211_phymode);
- enum ieee80211_phymode ieee80211_get11gbasicrates(struct ieee80211_rateset *);
- void ieee80211_send_pspoll(struct ieee80211_node *);
-+void ieee80211_check_mic(struct ieee80211_node *, struct sk_buff *);
- /*
-  * Return the size of the 802.11 header for a management or data frame.
---- a/net80211/ieee80211_linux.c
-+++ b/net80211/ieee80211_linux.c
-@@ -337,8 +337,8 @@ ieee80211_notify_replay_failure(struct i
-       /* TODO: needed parameters: count, keyid, key type, src address, TSC */
-       snprintf(buf, sizeof(buf), "%s(keyid=%d %scast addr=" MAC_FMT ")", tag,
-               k->wk_keyix,
--              IEEE80211_IS_MULTICAST(wh->i_addr1) ?  "broad" : "uni",
--              MAC_ADDR(wh->i_addr1));
-+              IEEE80211_IS_MULTICAST(wh->i_addr2) ?  "broad" : "uni",
-+              MAC_ADDR(wh->i_addr2));
-       memset(&wrqu, 0, sizeof(wrqu));
-       wrqu.data.length = strlen(buf);
-       wireless_send_event(dev, IWEVCUSTOM, &wrqu, buf);
---- a/net80211/ieee80211_output.c
-+++ b/net80211/ieee80211_output.c
-@@ -1074,13 +1074,16 @@ ieee80211_encap(struct ieee80211_node *n
-                       cip = (struct ieee80211_cipher *) key->wk_cipher;
-                       ciphdrsize = cip->ic_header;
-                       tailsize += (cip->ic_trailer + cip->ic_miclen);
-+
-+                      /* add the 8 bytes MIC length */
-+                      if (cip->ic_cipher == IEEE80211_CIPHER_TKIP)
-+                              pktlen += IEEE80211_WEP_MICLEN;
-               }
-               pdusize = vap->iv_fragthreshold - (hdrsize_nopad + ciphdrsize);
-               fragcnt = *framecnt =
--                      ((pktlen - (hdrsize_nopad + ciphdrsize)) / pdusize) +
--                      (((pktlen - (hdrsize_nopad + ciphdrsize)) %
--                              pdusize == 0) ? 0 : 1);
-+                      ((pktlen - hdrsize_nopad) / pdusize) +
-+                      (((pktlen - hdrsize_nopad) % pdusize == 0) ? 0 : 1);
-               /*
-                * Allocate sk_buff for each subsequent fragment; First fragment
---- a/net80211/ieee80211_node.c
-+++ b/net80211/ieee80211_node.c
-@@ -2264,11 +2264,13 @@ ieee80211_node_leave(struct ieee80211_no
-       /* From this point onwards we can no longer find the node,
-        * so no more references are generated
-        */
--      ieee80211_remove_wds_addr(nt, ni->ni_macaddr);
--      ieee80211_del_wds_node(nt, ni);
--      IEEE80211_NODE_TABLE_LOCK_IRQ(nt);
--      node_table_leave_locked(nt, ni);
--      IEEE80211_NODE_TABLE_UNLOCK_IRQ(nt);
-+      if (nt) {
-+              ieee80211_remove_wds_addr(nt, ni->ni_macaddr);
-+              ieee80211_del_wds_node(nt, ni);
-+              IEEE80211_NODE_TABLE_LOCK_IRQ(nt);
-+              node_table_leave_locked(nt, ni);
-+              IEEE80211_NODE_TABLE_UNLOCK_IRQ(nt);
-+      }
-       /*
-        * If node wasn't previously associated all
diff --git a/package/madwifi/patches/310-noise_get.patch b/package/madwifi/patches/310-noise_get.patch
deleted file mode 100644 (file)
index d882158..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
---- a/ath/if_ath.c
-+++ b/ath/if_ath.c
-@@ -1699,8 +1699,6 @@ ath_uapsd_processtriggers(struct ath_sof
-        * get to reality.  This value is used in monitor mode and by tools like
-        * Wireshark and Kismet.
-        */
--      ic->ic_channoise = ath_hal_get_channel_noise(ah, &(sc->sc_curchan));
--
-       ATH_RXBUF_LOCK_IRQ(sc);
-       if (sc->sc_rxbufcur == NULL)
-               sc->sc_rxbufcur = STAILQ_FIRST(&sc->sc_rxbuf);
-@@ -8975,6 +8973,7 @@ ath_calibrate(unsigned long arg)
-                       sc->sc_curchan.channel);
-               sc->sc_stats.ast_per_calfail++;
-       }
-+      ic->ic_channoise = ath_hal_get_channel_noise(ah, &(sc->sc_curchan));
-       ath_hal_process_noisefloor(ah);
-       if (isIQdone == AH_TRUE) {
-@@ -9043,6 +9042,7 @@ ath_set_channel(struct ieee80211com *ic)
-       struct ath_softc *sc = dev->priv;
-       (void) ath_chan_set(sc, ic->ic_curchan);
-+      ic->ic_channoise = ath_hal_get_channel_noise(sc->sc_ah, &(sc->sc_curchan));
-       /*
-        * If we are returning to our bss channel then mark state
-        * so the next recv'd beacon's TSF will be used to sync the
-@@ -9311,6 +9311,7 @@ ath_newstate(struct ieee80211vap *vap, e
-               }
-               ath_hal_process_noisefloor(ah);
-+              ic->ic_channoise = ath_hal_get_channel_noise(ah, &(sc->sc_curchan));
-               /*
-                * Reset rssi stats; maybe not the best place...
-                */
---- a/net80211/ieee80211_wireless.c
-+++ b/net80211/ieee80211_wireless.c
-@@ -4358,6 +4358,7 @@ get_sta_info(void *arg, struct ieee80211
-       si->isi_state = ni->ni_flags;
-       si->isi_authmode = ni->ni_authmode;
-       si->isi_rssi = ic->ic_node_getrssi(ni);
-+      si->isi_noise = ic->ic_channoise;
-       si->isi_capinfo = ni->ni_capinfo;
-       si->isi_athflags = ni->ni_ath_flags;
-       si->isi_erp = ni->ni_erp;
---- a/net80211/ieee80211_ioctl.h
-+++ b/net80211/ieee80211_ioctl.h
-@@ -311,6 +311,7 @@ struct ieee80211req_sta_info {
-       u_int16_t isi_state;            /* state flags */
-       u_int8_t isi_authmode;          /* authentication algorithm */
-       u_int8_t isi_rssi;
-+      int8_t isi_noise;
-       u_int16_t isi_capinfo;          /* capabilities */
-       u_int8_t isi_athflags;          /* Atheros capabilities */
-       u_int8_t isi_erp;               /* ERP element */
diff --git a/package/madwifi/patches/311-bssid_alloc.patch b/package/madwifi/patches/311-bssid_alloc.patch
deleted file mode 100644 (file)
index 005a677..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/ath/if_ath.c
-+++ b/ath/if_ath.c
-@@ -1354,7 +1354,7 @@ ath_vap_create(struct ieee80211com *ic,
-               TAILQ_FOREACH(v, &ic->ic_vaps, iv_next)
-                       id_mask |= (1 << ATH_GET_VAP_ID(v->iv_myaddr));
--              for (id = 1; id < ath_maxvaps; id++) {
-+              for (id = 0; id < ath_maxvaps; id++) {
-                       /* get the first available slot */
-                       if ((id_mask & (1 << id)) == 0) {
-                               ATH_SET_VAP_BSSID(vap->iv_myaddr, id);
diff --git a/package/madwifi/patches/312-erpupdate.patch b/package/madwifi/patches/312-erpupdate.patch
deleted file mode 100644 (file)
index f878acd..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
---- a/net80211/ieee80211_beacon.c
-+++ b/net80211/ieee80211_beacon.c
-@@ -542,10 +542,10 @@ ieee80211_beacon_update(struct ieee80211
-                       vap->iv_flags &= ~IEEE80211_F_XRUPDATE;
-               }
- #endif
--              if ((ic->ic_flags_ext & IEEE80211_FEXT_ERPUPDATE) && 
-+              if ((vap->iv_flags_ext & IEEE80211_FEXT_ERPUPDATE) &&
-                               (bo->bo_erp != NULL)) {
-                       (void)ieee80211_add_erp(bo->bo_erp, ic);
--                      ic->ic_flags_ext &= ~IEEE80211_FEXT_ERPUPDATE;
-+                      vap->iv_flags_ext &= ~IEEE80211_FEXT_ERPUPDATE;
-               }
-       }
-       /* if it is a mode change beacon for dynamic turbo case */
---- a/net80211/ieee80211_input.c
-+++ b/net80211/ieee80211_input.c
-@@ -3431,9 +3431,12 @@ ieee80211_recv_mgmt(struct ieee80211vap
-                       /* Assume no ERP IE == 11b AP */
-                       if ((!has_erp || (has_erp && (scan.erp & IEEE80211_ERP_NON_ERP_PRESENT))) &&
-                               !(ic->ic_flags & IEEE80211_F_USEPROT)) {
-+                              struct ieee80211vap *tmpvap;
-                               ic->ic_flags |= IEEE80211_F_USEPROT;
--                              ic->ic_flags_ext |= IEEE80211_FEXT_ERPUPDATE;
-+                              TAILQ_FOREACH(tmpvap, &ic->ic_vaps, iv_next) {
-+                                      tmpvap->iv_flags_ext |= IEEE80211_FEXT_ERPUPDATE;
-+                              }
-                       }
-               }
---- a/net80211/ieee80211_node.c
-+++ b/net80211/ieee80211_node.c
-@@ -2025,8 +2025,12 @@ ieee80211_node_join_11g(struct ieee80211
-               }
-               /* Update ERP element if this is first non ERP station */
--              if (ic->ic_nonerpsta == 1)
--                      ic->ic_flags_ext |= IEEE80211_FEXT_ERPUPDATE;
-+              if (ic->ic_nonerpsta == 1) {
-+                      struct ieee80211vap *tmpvap;
-+                      TAILQ_FOREACH(tmpvap, &ic->ic_vaps, iv_next) {
-+                              tmpvap->iv_flags_ext |= IEEE80211_FEXT_ERPUPDATE;
-+                      }
-+              }
-       } else
-               ni->ni_flags |= IEEE80211_NODE_ERP;
- }
-@@ -2229,6 +2233,8 @@ ieee80211_node_leave_11g(struct ieee8021
-               IEEE80211_NOTE(vap, IEEE80211_MSG_ASSOC, ni,
-                       "non-ERP station leaves, count now %d", ic->ic_nonerpsta);
-               if (ic->ic_nonerpsta == 0) {
-+                      struct ieee80211vap *tmpvap;
-+
-                       IEEE80211_DPRINTF(vap, IEEE80211_MSG_ASSOC,
-                               "%s: disable use of protection\n", __func__);
-                       ic->ic_flags &= ~IEEE80211_F_USEPROT;
-@@ -2240,7 +2246,9 @@ ieee80211_node_leave_11g(struct ieee8021
-                               ic->ic_flags |= IEEE80211_F_SHPREAMBLE;
-                               ic->ic_flags &= ~IEEE80211_F_USEBARKER;
-                       }
--                      ic->ic_flags_ext |= IEEE80211_FEXT_ERPUPDATE;
-+                      TAILQ_FOREACH(tmpvap, &ic->ic_vaps, iv_next) {
-+                              tmpvap->iv_flags_ext |= IEEE80211_FEXT_ERPUPDATE;
-+                      }
-               }
-       }
- }
diff --git a/package/madwifi/patches/317-bmask.patch b/package/madwifi/patches/317-bmask.patch
deleted file mode 100644 (file)
index 3355dc7..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/ath/if_ath.c
-+++ b/ath/if_ath.c
-@@ -8689,6 +8689,10 @@ ath_startrecv(struct ath_softc *sc)
-       sc->sc_rxbufcur = NULL;
-+      /* configure bssid mask */
-+      if (sc->sc_hasbmask)
-+              ath_hal_setbssidmask(ah, sc->sc_bssidmask);
-+
-       bf = STAILQ_FIRST(&sc->sc_rxbuf);
-       ath_hal_putrxbuf(ah, bf->bf_daddr);
-       ath_hal_rxena(ah);              /* enable recv descriptors */
diff --git a/package/madwifi/patches/323-dfs_optional.patch b/package/madwifi/patches/323-dfs_optional.patch
deleted file mode 100644 (file)
index 2336d74..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
---- a/ath/if_ath.c
-+++ b/ath/if_ath.c
-@@ -1778,17 +1778,14 @@ ath_uapsd_processtriggers(struct ath_sof
-                        * may have occurred in the intervening timeframe. */
-                       bf->bf_channoise = ic->ic_channoise;
--                      if (rs->rs_status) {
--                              if ((HAL_RXERR_PHY == rs->rs_status) &&
--                                  (HAL_PHYERR_RADAR ==
--                                   (rs->rs_phyerr & 0x1f)) &&
--                                  (0 == (bf->bf_status &
--                                         ATH_BUFSTATUS_RADAR_DONE))) {
--                                      check_for_radar = 1;
--                              }
--                              /* Skip past the error now */
-+                      if ((HAL_RXERR_PHY == rs->rs_status) &&
-+                          (HAL_PHYERR_RADAR == (rs->rs_phyerr & 0x1f)) &&
-+                          (0 == (bf->bf_status & ATH_BUFSTATUS_RADAR_DONE)) &&
-+                          (ic->ic_flags & IEEE80211_F_DOTH))
-+                              check_for_radar = 1;
-+
-+                      if (rs->rs_status) /* Skip past the error now */
-                               continue;
--                      }
-                       /* Prepare wireless header for examination */
-                       bus_dma_sync_single(sc->sc_bdev, bf->bf_skbaddr,
---- a/ath/if_ath_radar.c
-+++ b/ath/if_ath_radar.c
-@@ -265,7 +265,7 @@ int ath_radar_update(struct ath_softc *s
-               unsigned int new_rxfilt = old_rxfilt;
-               ath_hal_intrset(ah, old_ier & ~HAL_INT_GLOBAL);
--              if (required) {
-+              if ((required) && (ic->ic_flags & IEEE80211_F_DOTH)) {
-                       new_radar |= AR5K_PHY_RADAR_ENABLE;
-                       new_filter |= AR5K_AR5212_PHY_ERR_FIL_RADAR;
-                       new_rxfilt |= (HAL_RX_FILTER_PHYERR | 
diff --git a/package/madwifi/patches/324-alignment.patch b/package/madwifi/patches/324-alignment.patch
deleted file mode 100644 (file)
index c01135f..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
---- a/net80211/ieee80211_input.c
-+++ b/net80211/ieee80211_input.c
-@@ -1275,14 +1275,8 @@ ieee80211_decap(struct ieee80211vap *vap
-               eh->ether_type = ether_type;
-       if (!ALIGNED_POINTER(skb->data + sizeof(*eh), u_int32_t)) {
--              struct sk_buff *tskb;
--
--              /* XXX: does this always work? */
--              tskb = skb_copy(skb, GFP_ATOMIC);
--              if (tskb)
--                      ieee80211_skb_copy_noderef(skb, tskb);
--              ieee80211_dev_kfree_skb(&skb);
--              skb = tskb;
-+              memmove(skb->data - 2, skb->data, skb->len);
-+              skb->data -= 2;
-       }
-       return skb;
- }
diff --git a/package/madwifi/patches/325-channel_spam.patch b/package/madwifi/patches/325-channel_spam.patch
deleted file mode 100644 (file)
index e34b7a4..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
---- a/ath/if_ath.c
-+++ b/ath/if_ath.c
-@@ -9792,7 +9792,9 @@ ath_getchannels(struct net_device *dev,
-       /*
-        * Convert HAL channels to ieee80211 ones.
-        */
-+#ifdef AR_DEBUG
-       IPRINTF(sc, "HAL returned %d channels.\n", nchan);
-+#endif
-       for (i = 0; i < nchan; i++) {
-               HAL_CHANNEL *c = &chans[i];
-               struct ieee80211_channel *ichan = &ic->ic_channels[i];
-@@ -9819,6 +9821,7 @@ ath_getchannels(struct net_device *dev,
-               ic->ic_chan_non_occupy[i].tv_sec  = 0;
-               ic->ic_chan_non_occupy[i].tv_usec = 0;
-+#ifdef AR_DEBUG
-               IPRINTF(sc, "Channel %3d (%4d MHz) Max Tx Power %d dBm%s "
-                               "[%d hw %d reg] Flags%s%s%s%s%s%s%s%s%s%s%s%s%"
-                               "s%s%s%s%s%s%s%s%s%s%s%s\n",
-@@ -9907,6 +9910,7 @@ ath_getchannels(struct net_device *dev,
-                               (c->privFlags & 0x0080 ? 
-                                " PF & (1 << 7)" : "")
-                               );
-+#endif
-       }
-       ic->ic_nchans = nchan;
-       kfree(chans);
diff --git a/package/madwifi/patches/327-queue.patch b/package/madwifi/patches/327-queue.patch
deleted file mode 100644 (file)
index 228aae3..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
---- a/ath/if_ath.c
-+++ b/ath/if_ath.c
-@@ -8438,8 +8438,6 @@ process_tx_again:
-       ath_hal_intrset(sc->sc_ah, sc->sc_imask);
-       local_irq_restore(flags);
--      netif_wake_queue(dev);
--
-       if (sc->sc_softled)
-               ath_led_event(sc, ATH_LED_TX);
- }
-@@ -8486,8 +8484,6 @@ process_tx_again:
-       ath_hal_intrset(sc->sc_ah, sc->sc_imask);
-       local_irq_restore(flags);
--      netif_wake_queue(dev);
--
-       if (sc->sc_softled)
-               ath_led_event(sc, ATH_LED_TX);
- }
-@@ -8520,8 +8516,6 @@ process_tx_again:
-       ath_hal_intrset(sc->sc_ah, sc->sc_imask);
-       local_irq_restore(flags);
--      netif_wake_queue(dev);
--
-       if (sc->sc_softled)
-               ath_led_event(sc, ATH_LED_TX);
- }
---- a/net80211/ieee80211_input.c
-+++ b/net80211/ieee80211_input.c
-@@ -1132,7 +1132,7 @@ ieee80211_deliver_data(struct ieee80211_
-           (vap->iv_flags & IEEE80211_F_NOBRIDGE) == 0) {
-               struct sk_buff *skb1 = NULL;
--              if (ETHER_IS_MULTICAST(eh->ether_dhost)) {
-+              if (ETHER_IS_MULTICAST(eh->ether_dhost) && !netif_queue_stopped(dev)) {
-                       /* Create a SKB for the BSS to send out. */
-                       skb1 = skb_copy(skb, GFP_ATOMIC);
-                       if (skb1)
diff --git a/package/madwifi/patches/330-beaconcal.patch b/package/madwifi/patches/330-beaconcal.patch
deleted file mode 100644 (file)
index a338dc7..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
---- a/ath/if_ath.c
-+++ b/ath/if_ath.c
-@@ -397,6 +397,7 @@ static int countrycode = -1;
- static int maxvaps = -1;
- static int outdoor = -1;
- static int xchanmode = -1;
-+static int beacon_cal = 1;
- static const char *hal_status_desc[] = {
-       "No error",
-@@ -422,6 +423,7 @@ static struct notifier_block ath_event_b
- };
- #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,52))
-+MODULE_PARM(beacon_cal, "i");
- MODULE_PARM(countrycode, "i");
- MODULE_PARM(maxvaps, "i");
- MODULE_PARM(outdoor, "i");
-@@ -434,6 +436,7 @@ MODULE_PARM(autocreate, "s");
- MODULE_PARM(ratectl, "s");
- #else
- #include <linux/moduleparam.h>
-+module_param(beacon_cal, int, 0600);
- module_param(countrycode, int, 0600);
- module_param(maxvaps, int, 0600);
- module_param(outdoor, int, 0600);
-@@ -2600,7 +2603,8 @@ ath_stop_locked(struct net_device *dev)
-               }
-               if (!sc->sc_invalid) {
-                       del_timer_sync(&sc->sc_dfs_cac_timer);
--                      del_timer_sync(&sc->sc_cal_ch);
-+                      if (!sc->sc_beacon_cal)
-+                              del_timer_sync(&sc->sc_cal_ch);
-               }
-               ath_draintxq(sc);
-               if (!sc->sc_invalid) {
-@@ -2617,6 +2621,20 @@ ath_stop_locked(struct net_device *dev)
-       return 0;
- }
-+static void ath_set_beacon_cal(struct ath_softc *sc, int val)
-+{
-+      if (sc->sc_beacon_cal == !!val)
-+              return;
-+
-+      if (val) {
-+              del_timer_sync(&sc->sc_cal_ch);
-+      } else {
-+              sc->sc_cal_ch.expires = jiffies + (ath_calinterval * HZ);
-+              add_timer(&sc->sc_cal_ch);
-+      }
-+      sc->sc_beacon_cal = !!val && beacon_cal;
-+}
-+
- /*
-  * Stop the device, grabbing the top-level lock to protect
-  * against concurrent entry through ath_init (which can happen
-@@ -2742,6 +2760,12 @@ ath_reset(struct net_device *dev)
-       HAL_STATUS status;
-       /*
-+       * XXX: starting the calibration too early seems to lead to
-+       * problems with the beacons.
-+       */
-+      sc->sc_lastcal = jiffies;
-+
-+      /*
-        * Convert to a HAL channel description with the flags
-        * constrained to reflect the current operating mode.
-        */
-@@ -5154,6 +5178,10 @@ ath_beacon_send(struct ath_softc *sc, in
-                       "Invoking ath_hal_txstart with sc_bhalq: %d\n",
-                       sc->sc_bhalq);
-               ath_hal_txstart(ah, sc->sc_bhalq);
-+              if (sc->sc_beacon_cal && (jiffies > sc->sc_lastcal + (ath_calinterval * HZ))) {
-+                      sc->sc_cal_ch.expires = jiffies + msecs_to_jiffies(10);
-+                      add_timer(&sc->sc_cal_ch);
-+              }
-               sc->sc_stats.ast_be_xmit++;             /* XXX per-VAP? */
-       }
-@@ -5403,6 +5431,7 @@ ath_beacon_config(struct ath_softc *sc,
-               ath_hal_beacontimers(ah, &bs);
-               sc->sc_imask |= HAL_INT_BMISS;
-               ath_hal_intrset(ah, sc->sc_imask);
-+              ath_set_beacon_cal(sc, 0);
-       } else {
-               ath_hal_intrset(ah, 0);
-               if (reset_tsf)
-@@ -5414,8 +5443,11 @@ ath_beacon_config(struct ath_softc *sc,
-                        */
-                       intval |= HAL_BEACON_ENA;
-                       sc->sc_imask |= HAL_INT_SWBA;
-+                      ath_set_beacon_cal(sc, 1);
-                       ath_beaconq_config(sc);
--              }
-+              } else
-+                      ath_set_beacon_cal(sc, 0);
-+
- #ifdef ATH_SUPERG_DYNTURBO
-               ath_beacon_dturbo_config(vap, intval &
-                               ~(HAL_BEACON_RESET_TSF | HAL_BEACON_ENA));
-@@ -8879,6 +8911,9 @@ ath_chan_set(struct ath_softc *sc, struc
-                       /* Enter DFS wait period */
-                       mod_timer(&sc->sc_dfs_cac_timer,
-                               jiffies + (sc->sc_dfs_cac_period * HZ));
-+
-+                      /* This is a good time to start a calibration */
-+                      ath_set_beacon_cal(sc, 1);
-               }
-               /*
-                * re configure beacons when it is a turbo mode switch.
-@@ -8988,8 +9023,11 @@ ath_calibrate(unsigned long arg)
-               sc->sc_curchan.channel, sc->sc_curchan.channelFlags,
-               isIQdone ? "done" : "not done");
--      sc->sc_cal_ch.expires = jiffies + (ath_calinterval * HZ);
--      add_timer(&sc->sc_cal_ch);
-+      sc->sc_lastcal = jiffies;
-+      if (!sc->sc_beacon_cal) {
-+              sc->sc_cal_ch.expires = jiffies + (ath_calinterval * HZ);
-+              add_timer(&sc->sc_cal_ch);
-+      }
- }
- static void
-@@ -9096,7 +9134,8 @@ ath_newstate(struct ieee80211vap *vap, e
-               ieee80211_state_name[vap->iv_state],
-               ieee80211_state_name[nstate]);
--      del_timer(&sc->sc_cal_ch);              /* periodic calibration timer */
-+      if (!sc->sc_beacon_cal)
-+              del_timer(&sc->sc_cal_ch);              /* periodic calibration timer */
-       ath_hal_setledstate(ah, leds[nstate]);  /* set LED */
-       netif_stop_queue(dev);                  /* before we do anything else */
-@@ -9321,7 +9360,8 @@ ath_newstate(struct ieee80211vap *vap, e
-                               "VAP -> DFSWAIT_PENDING \n");
-                       /* start calibration timer with a really small value 
-                        * 1/10 sec */
--                      mod_timer(&sc->sc_cal_ch, jiffies + (HZ/10));
-+                      if (!sc->sc_beacon_cal)
-+                              mod_timer(&sc->sc_cal_ch, jiffies + (HZ/10));
-                       /* wake the receiver */
-                       netif_wake_queue(dev);
-                       /* don't do the other usual stuff... */
-@@ -9364,7 +9404,7 @@ done:
-       error = avp->av_newstate(vap, nstate, arg);
-       /* Finally, start any timers. */
--      if (nstate == IEEE80211_S_RUN) {
-+      if (nstate == IEEE80211_S_RUN && !sc->sc_beacon_cal) {
-               /* start periodic recalibration timer */
-               mod_timer(&sc->sc_cal_ch, jiffies + (ath_calinterval * HZ));
-       }
---- a/ath/if_athvar.h
-+++ b/ath/if_athvar.h
-@@ -778,6 +778,8 @@ struct ath_softc {
-       struct ieee80211vap **sc_bslot;         /* beacon xmit slots */
-       int sc_bnext;                           /* next slot for beacon xmit */
-+      int sc_beacon_cal;                      /* use beacon timer for calibration */
-+      u_int64_t sc_lastcal;                   /* last time the calibration was performed */
-       struct timer_list sc_cal_ch;            /* calibration timer */
-       HAL_NODE_STATS sc_halstats;             /* station-mode rssi stats */
diff --git a/package/madwifi/patches/331-memory_alloc.patch b/package/madwifi/patches/331-memory_alloc.patch
deleted file mode 100644 (file)
index 6b01d79..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
---- a/ath/if_ath.c
-+++ b/ath/if_ath.c
-@@ -3320,17 +3320,18 @@ ath_hardstart(struct sk_buff *skb, struc
-        * without affecting any other bridge ports. */
-       if (skb_cloned(skb)) {
-               /* Remember the original SKB so we can free up our references */
--              struct sk_buff *skb_orig = skb;
--              skb = skb_copy(skb, GFP_ATOMIC);
--              if (skb == NULL) {
-+              struct sk_buff *skb_new;
-+              skb_new = skb_copy(skb, GFP_ATOMIC);
-+              if (skb_new == NULL) {
-                       DPRINTF(sc, ATH_DEBUG_XMIT,
-                               "Dropping; skb_copy failure.\n");
-                       /* No free RAM, do not requeue! */
-                       goto hardstart_fail;
-               }
--              ieee80211_skb_copy_noderef(skb_orig, skb);
--              ieee80211_dev_kfree_skb(&skb_orig);
--      } 
-+              ieee80211_skb_copy_noderef(skb, skb_new);
-+              ieee80211_dev_kfree_skb(&skb);
-+              skb = skb_new;
-+      }
-       eh = (struct ether_header *)skb->data;
- #ifdef ATH_SUPERG_FF
-@@ -3601,6 +3602,8 @@ ath_mgtstart(struct ieee80211com *ic, st
-       sc->sc_stats.ast_tx_mgmt++;
-       return 0;
- bad:
-+      if (skb)
-+              ieee80211_dev_kfree_skb(&skb);
-       ath_return_txbuf(sc, &bf);
-       return error;
- }
diff --git a/package/madwifi/patches/332-reset_beacons.patch b/package/madwifi/patches/332-reset_beacons.patch
deleted file mode 100644 (file)
index b776426..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/ath/if_ath.c
-+++ b/ath/if_ath.c
-@@ -8922,7 +8922,7 @@ ath_chan_set(struct ath_softc *sc, struc
-                * re configure beacons when it is a turbo mode switch.
-                * HW seems to turn off beacons during turbo mode switch.
-                */
--              if (sc->sc_beacons && tswitch && !sc->sc_dfs_cac)
-+              if (sc->sc_beacons && !sc->sc_dfs_cac)
-                       ath_beacon_config(sc, NULL);
-               /*
-                * Re-enable interrupts.
diff --git a/package/madwifi/patches/333-apscan_mode.patch b/package/madwifi/patches/333-apscan_mode.patch
deleted file mode 100644 (file)
index 877eea6..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/net80211/ieee80211_scan_ap.c
-+++ b/net80211/ieee80211_scan_ap.c
-@@ -783,12 +783,6 @@ pick_channel(struct ieee80211_scan_state
-                               /* break the loop as the subsequent chans won't be 
-                                * better */
-                               break;
--
--                      if (!IEEE80211_ARE_CHANS_SAME_MODE(c->chan,
--                              ic->ic_bsschan))
--                              /* break the loop as the subsequent chans won't be 
--                               * better */
--                              break;
-               }
-               if (sta_assoc != 0) {
diff --git a/package/madwifi/patches/334-input.patch b/package/madwifi/patches/334-input.patch
deleted file mode 100644 (file)
index 7c13367..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/net80211/ieee80211_input.c
-+++ b/net80211/ieee80211_input.c
-@@ -950,6 +950,9 @@ ieee80211_input_all(struct ieee80211com
-       TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) {
-               struct sk_buff *skb1;
-+              if ((vap->iv_dev->flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING))
-+                      continue;
-+
-               if (TAILQ_NEXT(vap, iv_next) != NULL) {
-                       skb1 = skb_copy(skb, GFP_ATOMIC);
-                       if (skb1 == NULL) {
diff --git a/package/madwifi/patches/340-maxrate.patch b/package/madwifi/patches/340-maxrate.patch
deleted file mode 100644 (file)
index ae93f02..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
---- a/ath/if_ath.c
-+++ b/ath/if_ath.c
-@@ -1307,6 +1307,7 @@ ath_vap_create(struct ieee80211com *ic,
-       vap->iv_key_set = ath_key_set;
-       vap->iv_key_update_begin = ath_key_update_begin;
-       vap->iv_key_update_end = ath_key_update_end;
-+      vap->iv_maxrateindex = 0;
-       if (sc->sc_default_ieee80211_debug) {
-               /* User specified defaults for new VAPs were provided, so
-                * use those (only). */
---- a/ath_rate/minstrel/minstrel.c
-+++ b/ath_rate/minstrel/minstrel.c
-@@ -622,8 +622,12 @@ ath_rate_ctl_reset(struct ath_softc *sc,
-                       return;
-               }
-               sn->static_rate_ndx = -1;
-+              if (vap->iv_maxrateindex == 0 || ni->ni_rates.rs_nrates <= 0
-+                  || vap->iv_maxrateindex > ni->ni_rates.rs_nrates)
-+                      sn->num_rates = ni->ni_rates.rs_nrates;
-+              else
-+                      sn->num_rates = vap->iv_maxrateindex;
--              sn->num_rates = ni->ni_rates.rs_nrates;
-               for (x = 0; x < ni->ni_rates.rs_nrates; x++) {
-                       sn->rs_rateattempts     [x] = 0;
-                       sn->rs_thisprob         [x] = 0;
---- a/ath_rate/sample/sample.c
-+++ b/ath_rate/sample/sample.c
-@@ -835,7 +835,12 @@ ath_rate_ctl_reset(struct ath_softc *sc,
-       }
-       sn->static_rate_ndx = -1;
--      sn->num_rates = ni->ni_rates.rs_nrates;
-+      if (vap->iv_maxrateindex == 0 || ni->ni_rates.rs_nrates <= 0
-+          || vap->iv_maxrateindex > ni->ni_rates.rs_nrates)
-+              sn->num_rates = ni->ni_rates.rs_nrates;
-+      else
-+              sn->num_rates = vap->iv_maxrateindex;
-+
-       for (x = 0; x < ni->ni_rates.rs_nrates; x++) {
-               sn->rates[x].rate = ni->ni_rates.rs_rates[x] & IEEE80211_RATE_VAL;
-               sn->rates[x].rix = sc->sc_rixmap[sn->rates[x].rate];
---- a/net80211/ieee80211_ioctl.h
-+++ b/net80211/ieee80211_ioctl.h
-@@ -641,6 +641,7 @@ enum {
-                                                          FCC requires 30m, so that is the default. */
-       IEEE80211_PARAM_BEACON_MISS_THRESH      = 73,   /* Beacon miss threshold (in beacons) */
-       IEEE80211_PARAM_BEACON_MISS_THRESH_MS   = 74,   /* Beacon miss threshold (in ms) */
-+      IEEE80211_PARAM_MAXRATE                 = 75,   /* Maximum rate (by table index) */
- };
- #define       SIOCG80211STATS                 (SIOCDEVPRIVATE+2)
---- a/net80211/ieee80211_var.h
-+++ b/net80211/ieee80211_var.h
-@@ -281,6 +281,7 @@ struct ieee80211vap {
-       struct ieee80211_spy iv_spy;                    /* IWSPY support */
-       struct ieee80211_app_ie app_ie[IEEE80211_APPIE_NUM_OF_FRAME]; /* app-specified IEs by frame type */
-       u_int32_t app_filter;                           /* filters which management frames are forwarded to app */
-+      u_int iv_maxrateindex;
- };
- /* Debug functions need the defintion of struct ieee80211vap because iv_debug 
---- a/net80211/ieee80211_wireless.c
-+++ b/net80211/ieee80211_wireless.c
-@@ -2839,6 +2839,12 @@ ieee80211_ioctl_setparam(struct net_devi
-               else
-                       ic->ic_flags_ext &= ~IEEE80211_FEXT_MARKDFS;
-               break;
-+      case IEEE80211_PARAM_MAXRATE:
-+              if (value > 0)
-+                      vap->iv_maxrateindex = value;
-+              else
-+                      vap->iv_maxrateindex = 0;
-+              break;
- #ifdef ATH_REVERSE_ENGINEERING
-       case IEEE80211_PARAM_DUMPREGS:
-               ieee80211_dump_registers(dev, info, w, extra);
-@@ -3174,6 +3180,9 @@ ieee80211_ioctl_getparam(struct net_devi
-               else
-                       param[0] = 0;
-               break;
-+      case IEEE80211_PARAM_MAXRATE:
-+              param[0] = vap->iv_maxrateindex;
-+              break;
-       default:
-               return -EOPNOTSUPP;
-       }
-@@ -5610,6 +5619,10 @@ static const struct iw_priv_args ieee802
-         0, IW_PRIV_TYPE_APPIEBUF, "getiebuf" },
-       { IEEE80211_IOCTL_FILTERFRAME,
-         IW_PRIV_TYPE_FILTER , 0, "setfilter" },
-+      {IEEE80211_PARAM_MAXRATE,
-+       IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "maxrate"},
-+      {IEEE80211_PARAM_MAXRATE,
-+       0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_maxrate"},
- #ifdef ATH_REVERSE_ENGINEERING
-       /*
diff --git a/package/madwifi/patches/341-minrate.patch b/package/madwifi/patches/341-minrate.patch
deleted file mode 100644 (file)
index cc04ae0..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
---- a/ath/if_ath.c
-+++ b/ath/if_ath.c
-@@ -1308,6 +1308,7 @@ ath_vap_create(struct ieee80211com *ic,
-       vap->iv_key_update_begin = ath_key_update_begin;
-       vap->iv_key_update_end = ath_key_update_end;
-       vap->iv_maxrateindex = 0;
-+      vap->iv_minrateindex = 0;
-       if (sc->sc_default_ieee80211_debug) {
-               /* User specified defaults for new VAPs were provided, so
-                * use those (only). */
---- a/ath_rate/minstrel/minstrel.c
-+++ b/ath_rate/minstrel/minstrel.c
-@@ -638,9 +638,15 @@ ath_rate_ctl_reset(struct ath_softc *sc,
-                       sn->rs_succ_hist        [x] = 0;
-                       sn->rs_att_hist         [x] = 0;
-                       sn->rs_this_tp          [x] = 0;
--
-+                      if (vap->iv_minrateindex && vap->iv_minrateindex<ni->ni_rates.rs_nrates)
-+                      {
-+                      int idx = vap->iv_minrateindex; 
-+                      sn->rates[x].rate = ni->ni_rates.rs_rates[idx] & IEEE80211_RATE_VAL;
-+                      sn->rates[x].rix = sc->sc_rixmap[sn->rates[idx].rate];
-+                      }else{
-                       sn->rates[x].rate = ni->ni_rates.rs_rates[x] & IEEE80211_RATE_VAL;
-                       sn->rates[x].rix = sc->sc_rixmap[sn->rates[x].rate];
-+                      }
-                       if (sn->rates[x].rix == 0xff) {
-                               DPRINTF(sc, "%s: %s ignore bogus rix at %d\n",
-                                       dev_info, __func__, x);
-@@ -649,7 +655,7 @@ ath_rate_ctl_reset(struct ath_softc *sc,
-                       sn->rates[x].rateCode = rt->info[sn->rates[x].rix].rateCode;
-                       sn->rates[x].shortPreambleRateCode =
-                               rt->info[sn->rates[x].rix].rateCode |
--                              rt->info[sn->rates[x].rix].shortPreamble;
-+                              rt->info[sn->rates[x].rix].shortPreamble;                       
-               }
-               ath_fill_sample_table(sn);
---- a/ath_rate/sample/sample.c
-+++ b/ath_rate/sample/sample.c
-@@ -842,8 +842,15 @@ ath_rate_ctl_reset(struct ath_softc *sc,
-               sn->num_rates = vap->iv_maxrateindex;
-       for (x = 0; x < ni->ni_rates.rs_nrates; x++) {
--              sn->rates[x].rate = ni->ni_rates.rs_rates[x] & IEEE80211_RATE_VAL;
--              sn->rates[x].rix = sc->sc_rixmap[sn->rates[x].rate];
-+              if (vap->iv_minrateindex && vap->iv_minrateindex<ni->ni_rates.rs_nrates)
-+                      {
-+                      int idx = vap->iv_minrateindex; 
-+                      sn->rates[x].rate = ni->ni_rates.rs_rates[idx] & IEEE80211_RATE_VAL;
-+                      sn->rates[x].rix = sc->sc_rixmap[sn->rates[idx].rate];
-+                      }else{
-+                      sn->rates[x].rate = ni->ni_rates.rs_rates[x] & IEEE80211_RATE_VAL;
-+                      sn->rates[x].rix = sc->sc_rixmap[sn->rates[x].rate];
-+                      }
-               if (sn->rates[x].rix == 0xff) {
-                       DPRINTF(sc, ATH_DEBUG_RATE, "%s: %s ignore bogus rix at %u\n",
-                               dev_info, __func__, x);
---- a/net80211/ieee80211_ioctl.h
-+++ b/net80211/ieee80211_ioctl.h
-@@ -642,6 +642,7 @@ enum {
-       IEEE80211_PARAM_BEACON_MISS_THRESH      = 73,   /* Beacon miss threshold (in beacons) */
-       IEEE80211_PARAM_BEACON_MISS_THRESH_MS   = 74,   /* Beacon miss threshold (in ms) */
-       IEEE80211_PARAM_MAXRATE                 = 75,   /* Maximum rate (by table index) */
-+      IEEE80211_PARAM_MINRATE                 = 76,   /* Minimum rate (by table index) */
- };
- #define       SIOCG80211STATS                 (SIOCDEVPRIVATE+2)
---- a/net80211/ieee80211_var.h
-+++ b/net80211/ieee80211_var.h
-@@ -282,6 +282,7 @@ struct ieee80211vap {
-       struct ieee80211_app_ie app_ie[IEEE80211_APPIE_NUM_OF_FRAME]; /* app-specified IEs by frame type */
-       u_int32_t app_filter;                           /* filters which management frames are forwarded to app */
-       u_int iv_maxrateindex;
-+      u_int iv_minrateindex;
- };
- /* Debug functions need the defintion of struct ieee80211vap because iv_debug 
---- a/net80211/ieee80211_wireless.c
-+++ b/net80211/ieee80211_wireless.c
-@@ -2845,6 +2845,12 @@ ieee80211_ioctl_setparam(struct net_devi
-               else
-                       vap->iv_maxrateindex = 0;
-               break;
-+      case IEEE80211_PARAM_MINRATE:
-+              if (value > 0)
-+                      vap->iv_minrateindex = value;
-+              else
-+                      vap->iv_minrateindex = 0;
-+              break;
- #ifdef ATH_REVERSE_ENGINEERING
-       case IEEE80211_PARAM_DUMPREGS:
-               ieee80211_dump_registers(dev, info, w, extra);
-@@ -3183,6 +3189,9 @@ ieee80211_ioctl_getparam(struct net_devi
-       case IEEE80211_PARAM_MAXRATE:
-               param[0] = vap->iv_maxrateindex;
-               break;
-+      case IEEE80211_PARAM_MINRATE:
-+              param[0] = vap->iv_minrateindex;
-+              break;
-       default:
-               return -EOPNOTSUPP;
-       }
-@@ -5623,6 +5632,10 @@ static const struct iw_priv_args ieee802
-        IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "maxrate"},
-       {IEEE80211_PARAM_MAXRATE,
-        0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_maxrate"},
-+      {IEEE80211_PARAM_MINRATE,
-+       IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "minrate"},
-+      {IEEE80211_PARAM_MINRATE,
-+       0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_minrate"},
- #ifdef ATH_REVERSE_ENGINEERING
-       /*
diff --git a/package/madwifi/patches/342-performance.patch b/package/madwifi/patches/342-performance.patch
deleted file mode 100644 (file)
index 88cec18..0000000
+++ /dev/null
@@ -1,263 +0,0 @@
---- a/ath/if_ath.c
-+++ b/ath/if_ath.c
-@@ -3239,7 +3239,6 @@ ath_hardstart(struct sk_buff *skb, struc
-       struct ath_softc *sc = dev->priv;
-       struct ieee80211_node *ni = NULL;
-       struct ath_buf *bf = NULL;
--      struct ether_header *eh;
-       ath_bufhead bf_head;
-       struct ath_buf *tbf, *tempbf;
-       struct sk_buff *tskb;
-@@ -3251,6 +3250,7 @@ ath_hardstart(struct sk_buff *skb, struc
-       */
-       int requeue = 0;
- #ifdef ATH_SUPERG_FF
-+      struct ether_header *eh;
-       unsigned int pktlen;
-       struct ieee80211com *ic = &sc->sc_ic;
-       struct ath_node *an;
-@@ -3316,27 +3316,9 @@ ath_hardstart(struct sk_buff *skb, struc
-               requeue = 1;
-               goto hardstart_fail;
-       }
--#endif
--      /* If the skb data is shared, we will copy it so we can strip padding
--       * without affecting any other bridge ports. */
--      if (skb_cloned(skb)) {
--              /* Remember the original SKB so we can free up our references */
--              struct sk_buff *skb_new;
--              skb_new = skb_copy(skb, GFP_ATOMIC);
--              if (skb_new == NULL) {
--                      DPRINTF(sc, ATH_DEBUG_XMIT,
--                              "Dropping; skb_copy failure.\n");
--                      /* No free RAM, do not requeue! */
--                      goto hardstart_fail;
--              }
--              ieee80211_skb_copy_noderef(skb, skb_new);
--              ieee80211_dev_kfree_skb(&skb);
--              skb = skb_new;
--      }
-       eh = (struct ether_header *)skb->data;
--#ifdef ATH_SUPERG_FF
-       /* NB: use this lock to protect an->an_tx_ffbuf (and txq->axq_stageq)
-        *     in athff_can_aggregate() call too. */
-       ATH_TXQ_LOCK_IRQ(txq);
---- a/net80211/ieee80211_output.c
-+++ b/net80211/ieee80211_output.c
-@@ -283,7 +283,7 @@ ieee80211_hardstart(struct sk_buff *skb,
-        * normal vap. */
-       if (vap->iv_xrvap && (ni == vap->iv_bss) &&
-           vap->iv_xrvap->iv_sta_assoc) {
--              struct sk_buff *skb1 = skb_copy(skb, GFP_ATOMIC);
-+              struct sk_buff *skb1 = skb_clone(skb, GFP_ATOMIC);
-               if (skb1) {
-                       memset(SKB_CB(skb1), 0, sizeof(struct ieee80211_cb));
- #ifdef IEEE80211_DEBUG_REFCNT
-@@ -566,7 +566,7 @@ ieee80211_skbhdr_adjust(struct ieee80211
-       struct ieee80211_key *key, struct sk_buff *skb, int ismulticast)
- {
-       /* XXX pre-calculate per node? */
--      int need_headroom = LLC_SNAPFRAMELEN + hdrsize + IEEE80211_ADDR_LEN;
-+      int need_headroom = LLC_SNAPFRAMELEN + hdrsize;
-       int need_tailroom = 0;
- #ifdef ATH_SUPERG_FF
-       int isff = ATH_FF_MAGIC_PRESENT(skb);
-@@ -608,109 +608,56 @@ ieee80211_skbhdr_adjust(struct ieee80211
-                               need_tailroom += cip->ic_miclen;
-       }
--      if (skb_shared(skb)) {
--              /* Take our own reference to the node in the clone */
--              ieee80211_ref_node(SKB_CB(skb)->ni);
--              /* Unshare the node, decrementing users in the old skb */
--              skb = skb_unshare(skb, GFP_ATOMIC);
--      }
-+      need_headroom -= skb_headroom(skb);
-+      if (isff)
-+              need_tailroom -= skb_tailroom(skb2);
-+      else
-+              need_tailroom -= skb_tailroom(skb);
-+
-+      if (need_headroom < 0)
-+              need_headroom = 0;
-+      if (need_tailroom < 0)
-+              need_tailroom = 0;
--#ifdef ATH_SUPERG_FF
--      if (isff) {
--              if (skb == NULL) {
--                      IEEE80211_DPRINTF(vap, IEEE80211_MSG_OUTPUT,
--                              "%s: cannot unshare for encapsulation\n",
--                              __func__);
--                      vap->iv_stats.is_tx_nobuf++;
--                      ieee80211_dev_kfree_skb(&skb2);
-+      if (skb_cloned(skb) || (need_headroom > 0) ||
-+              (!isff && (need_tailroom > 0))) {
--                      return NULL;
-+              if (pskb_expand_head(skb, need_headroom, need_tailroom, GFP_ATOMIC)) {
-+                      IEEE80211_DPRINTF(vap, IEEE80211_MSG_OUTPUT,
-+                              "%s: cannot expand storage (tail)\n", __func__);
-+                      goto error;
-               }
-+      }
--              /* first skb header */
--              if (skb_headroom(skb) < need_headroom) {
--                      struct sk_buff *tmp = skb;
--                      skb = skb_realloc_headroom(skb, need_headroom);
--                      if (skb == NULL) {
--                              IEEE80211_DPRINTF(vap, IEEE80211_MSG_OUTPUT,
--                                      "%s: cannot expand storage (head1)\n",
--                                      __func__);
--                              vap->iv_stats.is_tx_nobuf++;
--                              ieee80211_dev_kfree_skb(&skb2);
--                              return NULL;
--                      } else
--                              ieee80211_skb_copy_noderef(tmp, skb);
--                      ieee80211_dev_kfree_skb(&tmp);
--                      /* NB: cb[] area was copied, but not next ptr. must do that
--                       *     prior to return on success. */
--              }
-+#ifdef ATH_SUPERG_FF
-+      if (isff) {
-+              inter_headroom -= skb_headroom(skb2);
-+              if (inter_headroom < 0)
-+                      inter_headroom = 0;
-+              if ((skb_cloned(skb2) ||
-+                      (inter_headroom > 0) || (need_tailroom > 0))) {
--              /* second skb with header and tail adjustments possible */
--              if (skb_tailroom(skb2) < need_tailroom) {
--                      int n = 0;
--                      if (inter_headroom > skb_headroom(skb2))
--                              n = inter_headroom - skb_headroom(skb2);
--                      if (pskb_expand_head(skb2, n,
--                          need_tailroom - skb_tailroom(skb2), GFP_ATOMIC)) {
--                              ieee80211_dev_kfree_skb(&skb2);
-+                      if (pskb_expand_head(skb2, inter_headroom,
-+                              need_tailroom, GFP_ATOMIC)) {
-                               IEEE80211_DPRINTF(vap, IEEE80211_MSG_OUTPUT,
--                                      "%s: cannot expand storage (tail2)\n",
--                                      __func__);
--                              vap->iv_stats.is_tx_nobuf++;
--                              /* this shouldn't happen, but don't send first ff either */
--                              ieee80211_dev_kfree_skb(&skb);
-+                                      "%s: cannot expand storage (tail)\n", __func__);
-+                              goto error;
-                       }
--              } else if (skb_headroom(skb2) < inter_headroom) {
--                      struct sk_buff *tmp = skb2;
--
--                      skb2 = skb_realloc_headroom(skb2, inter_headroom);
--                      if (skb2 == NULL) {
--                              IEEE80211_DPRINTF(vap, IEEE80211_MSG_OUTPUT,
--                                      "%s: cannot expand storage (head2)\n",
--                                      __func__);
--                              vap->iv_stats.is_tx_nobuf++;
--                              /* this shouldn't happen, but don't send first ff either */
--                              ieee80211_dev_kfree_skb(&skb);
--                              skb = NULL;
--                      } else
--                              ieee80211_skb_copy_noderef(tmp, skb);
--                      ieee80211_dev_kfree_skb(&tmp);
--              }
--              if (skb) {
--                      skb->next = skb2;
-               }
--              return skb;
-+              skb->next = skb2;
-       }
- #endif /* ATH_SUPERG_FF */
--      if (skb == NULL) {
--              IEEE80211_DPRINTF(vap, IEEE80211_MSG_OUTPUT,
--                      "%s: cannot unshare for encapsulation\n", __func__);
--              vap->iv_stats.is_tx_nobuf++;
--      } else if (skb_tailroom(skb) < need_tailroom) {
--              int n = 0;
--              if (need_headroom > skb_headroom(skb))
--                      n = need_headroom - skb_headroom(skb);
--              if (pskb_expand_head(skb, n, need_tailroom - 
--                                      skb_tailroom(skb), GFP_ATOMIC)) {
--                      IEEE80211_DPRINTF(vap, IEEE80211_MSG_OUTPUT,
--                              "%s: cannot expand storage (tail)\n", __func__);
--                      vap->iv_stats.is_tx_nobuf++;
--                      ieee80211_dev_kfree_skb(&skb);
--              }
--      } else if (skb_headroom(skb) < need_headroom) {
--              struct sk_buff *tmp = skb;
--              skb = skb_realloc_headroom(skb, need_headroom);
--              /* Increment reference count after copy */
--              if (skb == NULL) {
--                      IEEE80211_DPRINTF(vap, IEEE80211_MSG_OUTPUT,
--                              "%s: cannot expand storage (head)\n", __func__);
--                      vap->iv_stats.is_tx_nobuf++;
--              } else
--                      ieee80211_skb_copy_noderef(tmp, skb);
--              ieee80211_dev_kfree_skb(&tmp);
--      }
-       return skb;
-+
-+error:
-+      vap->iv_stats.is_tx_nobuf++;
-+      ieee80211_dev_kfree_skb(&skb);
-+#ifdef ATH_SUPERG_FF
-+      if (skb2)
-+              ieee80211_dev_kfree_skb(&skb2);
-+#endif
-+      return NULL;
- }
- #define       KEY_UNDEFINED(k)        ((k).wk_cipher == &ieee80211_cipher_none)
---- a/net80211/ieee80211_input.c
-+++ b/net80211/ieee80211_input.c
-@@ -204,7 +204,6 @@ ieee80211_input(struct ieee80211vap * va
-       struct ieee80211_frame *wh;
-       struct ieee80211_key *key;
-       struct ether_header *eh;
--      struct sk_buff *skb2;
- #ifdef ATH_SUPERG_FF
-       struct llc *llc;
- #endif
-@@ -244,20 +243,6 @@ ieee80211_input(struct ieee80211vap * va
-               vap->iv_stats.is_rx_tooshort++;
-               goto out;
-       }
--      /* Clone the SKB... we assume somewhere in this driver that we 'own'
--       * the skbuff passed into hard start and we do a lot of messing with it
--       * but bridges under some cases will not clone for the first pass of skb
--       * to a bridge port, but will then clone for subsequent ones.  This is 
--       * odd behavior but it means that if we have trashed the skb we are given
--       * then other ports get clones of the residual garbage.
--       */
--      if ((skb2 = skb_copy(skb, GFP_ATOMIC)) == NULL) {
--              vap->iv_devstats.tx_dropped++;
--              goto out;
--      }
--      ieee80211_skb_copy_noderef(skb, skb2);
--      ieee80211_dev_kfree_skb(&skb);
--      skb = skb2;
-       /*
-        * Bit of a cheat here, we use a pointer for a 3-address
-@@ -738,7 +723,7 @@ ieee80211_input(struct ieee80211vap * va
-                       /* ether_type must be length as FF frames are always LLC/SNAP encap'd */ 
-                       frame_len = ntohs(eh_tmp->ether_type); 
--                      skb1 = skb_copy(skb, GFP_ATOMIC);
-+                      skb1 = skb_clone(skb, GFP_ATOMIC);
-                       if (skb1 == NULL)
-                               goto err;
-                       ieee80211_skb_copy_noderef(skb, skb1);
-@@ -1137,7 +1122,7 @@ ieee80211_deliver_data(struct ieee80211_
-               if (ETHER_IS_MULTICAST(eh->ether_dhost) && !netif_queue_stopped(dev)) {
-                       /* Create a SKB for the BSS to send out. */
--                      skb1 = skb_copy(skb, GFP_ATOMIC);
-+                      skb1 = skb_clone(skb, GFP_ATOMIC);
-                       if (skb1)
-                               SKB_CB(skb1)->ni = ieee80211_ref_node(vap->iv_bss); 
-               }
diff --git a/package/madwifi/patches/343-txqueue_races.patch b/package/madwifi/patches/343-txqueue_races.patch
deleted file mode 100644 (file)
index a2b14d6..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-Merged from madwifi trunk r3551, r3552
-
---- a/ath/if_ath.c
-+++ b/ath/if_ath.c
-@@ -8253,6 +8253,17 @@ ath_tx_processq(struct ath_softc *sc, st
-                       goto bf_fail;
-               }
-+              /* We make sure we don't remove the TX descriptor on
-+               * which the HW is pointing since it contains the
-+               * ds_link field, except if this is the last TX
-+               * descriptor in the queue */
-+
-+              if ((txq->axq_depth > 1) &&
-+                  (bf->bf_daddr == ath_hal_gettxbuf(ah, txq->axq_qnum))) {
-+                      ATH_TXQ_UNLOCK_IRQ_EARLY(txq);
-+                      goto bf_fail;
-+              }
-+
-               ATH_TXQ_REMOVE_HEAD(txq, bf_list);
-               ATH_TXQ_UNLOCK_IRQ(txq);
---- a/ath/if_athvar.h
-+++ b/ath/if_athvar.h
-@@ -586,7 +586,8 @@ struct ath_vap {
- } while (0)
- #define ATH_TXQ_REMOVE_HEAD(_tq, _field) do { \
-       STAILQ_REMOVE_HEAD(&(_tq)->axq_q, _field); \
--      (_tq)->axq_depth--; \
-+      if (--(_tq)->axq_depth <= 0) \
-+              (_tq)->axq_link = NULL; \
- } while (0)
- /* move buffers from MCASTQ to CABQ */
- #define ATH_TXQ_MOVE_MCASTQ(_tqs,_tqd) do { \
diff --git a/package/madwifi/patches/344-minstrel_failcnt.patch b/package/madwifi/patches/344-minstrel_failcnt.patch
deleted file mode 100644 (file)
index ea92dc4..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/ath_rate/minstrel/minstrel.c
-+++ b/ath_rate/minstrel/minstrel.c
-@@ -475,7 +475,7 @@ ath_rate_tx_complete(struct ath_softc *s
-               /* 'tries' is the total number of times we have endeavoured to
-                * send this packet, and is a sum of the #attempts at each
-                * level in the multi-rate retry chain */
--              tries = ts->ts_shortretry + ts->ts_longretry + 1;
-+              tries = ts->ts_longretry + 1;
-               if (sn->num_rates <= 0) {
-                       DPRINTF(sc, "%s: " MAC_FMT " %s no rates yet\n", dev_info,
diff --git a/package/madwifi/patches/345-minstrel_sampling.patch b/package/madwifi/patches/345-minstrel_sampling.patch
deleted file mode 100644 (file)
index 63fcb8a..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
---- a/ath/if_ath.c
-+++ b/ath/if_ath.c
-@@ -8103,6 +8103,7 @@ ath_tx_start(struct net_device *dev, str
-               ath_hal_setupxtxdesc(sc->sc_ah, ds, mrr.rate1, mrr.retries1,
-                                    mrr.rate2, mrr.retries2,
-                                    mrr.rate3, mrr.retries3);
-+              bf->rcflags = mrr.privflags;
-       }
- #ifndef ATH_SUPERG_FF
---- a/ath/if_athvar.h
-+++ b/ath/if_athvar.h
-@@ -446,6 +446,7 @@ struct ath_buf {
-       u_int16_t bf_flags;                             /* tx descriptor flags */
-       u_int64_t bf_tsf;
-       int16_t bf_channoise;
-+      unsigned int rcflags;
- #ifdef ATH_SUPERG_FF
-       /* XXX: combine this with bf_skbaddr if it ever changes to accommodate
-        *      multiple segments.
---- a/ath_rate/minstrel/minstrel.c
-+++ b/ath_rate/minstrel/minstrel.c
-@@ -333,15 +333,19 @@ ath_rate_findrate(struct ath_softc *sc,
-               if (sn->static_rate_ndx >= 0) {
-                           ndx = sn->static_rate_ndx;
-               } else {
-+                      int delta;
-                       sn->packet_count++;
-                       sn->random_n = (sn->a * sn->random_n) + sn->b;
-                       offset = sn->random_n & 0xf;
--                      if ((((100 * sn->sample_count) / (sn->sample_count + sn->packet_count)) < ath_lookaround_rate) && (offset < 2)) {
-+                      delta = (sn->packet_count * ath_lookaround_rate / 100) - sn->sample_count;
-+                      if ((delta > 0) && (offset < 2)) {
-                               sn->sample_count++;
-                               sn->is_sampling = 1;
-                               if (sn->packet_count >= 10000) {
-                                       sn->sample_count = 0;
-                                       sn->packet_count = 0;
-+                              } else if (delta > sn->num_rates * 2) {
-+                                      sn->sample_count += ((delta - sn->num_rates * 2) * ath_lookaround_rate) / 100;
-                               }
-                               /* Don't look for slowest rate (i.e. slowest
-@@ -398,11 +402,14 @@ ath_rate_get_mrr(struct ath_softc *sc, s
-               if (sn->num_rates <= 0)
-                       return;
-+              mrr->privflags = sn->is_sampling;
-               if (sn->is_sampling) {
-                       sn->is_sampling = 0;
--                      if (sn->rs_sample_rate_slower)
-+                      if (sn->rs_sample_rate_slower) {
-                               rc1 = sn->rs_sample_rate;
--                      else
-+                              if (sn->sample_count > 0)
-+                                      sn->sample_count--;
-+                      } else
-                               rc1 = sn->max_tp_rate;
-               } else {
-                       rc1 = sn->max_tp_rate2;
-@@ -525,6 +532,9 @@ ath_rate_tx_complete(struct ath_softc *s
-               if (tries <= tries1)
-                       return;
-+              if (bf->rcflags)
-+                      sn->sample_count++;
-+
-               if  (tries2 < 0)
-                       return;
-               tries = tries - tries1;
---- a/net80211/ieee80211_rate.h
-+++ b/net80211/ieee80211_rate.h
-@@ -87,6 +87,7 @@ struct ieee80211_mrr {
-       int retries2;
-       int rate3;
-       int retries3;
-+      int privflags;
- };
- struct ieee80211_rate_ops {
diff --git a/package/madwifi/patches/346-protmode_trig.patch b/package/madwifi/patches/346-protmode_trig.patch
deleted file mode 100644 (file)
index 5b5cec6..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
---- a/net80211/ieee80211.c
-+++ b/net80211/ieee80211.c
-@@ -333,7 +333,9 @@ ieee80211_ifattach(struct ieee80211com *
-                       IEEE80211_MS_TO_TU(IEEE80211_BMISSTHRESH_DEFAULT_MS), 
-                       ic->ic_lintval), ic->ic_lintval);
-       }
--              
-+      ic->ic_protmode_timeout = IEEE80211_PROTMODE_TIMEOUT;
-+      ic->ic_protmode_rssi = IEEE80211_PROTMODE_RSSITHR;
-+
-       IEEE80211_LOCK_INIT(ic, "ieee80211com");
-       IEEE80211_VAPS_LOCK_INIT(ic, "ieee80211com_vaps");
-       TAILQ_INIT(&ic->ic_vaps);
---- a/net80211/ieee80211_input.c
-+++ b/net80211/ieee80211_input.c
-@@ -3411,14 +3411,18 @@ ieee80211_recv_mgmt(struct ieee80211vap
-                       IEEE80211_IS_CHAN_ANYG(ic->ic_curchan)) {
-                       /* Assume no ERP IE == 11b AP */
--                      if ((!has_erp || (has_erp && (scan.erp & IEEE80211_ERP_NON_ERP_PRESENT))) &&
--                              !(ic->ic_flags & IEEE80211_F_USEPROT)) {
-+                      if ((!has_erp || (has_erp &&
-+                              (scan.erp & IEEE80211_ERP_NON_ERP_PRESENT))) &&
-+                              (rssi > ic->ic_protmode_rssi)) {
-                               struct ieee80211vap *tmpvap;
--                              ic->ic_flags |= IEEE80211_F_USEPROT;
--                              TAILQ_FOREACH(tmpvap, &ic->ic_vaps, iv_next) {
--                                      tmpvap->iv_flags_ext |= IEEE80211_FEXT_ERPUPDATE;
-+                              if (!(ic->ic_flags & IEEE80211_F_USEPROT)) {
-+                                      ic->ic_flags |= IEEE80211_F_USEPROT;
-+                                      TAILQ_FOREACH(tmpvap, &ic->ic_vaps, iv_next) {
-+                                              tmpvap->iv_flags_ext |= IEEE80211_FEXT_ERPUPDATE;
-+                                      }
-                               }
-+                              ic->ic_protmode_lasttrig = jiffies;
-                       }
-               }
---- a/net80211/ieee80211_ioctl.h
-+++ b/net80211/ieee80211_ioctl.h
-@@ -643,6 +643,8 @@ enum {
-       IEEE80211_PARAM_BEACON_MISS_THRESH_MS   = 74,   /* Beacon miss threshold (in ms) */
-       IEEE80211_PARAM_MAXRATE                 = 75,   /* Maximum rate (by table index) */
-       IEEE80211_PARAM_MINRATE                 = 76,   /* Minimum rate (by table index) */
-+      IEEE80211_PARAM_PROTMODE_RSSI           = 77,   /* RSSI Threshold for enabling protection mode */
-+      IEEE80211_PARAM_PROTMODE_TIMEOUT        = 78,   /* Timeout for expiring protection mode */
- };
- #define       SIOCG80211STATS                 (SIOCDEVPRIVATE+2)
---- a/net80211/ieee80211_var.h
-+++ b/net80211/ieee80211_var.h
-@@ -128,6 +128,9 @@
- #define       IEEE80211_APPIE_MAX     1024
-+#define IEEE80211_PROTMODE_RSSITHR    15      /* default rssi threshold for protection mode trigger */
-+#define IEEE80211_PROTMODE_TIMEOUT    30      /* timeout for keeping protection mode alive */
-+
- #define IEEE80211_PWRCONSTRAINT_VAL(ic) \
-       (((ic)->ic_bsschan->ic_maxregpower > (ic)->ic_curchanmaxpwr) ? \
-           (ic)->ic_bsschan->ic_maxregpower - (ic)->ic_curchanmaxpwr : 0)
-@@ -324,6 +327,9 @@ struct ieee80211com {
-       u_int16_t ic_newtxpowlimit;             /* tx power limit to change to (in 0.5 dBm) */
-       u_int16_t ic_uapsdmaxtriggers;          /* max triggers that could arrive */
-       u_int8_t ic_coverageclass;              /* coverage class */
-+      u_int8_t ic_protmode_rssi;                      /* rssi threshold for protection mode */
-+      u_int64_t ic_protmode_lasttrig;         /* last trigger for protection mode */
-+      u_int16_t ic_protmode_timeout;          /* protection mode timeout */
-       /* Channel state:
-        *
---- a/net80211/ieee80211_wireless.c
-+++ b/net80211/ieee80211_wireless.c
-@@ -2312,6 +2312,12 @@ ieee80211_ioctl_setparam(struct net_devi
-                   IEEE80211_IS_CHAN_ANYG(ic->ic_bsschan))
-                       retv = ENETRESET;
-               break;
-+      case IEEE80211_PARAM_PROTMODE_TIMEOUT:
-+              ic->ic_protmode_timeout = value;
-+              break;
-+      case IEEE80211_PARAM_PROTMODE_RSSI:
-+              ic->ic_protmode_rssi = value;
-+              break;
-       case IEEE80211_PARAM_MCASTCIPHER:
-               if ((vap->iv_caps & cipher2cap(value)) == 0 &&
-                   !ieee80211_crypto_available(vap, value))
-@@ -2955,6 +2961,12 @@ ieee80211_ioctl_getparam(struct net_devi
-       case IEEE80211_PARAM_PROTMODE:
-               param[0] = ic->ic_protmode;
-               break;
-+      case IEEE80211_PARAM_PROTMODE_TIMEOUT:
-+              param[0] = ic->ic_protmode_timeout;
-+              break;
-+      case IEEE80211_PARAM_PROTMODE_RSSI:
-+              param[0] = ic->ic_protmode_rssi;
-+              break;
-       case IEEE80211_PARAM_MCASTCIPHER:
-               param[0] = rsn->rsn_mcastcipher;
-               break;
-@@ -5346,6 +5358,14 @@ static const struct iw_priv_args ieee802
-         IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "protmode" },
-       { IEEE80211_PARAM_PROTMODE,
-         0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_protmode" },
-+      { IEEE80211_PARAM_PROTMODE_RSSI,
-+        IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "protrssi" },
-+      { IEEE80211_PARAM_PROTMODE_RSSI,
-+        0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_protrssi" },
-+      { IEEE80211_PARAM_PROTMODE_TIMEOUT,
-+        IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "prottime" },
-+      { IEEE80211_PARAM_PROTMODE_TIMEOUT,
-+        0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_prottime" },
-       { IEEE80211_PARAM_MCASTCIPHER,
-         IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "mcastcipher" },
-       { IEEE80211_PARAM_MCASTCIPHER,
---- a/net80211/ieee80211_node.c
-+++ b/net80211/ieee80211_node.c
-@@ -1877,6 +1877,17 @@ ieee80211_node_timeout(unsigned long arg
-       ieee80211_scan_timeout(ic);
-       ieee80211_timeout_stations(&ic->ic_sta);
-+      if ((ic->ic_flags & IEEE80211_F_USEPROT) &&
-+              (ic->ic_protmode_lasttrig + ic->ic_protmode_timeout * HZ <
-+                      jiffies)) {
-+              struct ieee80211vap *tmpvap;
-+
-+              /* expire protection mode */
-+              ic->ic_flags &= ~IEEE80211_F_USEPROT;
-+              TAILQ_FOREACH(tmpvap, &ic->ic_vaps, iv_next) {
-+                      tmpvap->iv_flags_ext |= IEEE80211_FEXT_ERPUPDATE;
-+              }
-+      }
-       ic->ic_inact.expires = jiffies + IEEE80211_INACT_WAIT * HZ;
-       add_timer(&ic->ic_inact);
diff --git a/package/madwifi/patches/347-tuning.patch b/package/madwifi/patches/347-tuning.patch
deleted file mode 100644 (file)
index 1a73c42..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
---- a/ath/if_ath.c
-+++ b/ath/if_ath.c
-@@ -10276,11 +10276,11 @@ ath_setcurmode(struct ath_softc *sc, enu
-       sc->sc_currates = rt;
-       sc->sc_curmode = mode;
-       /*
--       * All protection frames are transmitted at 2Mb/s for
--       * 11g, otherwise at 1Mb/s.
-+       * All protection frames are transmitted at 11Mb/s for
-+       * 11g, otherwise at 2Mb/s.
-        * XXX select protection rate index from rate table.
-        */
--      sc->sc_protrix = (mode == IEEE80211_MODE_11G ? 1 : 0);
-+      sc->sc_protrix = (mode == IEEE80211_MODE_11G ? 3 : 1);
-       /* rate index used to send mgt frames */
-       sc->sc_minrateix = 0;
- }
---- a/ath/if_athvar.h
-+++ b/ath/if_athvar.h
-@@ -272,6 +272,10 @@ static inline struct net_device *_alloc_
- #define AES_ICV_FIELD_SIZE      8       /* AES ICV field size */
- #define EXT_IV_FIELD_SIZE       4       /* ext IV field size */
-+/* This is what the HAL uses by default for 11a+g */
-+#define ATH_DEFAULT_CWMIN     15
-+#define ATH_DEFAULT_CWMAX     1023
-+
- /* XR specific macros */
- #define XR_DEFAULT_GRPPOLL_RATE_STR   "0.25 1 1 3 3 6 6 20"
---- a/ath_rate/minstrel/minstrel.c
-+++ b/ath_rate/minstrel/minstrel.c
-@@ -197,7 +197,7 @@ calc_usecs_unicast_packet(struct ath_sof
-               unsigned int x = 0, tt = 0;
-               unsigned int cix = rt->info[rix].controlRate;
-               int rts = 0, cts = 0;
--              int cw = WIFI_CW_MIN;
-+              int cw = ATH_DEFAULT_CWMIN;
-               KASSERT(rt != NULL, ("no rate table, mode %u", sc->sc_curmode));
-@@ -281,7 +281,7 @@ calc_usecs_unicast_packet(struct ath_sof
-               tt += (long_retries + 1) * ath_hal_computetxtime(sc->sc_ah, rt, length,
-                                                       rix, AH_TRUE);
-               for (x = 0; x <= short_retries + long_retries; x++) {
--                      cw = MIN(WIFI_CW_MAX, (cw + 1) * 2);
-+                      cw = MIN(ATH_DEFAULT_CWMAX, (cw + 1) * 2);
-                       tt += (t_slot * cw / 2);
-               }
-               return tt;
---- a/ath_rate/minstrel/minstrel.h
-+++ b/ath_rate/minstrel/minstrel.h
-@@ -180,14 +180,6 @@ struct minstrel_node {
- #define MAX(a,b)        ((a) > (b) ? (a) : (b))
- #endif
--#if 0
--#define WIFI_CW_MIN 31
--#define WIFI_CW_MAX 1023
--#else
--#define WIFI_CW_MIN 3
--#define WIFI_CW_MAX 10
--#endif
--
- /*
-  * Definitions for pulling the rate and trie counts from
-  * a 5212 h/w descriptor. These Don't belong here; the
---- a/ath_rate/sample/sample.c
-+++ b/ath_rate/sample/sample.c
-@@ -170,7 +170,7 @@ calc_usecs_unicast_packet(struct ath_sof
-       struct ieee80211com *ic = &sc->sc_ic;
-       unsigned int tt = 0;
-       unsigned int x;
--      unsigned int cw = WIFI_CW_MIN;
-+      unsigned int cw = ATH_DEFAULT_CWMIN;
-       unsigned int cix = rt->info[rix].controlRate;
-       KASSERT(rt != NULL, ("no rate table, mode %u", sc->sc_curmode));
-@@ -254,7 +254,7 @@ calc_usecs_unicast_packet(struct ath_sof
-       tt += (long_retries+1)*ath_hal_computetxtime(sc->sc_ah, rt, length,
-                                               rix, AH_TRUE);
-       for (x = 0; x <= short_retries + long_retries; x++) {
--              cw = MIN(WIFI_CW_MAX, (cw + 1) * 2);
-+              cw = MIN(ATH_DEFAULT_CWMAX, (cw + 1) * 2);
-               tt += (t_slot * cw / 2);
-       }
-       return tt;
---- a/ath_rate/sample/sample.h
-+++ b/ath_rate/sample/sample.h
-@@ -106,9 +106,6 @@ struct sample_node {
- #define MAX(a,b)        ((a) > (b) ? (a) : (b))
- #endif
--#define WIFI_CW_MIN 31
--#define WIFI_CW_MAX 1023
--
- /*
-  * Definitions for pulling the rate and trie counts from
-  * a 5212 h/w descriptor. These Don't belong here; the
diff --git a/package/madwifi/patches/348-ackcts.patch b/package/madwifi/patches/348-ackcts.patch
deleted file mode 100644 (file)
index 42b6fe2..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
---- a/ath/if_ath.c
-+++ b/ath/if_ath.c
-@@ -2723,6 +2723,9 @@ ar_device(int devid)
- static int
- ath_set_ack_bitrate(struct ath_softc *sc, int high)
- {
-+      if (!sc->sc_ackrate_override)
-+              return 0;
-+
-       if (ar_device(sc->devid) == 5212 || ar_device(sc->devid) == 5213) {
-               /* set ack to be sent at low bit-rate */
-               /* registers taken from the OpenBSD 5212 HAL */
-@@ -10791,8 +10794,13 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl
-                               break;
- #endif
-                       case ATH_ACKRATE:
--                              sc->sc_ackrate = val;
--                              ath_set_ack_bitrate(sc, sc->sc_ackrate);
-+                              if (val == -1)
-+                                      sc->sc_ackrate_override = 0;
-+                              else {
-+                                      sc->sc_ackrate_override = 1;
-+                                      sc->sc_ackrate = val;
-+                                      ath_set_ack_bitrate(sc, sc->sc_ackrate);
-+                              }
-                               break;
-                       case ATH_RP:
-                               ath_rp_record(sc,
---- a/ath/if_athvar.h
-+++ b/ath/if_athvar.h
-@@ -681,6 +681,7 @@ struct ath_softc {
-       unsigned int    sc_devstopped:1;        /* stopped due to of no tx bufs */
-       unsigned int    sc_stagbeacons:1;       /* use staggered beacons */
-       unsigned int    sc_dfswait:1;           /* waiting on channel for radar detect */
-+      unsigned int    sc_ackrate_override:1;  /* override ack rate */
-       unsigned int    sc_ackrate:1;           /* send acks at high bitrate */
-       unsigned int    sc_dfs_cac:1;           /* waiting on channel for radar detect */
-       unsigned int    sc_hasintmit:1;         /* Interference mitigation */
diff --git a/package/madwifi/patches/349-reset.patch b/package/madwifi/patches/349-reset.patch
deleted file mode 100644 (file)
index 06e3fa8..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/ath/if_ath.c
-+++ b/ath/if_ath.c
-@@ -8864,8 +8864,7 @@ ath_chan_set(struct ath_softc *sc, struc
-                * needed to do the reset with chanchange = AH_FALSE in order
-                * to receive traffic when peforming high velocity channel
-                * changes. */
--              if (!ath_hal_reset(ah, sc->sc_opmode, &hchan, AH_TRUE, &status)   ||
--                  !ath_hal_reset(ah, sc->sc_opmode, &hchan, AH_FALSE, &status)) {
-+              if (!ath_hal_reset(ah, sc->sc_opmode, &hchan, AH_TRUE, &status)) {
-                       EPRINTF(sc, "Unable to reset channel %u (%u MHz) "
-                               "flags 0x%x '%s' (HAL status %u)\n",
-                               ieee80211_chan2ieee(ic, chan), chan->ic_freq,
diff --git a/package/madwifi/patches/350-wisoc_softled.patch b/package/madwifi/patches/350-wisoc_softled.patch
deleted file mode 100644 (file)
index dae9f21..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/ath/if_ath_ahb.c
-+++ b/ath/if_ath_ahb.c
-@@ -245,6 +245,8 @@ init_ath_wmac(u_int16_t devid, u_int16_t
-       num_activesc++;
-       /* Ready to process interrupts */
-+      sc->aps_sc.sc_softled = 1; /* SoftLED over GPIO */
-+      sc->aps_sc.sc_ledpin = config->board->sysLedGpio;
-       sc->aps_sc.sc_invalid = 0;
-       return 0;
diff --git a/package/madwifi/patches/351-scanlist.patch b/package/madwifi/patches/351-scanlist.patch
deleted file mode 100644 (file)
index c11f28e..0000000
+++ /dev/null
@@ -1,904 +0,0 @@
---- a/net80211/ieee80211_scan_sta.c
-+++ b/net80211/ieee80211_scan_sta.c
-@@ -317,147 +317,6 @@ found:
- #undef ISPROBE
- }
--static struct ieee80211_channel *
--find11gchannel(struct ieee80211com *ic, int i, int freq)
--{
--      struct ieee80211_channel *c;
--      int j;
--
--      /*
--       * The normal ordering in the channel list is b channel
--       * immediately followed by g so optimize the search for
--       * this.  We'll still do a full search just in case.
--       */
--      for (j = i+1; j < ic->ic_nchans; j++) {
--              c = &ic->ic_channels[j];
--              if (c->ic_freq == freq && IEEE80211_IS_CHAN_ANYG(c))
--                      return c;
--      }
--      for (j = 0; j < i; j++) {
--              c = &ic->ic_channels[j];
--              if (c->ic_freq == freq && IEEE80211_IS_CHAN_ANYG(c))
--                      return c;
--      }
--      return NULL;
--}
--static const u_int chanflags[] = {
--      IEEE80211_CHAN_B,       /* IEEE80211_MODE_AUTO */
--      IEEE80211_CHAN_A,       /* IEEE80211_MODE_11A */
--      IEEE80211_CHAN_B,       /* IEEE80211_MODE_11B */
--      IEEE80211_CHAN_PUREG,   /* IEEE80211_MODE_11G */
--      IEEE80211_CHAN_FHSS,    /* IEEE80211_MODE_FH */
--      IEEE80211_CHAN_A,       /* IEEE80211_MODE_TURBO_A */ /* for turbo mode look for AP in normal channel */
--      IEEE80211_CHAN_PUREG,   /* IEEE80211_MODE_TURBO_G */
--      IEEE80211_CHAN_ST,      /* IEEE80211_MODE_TURBO_STATIC_A */
--};
--
--static void
--add_channels(struct ieee80211com *ic,
--      struct ieee80211_scan_state *ss,
--      enum ieee80211_phymode mode, const u_int16_t freq[], int nfreq)
--{
--      struct ieee80211_channel *c, *cg;
--      u_int modeflags;
--      int i;
--
--      KASSERT(mode < ARRAY_SIZE(chanflags), ("Unexpected mode %u", mode));
--      modeflags = chanflags[mode];
--      for (i = 0; i < nfreq; i++) {
--              c = ieee80211_find_channel(ic, freq[i], modeflags);
--              if (c == NULL || isclr(ic->ic_chan_active, c->ic_ieee))
--                      continue;
--              if (mode == IEEE80211_MODE_AUTO) {
--                      /*
--                       * XXX special-case 11b/g channels so we select
--                       *     the g channel if both are present.
--                       */
--                      if (IEEE80211_IS_CHAN_B(c) &&
--                          (cg = find11gchannel(ic, i, c->ic_freq)) != NULL)
--                              c = cg;
--              }
--              if (ss->ss_last >= IEEE80211_SCAN_MAX)
--                      break;
--              ss->ss_chans[ss->ss_last++] = c;
--      }
--}
--
--static const u_int16_t rcl1[] =               /* 8 FCC channel: 52, 56, 60, 64, 36, 40, 44, 48 */
--{ 5260, 5280, 5300, 5320, 5180, 5200, 5220, 5240 };
--static const u_int16_t rcl2[] =               /* 4 MKK channels: 34, 38, 42, 46 */
--{ 5170, 5190, 5210, 5230 };
--static const u_int16_t rcl3[] =               /* 2.4Ghz ch: 1,6,11,7,13 */
--{ 2412, 2437, 2462, 2442, 2472 };
--static const u_int16_t rcl4[] =               /* 5 FCC channel: 149, 153, 161, 165 */
--{ 5745, 5765, 5785, 5805, 5825 };
--static const u_int16_t rcl7[] =               /* 11 ETSI channel: 100,104,108,112,116,120,124,128,132,136,140 */
--{ 5500, 5520, 5540, 5560, 5580, 5600, 5620, 5640, 5660, 5680, 5700 };
--static const u_int16_t rcl8[] =               /* 2.4Ghz ch: 2,3,4,5,8,9,10,12 */
--{ 2417, 2422, 2427, 2432, 2447, 2452, 2457, 2467 };
--static const u_int16_t rcl9[] =               /* 2.4Ghz ch: 14 */
--{ 2484 };
--static const u_int16_t rcl10[] =      /* Added Korean channels 2312-2372 */
--{ 2312, 2317, 2322, 2327, 2332, 2337, 2342, 2347, 2352, 2357, 2362, 2367, 2372 };
--static const u_int16_t rcl11[] =      /* Added Japan channels in 4.9/5.0 spectrum */
--{ 5040, 5060, 5080, 4920, 4940, 4960, 4980 };
--#ifdef ATH_TURBO_SCAN
--static const u_int16_t rcl5[] =               /* 3 static turbo channels */
--{ 5210, 5250, 5290 };
--static const u_int16_t rcl6[] =               /* 2 static turbo channels */
--{ 5760, 5800 };
--static const u_int16_t rcl6x[] =              /* 4 FCC3 turbo channels */
--{ 5540, 5580, 5620, 5660 };
--static const u_int16_t rcl12[] =              /* 2.4Ghz Turbo channel 6 */
--{ 2437 };
--static const u_int16_t rcl13[] =              /* dynamic Turbo channels */
--{ 5200, 5240, 5280, 5765, 5805 };
--#endif /* ATH_TURBO_SCAN */
--
--struct scanlist {
--      u_int16_t       mode;
--      u_int16_t       count;
--      const u_int16_t *list;
--};
--
--#define       IEEE80211_MODE_TURBO_STATIC_A   IEEE80211_MODE_MAX
--#define       X(a)    .count = sizeof(a)/sizeof(a[0]), .list = a
--
--static const struct scanlist staScanTable[] = {
--      { IEEE80211_MODE_11B,                   X(rcl3) },
--      { IEEE80211_MODE_11A,                   X(rcl1) },
--      { IEEE80211_MODE_11A,                   X(rcl2) },
--      { IEEE80211_MODE_11B,                   X(rcl8) },
--      { IEEE80211_MODE_11B,                   X(rcl9) },
--      { IEEE80211_MODE_11A,                   X(rcl4) },
--#ifdef ATH_TURBO_SCAN
--      { IEEE80211_MODE_TURBO_STATIC_A,        X(rcl5) },
--      { IEEE80211_MODE_TURBO_STATIC_A,        X(rcl6) },
--      { IEEE80211_MODE_TURBO_A,               X(rc