sync 8.09 with some changes from trunk
authorFelix Fietkau <nbd@openwrt.org>
Sun, 21 Dec 2008 17:12:53 +0000 (17:12 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 21 Dec 2008 17:12:53 +0000 (17:12 +0000)
SVN-Revision: 13708

227 files changed:
Makefile
include/host-build.mk
include/package-ipkg.mk
include/site/arm-linux
include/site/armeb-linux
include/site/avr32-linux
include/site/cris-linux
include/site/i386-linux
include/site/i686-linux
include/site/mips-linux
include/site/mipsel-linux
include/site/powerpc-linux
include/site/x86_64-linux
package/busybox/patches/480-vi_search.patch [new file with mode: 0644]
package/busybox/patches/510-awk_include.patch [new file with mode: 0644]
package/dnsmasq/Makefile
package/e2fsprogs/Makefile
package/fuse/patches/300-workaround-uclibc-pthread-breakage.patch [new file with mode: 0644]
package/hostapd/Makefile
package/hostapd/patches/100-madwifi_fix.patch
package/madwifi/Config.in
package/madwifi/patches/102-multicall_binary.patch
package/madwifi/patches/104-autocreate_none.patch
package/madwifi/patches/105-ratectl_attach.patch
package/madwifi/patches/106-get_arch.patch
package/madwifi/patches/111-minstrel_crash.patch
package/madwifi/patches/113-no_ibss_pwrsave.patch
package/madwifi/patches/122-replayfail_workaround.patch
package/madwifi/patches/123-ccmp_checks.patch
package/madwifi/patches/124-linux24_compat.patch
package/madwifi/patches/126-rxerr_frames.patch
package/madwifi/patches/200-no_debug.patch
package/madwifi/patches/201-debug_fix.patch
package/madwifi/patches/202-debug_variables.patch
package/madwifi/patches/300-napi_polling.patch
package/madwifi/patches/305-pureg_fix.patch
package/madwifi/patches/309-micfail_detect.patch
package/madwifi/patches/310-noise_get.patch
package/madwifi/patches/311-bssid_alloc.patch
package/madwifi/patches/312-erpupdate.patch
package/madwifi/patches/317-bmask.patch
package/madwifi/patches/323-dfs_optional.patch
package/madwifi/patches/324-alignment.patch
package/madwifi/patches/325-channel_spam.patch
package/madwifi/patches/327-queue.patch
package/madwifi/patches/330-beaconcal.patch
package/madwifi/patches/331-memory_alloc.patch
package/madwifi/patches/332-reset_beacons.patch
package/madwifi/patches/333-apscan_mode.patch
package/madwifi/patches/334-input.patch
package/madwifi/patches/340-maxrate.patch
package/madwifi/patches/341-minrate.patch
package/madwifi/patches/342-performance.patch
package/madwifi/patches/343-txqueue_races.patch
package/madwifi/patches/344-minstrel_failcnt.patch
package/madwifi/patches/345-minstrel_sampling.patch
package/madwifi/patches/346-protmode_trig.patch
package/madwifi/patches/347-tuning.patch
package/madwifi/patches/348-ackcts.patch
package/madwifi/patches/349-reset.patch
package/madwifi/patches/350-wisoc_softled.patch
package/madwifi/patches/351-scanlist.patch
package/madwifi/patches/352-ani_fix.patch
package/madwifi/patches/353-devid.patch
package/madwifi/patches/354-ifxmips_eeprom.patch
package/madwifi/patches/355-eap_auth_disassoc.patch
package/madwifi/patches/356-hidden_ssid.patch
package/madwifi/patches/357-bgscan_thresh.patch
package/madwifi/patches/358-ignore_broken_bssid.patch
package/madwifi/patches/359-disable_reassoc.patch
package/madwifi/patches/360-sta_nodes.patch
package/madwifi/patches/361-bmiss_handling.patch
package/madwifi/patches/362-rssithr.patch
package/madwifi/patches/363-fix_turbo.patch
package/madwifi/patches/364-memory_alloc.patch
package/madwifi/patches/365-turbo_channelsearch.patch
package/madwifi/patches/366-bstuck_thresh.patch
package/madwifi/patches/367-roaming.patch
package/madwifi/patches/368-sta_ie_preserve.patch
package/madwifi/patches/369-mlme_assoc.patch
package/madwifi/patches/370-wdsvap.patch
package/madwifi/patches/371-wds_sta_separation.patch [deleted file]
package/madwifi/patches/372-queue_vif.patch
package/madwifi/patches/373-sanity_check.patch
package/madwifi/patches/374-nbtt_fix.patch
package/madwifi/patches/375-atim_tsf_update.patch
package/madwifi/patches/377-disable_vlan_code.patch
package/madwifi/patches/378-adhoc_crash_fix.patch
package/madwifi/patches/379-invalid_rate_fix.patch
package/madwifi/patches/380-noderef_hack.patch
package/madwifi/patches/381-ibss_modes.patch
package/madwifi/patches/383-ibss_hostap.patch
package/madwifi/patches/384-hwdetect.patch
package/madwifi/patches/385-antenna_fix.patch
package/madwifi/patches/386-acl_crashfix.patch [new file with mode: 0644]
package/madwifi/patches/387-maxassoc.patch [new file with mode: 0644]
package/madwifi/patches/388-apsta_fix.patch [new file with mode: 0644]
package/madwifi/patches/389-autochannel.patch [new file with mode: 0644]
package/madwifi/patches/390-frame_type.patch [new file with mode: 0644]
package/madwifi/patches/400-changeset_r3402.patch
package/madwifi/patches/401-changeset_r3602.patch
package/madwifi/patches/403-changeset_r3605.patch
package/madwifi/patches/404-linux24_fix.patch
package/madwifi/patches/405-retransmit_check.patch
package/madwifi/patches/406-monitor_r3711.patch
package/madwifi/patches/407-new_athinfo.patch
package/madwifi/patches/408-changeset_r3337.patch
package/madwifi/patches/409-wext_compat.patch
package/madwifi/patches/450-new_hal.patch
package/opkg/Makefile
package/opkg/patches/003-fs_overlay_support.patch [new file with mode: 0644]
scripts/md5sum [new file with mode: 0644]
scripts/metadata.pl
scripts/quiltrc [new file with mode: 0644]
toolchain/binutils/Config.in
toolchain/binutils/Makefile
toolchain/binutils/patches/2.16.1/100-uclibc-conf.patch [deleted file]
toolchain/binutils/patches/2.16.1/110-uclibc-libtool-conf.patch [deleted file]
toolchain/binutils/patches/2.16.1/300-001_ld_makefile_patch.patch [deleted file]
toolchain/binutils/patches/2.16.1/300-006_better_file_error.patch [deleted file]
toolchain/binutils/patches/2.16.1/300-012_check_ldrunpath_length.patch [deleted file]
toolchain/binutils/patches/2.16.1/400-mips-ELF_MAXPAGESIZE-4k.patch [deleted file]
toolchain/binutils/patches/2.16.1/702-binutils-skip-comments.patch [deleted file]
toolchain/binutils/patches/2.18/500-avr32.patch [new file with mode: 0644]
toolchain/gcc/Config.in
toolchain/gcc/Config.version
toolchain/gcc/Makefile
toolchain/gcc/patches/4.2.0/100-uclibc-conf.patch [deleted file]
toolchain/gcc/patches/4.2.0/103-uclibc-conf-noupstream.patch [deleted file]
toolchain/gcc/patches/4.2.0/200-uclibc-locale.patch [deleted file]
toolchain/gcc/patches/4.2.0/203-uclibc-locale-no__x.patch [deleted file]
toolchain/gcc/patches/4.2.0/204-uclibc-locale-wchar_fix.patch [deleted file]
toolchain/gcc/patches/4.2.0/205-uclibc-locale-update.patch [deleted file]
toolchain/gcc/patches/4.2.0/300-libstdc++-pic.patch [deleted file]
toolchain/gcc/patches/4.2.0/301-missing-execinfo_h.patch [deleted file]
toolchain/gcc/patches/4.2.0/302-c99-snprintf.patch [deleted file]
toolchain/gcc/patches/4.2.0/303-c99-complex-ugly-hack.patch [deleted file]
toolchain/gcc/patches/4.2.0/304-index_macro.patch [deleted file]
toolchain/gcc/patches/4.2.0/305-libmudflap-susv3-legacy.patch [deleted file]
toolchain/gcc/patches/4.2.0/306-libstdc++-namespace.patch [deleted file]
toolchain/gcc/patches/4.2.0/307-long_double_fix.patch [deleted file]
toolchain/gcc/patches/4.2.0/402-libbackend_dep_gcov-iov.h.patch [deleted file]
toolchain/gcc/patches/4.2.0/800-arm-bigendian.patch [deleted file]
toolchain/gcc/patches/4.2.0/904-flatten-switch-stmt-00.patch [deleted file]
toolchain/gcc/patches/4.2.0/910-mbsd_multi.patch [deleted file]
toolchain/gcc/patches/4.2.0/930-eabi_fixes.patch [deleted file]
toolchain/gcc/patches/4.2.0/951-bug_37014.patch [deleted file]
toolchain/gcc/patches/4.2.1/100-uclibc-conf.patch [deleted file]
toolchain/gcc/patches/4.2.1/103-uclibc-conf-noupstream.patch [deleted file]
toolchain/gcc/patches/4.2.1/200-uclibc-locale.patch [deleted file]
toolchain/gcc/patches/4.2.1/203-uclibc-locale-no__x.patch [deleted file]
toolchain/gcc/patches/4.2.1/204-uclibc-locale-wchar_fix.patch [deleted file]
toolchain/gcc/patches/4.2.1/205-uclibc-locale-update.patch [deleted file]
toolchain/gcc/patches/4.2.1/300-libstdc++-pic.patch [deleted file]
toolchain/gcc/patches/4.2.1/301-missing-execinfo_h.patch [deleted file]
toolchain/gcc/patches/4.2.1/302-c99-snprintf.patch [deleted file]
toolchain/gcc/patches/4.2.1/303-c99-complex-ugly-hack.patch [deleted file]
toolchain/gcc/patches/4.2.1/304-index_macro.patch [deleted file]
toolchain/gcc/patches/4.2.1/305-libmudflap-susv3-legacy.patch [deleted file]
toolchain/gcc/patches/4.2.1/306-libstdc++-namespace.patch [deleted file]
toolchain/gcc/patches/4.2.1/402-libbackend_dep_gcov-iov.h.patch [deleted file]
toolchain/gcc/patches/4.2.1/800-arm-bigendian.patch [deleted file]
toolchain/gcc/patches/4.2.1/904-flatten-switch-stmt-00.patch [deleted file]
toolchain/gcc/patches/4.2.1/910-mbsd_multi.patch [deleted file]
toolchain/gcc/patches/4.2.1/920-soft-float.patch [deleted file]
toolchain/gcc/patches/4.2.1/930-eabi_fixes.patch [deleted file]
toolchain/gcc/patches/4.2.1/951-bug_37014.patch [deleted file]
toolchain/gcc/patches/4.2.2/100-uclibc-conf.patch [deleted file]
toolchain/gcc/patches/4.2.2/103-uclibc-conf-noupstream.patch [deleted file]
toolchain/gcc/patches/4.2.2/200-uclibc-locale.patch [deleted file]
toolchain/gcc/patches/4.2.2/203-uclibc-locale-no__x.patch [deleted file]
toolchain/gcc/patches/4.2.2/204-uclibc-locale-wchar_fix.patch [deleted file]
toolchain/gcc/patches/4.2.2/205-uclibc-locale-update.patch [deleted file]
toolchain/gcc/patches/4.2.2/300-libstdc++-pic.patch [deleted file]
toolchain/gcc/patches/4.2.2/301-missing-execinfo_h.patch [deleted file]
toolchain/gcc/patches/4.2.2/302-c99-snprintf.patch [deleted file]
toolchain/gcc/patches/4.2.2/303-c99-complex-ugly-hack.patch [deleted file]
toolchain/gcc/patches/4.2.2/304-index_macro.patch [deleted file]
toolchain/gcc/patches/4.2.2/305-libmudflap-susv3-legacy.patch [deleted file]
toolchain/gcc/patches/4.2.2/306-libstdc++-namespace.patch [deleted file]
toolchain/gcc/patches/4.2.2/402-libbackend_dep_gcov-iov.h.patch [deleted file]
toolchain/gcc/patches/4.2.2/800-arm-bigendian.patch [deleted file]
toolchain/gcc/patches/4.2.2/904-flatten-switch-stmt-00.patch [deleted file]
toolchain/gcc/patches/4.2.2/910-mbsd_multi.patch [deleted file]
toolchain/gcc/patches/4.2.2/910-soft-float.patch [deleted file]
toolchain/gcc/patches/4.2.2/920-soft-float.patch [deleted file]
toolchain/gcc/patches/4.2.2/930-eabi_fixes.patch [deleted file]
toolchain/gcc/patches/4.2.2/951-bug_37014.patch [deleted file]
toolchain/gcc/patches/4.2.3/100-uclibc-conf.patch [deleted file]
toolchain/gcc/patches/4.2.3/103-uclibc-conf-noupstream.patch [deleted file]
toolchain/gcc/patches/4.2.3/200-uclibc-locale.patch [deleted file]
toolchain/gcc/patches/4.2.3/203-uclibc-locale-no__x.patch [deleted file]
toolchain/gcc/patches/4.2.3/204-uclibc-locale-wchar_fix.patch [deleted file]
toolchain/gcc/patches/4.2.3/205-uclibc-locale-update.patch [deleted file]
toolchain/gcc/patches/4.2.3/300-libstdc++-pic.patch [deleted file]
toolchain/gcc/patches/4.2.3/301-missing-execinfo_h.patch [deleted file]
toolchain/gcc/patches/4.2.3/302-c99-snprintf.patch [deleted file]
toolchain/gcc/patches/4.2.3/303-c99-complex-ugly-hack.patch [deleted file]
toolchain/gcc/patches/4.2.3/304-index_macro.patch [deleted file]
toolchain/gcc/patches/4.2.3/305-libmudflap-susv3-legacy.patch [deleted file]
toolchain/gcc/patches/4.2.3/306-libstdc++-namespace.patch [deleted file]
toolchain/gcc/patches/4.2.3/307-locale_facets.patch [deleted file]
toolchain/gcc/patches/4.2.3/402-libbackend_dep_gcov-iov.h.patch [deleted file]
toolchain/gcc/patches/4.2.3/800-arm-bigendian.patch [deleted file]
toolchain/gcc/patches/4.2.3/900-avr32_support.patch [deleted file]
toolchain/gcc/patches/4.2.3/901-avr32_add_mno-pic.patch [deleted file]
toolchain/gcc/patches/4.2.3/902-avr32_fix_pic_redefinition_warning.patch [deleted file]
toolchain/gcc/patches/4.2.3/903-avr32_fix_expanding_builtin_xchg.patch [deleted file]
toolchain/gcc/patches/4.2.3/904-flatten-switch-stmt-00.patch [deleted file]
toolchain/gcc/patches/4.2.3/905-avr32_fix_folding_machine_reorg_optimizations.patch [deleted file]
toolchain/gcc/patches/4.2.3/906-avr32_use_rjmp_instead_of_got_when_jumping.patch [deleted file]
toolchain/gcc/patches/4.2.3/908-avr32_fix_invalid_assembler_code_on_64bit_hosts.patch [deleted file]
toolchain/gcc/patches/4.2.3/910-mbsd_multi.patch [deleted file]
toolchain/gcc/patches/4.2.3/910-soft-float.patch [deleted file]
toolchain/gcc/patches/4.2.3/920-soft-float.patch [deleted file]
toolchain/gcc/patches/4.2.3/930-eabi_fixes.patch [deleted file]
toolchain/gcc/patches/4.2.3/951-bug_37014.patch [deleted file]
toolchain/gcc/patches/4.2.4/900-avr32_support.patch
toolchain/gcc/patches/4.2.4/901-avr32_add_mno-pic.patch [deleted file]
toolchain/gcc/patches/4.2.4/902-avr32_fix_pic_redefinition_warning.patch [deleted file]
toolchain/gcc/patches/4.2.4/903-avr32_fix_expanding_builtin_xchg.patch [deleted file]
toolchain/gcc/patches/4.2.4/905-avr32_fix_folding_machine_reorg_optimizations.patch [deleted file]
toolchain/gcc/patches/4.2.4/906-avr32_use_rjmp_instead_of_got_when_jumping.patch [deleted file]
toolchain/gcc/patches/4.2.4/908-avr32_fix_invalid_assembler_code_on_64bit_hosts.patch [deleted file]
toolchain/uClibc/patches/160-add_openat_and_friends.patch [new file with mode: 0644]
tools/genext2fs/Makefile
tools/lzma/Makefile

index 7be906f..4bdc465 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -53,7 +53,7 @@ clean: FORCE
        $(_SINGLE)$(SUBMAKE) target/linux/clean
 
 dirclean: clean
-       rm -rf $(STAGING_DIR) $(STAGING_DIR_HOST) $(STAGING_DIR_TOOLCHAIN) $(TOOLCHAIN_DIR) $(BUILD_DIR_HOST)
+       rm -rf $(STAGING_DIR) $(STAGING_DIR_HOST) $(STAGING_DIR_TOOLCHAIN) $(TOOLCHAIN_DIR) $(BUILD_DIR_HOST) $(BUILD_DIR_TOOLCHAIN)
        rm -rf $(TMP_DIR)
 
 tmp/.prereq_packages: .config
index 8a8d6de..5622e98 100644 (file)
@@ -1,5 +1,5 @@
 # 
-# Copyright (C) 2006-2007 OpenWrt.org
+# Copyright (C) 2006-2008 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -82,6 +82,7 @@ define Download/default
   FILE:=$(PKG_SOURCE)
   URL:=$(PKG_SOURCE_URL)
   PROTO:=$(PKG_SOURCE_PROTO)
+  SUBDIR:=$(PKG_SOURCE_SUBDIR)
   VERSION:=$(PKG_SOURCE_VERSION)
   MD5SUM:=$(PKG_MD5SUM)
 endef
index c5d4916..b91a277 100644 (file)
@@ -72,6 +72,7 @@ ifeq ($(DUMP),)
                echo "Priority: $(PRIORITY)"; \
                echo "Maintainer: $(MAINTAINER)"; \
                echo "Architecture: $(PKGARCH)"; \
+               echo "Installed-Size: 1"; \
                echo -n "Description: "; getvar $(call shvar,Package/$(1)/description) | sed -e 's,^[[:space:]]*, ,g'; \
        ) >> $$(IDIR_$(1))/CONTROL/control
        chmod 644 $$(IDIR_$(1))/CONTROL/control
@@ -84,6 +85,8 @@ ifeq ($(DUMP),)
        mkdir -p $(PACKAGE_DIR)
        -find $$(IDIR_$(1)) -name 'CVS' -o -name '.svn' -o -name '.#*' | $(XARGS) rm -rf
        $(RSTRIP) $$(IDIR_$(1))
+       SIZE=`cd $$(IDIR_$(1)); du -bs --exclude=./CONTROL . 2>/dev/null | cut -f1`; \
+       $(SED) "s|^\(Installed-Size:\).*|\1 $$$$SIZE|g" $$(IDIR_$(1))/CONTROL/control
        $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR)
        @[ -f $$(IPKG_$(1)) ] || false 
 
index d22ec20..7c5773d 100644 (file)
@@ -23,5 +23,6 @@ ac_cv_sizeof_uint32_t=4
 ac_cv_sizeof_uint64_t=8
 ac_cv_sizeof_unsigned_int=4
 ac_cv_sizeof_unsigned_long=4
+ac_cv_sizeof_unsigned_long_long=8
 ac_cv_sizeof_unsigned_short=2
 ac_cv_sizeof_void_p=4
index c10b520..f93aa64 100644 (file)
@@ -23,5 +23,6 @@ ac_cv_sizeof_uint32_t=4
 ac_cv_sizeof_uint64_t=8
 ac_cv_sizeof_unsigned_int=4
 ac_cv_sizeof_unsigned_long=4
+ac_cv_sizeof_unsigned_long_long=8
 ac_cv_sizeof_unsigned_short=2
 ac_cv_sizeof_void_p=4
index c10b520..f93aa64 100644 (file)
@@ -23,5 +23,6 @@ ac_cv_sizeof_uint32_t=4
 ac_cv_sizeof_uint64_t=8
 ac_cv_sizeof_unsigned_int=4
 ac_cv_sizeof_unsigned_long=4
+ac_cv_sizeof_unsigned_long_long=8
 ac_cv_sizeof_unsigned_short=2
 ac_cv_sizeof_void_p=4
index d22ec20..7c5773d 100644 (file)
@@ -23,5 +23,6 @@ ac_cv_sizeof_uint32_t=4
 ac_cv_sizeof_uint64_t=8
 ac_cv_sizeof_unsigned_int=4
 ac_cv_sizeof_unsigned_long=4
+ac_cv_sizeof_unsigned_long_long=8
 ac_cv_sizeof_unsigned_short=2
 ac_cv_sizeof_void_p=4
index d22ec20..7c5773d 100644 (file)
@@ -23,5 +23,6 @@ ac_cv_sizeof_uint32_t=4
 ac_cv_sizeof_uint64_t=8
 ac_cv_sizeof_unsigned_int=4
 ac_cv_sizeof_unsigned_long=4
+ac_cv_sizeof_unsigned_long_long=8
 ac_cv_sizeof_unsigned_short=2
 ac_cv_sizeof_void_p=4
index 6785786..80cc8db 100644 (file)
@@ -23,5 +23,6 @@ ac_cv_sizeof_uint32_t=4
 ac_cv_sizeof_uint64_t=8
 ac_cv_sizeof_unsigned_int=4
 ac_cv_sizeof_unsigned_long=4
+ac_cv_sizeof_unsigned_long_long=8
 ac_cv_sizeof_unsigned_short=2
 ac_cv_sizeof_void_p=4
index c10b520..f93aa64 100644 (file)
@@ -23,5 +23,6 @@ ac_cv_sizeof_uint32_t=4
 ac_cv_sizeof_uint64_t=8
 ac_cv_sizeof_unsigned_int=4
 ac_cv_sizeof_unsigned_long=4
+ac_cv_sizeof_unsigned_long_long=8
 ac_cv_sizeof_unsigned_short=2
 ac_cv_sizeof_void_p=4
index d22ec20..7c5773d 100644 (file)
@@ -23,5 +23,6 @@ ac_cv_sizeof_uint32_t=4
 ac_cv_sizeof_uint64_t=8
 ac_cv_sizeof_unsigned_int=4
 ac_cv_sizeof_unsigned_long=4
+ac_cv_sizeof_unsigned_long_long=8
 ac_cv_sizeof_unsigned_short=2
 ac_cv_sizeof_void_p=4
index c10b520..f93aa64 100644 (file)
@@ -23,5 +23,6 @@ ac_cv_sizeof_uint32_t=4
 ac_cv_sizeof_uint64_t=8
 ac_cv_sizeof_unsigned_int=4
 ac_cv_sizeof_unsigned_long=4
+ac_cv_sizeof_unsigned_long_long=8
 ac_cv_sizeof_unsigned_short=2
 ac_cv_sizeof_void_p=4
index c711355..62e334c 100644 (file)
@@ -23,5 +23,6 @@ ac_cv_sizeof_uint32_t=4
 ac_cv_sizeof_uint64_t=8
 ac_cv_sizeof_unsigned_int=4
 ac_cv_sizeof_unsigned_long=8
+ac_cv_sizeof_unsigned_long_long=8
 ac_cv_sizeof_unsigned_short=2
 ac_cv_sizeof_void_p=4
diff --git a/package/busybox/patches/480-vi_search.patch b/package/busybox/patches/480-vi_search.patch
new file mode 100644 (file)
index 0000000..d9fa821
--- /dev/null
@@ -0,0 +1,35 @@
+--- a/editors/vi.c
++++ b/editors/vi.c
+@@ -3313,7 +3313,7 @@
+               buf[1] = '\0';
+               q = get_input_line(buf);        // get input line- use "status line"
+               if (q[0] && !q[1]) {
+-                      if (last_search_pattern[0])
++                      if (last_search_pattern)
+                           last_search_pattern[0] = c;
+                       goto dc3; // if no pat re-use old pat
+               }
+@@ -3329,6 +3329,10 @@
+               if (cmdcnt-- > 1) {
+                       do_cmd(c);
+               }                               // repeat cnt
++              if (last_search_pattern == 0) {
++                      msg = "No previous regular expression";
++                      goto dc2;
++              }
+               dir = BACK;             // assume BACKWARD search
+               p = dot - 1;
+               if (last_search_pattern[0] == '?') {
+@@ -3348,10 +3352,8 @@
+                       msg = "No previous regular expression";
+                       goto dc2;
+               }
+-              if (last_search_pattern[0] == '/') {
+-                      dir = FORWARD;  // assume FORWARD search
+-                      p = dot + 1;
+-              }
++              dir = FORWARD;  // assume FORWARD search
++              p = dot + 1;
+               if (last_search_pattern[0] == '?') {
+                       dir = BACK;
+                       p = dot - 1;
diff --git a/package/busybox/patches/510-awk_include.patch b/package/busybox/patches/510-awk_include.patch
new file mode 100644 (file)
index 0000000..c2d3040
--- /dev/null
@@ -0,0 +1,212 @@
+--- a/editors/awk.c
++++ b/editors/awk.c
+@@ -53,9 +53,14 @@ typedef struct chain_s {
+ } chain;
+ /* Function */
++typedef var *(*awk_cfunc)(var *res, var *args, int nargs);
+ typedef struct func_s {
+       unsigned nargs;
++      enum { AWKFUNC, CFUNC } type;
++      union {
++              awk_cfunc cfunc;
+       struct chain_s body;
++      } x;
+ } func;
+ /* I/O stream */
+@@ -1395,7 +1400,8 @@ static void parse_program(char *p)
+                       next_token(TC_FUNCTION);
+                       g_pos++;
+                       f = newfunc(t_string);
+-                      f->body.first = NULL;
++                      f->type = AWKFUNC;
++                      f->x.body.first = NULL;
+                       f->nargs = 0;
+                       while (next_token(TC_VARIABLE | TC_SEQTERM) & TC_VARIABLE) {
+                               v = findvar(ahash, t_string);
+@@ -1404,7 +1410,7 @@ static void parse_program(char *p)
+                               if (next_token(TC_COMMA | TC_SEQTERM) & TC_SEQTERM)
+                                       break;
+                       }
+-                      seq = &(f->body);
++                      seq = &(f->x.body);
+                       chain_group();
+                       clear_array(ahash);
+@@ -2367,7 +2373,8 @@ static var *evaluate(node *op, var *res)
+                       break;
+               case XC( OC_FUNC ):
+-                      if (!op->r.f->body.first)
++                      if ((op->r.f->type == AWKFUNC) &&
++                              !op->r.f->x.body.first)
+                               syntax_error(EMSG_UNDEF_FUNC);
+                       X.v = R.v = nvalloc(op->r.f->nargs+1);
+@@ -2384,7 +2391,10 @@ static var *evaluate(node *op, var *res)
+                       fnargs = X.v;
+                       L.s = g_progname;
+-                      res = evaluate(op->r.f->body.first, res);
++                      if (op->r.f->type == AWKFUNC)
++                              res = evaluate(op->r.f->x.body.first, res);
++                      else if (op->r.f->type == CFUNC)
++                              res = op->r.f->x.cfunc(res, fnargs, op->r.f->nargs);
+                       g_progname = L.s;
+                       nvfree(fnargs);
+@@ -2747,6 +2757,143 @@ static rstream *next_input_file(void)
+ #undef files_happen
+ }
++/* read the contents of an entire file */
++static char *get_file(const char *fname)
++{
++      FILE *F;
++      char *s = NULL;
++      int i, j, flen;
++
++      F = fopen(fname, "r");
++      if (!F) {
++              return NULL;
++      }
++
++      if (fseek(F, 0, SEEK_END) == 0) {
++              flen = ftell(F);
++              s = (char *)xmalloc(flen+4);
++              fseek(F, 0, SEEK_SET);
++              i = 1 + fread(s+1, 1, flen, F);
++      } else {
++              for (i=j=1; j>0; i+=j) {
++                      s = (char *)xrealloc(s, i+4096);
++                      j = fread(s+i, 1, 4094, F);
++              }
++      }
++
++      s[i] = '\0';
++      fclose(F);
++      return s;
++}
++
++
++/* parse_include():
++ *
++ * taken from parse_program from awk.c
++ * END{} is not parsed here, and BEGIN{} is executed immediately
++ */
++static void parse_include(char *p)
++{
++      uint32_t tclass;
++      chain *initseq = NULL;
++      chain tmp;
++      func *f;
++      var *v, *tv;
++
++      tv = nvalloc(1);
++      memset(&tmp, 0, sizeof(tmp));
++      g_pos = p;
++      t_lineno = 1;
++      while ((tclass = next_token(TC_EOF | TC_OPSEQ |
++                              TC_OPTERM | TC_BEGIN | TC_FUNCDECL)) != TC_EOF) {
++              if (tclass & TC_OPTERM)
++                      continue;
++
++              seq = &tmp;
++              if (tclass & TC_BEGIN) {
++                      initseq = xzalloc(sizeof(chain));
++                      seq = initseq;
++                      chain_group();
++              } else if (tclass & TC_FUNCDECL) {
++                      next_token(TC_FUNCTION);
++                      g_pos++;
++                      f = newfunc(t_string);
++                      f->type = AWKFUNC;
++                      f->x.body.first = NULL;
++                      f->nargs = 0;
++                      while (next_token(TC_VARIABLE | TC_SEQTERM) & TC_VARIABLE) {
++                              v = findvar(ahash, t_string);
++                              v->x.aidx = (f->nargs)++;
++
++                              if (next_token(TC_COMMA | TC_SEQTERM) & TC_SEQTERM)
++                                      break;
++                      }
++                      seq = &(f->x.body);
++                      chain_group();
++                      clear_array(ahash);
++              }
++      }
++      if (initseq && initseq->first)
++              tv = evaluate(initseq->first, tv);
++      nvfree(tv);
++}
++
++
++/* include an awk file and run its BEGIN{} section */
++static xhash *includes = NULL;
++static void include_file(const char *filename)
++{
++      char *s;
++      var *v;
++      int oldlnr = g_lineno;
++      const char *oldprg = g_progname;
++
++      if (!includes)
++              includes = hash_init();
++
++      /* find out if the file has been included already */
++      v = findvar(includes, filename);
++      if (istrue(v))
++              return;
++      setvar_s(v, "1");
++
++      /* read include file */
++      s = get_file(filename);
++      if (!s) {
++              fprintf(stderr, "Could not open file.\n");
++              return;
++      }
++      g_lineno = 1;
++      g_progname = xstrdup(filename);
++      parse_include(s+1);
++      free(s);
++      g_lineno = oldlnr;
++      g_progname = oldprg;
++}
++
++static var *include(var *res, var *args, int nargs)
++{
++      const char *s;
++
++      nargs = nargs; /* shut up, gcc */
++      s = getvar_s(args);
++      if (s && (strlen(s) > 0))
++              include_file(s);
++
++      return res;
++}
++
++/* registers a global c function for the awk interpreter */
++static void register_cfunc(const char *name, awk_cfunc cfunc, int nargs)
++{
++      func *f;
++
++      f = newfunc(name);
++      f->type = CFUNC;
++      f->x.cfunc = cfunc;
++      f->nargs = nargs;
++}
++
+ int awk_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+ int awk_main(int argc, char **argv)
+ {
+@@ -2812,6 +2959,9 @@ int awk_main(int argc, char **argv)
+                       *s1 = '=';
+               }
+       }
++
++      register_cfunc("include", include, 1);
++
+       opt_complementary = "v::f::"; /* -v and -f can occur multiple times */
+       opt = getopt32(argv, "F:v:f:W:", &opt_F, &list_v, &list_f, &opt_W);
+       argv += optind;
index 4d3beba..6051db9 100644 (file)
@@ -9,12 +9,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dnsmasq
-PKG_VERSION:=2.45
+PKG_VERSION:=2.46
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq
-PKG_MD5SUM:=b7956e15c9766e05b3eca3ce88fdb616
+PKG_MD5SUM:=79ec740d1a10ee75f13efa4ff36d0250
 
 include $(INCLUDE_DIR)/package.mk
 
index f9f17f4..a6b2d15 100644 (file)
@@ -27,7 +27,7 @@ $(call Package/e2fsprogs/Default)
   SECTION:=utils
   CATEGORY:=Utilities
   TITLE:=Ext2/3 filesystem utilities
-  DEPENDS:=+libblkid +libuuid
+  DEPENDS:=+libblkid +libuuid +libext2fs
 endef
 
 define Package/e2fsprogs/description
@@ -72,6 +72,17 @@ define Package/libblkid/description
  quickly and easily find block devices by filesystem UUID and LABEL.
 endef
 
+define Package/libext2fs
+$(call Package/e2fsprogs/Default)
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=ext2/ext3 filesystem library
+endef
+
+define Package/libext2fs/description
+libext2fs is a library which can access ext2 and ext3 filesystems.
+endef
+
 define Package/tune2fs
 $(call Package/e2fsprogs)
   TITLE:=Ext2 Filesystem tune utility
@@ -121,6 +132,10 @@ define Build/InstallDev
                BUILDCC="$(HOSTCC)" \
                DESTDIR="$(1)" \
                install-libs
+       $(MAKE) -C $(PKG_BUILD_DIR)/lib/ext2fs \
+               BUILDCC="$(HOSTCC)" \
+               DESTDIR="$(1)" \
+               install
 endef
 
 define Package/e2fsprogs/install
@@ -130,7 +145,7 @@ define Package/e2fsprogs/install
        ln -sf mke2fs $(1)/usr/sbin/mkfs.ext2
        ln -sf mke2fs $(1)/usr/sbin/mkfs.ext3
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(foreach lib,com_err e2p ext2fs,$(PKG_INSTALL_DIR)/usr/lib/lib$(lib).so.*) $(1)/usr/lib/
+       $(CP) $(foreach lib,com_err e2p,$(PKG_INSTALL_DIR)/usr/lib/lib$(lib).so.*) $(1)/usr/lib/
 endef
 
 define Package/libuuid/install
@@ -148,6 +163,11 @@ define Package/libblkid/install
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libblkid.so.* $(1)/usr/lib/
 endef
 
+define Package/libext2fs/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libext2fs.so* $(1)/usr/lib/
+endef
+
 define Package/tune2fs/install
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tune2fs $(1)/usr/sbin/
@@ -167,6 +187,7 @@ $(eval $(call BuildPackage,e2fsprogs))
 $(eval $(call BuildPackage,libuuid))
 $(eval $(call BuildPackage,uuidgen))
 $(eval $(call BuildPackage,libblkid))
+$(eval $(call BuildPackage,libext2fs))
 $(eval $(call BuildPackage,tune2fs))
 $(eval $(call BuildPackage,resize2fs))
 $(eval $(call BuildPackage,badblocks))
diff --git a/package/fuse/patches/300-workaround-uclibc-pthread-breakage.patch b/package/fuse/patches/300-workaround-uclibc-pthread-breakage.patch
new file mode 100644 (file)
index 0000000..cef5ce2
--- /dev/null
@@ -0,0 +1,46 @@
+--- fuse-2.7.3.orig/lib/helper.c       2008-11-22 03:25:11.000000000 +0100
++++ fuse-2.7.3/lib/helper.c    2008-11-22 04:06:35.000000000 +0100
+@@ -178,13 +178,41 @@
+ int fuse_daemonize(int foreground)
+ {
+       int res;
++      int fd;
+       if (!foreground) {
+-              res = daemon(0, 0);
++              /* uClibc daemon() has problems with pthread and friends */
++              /* workaround from http://www.mail-archive.com/uclibc@uclibc.org/msg01073.html */
++              /* res = daemon(0, 0); */
++              switch (res = fork()) {
++                      case -1:
++                              return(-1);
++                      case 0:
++                              break;
++                      default:
++                              _exit(0);
++              }
++
+               if (res == -1) {
+-                      perror("fuse: failed to daemonize program\n");
++                      perror("fuse: failed to fork()\n");
+                       return -1;
+               }
++
++              res=setsid();
++
++              if (res == -1) {
++                      perror("fuse: failed to setsid()\n");
++              }
++
++              chdir("/");
++
++              if (fd = open("/dev/null", O_RDWR, 0) != -1) {
++                      dup2(fd, STDIN_FILENO);
++                      dup2(fd, STDOUT_FILENO);
++                      dup2(fd, STDERR_FILENO);
++                      if (fd > 2)
++                              close(fd);
++              }
+       }
+       return 0;
+ }
index 8f8af96..eccb158 100644 (file)
@@ -1,5 +1,5 @@
-# 
-# Copyright (C) 2006 OpenWrt.org
+#
+# Copyright (C) 2006-2008 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,14 +9,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=hostapd
-PKG_VERSION:=0.6.4
+PKG_VERSION:=0.6.6
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://hostap.epitest.fi/releases/
 PKG_SOURCE_SUBDIR:=hostapd-$(PKG_VERSION)
 PKG_SOURCE_VERSION:=$(PKG_REV)
-PKG_MD5SUM:=62876f2179f316db0621cc33adf04c19
+PKG_MD5SUM:=cba36847d38c753731afefe1460f5f90
 PKG_BUILD_DEPENDS:=PACKAGE_kmod-madwifi:madwifi PACKAGE_kmod-mac80211:mac80211 PACKAGE_kmod-mac80211:libnl
 
 include $(INCLUDE_DIR)/package.mk
index 45e9023..3798398 100644 (file)
@@ -1,6 +1,6 @@
 --- a/hostapd/driver_madwifi.c
 +++ b/hostapd/driver_madwifi.c
-@@ -298,6 +298,7 @@ madwifi_set_iface_flags(void *priv, int 
+@@ -299,6 +299,7 @@ madwifi_set_iface_flags(void *priv, int 
  {
        struct madwifi_driver_data *drv = priv;
        struct ifreq ifr;
@@ -8,7 +8,7 @@
  
        wpa_printf(MSG_DEBUG, "%s: dev_up=%d", __func__, dev_up);
  
-@@ -312,10 +313,14 @@ madwifi_set_iface_flags(void *priv, int 
+@@ -313,10 +314,14 @@ madwifi_set_iface_flags(void *priv, int 
                return -1;
        }
  
index fd4bd90..0a5412a 100644 (file)
@@ -2,7 +2,7 @@
 
 config MADWIFI_DEBUG
        bool "Enable compilation of debugging features"
-       depends on EXPERIMENTAL && PACKAGE_kmod-madwifi
+       depends on DEVEL && PACKAGE_kmod-madwifi
        default n
 
 choice
index d3533ec..887a462 100644 (file)
@@ -8,7 +8,7 @@
  
  #undef ARRAY_SIZE
  #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
-@@ -185,7 +186,7 @@
+@@ -185,7 +186,7 @@ sysctlbyname(const char *oid0, void *old
  #endif /* __linux__ */
  
  int
@@ -27,7 +27,7 @@
  
  #ifndef SIOCG80211STATS
  #define       SIOCG80211STATS (SIOCDEVPRIVATE + 2)
-@@ -240,7 +241,7 @@
+@@ -240,7 +241,7 @@ print_sta_stats(FILE *fd, const u_int8_t
  }
  
  int
@@ -46,7 +46,7 @@
  
  static        int s = -1;
  static const char *progname;
-@@ -140,8 +141,9 @@
+@@ -140,8 +141,9 @@ usage(void)
  }
  
  #define       MAXCHAN ((int)(sizeof(struct ieee80211req_chanlist) * NBBY))
@@ -67,7 +67,7 @@
  
  static int
  setsysctrl(const char *dev, const char *control , u_long value)
-@@ -88,7 +89,7 @@
+@@ -88,7 +89,7 @@ static void usage(void)
  }
  
  int
@@ -86,7 +86,7 @@
  
  #undef ARRAY_SIZE
  #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
-@@ -194,7 +195,7 @@
+@@ -194,7 +195,7 @@ sysctlbyname(const char *oid0, void *old
  #endif /* __linux__ */
  
  int
  
  static int s = -1;
  static const char *progname;
-@@ -213,8 +214,7 @@
+@@ -213,8 +214,7 @@ usage(void)
        exit(-1);
  }
  
  
  static const struct {
        u_int           phyerr;
-@@ -228,7 +229,7 @@
+@@ -228,7 +229,7 @@ catchalarm(int signo)
  }
  
  int
 +#endif
 --- a/tools/Makefile
 +++ b/tools/Makefile
-@@ -46,56 +46,55 @@
+@@ -46,56 +46,55 @@ ifeq ($(HAL),)
  HAL=   $(TOP)/hal
  endif
  
  
  /*
   * These are taken from ieee80211_node.h
-@@ -100,7 +101,7 @@
+@@ -100,7 +101,7 @@ size_t strlcat(char *, const char *, siz
  static int verbose = 0;
  
  int
  
  #undef ARRAY_SIZE
  #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
-@@ -738,7 +739,8 @@
+@@ -738,7 +739,8 @@ static void usage(const char *n)
                "unlawful radio transmissions!\n\n");
  }
  
index 0979179..b2181b6 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -516,7 +516,7 @@
+@@ -516,7 +516,7 @@ ath_attach(u_int16_t devid, struct net_d
        HAL_STATUS status;
        int error = 0;
        unsigned int i;
index 79b08df..1303acf 100644 (file)
@@ -1,6 +1,6 @@
 --- a/net80211/ieee80211_rate.c
 +++ b/net80211/ieee80211_rate.c
-@@ -100,8 +100,18 @@
+@@ -100,8 +100,18 @@ struct ath_ratectrl *ieee80211_rate_atta
                ieee80211_load_module(buf);
  
        if (!ratectls[id].attach) {
index b5ef4f2..4873271 100644 (file)
@@ -1,6 +1,6 @@
 --- a/scripts/get_arch.mk
 +++ b/scripts/get_arch.mk
-@@ -36,6 +36,13 @@
+@@ -36,6 +36,13 @@ ifeq (,$(ARCH-y))
  $(Cannot determine ARCH)
  endif
  
index 43998c3..975bc4e 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath_rate/minstrel/minstrel.c
 +++ b/ath_rate/minstrel/minstrel.c
-@@ -393,6 +393,9 @@
+@@ -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 */
  
index 0d6a11e..af23ceb 100644 (file)
@@ -1,6 +1,6 @@
 --- a/net80211/ieee80211_scan.c
 +++ b/net80211/ieee80211_scan.c
-@@ -291,7 +291,8 @@
+@@ -291,7 +291,8 @@ scan_restart_pwrsav(unsigned long arg)
        struct ieee80211com *ic = vap->iv_ic;
        int delay;
  
index 3ed3520..c4eb28c 100644 (file)
@@ -1,6 +1,6 @@
 --- a/net80211/ieee80211_linux.c
 +++ b/net80211/ieee80211_linux.c
-@@ -331,6 +331,9 @@
+@@ -331,6 +331,9 @@ ieee80211_notify_replay_failure(struct i
                k->wk_cipher->ic_name, k->wk_keyix,
                (unsigned long long)rsc);
  
index 95c7905..71cede7 100644 (file)
@@ -1,6 +1,6 @@
 --- a/net80211/ieee80211_crypto_ccmp.c
 +++ b/net80211/ieee80211_crypto_ccmp.c
-@@ -475,6 +475,9 @@
+@@ -475,6 +475,9 @@ ccmp_encrypt(struct ieee80211_key *key, 
        uint8_t *mic, *pos;
        u_int space;
  
@@ -10,7 +10,7 @@
        ctx->cc_vap->iv_stats.is_crypto_ccmp++;
  
        skb = skb0;
-@@ -589,6 +592,9 @@
+@@ -589,6 +592,9 @@ ccmp_decrypt(struct ieee80211_key *key, 
        uint8_t *pos, *mic;
        u_int space;
  
index ec862bb..88601a4 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath/if_athvar.h
 +++ b/ath/if_athvar.h
-@@ -126,6 +126,11 @@
+@@ -126,6 +126,11 @@ typedef void irqreturn_t;
  #define ATH_GET_NETDEV_DEV(ndev)      ((ndev)->class_dev.dev)
  #endif
  
@@ -30,7 +30,7 @@
        const char *name;
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -4705,6 +4705,46 @@
+@@ -4705,6 +4705,46 @@ ath_beacon_setup(struct ath_softc *sc, s
  #undef USE_SHPREAMBLE
  }
  
index ceab9ea..762a7bc 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -6474,8 +6474,9 @@
+@@ -6474,8 +6474,9 @@ ath_rx_tasklet(TQUEUE_ARG data)
                        /*
                         * Reject error frames if we have no vaps that
                         * are operating in monitor mode.
index 542c6c8..ed44389 100644 (file)
@@ -8,7 +8,7 @@
  #include "if_ath_debug.h"
  #include "opt_ah.h"
  
-@@ -368,8 +367,10 @@
+@@ -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 *);
@@ -20,7 +20,7 @@
  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 @@
+@@ -520,9 +521,11 @@ ath_attach(u_int16_t devid, struct net_d
        u_int8_t csz;
  
        sc->devid = devid;
@@ -32,7 +32,7 @@
  
        /* Allocate space for dynamically determined maximum VAP count */
        sc->sc_bslot = 
-@@ -1038,8 +1041,9 @@
+@@ -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;
@@ -43,7 +43,7 @@
        ic->ic_set_dfs_testmode     = ath_set_dfs_testmode;
        ic->ic_get_dfs_testmode     = ath_get_dfs_testmode;
  
-@@ -1297,12 +1301,14 @@
+@@ -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. */
@@ -58,7 +58,7 @@
        }
        ic->ic_debug = (sc->sc_default_ieee80211_debug & IEEE80211_MSG_IC);
  
-@@ -10496,9 +10502,11 @@
+@@ -10496,9 +10502,11 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl
                                /* XXX validate? */
                                sc->sc_ledpin = val;
                                break;
@@ -70,7 +70,7 @@
                                break;
                        case ATH_TXANTENNA:
                                /*
-@@ -10918,9 +10926,11 @@
+@@ -10918,9 +10926,11 @@ ath_dynamic_sysctl_register(struct ath_s
        }
  
        /* initialize values */
@@ -82,7 +82,7 @@
        sc->sc_txantenna = 0;           /* default to auto-selection */
        sc->sc_txintrperiod = ATH_TXQ_INTR_PERIOD;
  }
-@@ -11762,6 +11772,7 @@
+@@ -11762,6 +11772,7 @@ ath_test_radar(struct ieee80211com *ic)
  }
  
  /* This is called by a private ioctl (iwpriv) to dump the HAL obfuscation table */
@@ -90,7 +90,7 @@
  static unsigned int
  ath_dump_hal_map(struct ieee80211com *ic)
  {
-@@ -11770,7 +11781,7 @@
+@@ -11770,7 +11781,7 @@ ath_dump_hal_map(struct ieee80211com *ic
        ath_hal_dump_map(sc->sc_ah);
        return 0;
  }
        ATH_DEBUG_RATE          = 0x00000010,   /* rate control */
 --- a/tools/do_multi.c
 +++ b/tools/do_multi.c
-@@ -10,16 +10,20 @@
+@@ -10,16 +10,20 @@ main(int argc, char *argv[])
  
      progname = basename(argv[0]);
  
      if(strcmp(progname, "athstats") == 0)
 --- a/tools/Makefile
 +++ b/tools/Makefile
-@@ -48,6 +48,8 @@
+@@ -48,6 +48,8 @@ endif
  
  all: compile
  
  ALLPROGS=     athstats 80211stats athkey athchans athctrl \
        athdebug 80211debug wlanconfig ath_info
  
-@@ -55,7 +57,7 @@
+@@ -55,7 +57,7 @@ OBJS=        $(patsubst %,%.o,$(ALLPROGS))
  
  INCS= -I. -I../ath -I$(HAL) -I$(TOP) -I$(ATH_HAL)
  CFLAGS=       -g -O2 -Wall
  #include <linux/wireless.h>
 --- a/Makefile.inc
 +++ b/Makefile.inc
-@@ -148,7 +148,8 @@
+@@ -148,7 +148,8 @@ ATH_RATE=  $(TOP)/ath_rate
  TOOLS=  $(TOP)/tools 
  
  WARNINGS = -Werror
  
 --- a/ath/if_ath_hal.h
 +++ b/ath/if_ath_hal.h
-@@ -1081,6 +1081,7 @@
+@@ -1081,6 +1081,7 @@ static inline HAL_BOOL ath_hal_disable(s
  
             tail -f /var/log/messages | sed -f hal_unmangle.sed 
   */
  static inline void ath_hal_dump_map(struct ath_hal *ah)
  {
  #ifdef CONFIG_KALLSYMS
-@@ -1345,7 +1346,7 @@
+@@ -1345,7 +1346,7 @@ static inline void ath_hal_dump_map(stru
  #endif                                /* #ifndef CONFIG_KALLSYMS */
  
  }
  #endif                                /* #ifndef _IF_ATH_HAL_H_ */
 --- a/net80211/ieee80211_var.h
 +++ b/net80211/ieee80211_var.h
-@@ -492,9 +492,10 @@
+@@ -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 *);
  
        unsigned int (*ic_get_dfs_cac_time)(struct ieee80211com *);
 --- a/net80211/ieee80211_wireless.c
 +++ b/net80211/ieee80211_wireless.c
-@@ -1548,6 +1548,7 @@
+@@ -1548,6 +1548,7 @@ ieee80211_get_txcont_power(struct net_de
        return 0;
  }
  
  static int 
  ieee80211_ioctl_hal_map(struct net_device *dev, struct iw_request_info *info,
         void *w, char *extra)
-@@ -1558,7 +1559,7 @@
+@@ -1558,7 +1559,7 @@ ieee80211_ioctl_hal_map(struct net_devic
         params[0] = ic->ic_dump_hal_map(ic);
         return 0;
  }
  
  static int
  ieee80211_ioctl_radar(struct net_device *dev, struct iw_request_info *info,
-@@ -5258,8 +5259,10 @@
+@@ -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" },
        /*
         * These depends on sub-ioctl support which added in version 12.
         */
-@@ -5695,7 +5698,9 @@
+@@ -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),
        set_priv(IEEE80211_IOCTL_WDSADDMAC, ieee80211_ioctl_wdsmac),
 --- a/ath/if_ath_debug.h
 +++ b/ath/if_ath_debug.h
-@@ -54,6 +54,10 @@
+@@ -54,6 +54,10 @@ enum {
        ATH_DEBUG_GLOBAL        = (ATH_DEBUG_SKB|ATH_DEBUG_SKB_REF)
  };
  
  #ifdef AR_DEBUG
  
  /* DEBUG-ONLY DEFINITIONS */
-@@ -68,20 +72,9 @@
+@@ -68,20 +72,9 @@ enum {
                ath_keyprint((_sc), __func__, _ix, _hk, _mac);          \
  } while (0)
  
  #define       WPRINTF(_sc, _fmt, ...) \
                printk(KERN_WARNING "%s: %s: " _fmt, \
                        SC_DEV_NAME(_sc), __func__, ## __VA_ARGS__)
-@@ -89,5 +82,14 @@
+@@ -89,5 +82,14 @@ enum {
  #define       IPRINTF(_sc, _fmt, ...) \
                printk(KERN_INFO "%s: %s: " _fmt, \
                        SC_DEV_NAME(_sc), __func__, ## __VA_ARGS__)
  #endif /* #ifndef _IF_ATH_DEBUG_H_ */
 --- a/net80211/ieee80211_node.c
 +++ b/net80211/ieee80211_node.c
-@@ -920,6 +920,9 @@
+@@ -920,6 +920,9 @@ node_cleanup(struct ieee80211_node *ni)
        ni->ni_rxkeyoff = 0;
  }
  
  static void node_print_message(
                u_int32_t flags,
                int show_counter, 
-@@ -972,7 +975,7 @@
+@@ -972,7 +975,7 @@ static void node_print_message(
                        adjusted_refcount);
        va_end(args);
  }
  #ifdef IEEE80211_DEBUG_REFCNT
 --- a/ath/if_ath_pci.c
 +++ b/ath/if_ath_pci.c
-@@ -134,8 +134,10 @@
+@@ -134,8 +134,10 @@ ath_pci_probe(struct pci_dev *pdev, cons
        u16 vdevice;
        int i;
  
  
        /* XXX 32-bit addressing only */
        if (pci_set_dma_mask(pdev, 0xffffffff)) {
-@@ -244,8 +246,10 @@
+@@ -244,8 +246,10 @@ ath_pci_probe(struct pci_dev *pdev, cons
                sc->aps_sc.sc_ledpin = 1;
        }
  
index 57425f7..bcfbba8 100644 (file)
@@ -9,7 +9,7 @@
  #endif
  
  int   ath_hal_dma_beacon_response_time = 2;   /* in TUs */
-@@ -327,6 +327,8 @@
+@@ -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;
index 83556ee..041344f 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -453,8 +453,8 @@
+@@ -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 "'");
  
@@ -10,7 +10,7 @@
  #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,52))
  MODULE_PARM(ath_debug, "i");
  #else
-@@ -465,8 +465,8 @@
+@@ -465,8 +465,8 @@ static void ath_printrxbuf(const struct 
  static void ath_printtxbuf(const struct ath_buf *, int);
  #endif /* defined(AR_DEBUG) */
  
@@ -20,7 +20,7 @@
  #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,52))
  MODULE_PARM(ieee80211_debug, "i");
  #else
-@@ -1565,7 +1565,9 @@
+@@ -1565,7 +1565,9 @@ ath_vap_delete(struct ieee80211vap *vap)
  void
  ath_suspend(struct net_device *dev)
  {
@@ -30,7 +30,7 @@
  
        DPRINTF(sc, ATH_DEBUG_ANY, "flags=%x\n", dev->flags);
        ath_stop(dev);
-@@ -1574,7 +1576,9 @@
+@@ -1574,7 +1576,9 @@ ath_suspend(struct net_device *dev)
  void
  ath_resume(struct net_device *dev)
  {
@@ -40,7 +40,7 @@
  
        DPRINTF(sc, ATH_DEBUG_ANY, "flags=%x\n", dev->flags);
        ath_init(dev);
-@@ -4019,7 +4023,9 @@
+@@ -4019,7 +4023,9 @@ static void
  ath_key_update_begin(struct ieee80211vap *vap)
  {
        struct net_device *dev = vap->iv_ic->ic_dev;
@@ -50,7 +50,7 @@
  
        DPRINTF(sc, ATH_DEBUG_KEYCACHE, "Begin\n");
        /*
-@@ -4040,7 +4046,9 @@
+@@ -4040,7 +4046,9 @@ static void
  ath_key_update_end(struct ieee80211vap *vap)
  {
        struct net_device *dev = vap->iv_ic->ic_dev;
@@ -60,7 +60,7 @@
  
        DPRINTF(sc, ATH_DEBUG_KEYCACHE, "End\n");
        netif_wake_queue(dev);
-@@ -6218,7 +6226,9 @@
+@@ -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;
@@ -70,7 +70,7 @@
        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 @@
+@@ -8382,7 +8392,9 @@ ath_tx_timeout(struct net_device *dev)
  static void
  ath_tx_draintxq(struct ath_softc *sc, struct ath_txq *txq)
  {
@@ -80,7 +80,7 @@
        struct ath_buf *bf;
        /*
         * NB: this assumes output has been stopped and
-@@ -11002,6 +11014,7 @@
+@@ -11002,6 +11014,7 @@ ath_announce(struct net_device *dev)
                strncat(m, b, MLEN);
        }
        strncat(m, "\n", MLEN);
@@ -88,7 +88,7 @@
        if (1 /* bootverbose */) {
                unsigned int i;
                for (i = 0; i <= WME_AC_VO; i++) {
-@@ -11014,6 +11027,7 @@
+@@ -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);
        }
@@ -98,7 +98,7 @@
   
 --- a/ath/if_ath_radar.c
 +++ b/ath/if_ath_radar.c
-@@ -156,7 +156,9 @@
+@@ -156,7 +156,9 @@ static struct radar_pattern_specificatio
  #endif
  };
  
  
  /* Returns true if radar detection is enabled. */
  int ath_radar_is_enabled(struct ath_softc *sc)
-@@ -229,7 +231,9 @@
+@@ -229,7 +231,9 @@ int ath_radar_update(struct ath_softc *s
  {
  
        struct ath_hal *ah = sc->sc_ah;
        struct ieee80211com *ic = &sc->sc_ic;
        int required = 0;
  
-@@ -366,6 +370,7 @@
+@@ -366,6 +370,7 @@ static struct ath_rp *pulse_prev(struct 
  #define MR_FAIL_MIN_PERIOD    4
  #define MR_FAIL_MAX_PERIOD    5
  
  static const char* get_match_result_desc(u_int32_t code) {
        switch (code) {
        case MR_MATCH:
-@@ -384,6 +389,7 @@
+@@ -384,6 +389,7 @@ static const char* get_match_result_desc
                return "unknown";
        }
  }
  
  static int32_t match_radar(
        u_int32_t matched, 
-@@ -775,7 +781,10 @@
+@@ -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)
        int i;
        int best_index = -1;
        unsigned int best_matched = 0;
-@@ -1217,6 +1226,7 @@
+@@ -1217,6 +1226,7 @@ static HAL_BOOL rp_analyse_short_pulse(
        return (-1 != best_index) ? AH_TRUE : AH_FALSE;
  }
  
  static u_int32_t interval_to_frequency(u_int32_t interval)
  {
        /* Calculate BRI from PRI */
-@@ -1224,6 +1234,7 @@
+@@ -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);
  }
  
  #ifdef ATH_RADAR_LONG_PULSE
  static const char* get_longpulse_desc(int lp) {
-@@ -1580,7 +1591,9 @@
+@@ -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)
  {
        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 @@
+@@ -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;
                TAILQ_FOREACH(ni, &nt->nt_node, ni_list) {
 --- a/net80211/ieee80211_scan_ap.c
 +++ b/net80211/ieee80211_scan_ap.c
-@@ -731,6 +731,7 @@
+@@ -731,6 +731,7 @@ pick_channel(struct ieee80211_scan_state
  
        sort(chans, ss_last, sizeof(*chans), pc_cmp, pc_swap);
  
        for (i = 0; i < ss_last; i++) {
                int chan = ieee80211_chan2ieee(ic, chans[i].chan);
  
-@@ -742,6 +743,7 @@
+@@ -742,6 +743,7 @@ pick_channel(struct ieee80211_scan_state
                                !!IEEE80211_ARE_CHANS_SAME_MODE(chans[i].chan, 
                                        ic->ic_bsschan));
        }
index a3a7c83..bc62d7b 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -184,7 +184,11 @@
+@@ -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);
@@ -13,7 +13,7 @@
  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 @@
+@@ -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);
  
@@ -23,7 +23,7 @@
  /* 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 @@
+@@ -547,7 +554,6 @@ ath_attach(u_int16_t devid, struct net_d
  
        atomic_set(&sc->sc_txbuf_counter, 0);
  
@@ -31,7 +31,7 @@
        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 @@
+@@ -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;
@@ -44,7 +44,7 @@
  #ifdef USE_HEADERLEN_RESV
        dev->hard_header_len += sizeof(struct ieee80211_qosframe) +
                                sizeof(struct llc) +
-@@ -2220,6 +2232,7 @@
+@@ -2220,6 +2232,7 @@ ath_intr(int irq, void *dev_id, struct p
                (status & HAL_INT_GLOBAL)       ? " HAL_INT_GLOBAL"     : ""
                );
  
@@ -52,7 +52,7 @@
        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 @@
+@@ -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);
@@ -75,7 +75,7 @@
                }
                if (status & HAL_INT_TX) {
  #ifdef ATH_SUPERG_DYNTURBO
-@@ -2303,6 +2330,11 @@
+@@ -2303,6 +2330,11 @@ ath_intr(int irq, void *dev_id, struct p
                                }
                        }
  #endif
@@ -87,7 +87,7 @@
                        ATH_SCHEDULE_TQUEUE(&sc->sc_txtq, &needmark);
                }
                if (status & HAL_INT_BMISS) {
-@@ -2515,6 +2547,7 @@
+@@ -2515,6 +2547,7 @@ ath_init(struct net_device *dev)
        if (sc->sc_tx99 != NULL)
                sc->sc_tx99->start(sc->sc_tx99);
  #endif
@@ -95,7 +95,7 @@
  
  done:
        ATH_UNLOCK(sc);
-@@ -2555,6 +2588,9 @@
+@@ -2555,6 +2588,9 @@ ath_stop_locked(struct net_device *dev)
                if (sc->sc_tx99 != NULL)
                        sc->sc_tx99->stop(sc->sc_tx99);
  #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 @@
+@@ -4013,12 +4049,47 @@ ath_key_set(struct ieee80211vap *vap, co
        return ath_keyset(sc, k, mac, vap->iv_bss);
  }
  
  static void
  ath_key_update_begin(struct ieee80211vap *vap)
  {
-@@ -4032,14 +4103,9 @@
+@@ -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.
  }
  
  static void
-@@ -4051,9 +4117,9 @@
+@@ -4051,9 +4117,9 @@ ath_key_update_end(struct ieee80211vap *
  #endif
  
        DPRINTF(sc, ATH_DEBUG_KEYCACHE, "End\n");
  }
  
  /*
-@@ -6360,15 +6426,25 @@
+@@ -6360,15 +6426,25 @@ ath_setdefantenna(struct ath_softc *sc, 
        sc->sc_rxotherant = 0;
  }
  
        struct ieee80211com *ic = &sc->sc_ic;
        struct ath_hal *ah = sc ? sc->sc_ah : NULL;
        struct ath_desc *ds;
-@@ -6378,8 +6454,10 @@
+@@ -6378,8 +6454,10 @@ ath_rx_tasklet(TQUEUE_ARG data)
        unsigned int len;
        int type;
        u_int phyerr;
        do {
                bf = STAILQ_FIRST(&sc->sc_rxbuf);
                if (bf == NULL) {               /* XXX ??? can this happen */
-@@ -6403,6 +6481,15 @@
+@@ -6403,6 +6481,15 @@ ath_rx_tasklet(TQUEUE_ARG data)
                        /* NB: never process the self-linked entry at the end */
                        break;
                }
                skb = bf->bf_skb;
                if (skb == NULL) {
                        EPRINTF(sc, "Dropping; buffer contains NULL skbuff.\n");
-@@ -6450,6 +6537,7 @@
+@@ -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]++;
                        }
                        if (rs->rs_status & HAL_RXERR_DECRYPT) {
                                /*
-@@ -6645,9 +6733,39 @@
+@@ -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);
  #undef PA2DESC
  }
  
-@@ -8298,12 +8416,24 @@
+@@ -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;
        netif_wake_queue(dev);
  
        if (sc->sc_softled)
-@@ -8319,7 +8449,9 @@
+@@ -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;
        /*
         * Process each active queue.
         */
-@@ -8340,6 +8472,16 @@
+@@ -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);
  
        netif_wake_queue(dev);
  
        if (sc->sc_softled)
-@@ -8355,13 +8497,25 @@
+@@ -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;
        netif_wake_queue(dev);
  
        if (sc->sc_softled)
-@@ -10296,9 +10450,9 @@
+@@ -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 */
  /*
   * Deduce if tasklets are available.  If not then
   * fall back to using the immediate work queue.
-@@ -616,6 +620,9 @@
+@@ -616,6 +620,9 @@ struct ath_rp {
  struct ath_softc {
        struct ieee80211com sc_ic;              /* NB: must be first */
        struct net_device *sc_dev;
        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 @@
+@@ -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_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 @@
+@@ -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 */
        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 @@
+@@ -858,6 +865,8 @@ typedef void (*ath_callback) (struct ath
  #define       ATH_TXBUF_LOCK_CHECK(_sc)
  #endif
  
  #define       ATH_RXBUF_LOCK_DESTROY(_sc)
 --- a/net80211/ieee80211_input.c
 +++ b/net80211/ieee80211_input.c
-@@ -1198,7 +1198,7 @@
+@@ -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) {
                                 * device was too busy */
                                if (ni_tmp != NULL) {
                                        /* node reference was leaked */
-@@ -1209,8 +1209,8 @@
+@@ -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;
                                 * device was too busy */
                                if (ni_tmp != NULL) {
                                        /* node reference was leaked */
-@@ -2322,8 +2322,8 @@
+@@ -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;
                                /* node reference was leaked */
 --- a/net80211/ieee80211_monitor.c
 +++ b/net80211/ieee80211_monitor.c
-@@ -584,8 +584,8 @@
+@@ -584,8 +584,8 @@ ieee80211_input_monitor(struct ieee80211
                        skb1->protocol = 
                                __constant_htons(0x0019); /* ETH_P_80211_RAW */
  
  #undef pskb_copy
  #undef skb_clone
  #undef skb_copy
-@@ -638,8 +638,8 @@
+@@ -638,8 +638,8 @@ int  vlan_hwaccel_receive_skb_debug(stru
                grp, vlan_tag);
  }
  
  }
  
  struct sk_buff * alloc_skb_debug(unsigned int length, gfp_t gfp_mask,
-@@ -760,7 +760,7 @@
+@@ -760,7 +760,7 @@ struct sk_buff * skb_copy_expand_debug(c
  }
  
  EXPORT_SYMBOL(vlan_hwaccel_receive_skb_debug);
  EXPORT_SYMBOL(skb_clone_debug);
 --- a/net80211/ieee80211_skb.h
 +++ b/net80211/ieee80211_skb.h
-@@ -116,7 +116,7 @@
+@@ -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);
  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 @@
+@@ -151,7 +151,7 @@ struct sk_buff * skb_copy_expand_debug(c
  #undef dev_queue_xmit
  #undef kfree_skb
  #undef kfree_skb_fast
  #undef pskb_copy
  #undef skb_clone
  #undef skb_copy
-@@ -168,8 +168,8 @@
+@@ -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__)
index 8950547..231ab08 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -4158,7 +4158,9 @@
+@@ -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 */
@@ -13,7 +13,7 @@
                rfilt |= (HAL_RX_FILTER_CONTROL | HAL_RX_FILTER_BEACON |
 --- a/net80211/ieee80211_input.c
 +++ b/net80211/ieee80211_input.c
-@@ -346,11 +346,12 @@
+@@ -346,11 +346,12 @@ ieee80211_input(struct ieee80211vap * va
                                bssid = wh->i_addr3;
                        }
                        /*
@@ -29,7 +29,7 @@
                                /*
                                 * allow MGT frames to vap->iv_xrvap.
                                 * this will allow roaming between  XR and normal vaps
-@@ -366,18 +367,14 @@
+@@ -366,18 +367,14 @@ ieee80211_input(struct ieee80211vap * va
                                        vap->iv_stats.is_rx_wrongbss++;
                                        goto out;
                                }
@@ -49,7 +49,7 @@
                        break;
                case IEEE80211_M_WDS:
                        if (skb->len < sizeof(struct ieee80211_frame_addr4)) {
-@@ -3066,7 +3063,7 @@
+@@ -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;
@@ -58,7 +58,7 @@
        u_int8_t qosinfo;
  
        if (ni_or_null == NULL)
-@@ -3096,11 +3093,15 @@
+@@ -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)
@@ -75,7 +75,7 @@
                        vap->iv_stats.is_rx_mgtdiscard++;
                        return;
                }
-@@ -3184,6 +3185,7 @@
+@@ -3184,6 +3185,7 @@ ieee80211_recv_mgmt(struct ieee80211vap 
                                        break;
                                }
                                scan.erp = frm[2];
@@ -83,7 +83,7 @@
                                break;
                        case IEEE80211_ELEMID_RSN:
                                scan.rsn = frm;
-@@ -3421,6 +3423,20 @@
+@@ -3421,6 +3423,20 @@ ieee80211_recv_mgmt(struct ieee80211vap 
                                ieee80211_bg_scan(vap);
                        return;
                }
                 */
 --- a/net80211/ieee80211_node.c
 +++ b/net80211/ieee80211_node.c
-@@ -383,10 +383,16 @@
+@@ -383,10 +383,16 @@ ieee80211_create_ibss(struct ieee80211va
        /* Update country ie information */
        ieee80211_build_countryie(ic);
  
  }
 --- a/net80211/ieee80211_proto.c
 +++ b/net80211/ieee80211_proto.c
-@@ -595,6 +595,28 @@
+@@ -595,6 +595,28 @@ static const struct ieee80211_rateset ba
        { 4, { 2, 4, 11, 22 } },        /* IEEE80211_MODE_TURBO_G (mixed b/g) */
  };
  
   * specified mode.  For 11b compatibility we mark only 11b
 --- a/net80211/ieee80211_var.h
 +++ b/net80211/ieee80211_var.h
-@@ -708,6 +708,7 @@
+@@ -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 *);
index 80c1e73..19bea79 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -6457,6 +6457,7 @@
+@@ -6457,6 +6457,7 @@ ath_rx_poll(struct net_device *dev, int 
        int type;
        u_int phyerr;
        u_int processed = 0, early_stop = 0;
@@ -8,7 +8,7 @@
  
        DPRINTF(sc, ATH_DEBUG_RX_PROC, "invoked\n");
  process_rx_again:
-@@ -6558,24 +6559,8 @@
+@@ -6558,24 +6559,8 @@ process_rx_again:
                        }
                        if (rs->rs_status & HAL_RXERR_MIC) {
                                sc->sc_stats.ast_rx_badmic++;
@@ -35,7 +35,7 @@
                        }
                        /*
                         * Reject error frames if we have no vaps that
-@@ -6614,8 +6599,9 @@
+@@ -6614,8 +6599,9 @@ rx_accept:
                /*
                 * Finished monitor mode handling, now reject
                 * error frames before passing to other vaps
@@ -46,7 +46,7 @@
                        ieee80211_dev_kfree_skb(&skb);
                        goto rx_next;
                }
-@@ -6623,6 +6609,26 @@
+@@ -6623,6 +6609,26 @@ rx_accept:
                /* remove the CRC */
                skb_trim(skb, skb->len - IEEE80211_CRC_LEN);
  
@@ -73,7 +73,7 @@
                /*
                 * From this point on we assume the frame is at least
                 * as large as ieee80211_frame_min; verify that.
-@@ -6635,6 +6641,7 @@
+@@ -6635,6 +6641,7 @@ rx_accept:
                        goto rx_next;
                }
  
@@ -83,7 +83,7 @@
                 */
 --- a/net80211/ieee80211_crypto_ccmp.c
 +++ b/net80211/ieee80211_crypto_ccmp.c
-@@ -73,7 +73,7 @@
+@@ -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);
@@ -92,7 +92,7 @@
  
  static const struct ieee80211_cipher ccmp = {
        .ic_name        = "AES-CCM",
-@@ -308,7 +308,7 @@
+@@ -308,7 +308,7 @@ ccmp_decap(struct ieee80211_key *k, stru
   * Verify and strip MIC from the frame.
   */
  static int
  }
 --- a/net80211/ieee80211_crypto.h
 +++ b/net80211/ieee80211_crypto.h
-@@ -145,7 +145,7 @@
+@@ -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);
  };
  extern const struct ieee80211_cipher ieee80211_cipher_none;
  
-@@ -163,10 +163,10 @@
+@@ -163,10 +163,10 @@ struct ieee80211_key *ieee80211_crypto_d
   */
  static __inline int
  ieee80211_crypto_demic(struct ieee80211vap *vap, struct ieee80211_key *k,
  /*
 --- a/net80211/ieee80211_crypto_none.c
 +++ b/net80211/ieee80211_crypto_none.c
-@@ -52,7 +52,7 @@
+@@ -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);
  
  const struct ieee80211_cipher ieee80211_cipher_none = {
        .ic_name        = "NONE",
-@@ -137,7 +137,7 @@
+@@ -137,7 +137,7 @@ none_enmic(struct ieee80211_key *k, stru
  }
  
  static int
  
 --- a/net80211/ieee80211_crypto_tkip.c
 +++ b/net80211/ieee80211_crypto_tkip.c
-@@ -57,7 +57,7 @@
+@@ -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 const struct ieee80211_cipher tkip  = {
        .ic_name        = "TKIP",
-@@ -339,7 +339,7 @@
+@@ -339,7 +339,7 @@ tkip_decap(struct ieee80211_key *k, stru
   * Verify and strip MIC from the frame.
   */
  static int
  {
        struct tkip_ctx *ctx = k->wk_private;
        struct sk_buff *skb;
-@@ -355,7 +355,7 @@
+@@ -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 */
                u8 mic0[IEEE80211_WEP_MICLEN];
 --- a/net80211/ieee80211_crypto_wep.c
 +++ b/net80211/ieee80211_crypto_wep.c
-@@ -54,7 +54,7 @@
+@@ -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 const struct ieee80211_cipher wep = {
        .ic_name        = "WEP",
-@@ -244,7 +244,7 @@
+@@ -244,7 +244,7 @@ wep_decap(struct ieee80211_key *k, struc
   * Verify and strip MIC from the frame.
   */
  static int
  }
 --- a/net80211/ieee80211_input.c
 +++ b/net80211/ieee80211_input.c
-@@ -669,7 +669,7 @@
+@@ -669,7 +669,7 @@ ieee80211_input(struct ieee80211vap * va
                 * Next strip any MSDU crypto bits.
                 */
                if (key != NULL &&
                        IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_INPUT,
                                ni->ni_macaddr, "data", "%s", "demic error");
                        IEEE80211_NODE_STAT(ni, rx_demicfail);
-@@ -4293,6 +4293,47 @@
+@@ -4293,6 +4293,47 @@ ath_eth_type_trans(struct sk_buff *skb, 
  }
  #endif
  
   * Debugging support.
 --- a/net80211/ieee80211_proto.h
 +++ b/net80211/ieee80211_proto.h
-@@ -90,6 +90,7 @@
+@@ -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 *);
   * 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 @@
+@@ -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,
        wireless_send_event(dev, IWEVCUSTOM, &wrqu, buf);
 --- a/net80211/ieee80211_output.c
 +++ b/net80211/ieee80211_output.c
-@@ -1074,13 +1074,16 @@
+@@ -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);
                 * Allocate sk_buff for each subsequent fragment; First fragment
 --- a/net80211/ieee80211_node.c
 +++ b/net80211/ieee80211_node.c
-@@ -2264,11 +2264,13 @@
+@@ -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
         */
index 63e8a4f..d882158 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -1699,8 +1699,6 @@
+@@ -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.
         */
@@ -9,7 +9,7 @@
        ATH_RXBUF_LOCK_IRQ(sc);
        if (sc->sc_rxbufcur == NULL)
                sc->sc_rxbufcur = STAILQ_FIRST(&sc->sc_rxbuf);
-@@ -8975,6 +8973,7 @@
+@@ -8975,6 +8973,7 @@ ath_calibrate(unsigned long arg)
                        sc->sc_curchan.channel);
                sc->sc_stats.ast_per_calfail++;
        }
@@ -17,7 +17,7 @@
  
        ath_hal_process_noisefloor(ah);
        if (isIQdone == AH_TRUE) {
-@@ -9043,6 +9042,7 @@
+@@ -9043,6 +9042,7 @@ ath_set_channel(struct ieee80211com *ic)
        struct ath_softc *sc = dev->priv;
  
        (void) ath_chan_set(sc, ic->ic_curchan);
@@ -25,7 +25,7 @@
        /*
         * 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 @@
+@@ -9311,6 +9311,7 @@ ath_newstate(struct ieee80211vap *vap, e
                }
  
                ath_hal_process_noisefloor(ah);
@@ -35,7 +35,7 @@
                 */
 --- a/net80211/ieee80211_wireless.c
 +++ b/net80211/ieee80211_wireless.c
-@@ -4358,6 +4358,7 @@
+@@ -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);
@@ -45,7 +45,7 @@
        si->isi_erp = ni->ni_erp;
 --- a/net80211/ieee80211_ioctl.h
 +++ b/net80211/ieee80211_ioctl.h
-@@ -311,6 +311,7 @@
+@@ -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;
index 9d895d2..8059b99 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -1354,7 +1354,7 @@
+@@ -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));
  
index b4befba..34fae68 100644 (file)
@@ -1,6 +1,6 @@
 --- a/net80211/ieee80211_beacon.c
 +++ b/net80211/ieee80211_beacon.c
-@@ -542,10 +542,10 @@
+@@ -542,10 +542,10 @@ ieee80211_beacon_update(struct ieee80211
                        vap->iv_flags &= ~IEEE80211_F_XRUPDATE;
                }
  #endif
@@ -15,7 +15,7 @@
        /* 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 @@
+@@ -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)) {
@@ -31,7 +31,7 @@
  
 --- a/net80211/ieee80211_node.c
 +++ b/net80211/ieee80211_node.c
-@@ -2025,8 +2025,12 @@
+@@ -2025,8 +2025,12 @@ ieee80211_node_join_11g(struct ieee80211
                }
  
                /* Update ERP element if this is first non ERP station */
@@ -46,7 +46,7 @@
        } else
                ni->ni_flags |= IEEE80211_NODE_ERP;
  }
-@@ -2229,6 +2233,8 @@
+@@ -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) {
@@ -55,7 +55,7 @@
                        IEEE80211_DPRINTF(vap, IEEE80211_MSG_ASSOC,
                                "%s: disable use of protection\n", __func__);
                        ic->ic_flags &= ~IEEE80211_F_USEPROT;
-@@ -2240,7 +2246,9 @@
+@@ -2240,7 +2246,9 @@ ieee80211_node_leave_11g(struct ieee8021
                                ic->ic_flags |= IEEE80211_F_SHPREAMBLE;
                                ic->ic_flags &= ~IEEE80211_F_USEBARKER;
                        }
index 4402761..3355dc7 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -8689,6 +8689,10 @@
+@@ -8689,6 +8689,10 @@ ath_startrecv(struct ath_softc *sc)
  
        sc->sc_rxbufcur = NULL;
  
index d1f3b62..2336d74 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -1778,17 +1778,14 @@
+@@ -1778,17 +1778,14 @@ ath_uapsd_processtriggers(struct ath_sof
                         * may have occurred in the intervening timeframe. */
                        bf->bf_channoise = ic->ic_channoise;
  
@@ -27,7 +27,7 @@
                        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 @@
+@@ -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);
index 338373e..c01135f 100644 (file)
@@ -1,6 +1,6 @@
 --- a/net80211/ieee80211_input.c
 +++ b/net80211/ieee80211_input.c
-@@ -1275,14 +1275,8 @@
+@@ -1275,14 +1275,8 @@ ieee80211_decap(struct ieee80211vap *vap
                eh->ether_type = ether_type;
  
        if (!ALIGNED_POINTER(skb->data + sizeof(*eh), u_int32_t)) {
index ee06fe9..a4b9463 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -9792,7 +9792,9 @@
+@@ -9792,7 +9792,9 @@ ath_getchannels(struct net_device *dev, 
        /*
         * Convert HAL channels to ieee80211 ones.
         */
@@ -10,7 +10,7 @@
        for (i = 0; i < nchan; i++) {
                HAL_CHANNEL *c = &chans[i];
                struct ieee80211_channel *ichan = &ic->ic_channels[i];
-@@ -9819,6 +9821,7 @@
+@@ -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;
  
@@ -18,7 +18,7 @@
                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 @@
+@@ -9907,6 +9910,7 @@ ath_getchannels(struct net_device *dev, 
                                (c->privFlags & 0x0080 ? 
                                 " PF & (1 << 7)" : "")
                                );
index 71e5911..228aae3 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -8438,8 +8438,6 @@
+@@ -8438,8 +8438,6 @@ process_tx_again:
        ath_hal_intrset(sc->sc_ah, sc->sc_imask);
        local_irq_restore(flags);
  
@@ -9,7 +9,7 @@
        if (sc->sc_softled)
                ath_led_event(sc, ATH_LED_TX);
  }
-@@ -8486,8 +8484,6 @@
+@@ -8486,8 +8484,6 @@ process_tx_again:
        ath_hal_intrset(sc->sc_ah, sc->sc_imask);
        local_irq_restore(flags);
  
@@ -18,7 +18,7 @@
        if (sc->sc_softled)
                ath_led_event(sc, ATH_LED_TX);
  }
-@@ -8520,8 +8516,6 @@
+@@ -8520,8 +8516,6 @@ process_tx_again:
        ath_hal_intrset(sc->sc_ah, sc->sc_imask);
        local_irq_restore(flags);
  
@@ -29,7 +29,7 @@
  }
 --- a/net80211/ieee80211_input.c
 +++ b/net80211/ieee80211_input.c
-@@ -1132,7 +1132,7 @@
+@@ -1132,7 +1132,7 @@ ieee80211_deliver_data(struct ieee80211_
            (vap->iv_flags & IEEE80211_F_NOBRIDGE) == 0) {
                struct sk_buff *skb1 = NULL;
  
index 3504bc4..8556e0b 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -397,6 +397,7 @@
+@@ -397,6 +397,7 @@ static int countrycode = -1;
  static int maxvaps = -1;
  static int outdoor = -1;
  static int xchanmode = -1;
@@ -8,7 +8,7 @@
  
  static const char *hal_status_desc[] = {
        "No error",
-@@ -422,6 +423,7 @@
+@@ -422,6 +423,7 @@ static struct notifier_block ath_event_b
  };
  
  #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,52))
@@ -16,7 +16,7 @@
  MODULE_PARM(countrycode, "i");
  MODULE_PARM(maxvaps, "i");
  MODULE_PARM(outdoor, "i");
-@@ -434,6 +436,7 @@
+@@ -434,6 +436,7 @@ MODULE_PARM(autocreate, "s");
  MODULE_PARM(ratectl, "s");
  #else
  #include <linux/moduleparam.h>
@@ -24,7 +24,7 @@
  module_param(countrycode, int, 0600);
  module_param(maxvaps, int, 0600);
  module_param(outdoor, int, 0600);
-@@ -2600,7 +2603,8 @@
+@@ -2600,7 +2603,8 @@ ath_stop_locked(struct net_device *dev)
                }
                if (!sc->sc_invalid) {
                        del_timer_sync(&sc->sc_dfs_cac_timer);
@@ -34,7 +34,7 @@
                }
                ath_draintxq(sc);
                if (!sc->sc_invalid) {
-@@ -2617,6 +2621,20 @@
+@@ -2617,6 +2621,20 @@ ath_stop_locked(struct net_device *dev)
        return 0;
  }
  
@@ -55,7 +55,7 @@
  /*
   * Stop the device, grabbing the top-level lock to protect
   * against concurrent entry through ath_init (which can happen
-@@ -2742,6 +2760,12 @@
+@@ -2742,6 +2760,12 @@ ath_reset(struct net_device *dev)
        HAL_STATUS status;
  
        /*
@@ -68,7 +68,7 @@
         * Convert to a HAL channel description with the flags
         * constrained to reflect the current operating mode.
         */
-@@ -5154,6 +5178,8 @@
+@@ -5154,6 +5178,8 @@ 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);
@@ -77,7 +77,7 @@
  
                sc->sc_stats.ast_be_xmit++;             /* XXX per-VAP? */
        }
-@@ -5403,6 +5429,7 @@
+@@ -5403,6 +5429,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);
@@ -85,7 +85,7 @@
        } else {
                ath_hal_intrset(ah, 0);
                if (reset_tsf)
-@@ -5414,8 +5441,11 @@
+@@ -5414,8 +5441,11 @@ ath_beacon_config(struct ath_softc *sc, 
                         */
                        intval |= HAL_BEACON_ENA;
                        sc->sc_imask |= HAL_INT_SWBA;
@@ -98,7 +98,7 @@
  #ifdef ATH_SUPERG_DYNTURBO
                ath_beacon_dturbo_config(vap, intval &
                                ~(HAL_BEACON_RESET_TSF | HAL_BEACON_ENA));
-@@ -8879,6 +8909,9 @@
+@@ -8879,6 +8909,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));
                }
                /*
                 * re configure beacons when it is a turbo mode switch.
-@@ -8988,8 +9021,11 @@
+@@ -8988,8 +9021,11 @@ ath_calibrate(unsigned long arg)
                sc->sc_curchan.channel, sc->sc_curchan.channelFlags,
                isIQdone ? "done" : "not done");
  
  }
  
  static void
-@@ -9096,7 +9132,8 @@
+@@ -9096,7 +9132,8 @@ ath_newstate(struct ieee80211vap *vap, e
                ieee80211_state_name[vap->iv_state],
                ieee80211_state_name[nstate]);
  
  
        ath_hal_setledstate(ah, leds[nstate]);  /* set LED */
        netif_stop_queue(dev);                  /* before we do anything else */
-@@ -9321,7 +9358,8 @@
+@@ -9321,7 +9358,8 @@ ath_newstate(struct ieee80211vap *vap, e
                                "VAP -> DFSWAIT_PENDING \n");
                        /* start calibration timer with a really small value 
                         * 1/10 sec */
                        /* wake the receiver */
                        netif_wake_queue(dev);
                        /* don't do the other usual stuff... */
-@@ -9364,7 +9402,7 @@
+@@ -9364,7 +9402,7 @@ done:
        error = avp->av_newstate(vap, nstate, arg);
  
        /* Finally, start any timers. */
        }
 --- a/ath/if_athvar.h
 +++ b/ath/if_athvar.h
-@@ -778,6 +778,8 @@
+@@ -778,6 +778,8 @@ struct ath_softc {
        struct ieee80211vap **sc_bslot;         /* beacon xmit slots */
        int sc_bnext;                           /* next slot for beacon xmit */
  
index 49a42e9..6b01d79 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -3320,17 +3320,18 @@
+@@ -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 */
@@ -25,7 +25,7 @@
        eh = (struct ether_header *)skb->data;
  
  #ifdef ATH_SUPERG_FF
-@@ -3601,6 +3602,8 @@
+@@ -3601,6 +3602,8 @@ ath_mgtstart(struct ieee80211com *ic, st
        sc->sc_stats.ast_tx_mgmt++;
        return 0;
  bad:
index 81b10b5..283f7f4 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -8920,7 +8920,7 @@
+@@ -8920,7 +8920,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.
                 */
index d8497a6..877eea6 100644 (file)
@@ -1,6 +1,6 @@
 --- a/net80211/ieee80211_scan_ap.c
 +++ b/net80211/ieee80211_scan_ap.c
-@@ -783,12 +783,6 @@
+@@ -783,12 +783,6 @@ pick_channel(struct ieee80211_scan_state
                                /* break the loop as the subsequent chans won't be 
                                 * better */
                                break;
index e96e672..1e1b276 100644 (file)
@@ -1,6 +1,6 @@
 --- a/net80211/ieee80211_input.c
 +++ b/net80211/ieee80211_input.c
-@@ -950,6 +950,9 @@
+@@ -950,6 +950,9 @@ ieee80211_input_all(struct ieee80211com 
        TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) {
                struct sk_buff *skb1;
  
index ecefd82..50374a7 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -1307,6 +1307,7 @@
+@@ -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;
@@ -10,7 +10,7 @@
                 * use those (only). */
 --- a/ath_rate/minstrel/minstrel.c
 +++ b/ath_rate/minstrel/minstrel.c
-@@ -622,8 +622,12 @@
+@@ -622,8 +622,12 @@ ath_rate_ctl_reset(struct ath_softc *sc,
                        return;
                }
                sn->static_rate_ndx = -1;
@@ -26,7 +26,7 @@
                        sn->rs_thisprob         [x] = 0;
 --- a/ath_rate/sample/sample.c
 +++ b/ath_rate/sample/sample.c
-@@ -835,7 +835,12 @@
+@@ -835,7 +835,12 @@ ath_rate_ctl_reset(struct ath_softc *sc,
        }
        sn->static_rate_ndx = -1;
  
@@ -42,7 +42,7 @@
                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 @@
+@@ -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) */
@@ -52,7 +52,7 @@
  #define       SIOCG80211STATS                 (SIOCDEVPRIVATE+2)
 --- a/net80211/ieee80211_var.h
 +++ b/net80211/ieee80211_var.h
-@@ -281,6 +281,7 @@
+@@ -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 */
@@ -62,7 +62,7 @@
  /* 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 @@
+@@ -2839,6 +2839,12 @@ ieee80211_ioctl_setparam(struct net_devi
                else
                        ic->ic_flags_ext &= ~IEEE80211_FEXT_MARKDFS;
                break;
@@ -75,7 +75,7 @@
  #ifdef ATH_REVERSE_ENGINEERING
        case IEEE80211_PARAM_DUMPREGS:
                ieee80211_dump_registers(dev, info, w, extra);
-@@ -3174,6 +3180,9 @@
+@@ -3174,6 +3180,9 @@ ieee80211_ioctl_getparam(struct net_devi
                else
                        param[0] = 0;
                break;
@@ -85,7 +85,7 @@
        default:
                return -EOPNOTSUPP;
        }
-@@ -5610,6 +5619,10 @@
+@@ -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" },
index 1e75dde..6f448af 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -1308,6 +1308,7 @@
+@@ -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;
@@ -10,7 +10,7 @@
                 * use those (only). */
 --- a/ath_rate/minstrel/minstrel.c
 +++ b/ath_rate/minstrel/minstrel.c
-@@ -638,9 +638,15 @@
+@@ -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;
@@ -27,7 +27,7 @@
                        if (sn->rates[x].rix == 0xff) {
                                DPRINTF(sc, "%s: %s ignore bogus rix at %d\n",
                                        dev_info, __func__, x);
-@@ -649,7 +655,7 @@
+@@ -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 |
@@ -38,7 +38,7 @@
                ath_fill_sample_table(sn);
 --- a/ath_rate/sample/sample.c
 +++ b/ath_rate/sample/sample.c
-@@ -842,8 +842,15 @@
+@@ -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++) {
@@ -58,7 +58,7 @@
                                dev_info, __func__, x);
 --- a/net80211/ieee80211_ioctl.h
 +++ b/net80211/ieee80211_ioctl.h
-@@ -642,6 +642,7 @@
+@@ -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) */
@@ -68,7 +68,7 @@
  #define       SIOCG80211STATS                 (SIOCDEVPRIVATE+2)
 --- a/net80211/ieee80211_var.h
 +++ b/net80211/ieee80211_var.h
-@@ -282,6 +282,7 @@
+@@ -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 */
        int iv_maxrateindex;
@@ -78,7 +78,7 @@
  /* 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 @@
+@@ -2845,6 +2845,12 @@ ieee80211_ioctl_setparam(struct net_devi
                else
                        vap->iv_maxrateindex = 0;
                break;
@@ -91,7 +91,7 @@
  #ifdef ATH_REVERSE_ENGINEERING
        case IEEE80211_PARAM_DUMPREGS:
                ieee80211_dump_registers(dev, info, w, extra);
-@@ -3183,6 +3189,9 @@
+@@ -3183,6 +3189,9 @@ ieee80211_ioctl_getparam(struct net_devi
        case IEEE80211_PARAM_MAXRATE:
                param[0] = vap->iv_maxrateindex;
                break;
        default:
                return -EOPNOTSUPP;
        }
-@@ -5623,6 +5632,10 @@
+@@ -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"},
index 1fa1b85..8015643 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -3239,7 +3239,6 @@
+@@ -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;
@@ -8,7 +8,7 @@
        ath_bufhead bf_head;
        struct ath_buf *tbf, *tempbf;
        struct sk_buff *tskb;
-@@ -3251,6 +3250,7 @@
+@@ -3251,6 +3250,7 @@ ath_hardstart(struct sk_buff *skb, struc
        */
        int requeue = 0;
  #ifdef ATH_SUPERG_FF
@@ -16,7 +16,7 @@
        unsigned int pktlen;
        struct ieee80211com *ic = &sc->sc_ic;
        struct ath_node *an;
-@@ -3316,27 +3316,9 @@
+@@ -3316,27 +3316,9 @@ ath_hardstart(struct sk_buff *skb, struc
                requeue = 1;
                goto hardstart_fail;
        }
@@ -46,7 +46,7 @@
        ATH_TXQ_LOCK_IRQ(txq);
 --- a/net80211/ieee80211_output.c
 +++ b/net80211/ieee80211_output.c
-@@ -283,7 +283,7 @@
+@@ -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) {
@@ -55,7 +55,7 @@
                if (skb1) {
                        memset(SKB_CB(skb1), 0, sizeof(struct ieee80211_cb));
  #ifdef IEEE80211_DEBUG_REFCNT
-@@ -566,7 +566,7 @@
+@@ -566,7 +566,7 @@ ieee80211_skbhdr_adjust(struct ieee80211
        struct ieee80211_key *key, struct sk_buff *skb, int ismulticast)
  {
        /* XXX pre-calculate per node? */
@@ -64,7 +64,7 @@
        int need_tailroom = 0;
  #ifdef ATH_SUPERG_FF
        int isff = ATH_FF_MAGIC_PRESENT(skb);
-@@ -608,109 +608,56 @@
+@@ -608,109 +608,56 @@ ieee80211_skbhdr_adjust(struct ieee80211
                                need_tailroom += cip->ic_miclen;
        }
  
  #define       KEY_UNDEFINED(k)        ((k).wk_cipher == &ieee80211_cipher_none)
 --- a/net80211/ieee80211_input.c
 +++ b/net80211/ieee80211_input.c
-@@ -204,7 +204,6 @@
+@@ -204,7 +204,6 @@ ieee80211_input(struct ieee80211vap * va
        struct ieee80211_frame *wh;
        struct ieee80211_key *key;
        struct ether_header *eh;
  #ifdef ATH_SUPERG_FF
        struct llc *llc;
  #endif
-@@ -244,20 +243,6 @@
+@@ -244,20 +243,6 @@ ieee80211_input(struct ieee80211vap * va
                vap->iv_stats.is_rx_tooshort++;
                goto out;
        }
  
        /*
         * Bit of a cheat here, we use a pointer for a 3-address
-@@ -738,7 +723,7 @@
+@@ -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); 
  
                        if (skb1 == NULL)
                                goto err;
                        ieee80211_skb_copy_noderef(skb, skb1);
-@@ -1137,7 +1122,7 @@
+@@ -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. */
index a49f537..4ae287e 100644 (file)
@@ -2,7 +2,7 @@ Merged from madwifi trunk r3551, r3552
 
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -8251,6 +8251,17 @@
+@@ -8251,6 +8251,17 @@ ath_tx_processq(struct ath_softc *sc, st
                        goto bf_fail;
                }
  
@@ -22,7 +22,7 @@ Merged from madwifi trunk r3551, r3552
  
 --- a/ath/if_athvar.h
 +++ b/ath/if_athvar.h
-@@ -586,7 +586,8 @@
+@@ -586,7 +586,8 @@ struct ath_vap {
  } while (0)
  #define ATH_TXQ_REMOVE_HEAD(_tq, _field) do { \
        STAILQ_REMOVE_HEAD(&(_tq)->axq_q, _field); \
index b17440b..ea92dc4 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath_rate/minstrel/minstrel.c
 +++ b/ath_rate/minstrel/minstrel.c
-@@ -475,7 +475,7 @@
+@@ -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 */
index aa242d5..cf278a4 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -8101,6 +8101,7 @@
+@@ -8101,6 +8101,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);
@@ -10,7 +10,7 @@
  #ifndef ATH_SUPERG_FF
 --- a/ath/if_athvar.h
 +++ b/ath/if_athvar.h
-@@ -446,6 +446,7 @@
+@@ -446,6 +446,7 @@ struct ath_buf {
        u_int16_t bf_flags;                             /* tx descriptor flags */
        u_int64_t bf_tsf;
        int16_t bf_channoise;
@@ -20,7 +20,7 @@
         *      multiple segments.
 --- a/ath_rate/minstrel/minstrel.c
 +++ b/ath_rate/minstrel/minstrel.c
-@@ -333,15 +333,19 @@
+@@ -333,15 +333,19 @@ ath_rate_findrate(struct ath_softc *sc, 
                if (sn->static_rate_ndx >= 0) {
                            ndx = sn->static_rate_ndx;
                } else {
@@ -41,7 +41,7 @@
                                }
  
                                /* Don't look for slowest rate (i.e. slowest
-@@ -398,11 +402,14 @@
+@@ -398,11 +402,14 @@ ath_rate_get_mrr(struct ath_softc *sc, s
                if (sn->num_rates <= 0)
                        return;
  
@@ -58,7 +58,7 @@
                                rc1 = sn->max_tp_rate;
                } else {
                        rc1 = sn->max_tp_rate2;
-@@ -525,6 +532,9 @@
+@@ -525,6 +532,9 @@ ath_rate_tx_complete(struct ath_softc *s
                if (tries <= tries1)
                        return;
  
@@ -70,7 +70,7 @@
                tries = tries - tries1;
 --- a/net80211/ieee80211_rate.h
 +++ b/net80211/ieee80211_rate.h
-@@ -87,6 +87,7 @@
+@@ -87,6 +87,7 @@ struct ieee80211_mrr {
        int retries2;
        int rate3;
        int retries3;
index 0abae51..1364c55 100644 (file)
@@ -1,6 +1,6 @@
 --- a/net80211/ieee80211.c
 +++ b/net80211/ieee80211.c
-@@ -333,7 +333,9 @@
+@@ -333,7 +333,9 @@ ieee80211_ifattach(struct ieee80211com *
                        IEEE80211_MS_TO_TU(IEEE80211_BMISSTHRESH_DEFAULT_MS), 
                        ic->ic_lintval), ic->ic_lintval);
        }
@@ -13,7 +13,7 @@
        TAILQ_INIT(&ic->ic_vaps);
 --- a/net80211/ieee80211_input.c
 +++ b/net80211/ieee80211_input.c
-@@ -3411,14 +3411,18 @@
+@@ -3411,14 +3411,18 @@ ieee80211_recv_mgmt(struct ieee80211vap 
                        IEEE80211_IS_CHAN_ANYG(ic->ic_curchan)) {
  
                        /* Assume no ERP IE == 11b AP */
@@ -39,7 +39,7 @@
  
 --- a/net80211/ieee80211_ioctl.h
 +++ b/net80211/ieee80211_ioctl.h
-@@ -643,6 +643,8 @@
+@@ -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,   /* Maximum rate (by table index) */
@@ -60,7 +60,7 @@
  #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 @@
+@@ -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 */
@@ -72,7 +72,7 @@
         *
 --- a/net80211/ieee80211_wireless.c
 +++ b/net80211/ieee80211_wireless.c
-@@ -2312,6 +2312,12 @@
+@@ -2312,6 +2312,12 @@ ieee80211_ioctl_setparam(struct net_devi
                    IEEE80211_IS_CHAN_ANYG(ic->ic_bsschan))
                        retv = ENETRESET;
                break;
@@ -85,7 +85,7 @@
        case IEEE80211_PARAM_MCASTCIPHER:
                if ((vap->iv_caps & cipher2cap(value)) == 0 &&
                    !ieee80211_crypto_available(vap, value))
-@@ -2955,6 +2961,12 @@
+@@ -2955,6 +2961,12 @@ ieee80211_ioctl_getparam(struct net_devi
        case IEEE80211_PARAM_PROTMODE:
                param[0] = ic->ic_protmode;
                break;
@@ -98,7 +98,7 @@
        case IEEE80211_PARAM_MCASTCIPHER:
                param[0] = rsn->rsn_mcastcipher;
                break;
-@@ -5346,6 +5358,14 @@
+@@ -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_MCASTCIPHER,
 --- a/net80211/ieee80211_node.c
 +++ b/net80211/ieee80211_node.c
-@@ -1877,6 +1877,17 @@
+@@ -1877,6 +1877,17 @@ ieee80211_node_timeout(unsigned long arg
  
        ieee80211_scan_timeout(ic);
        ieee80211_timeout_stations(&ic->ic_sta);
index efa3f6e..ca005e7 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -10274,11 +10274,11 @@
+@@ -10274,11 +10274,11 @@ ath_setcurmode(struct ath_softc *sc, enu
        sc->sc_currates = rt;
        sc->sc_curmode = mode;
        /*
@@ -17,7 +17,7 @@
  }
 --- a/ath/if_athvar.h
 +++ b/ath/if_athvar.h
-@@ -272,6 +272,10 @@
+@@ -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 */
  
@@ -30,7 +30,7 @@
  #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 @@
+@@ -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;
@@ -39,7 +39,7 @@
  
                KASSERT(rt != NULL, ("no rate table, mode %u", sc->sc_curmode));
  
-@@ -281,7 +281,7 @@
+@@ -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++) {
@@ -50,7 +50,7 @@
                return tt;
 --- a/ath_rate/minstrel/minstrel.h
 +++ b/ath_rate/minstrel/minstrel.h
-@@ -180,14 +180,6 @@
+@@ -180,14 +180,6 @@ struct minstrel_node {
  #define MAX(a,b)        ((a) > (b) ? (a) : (b))
  #endif
  
@@ -67,7 +67,7 @@
   * 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 @@
+@@ -170,7 +170,7 @@ calc_usecs_unicast_packet(struct ath_sof
        struct ieee80211com *ic = &sc->sc_ic;
        unsigned int tt = 0;
        unsigned int x;
@@ -76,7 +76,7 @@
        unsigned int cix = rt->info[rix].controlRate;
        KASSERT(rt != NULL, ("no rate table, mode %u", sc->sc_curmode));
  
-@@ -254,7 +254,7 @@
+@@ -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++) {
@@ -87,7 +87,7 @@
        return tt;
 --- a/ath_rate/sample/sample.h
 +++ b/ath_rate/sample/sample.h
-@@ -106,9 +106,6 @@
+@@ -106,9 +106,6 @@ struct sample_node {
  #define MAX(a,b)        ((a) > (b) ? (a) : (b))
  #endif
  
index 5dd23fe..957e8ad 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -2723,6 +2723,9 @@
+@@ -2723,6 +2723,9 @@ ar_device(int devid)
  static int
  ath_set_ack_bitrate(struct ath_softc *sc, int high)
  {
@@ -10,7 +10,7 @@
        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 */
-@@ -10789,8 +10792,13 @@
+@@ -10789,8 +10792,13 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl
                                break;
  #endif
                        case ATH_ACKRATE:
@@ -28,7 +28,7 @@
                                ath_rp_record(sc,
 --- a/ath/if_athvar.h
 +++ b/ath/if_athvar.h
-@@ -681,6 +681,7 @@
+@@ -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 */
index 8b74e02..599948d 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -8862,8 +8862,7 @@
+@@ -8862,8 +8862,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. */
index ca5ffdc..dae9f21 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath/if_ath_ahb.c
 +++ b/ath/if_ath_ahb.c
-@@ -245,6 +245,8 @@
+@@ -245,6 +245,8 @@ init_ath_wmac(u_int16_t devid, u_int16_t
        num_activesc++;
        /* Ready to process interrupts */
  
index 3765264..67e7574 100644 (file)
@@ -1,6 +1,6 @@
 --- a/net80211/ieee80211_scan_sta.c
 +++ b/net80211/ieee80211_scan_sta.c
-@@ -317,147 +317,6 @@
+@@ -317,147 +317,6 @@ found:
  #undef ISPROBE
  }
  
  /*
   * Start a station-mode scan by populating the channel list.
   */
-@@ -466,81 +325,14 @@
+@@ -466,81 +325,14 @@ sta_start(struct ieee80211_scan_state *s
  {
        struct ieee80211com *ic = vap->iv_ic;
        struct sta_table *st = ss->ss_priv;
        /* XXX tunables */
        /* 
         * The scanner will stay on station for ss_maxdwell ms (using a 
-@@ -749,17 +541,7 @@
+@@ -749,17 +541,7 @@ match_bss(struct ieee80211vap *vap,
        fail = 0;
        if (isclr(ic->ic_chan_active, ieee80211_chan2ieee(ic, se->se_chan)))
                fail |= 0x01;
        if (vap->iv_opmode == IEEE80211_M_IBSS) {
                if ((se->se_capinfo & IEEE80211_CAPINFO_IBSS) == 0)
                        fail |= 0x02;
-@@ -1168,78 +950,6 @@
+@@ -1168,78 +950,6 @@ static const struct ieee80211_scanner st
        .scan_default           = ieee80211_sta_join,
  };
  
  
  /*
   * Select a channel to start an adhoc network on.
-@@ -1405,7 +1115,7 @@
+@@ -1405,7 +1115,7 @@ static const struct ieee80211_scanner ad
        .scan_name              = "default",
        .scan_attach            = sta_attach,
        .scan_detach            = sta_detach,
        .scan_end               = adhoc_pick_bss,
 --- a/net80211/ieee80211.c
 +++ b/net80211/ieee80211.c
-@@ -278,6 +278,11 @@
+@@ -278,6 +278,11 @@ ieee80211_ifattach(struct ieee80211com *
                        ("channel with bogus ieee number %u", c->ic_ieee));
                setbit(ic->ic_chan_avail, c->ic_ieee);
  
                        ic->ic_modecaps |= 1 << IEEE80211_MODE_11A;
 --- a/net80211/_ieee80211.h
 +++ b/net80211/_ieee80211.h
-@@ -132,6 +132,11 @@
+@@ -132,6 +132,11 @@ enum ieee80211_scanmode {
        IEEE80211_SCAN_FIRST    = 2,    /* take first suitable candidate */
  };
  
  /*
   * Channels are specified by frequency and attributes.
   */
-@@ -142,6 +147,7 @@
+@@ -142,6 +147,7 @@ struct ieee80211_channel {
        int8_t ic_maxregpower;  /* maximum regulatory tx power in dBm */
        int8_t ic_maxpower;     /* maximum tx power in dBm */
        int8_t ic_minpower;     /* minimum tx power in dBm */
  #define       IEEE80211_CHAN_MAX      255
 --- a/net80211/ieee80211_ioctl.h
 +++ b/net80211/ieee80211_ioctl.h
-@@ -555,6 +555,7 @@
+@@ -555,6 +555,7 @@ struct ieee80211req_scan_result {
  #define       IEEE80211_IOCTL_WDSADDMAC       (SIOCIWFIRSTPRIV+26)
  #define       IEEE80211_IOCTL_WDSDELMAC       (SIOCIWFIRSTPRIV+28)
  #define       IEEE80211_IOCTL_KICKMAC         (SIOCIWFIRSTPRIV+30)
        IEEE80211_WMMPARAMS_CWMIN       = 1,
 --- a/net80211/ieee80211_scan_ap.c
 +++ b/net80211/ieee80211_scan_ap.c
-@@ -129,131 +129,7 @@
+@@ -129,131 +129,7 @@ struct ap_state {
  
  static int ap_flush(struct ieee80211_scan_state *);
  static void action_tasklet(IEEE80211_TQUEUE_ARG);
  
  /*
   * Attach prior to any scanning work.
-@@ -327,29 +203,6 @@
+@@ -327,29 +203,6 @@ saveie(u_int8_t **iep, const u_int8_t *i
                ieee80211_saveie(iep, ie);
  }
  
  /*
   * Start an ap scan by populating the channel list.
   */
-@@ -358,8 +211,6 @@
+@@ -358,8 +211,6 @@ ap_start(struct ieee80211_scan_state *ss
  {
        struct ap_state *as         = ss->ss_priv;
        struct ieee80211com *ic     = NULL;
        int i;
        unsigned int mode = 0;
  
-@@ -368,80 +219,8 @@
+@@ -368,80 +219,8 @@ ap_start(struct ieee80211_scan_state *ss
        /* Determine mode flags to match, or leave zero for auto mode */
        as->as_vap_desired_mode = vap->iv_des_mode;
        as->as_required_mode    = 0;
        ss->ss_next = 0;
        /* XXX tunables */
        ss->ss_mindwell = msecs_to_jiffies(200);        /* 200ms */
-@@ -761,13 +540,6 @@
+@@ -761,13 +540,6 @@ pick_channel(struct ieee80211_scan_state
                if (IEEE80211_IS_CHAN_RADAR(c->chan))
                        continue;
  
                                as->as_required_mode)
 --- a/net80211/ieee80211_scan.c
 +++ b/net80211/ieee80211_scan.c
-@@ -958,6 +958,80 @@
+@@ -958,6 +958,80 @@ ieee80211_scan_flush(struct ieee80211com
        }
  }
  
   * signal is detected.  AP mode only.  Return 1 on success, 0 on
 --- a/net80211/ieee80211_scan.h
 +++ b/net80211/ieee80211_scan.h
-@@ -219,4 +219,7 @@
+@@ -219,4 +219,7 @@ void ieee80211_scanner_register(enum iee
  void ieee80211_scanner_unregister(enum ieee80211_opmode,
        const struct ieee80211_scanner *);
  void ieee80211_scanner_unregister_all(const struct ieee80211_scanner *);
  #endif /* _NET80211_IEEE80211_SCAN_H_ */
 --- a/net80211/ieee80211_wireless.c
 +++ b/net80211/ieee80211_wireless.c
-@@ -3873,6 +3873,106 @@
+@@ -3873,6 +3873,106 @@ ieee80211_ioctl_kickmac(struct net_devic
        return ieee80211_ioctl_setmlme(dev, info, w, (char *)&mlme);
  }
  
  static int
  ieee80211_ioctl_addmac(struct net_device *dev, struct iw_request_info *info,
        void *w, char *extra)
-@@ -5656,6 +5756,8 @@
+@@ -5656,6 +5756,8 @@ static const struct iw_priv_args ieee802
         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
        /*
-@@ -5753,6 +5855,7 @@
+@@ -5753,6 +5855,7 @@ static const iw_handler ieee80211_priv_h
        set_priv(IEEE80211_IOCTL_WDSADDMAC, ieee80211_ioctl_wdsmac),
        set_priv(IEEE80211_IOCTL_WDSDELMAC, ieee80211_ioctl_wdsdelmac),
        set_priv(IEEE80211_IOCTL_KICKMAC, ieee80211_ioctl_kickmac),
index 981005f..af00f5e 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -1014,9 +1014,7 @@
+@@ -1014,9 +1014,7 @@ ath_attach(u_int16_t devid, struct net_d
         */
        sc->sc_hasveol = ath_hal_hasveol(ah);
  
@@ -11,7 +11,7 @@
        sc->sc_hasintmit = ath_hal_hasintmit(ah);
  
        /* get mac address from hardware */
-@@ -1144,6 +1142,11 @@
+@@ -1144,6 +1142,11 @@ ath_attach(u_int16_t devid, struct net_d
        sc->sc_rp_lasttsf       = 0;
        sc->sc_last_tsf         = 0;
  
@@ -23,7 +23,7 @@
        return 0;
  bad3:
        ieee80211_ifdetach(ic);
-@@ -2428,6 +2431,43 @@
+@@ -2428,6 +2431,43 @@ ath_chan2flags(struct ieee80211_channel 
        return flags;
  }
  
@@ -67,7 +67,7 @@
  /*
   * Context: process context
   */
-@@ -2493,8 +2533,7 @@
+@@ -2493,8 +2533,7 @@ ath_init(struct net_device *dev)
        if (sc->sc_softled)
                ath_hal_gpioCfgOutput(ah, sc->sc_ledpin);
  
@@ -77,7 +77,7 @@
  
        /*
         * This is needed only to setup initial state
-@@ -2530,7 +2569,7 @@
+@@ -2530,7 +2569,7 @@ ath_init(struct net_device *dev)
         * Enable MIB interrupts when there are hardware phy counters.
         * Note we only do this (at the moment) for station mode.
         */
@@ -86,7 +86,7 @@
                sc->sc_imask |= HAL_INT_MIB;
        ath_hal_intrset(ah, sc->sc_imask);
  
-@@ -2787,9 +2826,7 @@
+@@ -2787,9 +2826,7 @@ ath_reset(struct net_device *dev)
                EPRINTF(sc, "Unable to reset hardware: '%s' (HAL status %u)\n",
                        ath_get_hal_status_desc(status), status);
  
@@ -97,7 +97,7 @@
        ath_update_txpow(sc);           /* update tx power state */
        ath_radar_update(sc);
        ath_setdefantenna(sc, sc->sc_defant);
-@@ -4174,6 +4211,8 @@
+@@ -4174,6 +4211,8 @@ ath_calcrxfilter(struct ath_softc *sc)
        if (sc->sc_nmonvaps > 0)
                rfilt |= (HAL_RX_FILTER_CONTROL | HAL_RX_FILTER_BEACON |
                          HAL_RX_FILTER_PROBEREQ | HAL_RX_FILTER_PROM);
        if (sc->sc_curchan.privFlags & CHANNEL_DFS)
                rfilt |= (HAL_RX_FILTER_PHYERR | HAL_RX_FILTER_PHYRADAR);
        return rfilt;
-@@ -6524,9 +6563,6 @@
+@@ -6524,9 +6563,6 @@ process_rx_again:
                        rs->rs_rssi = 0;
  
                len = rs->rs_datalen;
  
                if (rs->rs_more) {
                        /*
-@@ -8874,9 +8910,7 @@
+@@ -8874,9 +8910,7 @@ ath_chan_set(struct ath_softc *sc, struc
                if (sc->sc_softled)
                        ath_hal_gpioCfgOutput(ah, sc->sc_ledpin);
  
                sc->sc_curchan = hchan;
                ath_update_txpow(sc);           /* update tx power state */
                ath_radar_update(sc);
-@@ -10653,9 +10687,54 @@
+@@ -10653,9 +10687,54 @@ enum {
        ATH_RP_IGNORED          = 24,
        ATH_RADAR_IGNORED       = 25,
        ATH_MAXVAPS             = 26,
  ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl, write, filp, buffer, lenp, ppos)
  {
        struct ath_softc *sc = ctl->extra1;
-@@ -10841,6 +10920,11 @@
+@@ -10841,6 +10920,11 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl
                        case ATH_RADAR_IGNORED:
                                sc->sc_radar_ignored = val;
                                break;
                        default:
                                ret = -EINVAL;
                                break;
-@@ -10907,6 +10991,11 @@
+@@ -10907,6 +10991,11 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl
                case ATH_RADAR_IGNORED:
                        val = sc->sc_radar_ignored;
                        break;
                default:
                        ret = -EINVAL;
                        break;
-@@ -11084,6 +11173,24 @@
+@@ -11084,6 +11173,24 @@ static const ctl_table ath_sysctl_templa
          .proc_handler = ath_sysctl_halparam,
          .extra2       = (void *)ATH_RADAR_IGNORED,
        },
  
 --- a/ath/if_athvar.h
 +++ b/ath/if_athvar.h
-@@ -693,6 +693,10 @@
+@@ -693,6 +693,10 @@ struct ath_softc {
        unsigned int sc_txcont_power; /* Continuous transmit power in 0.5dBm units */
        unsigned int sc_txcont_rate;  /* Continuous transmit rate in Mbps */
  
        const HAL_RATE_TABLE *sc_currates;      /* current rate table */
 --- a/ath/if_ath_hal.h
 +++ b/ath/if_ath_hal.h
-@@ -67,14 +67,14 @@
+@@ -67,14 +67,14 @@ static inline HAL_POWER_MODE ath_hal_get
  
  static inline HAL_BOOL ath_hal_getdiagstate(struct ath_hal *ah, int request,
                                            const void *args, u_int32_t argsize,
index 281e348..bcc214b 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath/if_ath_pci.c
 +++ b/ath/if_ath_pci.c
-@@ -114,11 +114,13 @@
+@@ -114,11 +114,13 @@ static struct pci_device_id ath_pci_id_t
        { 0x168c, 0x0023, PCI_ANY_ID, PCI_ANY_ID },
        { 0x168c, 0x0024, PCI_ANY_ID, PCI_ANY_ID },
        { 0x168c, 0x9013, PCI_ANY_ID, PCI_ANY_ID }, /* sonicwall */
index e96bf86..635857a 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath_hal/ah_os.c
 +++ b/ath_hal/ah_os.c
-@@ -343,6 +343,46 @@
+@@ -343,6 +343,46 @@ EXPORT_SYMBOL(ath_hal_func);
   * NB: see the comments in ah_osdep.h about byte-swapping register
   *     reads and writes to understand what's going on below.
   */
@@ -47,7 +47,7 @@
  void __ahdecl
  ath_hal_reg_write(struct ath_hal *ah, u_int reg, u_int32_t val)
  {
-@@ -351,20 +391,33 @@
+@@ -351,20 +391,33 @@ ath_hal_reg_write(struct ath_hal *ah, u_
                ath_hal_printf(ah, "%s: WRITE 0x%x <= 0x%x\n", 
                                (ath_hal_func ?: "unknown"), reg, val);
  #endif
@@ -85,7 +85,7 @@
                                (ath_hal_func ?: "unknown"), reg, val);
  #endif
        return val;
-@@ -581,7 +634,9 @@
+@@ -581,7 +634,9 @@ init_ath_hal(void)
  {
        const char *sep;
        int i;
index a3d8de4..23cde7b 100644 (file)
@@ -5,7 +5,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
 
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -8332,6 +8332,14 @@
+@@ -8332,6 +8332,14 @@ ath_tx_processq(struct ath_softc *sc, st
  #endif
                                if (ts->ts_status & HAL_TXERR_XRETRY) {
                                        sc->sc_stats.ast_tx_xretries++;
@@ -22,7 +22,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
                                                DPRINTF(sc, ATH_DEBUG_UAPSD,
 --- a/net80211/ieee80211_linux.c
 +++ b/net80211/ieee80211_linux.c
-@@ -156,6 +156,7 @@
+@@ -156,6 +156,7 @@ ieee80211_getmgtframe(u_int8_t **frm, u_
                if (off != 0)
                        skb_reserve(skb, align - off);
  
@@ -32,7 +32,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
                SKB_CB(skb)->next = NULL;
 --- a/net80211/ieee80211_linux.h
 +++ b/net80211/ieee80211_linux.h
-@@ -393,6 +393,7 @@
+@@ -393,6 +393,7 @@ typedef spinlock_t acl_lock_t;
        void            (*next_destructor)(struct sk_buff *skb);
  #endif
        struct sk_buff *next;                   /* fast frame sk_buf chain */
@@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
  
 --- a/net80211/ieee80211_output.c
 +++ b/net80211/ieee80211_output.c
-@@ -778,6 +778,8 @@
+@@ -778,6 +778,8 @@ ieee80211_encap(struct ieee80211_node *n
        else
                hdrsize = sizeof(struct ieee80211_frame);
  
@@ -51,7 +51,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
        switch (vap->iv_opmode) {
        case IEEE80211_M_IBSS:
        case IEEE80211_M_AHDEMO:
-@@ -1622,6 +1624,7 @@
+@@ -1622,6 +1624,7 @@ ieee80211_add_xr_param(u_int8_t *frm, st
        ie->param_len = frm - &ie->param_oui[0];
        return frm;
  }
@@ -59,7 +59,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
  #endif
  /*
   * Send a probe request frame with the specified ssid
-@@ -1886,6 +1889,7 @@
+@@ -1886,6 +1889,7 @@ ieee80211_send_mgmt(struct ieee80211_nod
                                sizeof(u_int16_t)+IEEE80211_CHALLENGE_LEN : 0));
                if (skb == NULL)
                        senderr(ENOMEM, is_tx_nobuf);
@@ -67,7 +67,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
  
                ((__le16 *)frm)[0] =
                        (is_shared_key) ? htole16(IEEE80211_AUTH_ALG_SHARED)
-@@ -1960,6 +1964,7 @@
+@@ -1960,6 +1964,7 @@ ieee80211_send_mgmt(struct ieee80211_nod
                        vap->app_ie[IEEE80211_APPIE_FRAME_ASSOC_REQ].length);
                if (skb == NULL)
                        senderr(ENOMEM, is_tx_nobuf);
index f8b895c..b87569e 100644 (file)
@@ -5,7 +5,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
 
 --- a/net80211/ieee80211_scan_sta.c
 +++ b/net80211/ieee80211_scan_sta.c
-@@ -209,6 +209,19 @@
+@@ -209,6 +209,19 @@ saveie(u_int8_t **iep, const u_int8_t *i
                ieee80211_saveie(iep, ie);
  }
  
@@ -25,7 +25,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
  /*
   * Process a beacon or probe response frame; create an
   * entry in the scan cache or update any previous entry.
-@@ -233,8 +246,8 @@
+@@ -233,8 +246,8 @@ sta_add(struct ieee80211_scan_state *ss,
        SCAN_STA_LOCK_IRQ(st);
        LIST_FOREACH(se, &st->st_hash[hash], se_hash)
                if (IEEE80211_ADDR_EQ(se->base.se_macaddr, macaddr) &&
@@ -36,7 +36,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
                        goto found;
  
        MALLOC(se, struct sta_entry *, sizeof(struct sta_entry),
-@@ -252,8 +265,8 @@
+@@ -252,8 +265,8 @@ found:
        ise = &se->base;
  
        /* XXX ap beaconing multiple ssid w/ same bssid */
index 9255768..c9d60ea 100644 (file)
@@ -6,7 +6,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
 
 --- a/net80211/ieee80211_ioctl.h
 +++ b/net80211/ieee80211_ioctl.h
-@@ -646,6 +646,7 @@
+@@ -646,6 +646,7 @@ enum {
        IEEE80211_PARAM_MINRATE                 = 76,   /* Maximum 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 */
@@ -25,7 +25,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
  #define IEEE80211_COVERAGE_CLASS_MAX  31      /* max coverage class */
  #define IEEE80211_REGCLASSIDS_MAX     10      /* max regclass id list */
  
-@@ -219,6 +221,10 @@
+@@ -219,6 +221,10 @@ struct ieee80211vap {
        u_int8_t iv_nickname[IEEE80211_NWID_LEN];
        u_int iv_bgscanidle;                            /* bg scan idle threshold */
        u_int iv_bgscanintvl;                           /* bg scan min interval */
@@ -36,7 +36,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
        u_int iv_scanvalid;                             /* scan cache valid threshold */
        struct ieee80211_roam iv_roam;                  /* sta-mode roaming state */
  
-@@ -608,6 +614,7 @@
+@@ -608,6 +614,7 @@ MALLOC_DECLARE(M_80211_VAP);
  #define IEEE80211_FEXT_SWBMISS                0x00000400      /* CONF: use software beacon timer */
  #define IEEE80211_FEXT_DROPUNENC_EAPOL        0x00000800      /* CONF: drop unencrypted eapol frames */
  #define IEEE80211_FEXT_APPIE_UPDATE   0x00001000      /* STATE: beacon APP IE updated */
@@ -46,7 +46,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
  #define IEEE80211_COM_UAPSD_DISABLE(_ic)      ((_ic)->ic_flags_ext &= ~IEEE80211_FEXT_UAPSD)
 --- a/net80211/ieee80211_wireless.c
 +++ b/net80211/ieee80211_wireless.c
-@@ -2744,6 +2744,9 @@
+@@ -2744,6 +2744,9 @@ ieee80211_ioctl_setparam(struct net_devi
                else
                        retv = EINVAL;
                break;
@@ -56,7 +56,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
        case IEEE80211_PARAM_MCAST_RATE:
                /* units are in KILObits per second */
                if (value >= 256 && value <= 54000)
-@@ -3144,6 +3147,9 @@
+@@ -3144,6 +3147,9 @@ ieee80211_ioctl_getparam(struct net_devi
        case IEEE80211_PARAM_BGSCAN_INTERVAL:
                param[0] = vap->iv_bgscanintvl / HZ;    /* seconds */
                break;
@@ -66,7 +66,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
        case IEEE80211_PARAM_MCAST_RATE:
                param[0] = vap->iv_mcast_rate;  /* seconds */
                break;
-@@ -5666,6 +5672,10 @@
+@@ -5666,6 +5672,10 @@ static const struct iw_priv_args ieee802
          IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "bgscanintvl" },
        { IEEE80211_PARAM_BGSCAN_INTERVAL,
          0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_bgscanintvl" },
@@ -79,7 +79,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
        { IEEE80211_PARAM_MCAST_RATE,
 --- a/net80211/ieee80211_input.c
 +++ b/net80211/ieee80211_input.c
-@@ -3013,8 +3013,10 @@
+@@ -3013,8 +3013,10 @@ contbgscan(struct ieee80211vap *vap)
  {
        struct ieee80211com *ic = vap->iv_ic;
  
@@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
  }
  
  static __inline int
-@@ -3258,6 +3260,25 @@
+@@ -3258,6 +3260,25 @@ ieee80211_recv_mgmt(struct ieee80211vap 
                        /* record tsf of last beacon */
                        memcpy(ni->ni_tstamp.data, scan.tstamp,
                                sizeof(ni->ni_tstamp));
@@ -119,7 +119,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
                                                "beacon interval divergence: "
 --- a/net80211/ieee80211_scan.c
 +++ b/net80211/ieee80211_scan.c
-@@ -616,6 +616,7 @@
+@@ -616,6 +616,7 @@ ieee80211_cancel_scan(struct ieee80211va
  
                /* clear bg scan NOPICK and mark cancel request */
                ss->ss_flags &= ~IEEE80211_SCAN_NOPICK;
@@ -127,7 +127,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
                SCAN_PRIVATE(ss)->ss_iflags |= ISCAN_CANCEL;
                ss->ss_ops->scan_cancel(ss, vap);
                /* force it to fire asap */
-@@ -782,7 +783,7 @@
+@@ -782,7 +783,7 @@ again:
                                ieee80211_sta_pwrsave(vap, 0);
                                if (ss->ss_next >= ss->ss_last) {
                                        ieee80211_notify_scan_done(vap);
@@ -138,7 +138,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
                        SCAN_PRIVATE(ss)->ss_iflags &= ~ISCAN_CANCEL;
 --- a/net80211/ieee80211_proto.c
 +++ b/net80211/ieee80211_proto.c
-@@ -1450,6 +1450,7 @@
+@@ -1450,6 +1450,7 @@ __ieee80211_newstate(struct ieee80211vap
                }
                break;
        case IEEE80211_S_AUTH:
@@ -148,7 +148,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
                KASSERT(vap->iv_opmode == IEEE80211_M_STA || 
 --- a/net80211/ieee80211_output.c
 +++ b/net80211/ieee80211_output.c
-@@ -238,7 +238,8 @@
+@@ -238,7 +238,8 @@ ieee80211_hardstart(struct sk_buff *skb,
        }
        
        /* Cancel any running BG scan */
index 0bae461..b549272 100644 (file)
@@ -5,7 +5,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
 
 --- a/net80211/ieee80211_scan_sta.c
 +++ b/net80211/ieee80211_scan_sta.c
-@@ -242,6 +242,10 @@
+@@ -242,6 +242,10 @@ sta_add(struct ieee80211_scan_state *ss,
        struct ieee80211_scan_entry *ise;
        int hash;
  
index 723424f..8d25dc2 100644 (file)
@@ -5,7 +5,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
 
 --- a/net80211/ieee80211_node.c
 +++ b/net80211/ieee80211_node.c
-@@ -599,10 +599,9 @@
+@@ -599,10 +599,9 @@ ieee80211_ibss_merge(struct ieee80211_no
  EXPORT_SYMBOL(ieee80211_ibss_merge);
  
  static __inline int
@@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
  }
  
  /*
-@@ -634,8 +633,8 @@
+@@ -634,8 +633,8 @@ ieee80211_sta_join1(struct ieee80211_nod
         * Check if old+new node have the same ssid in which
         * case we can reassociate when operating in sta mode.
         */
index f1151ac..2060001 100644 (file)
@@ -5,7 +5,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
 
 --- a/net80211/ieee80211_proto.c
 +++ b/net80211/ieee80211_proto.c
-@@ -1348,7 +1348,7 @@
+@@ -1348,7 +1348,7 @@ __ieee80211_newstate(struct ieee80211vap
                                IEEE80211_SEND_MGMT(ni,
                                        IEEE80211_FC0_SUBTYPE_DISASSOC,
                                        IEEE80211_REASON_ASSOC_LEAVE);
@@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
                                break;
                        case IEEE80211_M_HOSTAP:
                                ieee80211_iterate_nodes(&ic->ic_sta,
-@@ -1358,12 +1358,14 @@
+@@ -1358,12 +1358,14 @@ __ieee80211_newstate(struct ieee80211vap
                                break;
                        }
                        goto reset;
@@ -29,7 +29,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
                                break;
                        case IEEE80211_M_HOSTAP:
                                ieee80211_iterate_nodes(&ic->ic_sta,
-@@ -1376,7 +1378,6 @@
+@@ -1376,7 +1378,6 @@ __ieee80211_newstate(struct ieee80211vap
                case IEEE80211_S_SCAN:
                        ieee80211_cancel_scan(vap);
                        goto reset;
@@ -37,7 +37,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
                reset:
                        ieee80211_reset_bss(vap);
                        break;
-@@ -1429,10 +1430,12 @@
+@@ -1429,10 +1430,12 @@ __ieee80211_newstate(struct ieee80211vap
                                        IEEE80211_SCAN_FOREVER,
                                        vap->iv_des_nssid, vap->iv_des_ssid,
                                        NULL);
@@ -51,7 +51,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
                                vap->iv_flags &= ~IEEE80211_F_SIBSS;    /* XXX */
                                if (ic->ic_roaming == IEEE80211_ROAMING_AUTO)
                                        ieee80211_check_scan(vap,
-@@ -1511,7 +1514,7 @@
+@@ -1511,7 +1514,7 @@ __ieee80211_newstate(struct ieee80211vap
                                IEEE80211_FC0_SUBTYPE_ASSOC_REQ, 0);
                        break;
                case IEEE80211_S_RUN:
@@ -60,7 +60,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
                        if (ic->ic_roaming == IEEE80211_ROAMING_AUTO) {
                                /* NB: caller specifies ASSOC/REASSOC by arg */
                                IEEE80211_SEND_MGMT(ni, arg ?
-@@ -1779,6 +1782,7 @@
+@@ -1779,6 +1782,7 @@ ieee80211_newstate(struct ieee80211vap *
                          ieee80211_state_name[nstate], 
                          ieee80211_state_name[dstate]);
  
@@ -70,7 +70,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
        case IEEE80211_S_ASSOC:
 --- a/net80211/ieee80211_linux.c
 +++ b/net80211/ieee80211_linux.c
-@@ -233,33 +233,59 @@
+@@ -233,33 +233,59 @@ ieee80211_vlan_vdetach(struct ieee80211v
  }
  
  void
@@ -149,7 +149,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
  }
  
  void
-@@ -269,18 +295,14 @@
+@@ -269,18 +295,14 @@ ieee80211_notify_node_leave(struct ieee8
        struct net_device *dev = vap->iv_dev;
        union iwreq_data wreq;
  
@@ -178,7 +178,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
  void
 --- a/net80211/ieee80211_node.c
 +++ b/net80211/ieee80211_node.c
-@@ -2332,6 +2332,7 @@
+@@ -2332,6 +2332,7 @@ ieee80211_node_leave(struct ieee80211_no
                count_suppchans(ic, ni, -1);
        IEEE80211_UNLOCK_IRQ(ic);
  
@@ -186,7 +186,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
        /*
         * Cleanup station state.  In particular clear various
         * state that might otherwise be reused if the node
-@@ -2339,7 +2340,7 @@
+@@ -2339,7 +2340,7 @@ ieee80211_node_leave(struct ieee80211_no
         * (and memory is reclaimed).
         */
        ieee80211_sta_leave(ni);
@@ -208,7 +208,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
  /* simple hash is enough for variation of macaddr */
 --- a/net80211/ieee80211_output.c
 +++ b/net80211/ieee80211_output.c
-@@ -2141,7 +2141,7 @@
+@@ -2141,7 +2141,7 @@ ieee80211_send_mgmt(struct ieee80211_nod
  
        ieee80211_mgmt_output(ieee80211_ref_node(ni), skb, type);
        if (timer)
@@ -219,7 +219,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
        return ret;
 --- a/net80211/ieee80211_wireless.c
 +++ b/net80211/ieee80211_wireless.c
-@@ -514,8 +514,9 @@
+@@ -514,8 +514,9 @@ ieee80211_ioctl_siwap(struct net_device 
                        vap->iv_flags |= IEEE80211_F_DESBSSID;
  
                IEEE80211_ADDR_COPY(vap->iv_des_bssid, &ap_addr->sa_data);
@@ -232,7 +232,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
  }
 --- a/net80211/ieee80211_linux.h
 +++ b/net80211/ieee80211_linux.h
-@@ -643,6 +643,7 @@
+@@ -643,6 +643,7 @@ void ieee80211_vlan_vdetach(struct ieee8
  #define       free_netdev(dev)        kfree(dev)
  #endif
  
index 8de323e..b33cc3f 100644 (file)
@@ -7,7 +7,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
 
 --- a/net80211/ieee80211_input.c
 +++ b/net80211/ieee80211_input.c
-@@ -3400,12 +3400,17 @@
+@@ -3400,12 +3400,17 @@ ieee80211_recv_mgmt(struct ieee80211vap 
                        }
  
                        /* WDS/Repeater: re-schedule software beacon timer for 
@@ -31,7 +31,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
                         * Otherwise, check if it's the right time to do
 --- a/net80211/ieee80211_proto.c
 +++ b/net80211/ieee80211_proto.c
-@@ -1209,6 +1209,8 @@
+@@ -1209,6 +1209,8 @@ ieee80211_beacon_miss(struct ieee80211co
        }
        /* XXX locking */
        TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) {
@@ -40,7 +40,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
                IEEE80211_DPRINTF(vap,
                        IEEE80211_MSG_STATE | IEEE80211_MSG_DEBUG,
                        "%s\n", "beacon miss");
-@@ -1221,6 +1223,29 @@
+@@ -1221,6 +1223,29 @@ ieee80211_beacon_miss(struct ieee80211co
                if (vap->iv_opmode != IEEE80211_M_STA ||
                    vap->iv_state != IEEE80211_S_RUN)
                        continue;
@@ -70,7 +70,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
                if (ic->ic_roaming == IEEE80211_ROAMING_AUTO) {
  #ifdef ATH_SUPERG_DYNTURBO
                        /* 
-@@ -1621,14 +1646,14 @@
+@@ -1621,14 +1646,14 @@ __ieee80211_newstate(struct ieee80211vap
                }
  
                /* WDS/Repeater: Start software beacon timer for STA */
@@ -92,7 +92,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
  
 --- a/net80211/ieee80211_var.h
 +++ b/net80211/ieee80211_var.h
-@@ -283,6 +283,7 @@
+@@ -283,6 +283,7 @@ struct ieee80211vap {
  
        struct timer_list iv_swbmiss;                   /* software beacon miss timer */
        u_int16_t iv_swbmiss_period;                    /* software beacon miss timer period */
index 376204a..7e178e1 100644 (file)
@@ -5,7 +5,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
 
 --- a/net80211/ieee80211_ioctl.h
 +++ b/net80211/ieee80211_ioctl.h
-@@ -647,6 +647,8 @@
+@@ -647,6 +647,8 @@ enum {
        IEEE80211_PARAM_PROTMODE_RSSI           = 77,   /* RSSI Threshold for enabling protection mode */
        IEEE80211_PARAM_PROTMODE_TIMEOUT        = 78,   /* Timeout for expiring protection mode */
        IEEE80211_PARAM_BGSCAN_THRESH           = 79,   /* bg scan rssi threshold */
@@ -16,7 +16,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
  #define       SIOCG80211STATS                 (SIOCDEVPRIVATE+2)
 --- a/net80211/ieee80211_wireless.c
 +++ b/net80211/ieee80211_wireless.c
-@@ -2799,6 +2799,12 @@
+@@ -2799,6 +2799,12 @@ ieee80211_ioctl_setparam(struct net_devi
        case IEEE80211_PARAM_ROAM_RATE_11G:
                vap->iv_roam.rate11b = value;
                break;
@@ -29,7 +29,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
        case IEEE80211_PARAM_UAPSDINFO:
                if (vap->iv_opmode == IEEE80211_M_HOSTAP) {
                        if (ic->ic_caps & IEEE80211_C_UAPSD) {
-@@ -3184,6 +3190,12 @@
+@@ -3184,6 +3190,12 @@ ieee80211_ioctl_getparam(struct net_devi
        case IEEE80211_PARAM_ROAM_RATE_11G:
                param[0] = vap->iv_roam.rate11b;
                break;
@@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
        case IEEE80211_PARAM_UAPSDINFO:
                if (vap->iv_opmode == IEEE80211_M_HOSTAP) {
                        if (IEEE80211_VAP_UAPSD_ENABLED(vap))
-@@ -5733,6 +5745,14 @@
+@@ -5733,6 +5745,14 @@ static const struct iw_priv_args ieee802
          IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "rate11g" },
        { IEEE80211_PARAM_ROAM_RATE_11G,
          0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_rate11g" },
@@ -59,7 +59,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
        { IEEE80211_PARAM_UAPSDINFO,
 --- a/net80211/ieee80211_input.c
 +++ b/net80211/ieee80211_input.c
-@@ -3261,6 +3261,19 @@
+@@ -3261,6 +3261,19 @@ ieee80211_recv_mgmt(struct ieee80211vap 
                        memcpy(ni->ni_tstamp.data, scan.tstamp,
                                sizeof(ni->ni_tstamp));
  
@@ -81,7 +81,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
                        if (!(ic->ic_flags & IEEE80211_F_SCAN) && (rssi < vap->iv_bgscanthr) &&
 --- a/net80211/ieee80211_var.h
 +++ b/net80211/ieee80211_var.h
-@@ -223,6 +223,9 @@
+@@ -223,6 +223,9 @@ struct ieee80211vap {
        u_int iv_bgscanintvl;                           /* bg scan min interval */
        u_int iv_bgscanthr;                                     /* bg scan rssi threshold */
        u_int iv_bgscantrintvl;                         /* bg scan trigger interval */
index 54fcd76..880f2d6 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -4925,7 +4925,7 @@
+@@ -4925,7 +4925,7 @@ ath_beacon_generate(struct ath_softc *sc
         * capability info and arrange for a mode change
         * if needed.
         */
index d0d76a1..53fbc77 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -539,8 +539,8 @@
+@@ -539,8 +539,8 @@ ath_attach(u_int16_t devid, struct net_d
  
        /* Allocate space for dynamically determined maximum VAP count */
        sc->sc_bslot = 
index 31caa1b..df4306b 100644 (file)
@@ -1,6 +1,6 @@
 --- a/net80211/ieee80211.c
 +++ b/net80211/ieee80211.c
-@@ -684,6 +684,7 @@
+@@ -684,6 +684,7 @@ ieee80211_find_channel(struct ieee80211c
        int i;
  
        /* Brute force search */
index 6aa70d3..f5a94c6 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -389,6 +389,7 @@
+@@ -389,6 +389,7 @@ static int ath_countrycode = CTRY_DEFAUL
  static int ath_outdoor = AH_FALSE;            /* enable outdoor use */
  static int ath_xchanmode = AH_TRUE;           /* enable extended channels */
  static int ath_maxvaps = ATH_MAXVAPS_DEFAULT;   /* set default maximum vaps */
@@ -8,7 +8,7 @@
  static char *autocreate = NULL;
  static char *ratectl = DEF_RATE_CTL;
  static int rfkill = 0;
-@@ -432,6 +433,7 @@
+@@ -432,6 +433,7 @@ MODULE_PARM(rfkill, "i");
  #ifdef ATH_CAP_TPC
  MODULE_PARM(tpc, "i");
  #endif
@@ -16,7 +16,7 @@
  MODULE_PARM(autocreate, "s");
  MODULE_PARM(ratectl, "s");
  #else
-@@ -445,6 +447,7 @@
+@@ -445,6 +447,7 @@ module_param(rfkill, int, 0600);
  #ifdef ATH_CAP_TPC
  module_param(tpc, int, 0600);
  #endif
@@ -24,7 +24,7 @@
  module_param(autocreate, charp, 0600);
  module_param(ratectl, charp, 0600);
  #endif
-@@ -457,6 +460,7 @@
+@@ -457,6 +460,7 @@ MODULE_PARM_DESC(rfkill, "Enable/disable
  MODULE_PARM_DESC(tpc, "Enable/disable per-packet transmit power control (TPC) "
                "capability");
  #endif
@@ -32,7 +32,7 @@
  MODULE_PARM_DESC(autocreate, "Create ath device in "
                "[sta|ap|wds|adhoc|ahdemo|monitor] mode. defaults to sta, use "
                "'none' to disable");
-@@ -5072,7 +5076,7 @@
+@@ -5072,7 +5076,7 @@ ath_beacon_send(struct ath_softc *sc, in
                DPRINTF(sc, ATH_DEBUG_BEACON_PROC,
                        "Missed %u consecutive beacons (n_beacon=%u)\n",
                        sc->sc_bmisscount, n_beacon);
@@ -41,7 +41,7 @@
                        ATH_SCHEDULE_TQUEUE(&sc->sc_bstucktq, needmark);
                return;
        }
-@@ -5228,7 +5232,7 @@
+@@ -5228,7 +5232,7 @@ ath_bstuck_tasklet(TQUEUE_ARG data)
         *     check will be true, in which case return
         *     without resetting the driver.
         */
index a8af671..5950f9f 100644 (file)
@@ -2,7 +2,7 @@ Patch adapted from ubnt madwifi patchset
 
 --- a/net80211/ieee80211_node.c
 +++ b/net80211/ieee80211_node.c
-@@ -659,7 +659,7 @@
+@@ -659,7 +659,7 @@ ieee80211_sta_join1(struct ieee80211_nod
                 */
                if (canreassoc) {
                        vap->iv_nsparams.newstate = IEEE80211_S_ASSOC;
@@ -13,7 +13,7 @@ Patch adapted from ubnt madwifi patchset
                        vap->iv_nsparams.newstate = IEEE80211_S_AUTH;
 --- a/net80211/ieee80211_scan_sta.c
 +++ b/net80211/ieee80211_scan_sta.c
-@@ -748,14 +748,17 @@
+@@ -748,14 +748,17 @@ notfound:
   * a reference to an entry w/o holding the lock on the table.
   */
  static struct sta_entry *
@@ -33,7 +33,7 @@ Patch adapted from ubnt madwifi patchset
                        break;
        SCAN_STA_UNLOCK_IRQ(st);
  
-@@ -772,7 +775,7 @@
+@@ -772,7 +775,7 @@ sta_roam_check(struct ieee80211_scan_sta
        u_int8_t roamRate, curRate;
        int8_t roamRssi, curRssi;
  
@@ -42,7 +42,7 @@ Patch adapted from ubnt madwifi patchset
        if (se == NULL) {
                /* XXX something is wrong */
                return;
-@@ -866,8 +869,8 @@
+@@ -866,8 +869,8 @@ sta_age(struct ieee80211_scan_state *ss)
         */
        KASSERT(vap->iv_opmode == IEEE80211_M_STA,
                ("wrong mode %u", vap->iv_opmode));
@@ -53,7 +53,7 @@ Patch adapted from ubnt madwifi patchset
            vap->iv_state >= IEEE80211_S_RUN)
                /* XXX vap is implicit */
                sta_roam_check(ss, vap);
-@@ -922,7 +925,11 @@
+@@ -922,7 +925,11 @@ sta_assoc_fail(struct ieee80211_scan_sta
        struct sta_table *st = ss->ss_priv;
        struct sta_entry *se;
  
@@ -66,7 +66,7 @@ Patch adapted from ubnt madwifi patchset
        if (se != NULL) {
                se->se_fails++;
                se->se_lastfail = jiffies;
-@@ -939,7 +946,7 @@
+@@ -939,7 +946,7 @@ sta_assoc_success(struct ieee80211_scan_
        struct sta_table *st = ss->ss_priv;
        struct sta_entry *se;
  
index 7094a43..4beef62 100644 (file)
@@ -1,6 +1,6 @@
 --- a/net80211/ieee80211_scan_sta.c
 +++ b/net80211/ieee80211_scan_sta.c
-@@ -201,8 +201,10 @@
+@@ -201,8 +201,10 @@ sta_flush_table(struct sta_table *st)
  }
  
  static void
@@ -12,7 +12,7 @@
        if (ie == NULL)
                *iep = NULL;
        else
-@@ -304,10 +306,10 @@
+@@ -304,10 +306,10 @@ found:
                    (const struct ieee80211_tim_ie *) sp->tim;
                ise->se_dtimperiod = tim->tim_period;
        }
@@ -29,7 +29,7 @@
        if (se->se_fails && (jiffies - se->se_lastfail) > STA_FAILS_AGE*HZ) {
 --- a/net80211/ieee80211_input.c
 +++ b/net80211/ieee80211_input.c
-@@ -3106,6 +3106,7 @@
+@@ -3106,6 +3106,7 @@ ieee80211_recv_mgmt(struct ieee80211vap 
                 */
                IEEE80211_VERIFY_LENGTH(efrm - frm, 12);
                memset(&scan, 0, sizeof(scan));
@@ -39,7 +39,7 @@
                scan.bintval = le16toh(*(__le16 *)frm);
 --- a/net80211/ieee80211_scan.h
 +++ b/net80211/ieee80211_scan.h
-@@ -133,6 +133,7 @@
+@@ -133,6 +133,7 @@ struct ieee80211_scanparams {
        u_int8_t erp;
        u_int16_t bintval;
        u_int8_t timoff;
index 84e9ed9..43aac66 100644 (file)
@@ -1,6 +1,6 @@
 --- a/net80211/ieee80211_wireless.c
 +++ b/net80211/ieee80211_wireless.c
-@@ -3723,6 +3723,7 @@
+@@ -3723,6 +3723,7 @@ ieee80211_ioctl_setmlme(struct net_devic
                if (vap->iv_opmode == IEEE80211_M_STA) {
                        struct scanlookup lookup;
  
index 0e4b3a8..f35e657 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -124,7 +124,7 @@
+@@ -124,7 +124,7 @@ enum {
  };
  
  static struct ieee80211vap *ath_vap_create(struct ieee80211com *,
@@ -9,7 +9,7 @@
  static void ath_vap_delete(struct ieee80211vap *);
  static int ath_init(struct net_device *);
  static int ath_set_ack_bitrate(struct ath_softc *, int);
-@@ -1123,8 +1123,6 @@
+@@ -1123,8 +1123,6 @@ ath_attach(u_int16_t devid, struct net_d
                        autocreatemode = IEEE80211_M_IBSS;
                else if (!strcmp(autocreate, "ahdemo"))
                        autocreatemode = IEEE80211_M_AHDEMO;
@@ -18,7 +18,7 @@
                else if (!strcmp(autocreate, "monitor"))
                        autocreatemode = IEEE80211_M_MONITOR;
                else {
-@@ -1137,7 +1135,7 @@
+@@ -1137,7 +1135,7 @@ ath_attach(u_int16_t devid, struct net_d
        if (autocreatemode != -1) {
                rtnl_lock();
                vap = ieee80211_create_vap(ic, "ath%d", dev,
@@ -27,7 +27,7 @@
                rtnl_unlock();
                if (vap == NULL)
                        EPRINTF(sc, "Autocreation of %s VAP failed.", autocreate);
-@@ -1230,14 +1228,14 @@
+@@ -1230,14 +1228,14 @@ ath_detach(struct net_device *dev)
  
  static struct ieee80211vap *
  ath_vap_create(struct ieee80211com *ic, const char *name,
@@ -44,7 +44,7 @@
  
        if (ic->ic_dev->flags & IFF_RUNNING) {
                /* needs to disable hardware too */
-@@ -1271,8 +1269,12 @@
+@@ -1271,8 +1269,11 @@ ath_vap_create(struct ieee80211com *ic, 
                } else
                        ic_opmode = opmode;
                break;
        case IEEE80211_M_WDS:
 +              if (!master)
 +                      return NULL;
-+              ic_opmode = ic->ic_opmode;
 +              break;
 +      case IEEE80211_M_HOSTAP:
                /* permit multiple APs and/or WDS links */
                /* XXX sta+ap for repeater/bridge application */
                if ((sc->sc_nvaps != 0) && (ic->ic_opmode == IEEE80211_M_STA))
-@@ -1304,7 +1306,7 @@
+@@ -1304,7 +1305,7 @@ ath_vap_create(struct ieee80211com *ic, 
        }
  
        avp = dev->priv;
@@ -67,7 +66,7 @@
        /* override with driver methods */
        vap = &avp->av_vap;
        avp->av_newstate = vap->iv_newstate;
-@@ -4209,8 +4211,7 @@
+@@ -4209,8 +4210,7 @@ ath_calcrxfilter(struct ath_softc *sc)
        if (ic->ic_opmode == IEEE80211_M_STA ||
            sc->sc_opmode == HAL_M_IBSS ||      /* NB: AHDEMO too */
            (sc->sc_nostabeacons) || sc->sc_scanning ||
@@ -77,7 +76,7 @@
                rfilt |= HAL_RX_FILTER_BEACON;
        if (sc->sc_nmonvaps > 0)
                rfilt |= (HAL_RX_FILTER_CONTROL | HAL_RX_FILTER_BEACON |
-@@ -9030,8 +9031,6 @@
+@@ -9030,8 +9030,6 @@ ath_calibrate(unsigned long arg)
                 * set sc->beacons if we might need to restart
                   * them after ath_reset. */
                if (!sc->sc_beacons &&
                        sc->sc_beacons = 1;
 --- a/net80211/ieee80211.c
 +++ b/net80211/ieee80211.c
-@@ -396,7 +396,7 @@
+@@ -373,10 +373,25 @@ void
+ ieee80211_ifdetach(struct ieee80211com *ic)
+ {
+       struct ieee80211vap *vap;
++      int count;
++
++      /* bring down all vaps */
++      TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) {
++              ieee80211_stop(vap->iv_dev);
++      }
++
++      /* wait for all subifs to disappear */
++      do {
++              schedule();
++              rtnl_lock();
++              count = ic->ic_subifs;
++              rtnl_unlock();
++      } while (count > 0);
+       rtnl_lock();
+-      while ((vap = TAILQ_FIRST(&ic->ic_vaps)) != NULL)
++      while ((vap = TAILQ_FIRST(&ic->ic_vaps)) != NULL) {
+               ic->ic_vap_delete(vap);
++      }
+       rtnl_unlock();
+       del_timer(&ic->ic_dfs_excl_timer);
+@@ -396,7 +411,7 @@ EXPORT_SYMBOL(ieee80211_ifdetach);
  
  int
  ieee80211_vap_setup(struct ieee80211com *ic, struct net_device *dev,
  {
  #define       IEEE80211_C_OPMODE \
        (IEEE80211_C_IBSS | IEEE80211_C_HOSTAP | IEEE80211_C_AHDEMO | \
-@@ -510,9 +510,18 @@
+@@ -510,9 +525,18 @@ ieee80211_vap_setup(struct ieee80211com 
  
        vap->iv_monitor_crc_errors = 0;
        vap->iv_monitor_phy_errors = 0;
        /* NB: Defer setting dev_addr so driver can override */
  
        ieee80211_crypto_vattach(vap);
-@@ -547,7 +556,8 @@
+@@ -547,7 +571,8 @@ ieee80211_vap_attach(struct ieee80211vap
        ifmedia_set(&vap->iv_media, imr.ifm_active);
  
        IEEE80211_LOCK_IRQ(ic);
        IEEE80211_UNLOCK_IRQ(ic);
  
        IEEE80211_ADDR_COPY(dev->dev_addr, vap->iv_myaddr);
-@@ -579,10 +589,24 @@
+@@ -579,10 +604,27 @@ ieee80211_vap_detach(struct ieee80211vap
  {
        struct ieee80211com *ic = vap->iv_ic;
        struct net_device *dev = vap->iv_dev;
 +
 +      /* Drop all WDS links that belong to this vap */
 +      while ((avp = TAILQ_FIRST(&vap->iv_wdslinks)) != NULL) {
-+              ieee80211_stop(avp->iv_dev);
++              if (avp->iv_state != IEEE80211_S_INIT)
++                      ieee80211_stop(avp->iv_dev);
 +              ic->ic_vap_delete(avp);
 +      }
  
        IEEE80211_CANCEL_TQUEUE(&vap->iv_stajoin1tq);
        IEEE80211_LOCK_IRQ(ic);
 -      TAILQ_REMOVE(&ic->ic_vaps, vap, iv_next);
-+      if (vap->iv_wdsnode)
++      if (vap->iv_wdsnode) {
++              vap->iv_wdsnode->ni_subif = NULL;
 +              ieee80211_unref_node(&vap->iv_wdsnode);
++      }
 +      if ((vap->iv_opmode == IEEE80211_M_WDS) &&
 +              (vap->iv_master != NULL))
 +              TAILQ_REMOVE(&vap->iv_master->iv_wdslinks, vap, iv_wdsnext);
        IEEE80211_UNLOCK_IRQ(ic);
 --- a/net80211/ieee80211_ioctl.h
 +++ b/net80211/ieee80211_ioctl.h
-@@ -474,7 +474,7 @@
+@@ -474,7 +474,7 @@ struct ieee80211req {
  #define       IEEE80211_IOC_DTIM_PERIOD       52      /* DTIM period (beacons) */
  #define       IEEE80211_IOC_BEACON_INTERVAL   53      /* beacon interval (ms) */
  #define       IEEE80211_IOC_ADDMAC            54      /* add sta to MAC ACL table */
  #define       IEEE80211_IOC_FF                56      /* ATH fast frames (on, off) */
  #define       IEEE80211_IOC_TURBOP            57      /* ATH turbo' (on, off) */
  #define       IEEE80211_IOC_APPIEBUF          58      /* IE in the management frame */
-@@ -552,8 +552,8 @@
+@@ -552,8 +552,8 @@ struct ieee80211req_scan_result {
  #define       IEEE80211_IOCTL_HALMAP          (SIOCIWFIRSTPRIV+21)
  #define       IEEE80211_IOCTL_ADDMAC          (SIOCIWFIRSTPRIV+22)
  #define       IEEE80211_IOCTL_DELMAC          (SIOCIWFIRSTPRIV+24)
  #define       IEEE80211_IOCTL_KICKMAC         (SIOCIWFIRSTPRIV+30)
  #define       IEEE80211_IOCTL_SETSCANLIST     (SIOCIWFIRSTPRIV+31)
  
+@@ -649,6 +649,7 @@ enum {
+       IEEE80211_PARAM_BGSCAN_THRESH           = 79,   /* bg scan rssi threshold */
+       IEEE80211_PARAM_RSSI_DIS_THR    = 80,   /* rssi threshold for disconnection */
+       IEEE80211_PARAM_RSSI_DIS_COUNT  = 81,   /* counter for rssi threshold */
++      IEEE80211_PARAM_WDS_SEP                 = 82,   /* move wds stations into separate interfaces */
+ };
+ #define       SIOCG80211STATS                 (SIOCDEVPRIVATE+2)
 --- a/net80211/ieee80211_linux.h
 +++ b/net80211/ieee80211_linux.h
-@@ -650,5 +650,5 @@
+@@ -81,6 +81,12 @@ set_quality(struct iw_quality *iq, u_int
+ #endif
+ }
++#ifndef container_of
++#define container_of(ptr, type, member) ({          \
++    const typeof( ((type *)0)->member ) *__mptr = (ptr);    \
++          (type *)( (char *)__mptr - offsetof(type,member) );})
++#endif
++
+ /*
+  * Task deferral
+  *
+@@ -113,6 +119,29 @@ typedef void *IEEE80211_TQUEUE_ARG;
+ #define       IEEE80211_RESCHEDULE    schedule
++#include <linux/sched.h>
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,41)
++#include <linux/tqueue.h>
++#define work_struct                   tq_struct
++#define schedule_work(t)              schedule_task((t))
++#define flush_scheduled_work()                flush_scheduled_tasks()
++#define IEEE80211_INIT_WORK(t, f) do {                        \
++      memset((t), 0, sizeof(struct tq_struct)); \
++      (t)->routine = (void (*)(void*)) (f);   \
++      (t)->data=(void *) (t);                 \
++} while (0)
++#else
++#include <linux/workqueue.h>
++
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
++#define IEEE80211_INIT_WORK(_t, _f)   INIT_WORK((_t), (void (*)(void *))(_f), (_t));
++#else
++#define IEEE80211_INIT_WORK(_t, _f)   INIT_WORK((_t), (_f));
++#endif
++
++#endif /* KERNEL_VERSION < 2.5.41 */
++
++
+ /* Locking */
+ /* NB: beware, spin_is_locked() is not usefully defined for !(DEBUG || SMP)
+  * because spinlocks do not exist in this configuration. Instead IRQs 
+@@ -167,6 +196,14 @@ typedef spinlock_t ieee80211com_lock_t;
+       IEEE80211_VAPS_LOCK_ASSERT(_ic);                \
+       spin_unlock_bh(&(_ic)->ic_vapslock);            \
+ } while (0)
++#define       IEEE80211_VAPS_LOCK_IRQ(_ic) do {                                       \
++      unsigned long __ilockflags;                                     \
++      IEEE80211_VAPS_LOCK_CHECK(_ic);                                 \
++      spin_lock_irqsave(&(_ic)->ic_vapslock, __ilockflags);
++#define       IEEE80211_VAPS_UNLOCK_IRQ(_ic)                                  \
++      IEEE80211_VAPS_LOCK_ASSERT(_ic);                                        \
++      spin_unlock_irqrestore(&(_ic)->ic_vapslock, __ilockflags);      \
++} while (0)
+ #if (defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK)) && defined(spin_is_locked)
+ #define IEEE80211_VAPS_LOCK_ASSERT(_ic) \
+@@ -650,5 +687,5 @@ struct ifreq;
  int ieee80211_ioctl_create_vap(struct ieee80211com *, struct ifreq *,
        struct net_device *);
  struct ieee80211vap *ieee80211_create_vap(struct ieee80211com *, char *,
  #endif /* _NET80211_IEEE80211_LINUX_H_ */
 --- a/net80211/ieee80211_var.h
 +++ b/net80211/ieee80211_var.h
-@@ -187,6 +187,12 @@
+@@ -187,6 +187,12 @@ struct ieee80211vap {
        struct ieee80211_proc_entry *iv_proc_entries;
        struct vlan_group *iv_vlgrp;                    /* vlan group state */
  
        TAILQ_ENTRY(ieee80211vap) iv_next;              /* list of vap instances */
        struct ieee80211com *iv_ic;                     /* back ptr to common state */
        u_int32_t iv_debug;                             /* debug msg flags */
-@@ -447,7 +453,7 @@
+@@ -316,6 +322,7 @@ struct ieee80211com {
+       u_int8_t ic_myaddr[IEEE80211_ADDR_LEN];
+       struct timer_list ic_inact;             /* mgmt/inactivity timer */
++      unsigned int ic_subifs;
+       u_int32_t ic_flags;                     /* state flags */
+       u_int32_t ic_flags_ext;                 /* extension of state flags */
+       u_int32_t ic_caps;                      /* capabilities */
+@@ -447,7 +454,7 @@ struct ieee80211com {
        atomic_t ic_node_counter;
        /* Virtual AP create/delete */
        struct ieee80211vap *(*ic_vap_create)(struct ieee80211com *,
        void (*ic_vap_delete)(struct ieee80211vap *);
  
        /* Send/recv 802.11 management frame */
-@@ -703,7 +709,7 @@
+@@ -619,6 +626,7 @@ MALLOC_DECLARE(M_80211_VAP);
+ #define IEEE80211_FEXT_DROPUNENC_EAPOL        0x00000800      /* CONF: drop unencrypted eapol frames */
+ #define IEEE80211_FEXT_APPIE_UPDATE   0x00001000      /* STATE: beacon APP IE updated */
+ #define IEEE80211_FEXT_BGSCAN_THR     0x00002000      /* bgscan due to low rssi */
++#define IEEE80211_FEXT_WDSSEP         0x00004000      /* move wds clients into separate interfaces */
+ #define IEEE80211_COM_UAPSD_ENABLE(_ic)               ((_ic)->ic_flags_ext |= IEEE80211_FEXT_UAPSD)
+ #define IEEE80211_COM_UAPSD_DISABLE(_ic)      ((_ic)->ic_flags_ext &= ~IEEE80211_FEXT_UAPSD)
+@@ -703,7 +711,7 @@ MALLOC_DECLARE(M_80211_VAP);
  int ieee80211_ifattach(struct ieee80211com *);
  void ieee80211_ifdetach(struct ieee80211com *);
  int ieee80211_vap_setup(struct ieee80211com *, struct net_device *,
  void ieee80211_mark_dfs(struct ieee80211com *, struct ieee80211_channel *);
 --- a/net80211/ieee80211_wireless.c
 +++ b/net80211/ieee80211_wireless.c
-@@ -2190,7 +2190,7 @@
+@@ -2190,7 +2190,7 @@ ieee80211_setupxr(struct ieee80211vap *v
                        ieee80211_scan_flush(ic);       /* NB: could optimize */
  
                        if (!(xrvap = ic->ic_vap_create(ic, name, IEEE80211_M_HOSTAP,
                                return;
  
                        /* We use iv_xrvap to link to the parent VAP as well */
-@@ -3801,74 +3801,51 @@
+@@ -2867,6 +2867,14 @@ ieee80211_ioctl_setparam(struct net_devi
+               else
+                       vap->iv_minrateindex = 0;
+               break;
++      case IEEE80211_PARAM_WDS_SEP:
++              if (vap->iv_opmode != IEEE80211_M_HOSTAP)
++                      retv = -EINVAL;
++              else if (value)
++                      vap->iv_flags_ext |= IEEE80211_FEXT_WDSSEP;
++              else
++                      vap->iv_flags_ext &= ~IEEE80211_FEXT_WDSSEP;
++              break;
+ #ifdef ATH_REVERSE_ENGINEERING
+       case IEEE80211_PARAM_DUMPREGS:
+               ieee80211_dump_registers(dev, info, w, extra);
+@@ -3223,6 +3231,9 @@ ieee80211_ioctl_getparam(struct net_devi
+       case IEEE80211_PARAM_MINRATE:
+               param[0] = vap->iv_minrateindex;
+               break;
++      case IEEE80211_PARAM_WDS_SEP:
++              param[0] = !!(vap->iv_flags_ext & IEEE80211_FEXT_WDSSEP);
++              break;
+       default:
+               return -EOPNOTSUPP;
+       }
+@@ -3801,74 +3812,54 @@ ieee80211_ioctl_setmlme(struct net_devic
        return 0;
  }
  
 -      }
 -
 -      memcpy(vap->wds_mac, sa->sa_data, IEEE80211_ADDR_LEN);
--
++      if (vap->iv_opmode != IEEE80211_M_HOSTAP)
++              return -EINVAL;
 -      printk("%s: Added WDS MAC: " MAC_FMT "\n", dev->name,
 -              MAC_ADDR(vap->wds_mac));
 +      name = kmalloc(strlen(vap->iv_dev->name) + sizeof(WDSNAME) + 1, GFP_KERNEL);
  }
  
  /*
-@@ -5391,8 +5368,8 @@
+@@ -4470,6 +4461,8 @@ get_sta_space(void *arg, struct ieee8021
+       struct ieee80211vap *vap = ni->ni_vap;
+       size_t ielen;
++      if (req->vap->iv_wdsnode && ni->ni_subif)
++              vap = ni->ni_subif;
+       if (vap != req->vap && vap != req->vap->iv_xrvap)       /* only entries for this vap */
+               return;
+       if ((vap->iv_opmode == IEEE80211_M_HOSTAP ||
+@@ -4489,6 +4482,8 @@ get_sta_info(void *arg, struct ieee80211
+       size_t ielen, len;
+       u_int8_t *cp;
++      if (req->vap->iv_wdsnode && ni->ni_subif)
++              vap = ni->ni_subif;
+       if (vap != req->vap && vap != req->vap->iv_xrvap)       /* only entries for this vap (or) xrvap */
+               return;
+       if ((vap->iv_opmode == IEEE80211_M_HOSTAP ||
+@@ -5391,8 +5386,8 @@ static const struct iw_priv_args ieee802
          IW_PRIV_TYPE_ADDR | IW_PRIV_SIZE_FIXED | 1, 0, "kickmac"},
        { IEEE80211_IOCTL_WDSADDMAC,
          IW_PRIV_TYPE_ADDR | IW_PRIV_SIZE_FIXED | 1, 0,"wds_add" },
        { IEEE80211_IOCTL_SETCHANLIST,
          IW_PRIV_TYPE_CHANLIST | IW_PRIV_SIZE_FIXED, 0,"setchanlist" },
        { IEEE80211_IOCTL_GETCHANLIST,
-@@ -5884,8 +5861,8 @@
+@@ -5790,6 +5785,10 @@ static const struct iw_priv_args ieee802
+        0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_minrate"},
+       { IEEE80211_IOCTL_SETSCANLIST,
+        IW_PRIV_TYPE_CHAR | 255, 0, "setscanlist"},
++      { IEEE80211_PARAM_WDS_SEP,
++       IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "wdssep"},
++      { IEEE80211_PARAM_WDS_SEP,
++       0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_wdssep"},
+ #ifdef ATH_REVERSE_ENGINEERING
+       /*
+@@ -5884,8 +5883,8 @@ static const iw_handler ieee80211_priv_h
  #endif
        set_priv(IEEE80211_IOCTL_ADDMAC, ieee80211_ioctl_addmac),
        set_priv(IEEE80211_IOCTL_DELMAC, ieee80211_ioctl_delmac),
        set_priv(IEEE80211_IOCTL_KICKMAC, ieee80211_ioctl_kickmac),
        set_priv(IEEE80211_IOCTL_SETSCANLIST, ieee80211_ioctl_setscanlist),
  #ifdef ATH_REVERSE_ENGINEERING
-@@ -5956,7 +5933,7 @@
+@@ -5913,6 +5912,8 @@ static int
+ ieee80211_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
+ {
+       struct ieee80211vap *vap = dev->priv;
++      struct ieee80211com *ic = vap->iv_ic;
++      struct ieee80211_node *ni;
+       switch (cmd) {
+       case SIOCG80211STATS:
+@@ -5921,8 +5922,20 @@ ieee80211_ioctl(struct net_device *dev, 
+       case SIOC80211IFDESTROY:
+               if (!capable(CAP_NET_ADMIN))
+                       return -EPERM;
++              /* drop all node subifs */
++              TAILQ_FOREACH(ni, &ic->ic_sta.nt_node, ni_list) {
++                      struct ieee80211vap *avp = ni->ni_subif;
++
++                      if (ni->ni_vap != vap)
++                              continue;
++                      if (!avp)
++                              continue;
++                      ni->ni_subif = NULL;
++                      ieee80211_stop(avp->iv_dev);
++                      ic->ic_vap_delete(avp);
++              }
+               ieee80211_stop(vap->iv_dev);    /* force state before cleanup */
+-              vap->iv_ic->ic_vap_delete(vap);
++              ic->ic_vap_delete(vap);
+               return 0;
+       case IEEE80211_IOCTL_GETKEY:
+               return ieee80211_ioctl_getkey(dev, (struct iwreq *) ifr);
+@@ -5956,7 +5969,7 @@ ieee80211_ioctl_create_vap(struct ieee80
  
        strncpy(name, cp.icp_name, sizeof(name));
  
        if (vap == NULL)
                return -EIO;
  
-@@ -5973,9 +5950,9 @@
+@@ -5973,9 +5986,9 @@ EXPORT_SYMBOL(ieee80211_ioctl_create_vap
   */
  struct ieee80211vap*
  ieee80211_create_vap(struct ieee80211com *ic, char *name,
  
 --- a/net80211/ieee80211_input.c
 +++ b/net80211/ieee80211_input.c
-@@ -201,6 +201,7 @@
+@@ -199,8 +199,10 @@ ieee80211_input(struct ieee80211vap * va
+ {
+ #define       HAS_SEQ(type)   ((type & 0x4) == 0)
        struct ieee80211_node * ni = ni_or_null;
-       struct ieee80211com *ic = vap->iv_ic;
-       struct net_device *dev = vap->iv_dev;
+-      struct ieee80211com *ic = vap->iv_ic;
+-      struct net_device *dev = vap->iv_dev;
++      struct ieee80211com *ic;
++      struct net_device *dev;
 +      struct ieee80211_node *ni_wds = NULL;
++      struct net_device_stats *stats;
        struct ieee80211_frame *wh;
        struct ieee80211_key *key;
        struct ether_header *eh;
-@@ -545,11 +546,29 @@
+@@ -212,6 +214,19 @@ ieee80211_input(struct ieee80211vap * va
+       u_int8_t *bssid;
+       u_int16_t rxseq;
++      type = -1;                      /* undefined */
++
++      if (!vap)
++              goto out;
++
++      ic = vap->iv_ic;
++      if (!ic)
++              goto out;
++
++      dev = vap->iv_dev;
++      if (!dev)
++              goto out;
++
+       /* initialize ni as in the previous API */
+       if (ni_or_null == NULL) {
+                /* This function does not 'own' vap->iv_bss, so we cannot
+@@ -227,7 +242,6 @@ ieee80211_input(struct ieee80211vap * va
+       /* XXX adjust device in sk_buff? */
+-      type = -1;                      /* undefined */
+       /*
+        * In monitor mode, send everything directly to bpf.
+        * Also do not process frames w/o i_addr2 any further.
+@@ -434,7 +448,7 @@ ieee80211_input(struct ieee80211vap * va
+       switch (type) {
+       case IEEE80211_FC0_TYPE_DATA:
+-              hdrspace = ieee80211_hdrspace(ic, wh);
++              hdrspace = ieee80211_hdrsize(wh);
+               if (skb->len < hdrspace) {
+                       IEEE80211_DISCARD(vap, IEEE80211_MSG_ANY,
+                               wh, "data", "too short: len %u, expecting %u",
+@@ -444,16 +458,24 @@ ieee80211_input(struct ieee80211vap * va
+               }
+               switch (vap->iv_opmode) {
+               case IEEE80211_M_STA:
+-                      if ((dir != IEEE80211_FC1_DIR_FROMDS) &&
+-                          (!((vap->iv_flags_ext & IEEE80211_FEXT_WDS) &&
+-                          (dir == IEEE80211_FC1_DIR_DSTODS)))) {
++                      switch(dir) {
++                      case IEEE80211_FC1_DIR_FROMDS:
++                              break;
++                      case IEEE80211_FC1_DIR_DSTODS:
++                              if (vap->iv_flags_ext & IEEE80211_FEXT_WDS)
++                                      break;
++                      default:
+                               IEEE80211_DISCARD(vap, IEEE80211_MSG_ANY,
+                                       wh, "data", "invalid dir 0x%x", dir);
+                               vap->iv_stats.is_rx_wrongdir++;
+                               goto out;
+                       }
+-                      if (IEEE80211_IS_MULTICAST(wh->i_addr1)) {
++                      if (IEEE80211_IS_MULTICAST(wh->i_addr1)) {
++                              /* ignore 3-addr mcast if we're WDS STA */
++                              if (vap->iv_flags_ext & IEEE80211_FEXT_WDS)
++                                      goto out;
++
+                               /* Discard multicast if IFF_MULTICAST not set */
+                               if ((0 != memcmp(wh->i_addr3, dev->broadcast, ETH_ALEN)) && 
+                                       (0 == (dev->flags & IFF_MULTICAST))) {
+@@ -481,24 +503,10 @@ ieee80211_input(struct ieee80211vap * va
+                                       vap->iv_stats.is_rx_mcastecho++;
+                                       goto out;
+                               }
+-                              /* 
+-                               * if it is brodcasted by me on behalf of
+-                               * a station behind me, drop it.
+-                               */
+-                              if (vap->iv_flags_ext & IEEE80211_FEXT_WDS) {
+-                                      struct ieee80211_node_table *nt;
+-                                      struct ieee80211_node *ni_wds;
+-                                      nt = &ic->ic_sta;
+-                                      ni_wds = ieee80211_find_wds_node(nt, wh->i_addr3);
+-                                      if (ni_wds) {
+-                                              ieee80211_unref_node(&ni_wds);
+-                                              IEEE80211_DISCARD(vap, IEEE80211_MSG_INPUT,
+-                                                      wh, NULL, "%s",
+-                                                      "multicast echo originated from node behind me");
+-                                              vap->iv_stats.is_rx_mcastecho++;
+-                                              goto out;
+-                                      }
+-                              }
++                      } else {
++                              /* Same BSSID, but not meant for us to receive */
++                              if (!IEEE80211_ADDR_EQ(wh->i_addr1, vap->iv_myaddr))
++                                      goto out;
+                       }
+                       break;
+               case IEEE80211_M_IBSS:
+@@ -540,16 +548,32 @@ ieee80211_input(struct ieee80211vap * va
+                               vap->iv_stats.is_rx_notassoc++;
+                               goto err;
+                       }
++
++                      /* subif isn't fully set up yet, drop the frame */
++                      if (ni->ni_subif == ni->ni_vap)
++                              goto err;
++
+                       /*
+                        * If we're a 4 address packet, make sure we have an entry in
                         * the node table for the packet source address (addr4).
                         * If not, add one.
                         */
--                      /* XXX: Useless node mgmt API; make better */
-+
 +                      /* check for wds link first */
-                       if (dir == IEEE80211_FC1_DIR_DSTODS) {
--                              struct ieee80211_node_table *nt;
-+                              struct ieee80211vap *avp;
-+
-+                              TAILQ_FOREACH(avp, &vap->iv_wdslinks, iv_wdsnext) {
-+                                      if (!memcmp(avp->wds_mac, wh->i_addr2, IEEE80211_ADDR_LEN)) {
-+                                              IEEE80211_LOCK_IRQ(ni->ni_ic);
-+                                              ni_wds = avp->iv_wdsnode;
-+                                              IEEE80211_UNLOCK_IRQ(ni->ni_ic);
-+                                              break;
-+                                      }
-+                              }
-+                              if (ni_wds != NULL) {
-+                                      ieee80211_unref_node(&ni);
-+                                      ni = ieee80211_ref_node(ni_wds);
++                      if ((dir == IEEE80211_FC1_DIR_DSTODS) && !ni->ni_subif) {
++                              if (vap->iv_flags_ext & IEEE80211_FEXT_WDSSEP) {
++                                      ieee80211_wds_addif(ni);
++                                      /* we must drop frames here until the interface has
++                                       * been fully separated, otherwise a bridge might get
++                                       * confused */
++                                      goto err;
 +                              }
 +                      }
 +
-+                      /* XXX: Useless node mgmt API; make better */
-+                      if ((dir == IEEE80211_FC1_DIR_DSTODS) && !ni_wds) {
+                       /* XXX: Useless node mgmt API; make better */
+-                      if (dir == IEEE80211_FC1_DIR_DSTODS) {
+-                              struct ieee80211_node_table *nt;
++                      if ((dir == IEEE80211_FC1_DIR_DSTODS) && !vap->iv_wdsnode &&
++                                      !ni_wds && !ni->ni_subif) {
 +                              struct ieee80211_node_table *nt = &ic->ic_sta;
                                struct ieee80211_frame_addr4 *wh4;
 -                              struct ieee80211_node *ni_wds;
  
                                if (!(vap->iv_flags_ext & IEEE80211_FEXT_WDS)) {
                                        IEEE80211_DISCARD(vap, IEEE80211_MSG_INPUT,
-@@ -557,7 +576,6 @@
+@@ -557,7 +581,6 @@ ieee80211_input(struct ieee80211vap * va
                                        goto err;
                                }
                                wh4 = (struct ieee80211_frame_addr4 *)skb->data;
                                ni_wds = ieee80211_find_wds_node(nt, wh4->i_addr4);
                                /* Last call increments ref count if !NULL */
                                if ((ni_wds != NULL) && (ni_wds != ni)) {
-@@ -3084,8 +3102,7 @@
+@@ -608,6 +631,11 @@ ieee80211_input(struct ieee80211vap * va
+                       goto out;
+               }
++              /* check if there is any data left */
++              hdrspace = ieee80211_hdrspace(ic, wh);
++              if (skb->len < hdrspace)
++                      goto out;
++
+               /*
+                * Handle privacy requirements.  Note that we
+                * must not be preempted from here until after
+@@ -680,8 +708,12 @@ ieee80211_input(struct ieee80211vap * va
+               if (! accept_data_frame(vap, ni, key, skb, eh))
+                       goto out;
+-              vap->iv_devstats.rx_packets++;
+-              vap->iv_devstats.rx_bytes += skb->len;
++              if (ni->ni_subif && ((eh)->ether_type != __constant_htons(ETHERTYPE_PAE)))
++                      stats = &ni->ni_subif->iv_devstats;
++              else
++                      stats = &vap->iv_devstats;
++              stats->rx_packets++;
++              stats->rx_bytes += skb->len;
+               IEEE80211_NODE_STAT(ni, rx_data);
+               IEEE80211_NODE_STAT_ADD(ni, rx_bytes, skb->len);
+               ic->ic_lastdata = jiffies;
+@@ -1114,6 +1146,13 @@ ieee80211_deliver_data(struct ieee80211_
+               dev = vap->iv_xrvap->iv_dev;
+ #endif
++      /* if the node has a wds subif, move data frames there,
++       * but keep EAP traffic on the master */
++      if (ni->ni_subif && ((eh)->ether_type != __constant_htons(ETHERTYPE_PAE))) {
++              vap = ni->ni_subif;
++              dev = vap->iv_dev;
++      }
++
+       /* perform as a bridge within the vap */
+       /* XXX intra-vap bridging only */
+       if (vap->iv_opmode == IEEE80211_M_HOSTAP &&
+@@ -1139,7 +1178,16 @@ ieee80211_deliver_data(struct ieee80211_
+                       if (ni1 != NULL) {
+                               if (ni1->ni_vap == vap &&
+                                   ieee80211_node_is_authorized(ni1) &&
++                                      !ni1->ni_subif &&
+                                   ni1 != vap->iv_bss) {
++
++                                      /* tried to bridge to a subif, drop the packet */
++                                      if (ni->ni_subif) {
++                                              ieee80211_unref_node(&ni1);
++                                              ieee80211_dev_kfree_skb(&skb);
++                                              return;
++                                      }
++
+                                       skb1 = skb;
+                                       skb = NULL;
+                               }
+@@ -3084,8 +3132,7 @@ ieee80211_recv_mgmt(struct ieee80211vap 
                    (vap->iv_opmode == IEEE80211_M_STA && ni->ni_associd) ||
                    (vap->iv_opmode == IEEE80211_M_IBSS) ||
                        ((subtype == IEEE80211_FC0_SUBTYPE_BEACON) &&
                        vap->iv_stats.is_rx_mgtdiscard++;
                        return;
                }
-@@ -3471,13 +3488,53 @@
+@@ -3471,13 +3518,54 @@ ieee80211_recv_mgmt(struct ieee80211vap 
                 */
                if (ic->ic_flags & IEEE80211_F_SCAN) {
                        ieee80211_add_scan(vap, &scan, wh, subtype, rssi, rtsf);
 +
 +                              TAILQ_FOREACH(avp, &vap->iv_wdslinks, iv_wdsnext) {
 +                                      if (!memcmp(avp->wds_mac, wh->i_addr2, IEEE80211_ADDR_LEN)) {
++                                              if (avp->iv_state != IEEE80211_S_RUN)
++                                                      continue;
 +                                              found = 1;
 +                                              break;
 +                                      }
 +                              }
-+                              if (found) {
-+                                      if (!avp->iv_wdsnode)
-+                                              break;
-+                                      ni = ni_or_null = avp->iv_wdsnode;
-+                              } else {
-+                                      avp = NULL;
-+                              }
++                              if (!found)
++                                      break;
++
++                              ni = ni_or_null = avp->iv_wdsnode;
++                      } else if (vap->iv_opmode == IEEE80211_M_WDS) {
++                              ni = ni_or_null = vap->iv_wdsnode;
 +                      }
 +                      IEEE80211_UNLOCK_IRQ(vap->iv_ic);
 +
                        } else {
                                /*
                                 * Copy data from beacon to neighbor table.
-@@ -3490,6 +3547,7 @@
+@@ -3490,6 +3578,7 @@ ieee80211_recv_mgmt(struct ieee80211vap 
                                IEEE80211_ADDR_COPY(ni->ni_bssid, wh->i_addr3);
                                memcpy(ni->ni_tstamp.data, scan.tstamp,
                                        sizeof(ni->ni_tstamp));
                                ni->ni_capinfo = scan.capinfo;
 --- a/net80211/ieee80211_node.c
 +++ b/net80211/ieee80211_node.c
-@@ -1553,22 +1553,24 @@
+@@ -47,6 +47,7 @@
+ #include <linux/netdevice.h>
+ #include <linux/etherdevice.h>
+ #include <linux/random.h>
++#include <linux/rtnetlink.h>
+ #include "if_media.h"
+@@ -236,7 +237,11 @@ void
+ ieee80211_node_vdetach(struct ieee80211vap *vap)
+ {
+       struct ieee80211com *ic = vap->iv_ic;
++      struct ieee80211_node *ni;
++      ni = vap->iv_wdsnode;
++      if (ni)
++              ni->ni_subif = NULL;
+       ieee80211_node_table_reset(&ic->ic_sta, vap);
+       if (vap->iv_bss != NULL) {
+               ieee80211_unref_node(&vap->iv_bss);
+@@ -831,12 +836,18 @@ node_table_leave_locked(struct ieee80211
+               LIST_REMOVE(ni, ni_hash);
+       }
+       ni->ni_table = NULL;
++      if (ni->ni_vap->iv_wdsnode == ni) {
++#ifdef IEEE80211_DEBUG_REFCNT
++              ieee80211_unref_node_debug(&ni->ni_vap->iv_wdsnode, func, line);
++#else
++              ieee80211_unref_node(&ni->ni_vap->iv_wdsnode);
++#endif
++      }
+ #ifdef IEEE80211_DEBUG_REFCNT
+       ieee80211_unref_node_debug(&ni, func, line);
+ #else
+       ieee80211_unref_node(&ni);
+ #endif
+-      
+ }
+ /* This is overridden by ath_node_alloc in ath/if_ath.c, and so
+@@ -1134,6 +1145,62 @@ ieee80211_alloc_node(struct ieee80211vap
+       return ni;
+ }
++#define WDSIFNAME ".sta%d"
++static void
++ieee80211_wds_do_addif(struct work_struct *work)
++{
++      struct ieee80211_node *ni = container_of(work, struct ieee80211_node, ni_create);
++      struct ieee80211vap *vap = ni->ni_vap;
++      struct ieee80211com *ic = vap->iv_ic;
++      struct ieee80211vap *avp = NULL;
++      char *name;
++
++      rtnl_lock();
++      /* did we get cancelled by the destroy call? */
++      if (!ni->ni_subif)
++              goto done;
++
++      ni->ni_subif = NULL;
++      name = kmalloc(strlen(vap->iv_dev->name) + sizeof(WDSIFNAME) + 1, GFP_KERNEL);
++      if (!name)
++              goto done;
++
++      strcpy(name, vap->iv_dev->name);
++      strcat(name, WDSIFNAME);
++      avp = ieee80211_create_vap(ic, name, ic->ic_dev, IEEE80211_M_WDS, 0, vap);
++      kfree(name);
++      if (!avp)
++              goto done;
++
++      memcpy(avp->wds_mac, ni->ni_bssid, IEEE80211_ADDR_LEN);
++      avp->iv_wdsnode = ieee80211_ref_node(ni);
++      ni->ni_subif = avp;
++      ic->ic_subifs++;
++
++done:
++      if (avp) {
++              IEEE80211_VAPS_LOCK_IRQ(ic);
++              avp->iv_newstate(vap, IEEE80211_S_RUN, -1);
++              IEEE80211_VAPS_UNLOCK_IRQ(ic);
++      }
++      rtnl_unlock();
++      ieee80211_unref_node(&ni);
++}
++#undef WDSIFNAME
++
++void ieee80211_wds_addif(struct ieee80211_node *ni)
++{
++      /* check if the node is split out already,
++       * or if we're in progress of setting up a new interface already */
++      if (ni->ni_subif)
++              return;
++
++      ieee80211_ref_node(ni);
++      ni->ni_subif = ni->ni_vap;
++      IEEE80211_INIT_WORK(&ni->ni_create, ieee80211_wds_do_addif);
++      schedule_work(&ni->ni_create);
++}
++
+ /* Add wds address to the node table */
+ int
+ #ifdef IEEE80211_DEBUG_REFCNT
+@@ -1553,22 +1620,39 @@ ieee80211_find_rxnode(struct ieee80211co
        ((wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK) == IEEE80211_FC0_SUBTYPE_PS_POLL)
        struct ieee80211_node_table *nt;
        struct ieee80211_node *ni;
++      struct ieee80211vap *vap, *avp;
 +      const u_int8_t *addr;
 +
 +      if (IS_CTL(wh) && !IS_PSPOLL(wh) /*&& !IS_RTS(ah)*/)
        nt = &ic->ic_sta;
        IEEE80211_NODE_TABLE_LOCK_IRQ(nt);
 -      if (IS_CTL(wh) && !IS_PSPOLL(wh) /*&& !IS_RTS(ah)*/)
- #ifdef IEEE80211_DEBUG_REFCNT
+-#ifdef IEEE80211_DEBUG_REFCNT
 -              ni = ieee80211_find_node_locked_debug(nt, wh->i_addr1, func, line);
-+      ni = ieee80211_find_node_locked_debug(nt, addr, func, line);
- #else
+-#else
 -              ni = ieee80211_find_node_locked(nt, wh->i_addr1);
 -#endif
 -      else
--#ifdef IEEE80211_DEBUG_REFCNT
++      if ((wh->i_fc[1] & IEEE80211_FC1_DIR_MASK) == IEEE80211_FC1_DIR_DSTODS) {
++              TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) {
++                      TAILQ_FOREACH(avp, &vap->iv_wdslinks, iv_wdsnext) {
++                              if (!IEEE80211_ADDR_EQ(addr, avp->wds_mac))
++                                      continue;
++
++                              if (avp->iv_wdsnode)
++                                      return ieee80211_ref_node(avp->iv_wdsnode);
++                              else
++                                      return NULL;
++                      }
++              }
++      }
++
+ #ifdef IEEE80211_DEBUG_REFCNT
 -              ni = ieee80211_find_node_locked_debug(nt, wh->i_addr2, func, line);
--#else
++      ni = ieee80211_find_node_locked_debug(nt, addr, func, line);
+ #else
 -              ni = ieee80211_find_node_locked(nt, wh->i_addr2);
 +      ni = ieee80211_find_node_locked(nt, addr);
  #endif
        IEEE80211_NODE_TABLE_UNLOCK_IRQ(nt);
  
-@@ -1669,6 +1671,11 @@
+@@ -1596,9 +1680,19 @@ ieee80211_find_txnode_debug(struct ieee8
+ ieee80211_find_txnode(struct ieee80211vap *vap, const u_int8_t *mac)
+ #endif
+ {
++      struct ieee80211com *ic = vap->iv_ic;
+       struct ieee80211_node_table *nt;
+       struct ieee80211_node *ni = NULL;
++      IEEE80211_LOCK_IRQ(ic);
++      if (vap->iv_opmode == IEEE80211_M_WDS) {
++              if (vap->iv_wdsnode && (vap->iv_state == IEEE80211_S_RUN))
++                      return ieee80211_ref_node(vap->iv_wdsnode);
++              else
++                      return NULL;
++      }
++      IEEE80211_UNLOCK_IRQ(ic);
++
+       /*
+        * The destination address should be in the node table
+        * unless we are operating in station mode or this is a
+@@ -1669,6 +1763,11 @@ ieee80211_free_node(struct ieee80211_nod
  {
        struct ieee80211vap *vap = ni->ni_vap;
  
        atomic_dec(&ni->ni_ic->ic_node_counter);
        node_print_message(IEEE80211_MSG_NODE|IEEE80211_MSG_NODE_REF,
                           1 /* show counter */, 
-@@ -1781,22 +1788,6 @@
+@@ -1781,22 +1880,6 @@ restart:
                    jiffies > ni->ni_rxfragstamp + HZ) {
                        ieee80211_dev_kfree_skb(&ni->ni_rxfrag);
                }
                ni->ni_inact--;
                if (ni->ni_associd != 0 || isadhoc) {
                        struct ieee80211vap *vap = ni->ni_vap;
+@@ -2263,6 +2346,36 @@ ieee80211_node_leave_11g(struct ieee8021
+       }
+ }
++static void
++ieee80211_subif_destroy(struct work_struct *work)
++{
++      struct ieee80211_node *ni = container_of(work, struct ieee80211_node, ni_destroy);
++      struct ieee80211vap *vap;
++      struct ieee80211com *ic;
++
++      rtnl_lock();
++      vap = ni->ni_subif;
++
++      /* if addif is waiting for the timer to fire, cancel! */
++      if (vap == ni->ni_vap) {
++              ni->ni_subif = NULL;
++              goto done;
++      }
++
++      if (!vap)
++              goto done;
++
++      ic = vap->iv_ic;
++      ni->ni_subif = NULL;
++      ieee80211_stop(vap->iv_dev);
++      ic->ic_vap_delete(vap);
++      ic->ic_subifs--;
++
++done:
++      ieee80211_unref_node(&ni);
++      rtnl_unlock();
++}
++
+ /*
+  * Handle bookkeeping for a station/neighbor leaving
+  * the bss when operating in ap or adhoc modes.
+@@ -2279,6 +2392,12 @@ ieee80211_node_leave(struct ieee80211_no
+                       ni, "station with aid %d leaves (refcnt %u)",
+                       IEEE80211_NODE_AID(ni), atomic_read(&ni->ni_refcnt));
++      if (ni->ni_subif) {
++              ieee80211_ref_node(ni);
++              IEEE80211_INIT_WORK(&ni->ni_destroy, ieee80211_subif_destroy);
++              schedule_work(&ni->ni_destroy);
++      }
++
+       /* From this point onwards we can no longer find the node,
+        * so no more references are generated
+        */
 --- a/net80211/ieee80211_output.c
 +++ b/net80211/ieee80211_output.c
-@@ -246,10 +246,16 @@
+@@ -246,15 +246,16 @@ ieee80211_hardstart(struct sk_buff *skb,
         * things like power save.
         */
        eh = (struct ether_header *)skb->data;
 -      if (vap->iv_opmode == IEEE80211_M_WDS)
 -              ni = ieee80211_find_txnode(vap, vap->wds_mac);
 -      else
-+      if (vap->iv_opmode == IEEE80211_M_WDS) {
-+              IEEE80211_LOCK_IRQ(ic);
-+              ni = vap->iv_wdsnode;
-+              IEEE80211_UNLOCK_IRQ(ic);
-+              if (!ni)
-+                      goto bad;
-+              ni = ieee80211_ref_node(vap->iv_wdsnode);
-+      } else {
-               ni = ieee80211_find_txnode(vap, eh->ether_dhost);
-+      }
+-              ni = ieee80211_find_txnode(vap, eh->ether_dhost);
++      ni = ieee80211_find_txnode(vap, eh->ether_dhost);
        if (ni == NULL) {
                /* NB: ieee80211_find_txnode does stat+msg */
                goto bad;
-@@ -788,7 +794,7 @@
+       }
++      if (ni->ni_subif && (vap != ni->ni_subif) &&
++              ((eh)->ether_type != __constant_htons(ETHERTYPE_PAE)))
++              goto bad;
++
+       /* calculate priority so drivers can find the TX queue */
+       if (ieee80211_classify(ni, skb)) {
+               IEEE80211_NOTE(vap, IEEE80211_MSG_OUTPUT, ni,
+@@ -334,20 +335,33 @@ void ieee80211_parent_queue_xmit(struct 
+  * constructing a frame as it sets i_fc[1]; other bits can
+  * then be or'd in.
+  */
+-static void
++static struct ieee80211_frame *
+ ieee80211_send_setup(struct ieee80211vap *vap,
+       struct ieee80211_node *ni,
+-      struct ieee80211_frame *wh,
++      struct sk_buff *skb,
+       int type,
+       const u_int8_t sa[IEEE80211_ADDR_LEN],
+       const u_int8_t da[IEEE80211_ADDR_LEN],
+       const u_int8_t bssid[IEEE80211_ADDR_LEN])
+ {
+ #define       WH4(wh) ((struct ieee80211_frame_addr4 *)wh)
++      struct ieee80211_frame *wh;
++      int len = sizeof(struct ieee80211_frame);
++      int opmode = vap->iv_opmode;
++      if ((type & IEEE80211_FC0_TYPE_MASK) == IEEE80211_FC0_TYPE_DATA) {
++              if ((opmode == IEEE80211_M_STA) &&
++                      (vap->iv_flags_ext & IEEE80211_FEXT_WDS))
++                      opmode = IEEE80211_M_WDS;
++
++              if (opmode == IEEE80211_M_WDS)
++                      len = sizeof(struct ieee80211_frame_addr4);
++      }
++
++      wh = (struct ieee80211_frame *)skb_push(skb, len);
+       wh->i_fc[0] = IEEE80211_FC0_VERSION_0 | type;
+       if ((type & IEEE80211_FC0_TYPE_MASK) == IEEE80211_FC0_TYPE_DATA) {
+-              switch (vap->iv_opmode) {
++              switch (opmode) {
+               case IEEE80211_M_STA:
+                       wh->i_fc[1] = IEEE80211_FC1_DIR_TODS;
+                       IEEE80211_ADDR_COPY(wh->i_addr1, bssid);
+@@ -389,6 +403,8 @@ ieee80211_send_setup(struct ieee80211vap
+       *(__le16 *)&wh->i_seq[0] =
+           htole16(ni->ni_txseqs[0] << IEEE80211_SEQ_SEQ_SHIFT);
+       ni->ni_txseqs[0]++;
++
++      return wh;
+ #undef WH4
+ }
+@@ -410,9 +426,7 @@ ieee80211_mgmt_output(struct ieee80211_n
+       SKB_CB(skb)->ni = ni;
+-      wh = (struct ieee80211_frame *)
+-              skb_push(skb, sizeof(struct ieee80211_frame));
+-      ieee80211_send_setup(vap, ni, wh,
++      wh = ieee80211_send_setup(vap, ni, skb,
+               IEEE80211_FC0_TYPE_MGT | type,
+               vap->iv_myaddr, ni->ni_macaddr, vap->iv_bssid);
+       /* XXX power management */
+@@ -458,6 +472,9 @@ ieee80211_send_nulldata(struct ieee80211
+       struct ieee80211_frame *wh;
+       u_int8_t *frm;
++      if (ni->ni_subif)
++              vap = ni->ni_subif;
++
+       skb = ieee80211_getmgtframe(&frm, 0);
+       if (skb == NULL) {
+               /* XXX debug msg */
+@@ -466,9 +483,7 @@ ieee80211_send_nulldata(struct ieee80211
+               return -ENOMEM;
+       }
+-      wh = (struct ieee80211_frame *)
+-              skb_push(skb, sizeof(struct ieee80211_frame));
+-      ieee80211_send_setup(vap, ni, wh,
++      wh = ieee80211_send_setup(vap, ni, skb,
+               IEEE80211_FC0_TYPE_DATA | IEEE80211_FC0_SUBTYPE_NODATA,
+               vap->iv_myaddr, ni->ni_macaddr, vap->iv_bssid);
+       /* NB: power management bit is never sent by an AP */
+@@ -506,6 +521,7 @@ ieee80211_send_qosnulldata(struct ieee80
+       struct sk_buff *skb;
+       struct ieee80211_qosframe *qwh;
+       u_int8_t *frm;
++      u_int8_t *i_qos;
+       int tid;
+       skb = ieee80211_getmgtframe(&frm, 2);
+@@ -517,11 +533,12 @@ ieee80211_send_qosnulldata(struct ieee80
+       SKB_CB(skb)->ni = ieee80211_ref_node(ni);
+       skb->priority = ac;
+-      qwh = (struct ieee80211_qosframe *)skb_push(skb, sizeof(struct ieee80211_qosframe));
+-      qwh = (struct ieee80211_qosframe *)skb->data;
++      /* grab a pointer to QoS control and also compensate for the header length
++       * difference between QoS and non-QoS frame */
++      i_qos = skb_push(skb, sizeof(struct ieee80211_qosframe) - sizeof(struct ieee80211_frame));
+-      ieee80211_send_setup(vap, ni, (struct ieee80211_frame *)qwh,
++      qwh = (struct ieee80211_qosframe *) ieee80211_send_setup(vap, ni, skb,
+               IEEE80211_FC0_TYPE_DATA,
+               vap->iv_myaddr, /* SA */
+               ni->ni_macaddr, /* DA */
+@@ -535,10 +552,10 @@ ieee80211_send_qosnulldata(struct ieee80
+       /* map from access class/queue to 11e header priority value */
+       tid&nbs