--- madwifi-tools-0.9.4+r3685.20080531+dfsg.orig/debian/control
+++ madwifi-tools-0.9.4+r3685.20080531+dfsg/debian/control
@@ -0,0 +1,17 @@
+Source: madwifi-tools
+Section: contrib/net
+Priority: optional
+Maintainer: Debian madwifi team <pkg-madwifi-maintainers@lists.alioth.debian.org>
+Uploaders: Loic Minier <lool@dooz.org>, Kel Modderman <kel@otaku42.de>, Matt Brown <debian@mattb.net.nz>, Matthew W.S.Bell <mentor@madwifi.org>
+Build-Depends: debhelper (>= 7), quilt
+Standards-Version: 3.7.3
+Vcs-Svn: svn://svn.debian.org/pkg-madwifi/unstable/madwifi-tools
+Vcs-Browser: http://svn.debian.org/wsvn/pkg-madwifi/unstable/madwifi-tools/
+Homepage: http://madwifi.org/
+
+Package: madwifi-tools
+Architecture: alpha amd64 arm hurd-i386 i386 mips mipsel powerpc sparc
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: tools for the Multiband Atheros Driver for WiFi
+ This package provides userspace tools for the madwifi driver. The tools are
+ required to use and manipulate the madwifi interfaces present in a system.
--- madwifi-tools-0.9.4+r3685.20080531+dfsg.orig/debian/postinst
+++ madwifi-tools-0.9.4+r3685.20080531+dfsg/debian/postinst
@@ -0,0 +1,26 @@
+#!/bin/sh -e
+
+# Move a conffile without triggering a dpkg question
+mv_conffile() {
+	OLDCONFFILE="$1"
+	NEWCONFFILE="$2"
+
+	if [ -e "$OLDCONFFILE" ]; then
+		echo "Preserving user changes to $NEWCONFFILE ..."
+		mv -f "$NEWCONFFILE" "$NEWCONFFILE".dpkg-new
+		mv -f "$OLDCONFFILE" "$NEWCONFFILE"
+	fi
+}
+
+case "$1" in
+	configure)
+		if dpkg --compare-versions "$2" le "1:0.9.3+dfsg-2"; then
+			mv_conffile /etc/network/if-pre-up.d/madwifi \
+				/etc/network/if-pre-up.d/050madwifi
+			mv_conffile /etc/network/if-post-down.d/madwifi \
+				/etc/network/if-post-down.d/z50madwifi
+		fi
+		;;
+esac
+
+#DEBHELPER#
--- madwifi-tools-0.9.4+r3685.20080531+dfsg.orig/debian/post-down
+++ madwifi-tools-0.9.4+r3685.20080531+dfsg/debian/post-down
@@ -0,0 +1,42 @@
+#!/bin/sh
+#
+# Debian ifupdown hook script for madwifi-ng
+#
+# Author: Matt Brown <matt@mattb.net.nz>
+# Modified by: Kel Modderman <kelrin@tpg.com.au>
+#
+# Copyright (C) 2005 - 2006   Matt Brown
+#
+# This is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# This is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+#
+# On Debian GNU/Linux systems, the text of the GPL license can be found in
+# /usr/share/common-licenses/GPL
+
+WLANCONFIG=/sbin/wlanconfig
+
+if [ ! -x "$WLANCONFIG" ]; then
+	exit 0
+fi
+
+if [ ! -n "$IF_MADWIFI_BASE" ]; then
+	exit 0
+fi
+
+if [ -n "$IF_MADWIFI_VAP" ]; then
+	VAP="$IF_MADWIFI_VAP"
+else
+	VAP="$IFACE"
+fi
+
+# Destroy 
+$WLANCONFIG $VAP destroy
+
+exit $?
--- madwifi-tools-0.9.4+r3685.20080531+dfsg.orig/debian/preinst
+++ madwifi-tools-0.9.4+r3685.20080531+dfsg/debian/preinst
@@ -0,0 +1,26 @@
+#!/bin/sh -e
+
+# Prepare to move a conffile without triggering a dpkg question
+prep_mv_conffile() {
+	PKGNAME="$1"
+	CONFFILE="$2"
+
+	if [ -e "$CONFFILE" ]; then
+		md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`"
+		old_md5sum="`dpkg-query -W -f='${Conffiles}' $PKGNAME | sed -n -e \"\\\\' $CONFFILE'{s/ obsolete$//;s/.* //p}\"`"
+		if [ "$md5sum" = "$old_md5sum" ]; then
+			rm -f "$CONFFILE"
+		fi
+	fi
+}
+
+case "$1" in
+	install|upgrade)
+		if dpkg --compare-versions "$2" le "1:0.9.3+dfsg-2"; then
+			prep_mv_conffile madwifi-tools /etc/network/if-pre-up.d/madwifi
+			prep_mv_conffile madwifi-tools /etc/network/if-post-down.d/madwifi
+		fi
+		;;
+esac
+
+#DEBHELPER#
--- madwifi-tools-0.9.4+r3685.20080531+dfsg.orig/debian/madwifi-tools.madwifi.modprobe
+++ madwifi-tools-0.9.4+r3685.20080531+dfsg/debian/madwifi-tools.madwifi.modprobe
@@ -0,0 +1,19 @@
+## ath5k (mac80211)
+## Comment out the following line, and uncomment all of the
+## madwifi modules below to use the athk module
+blacklist ath5k
+
+## madwifi (non-free)
+#blacklist ath_hal
+#blacklist ath_pci
+#blacklist ath_rate_amrr
+#blacklist ath_rate_onoe
+#blacklist ath_rate_sample
+#blacklist wlan
+#blacklist wlan_acl
+#blacklist wlan_ccmp
+#blacklist wlan_scan_ap
+#blacklist wlan_scan_sta
+#blacklist wlan_tkip
+#blacklist wlan_wep
+#blacklist wlan_xauth
--- madwifi-tools-0.9.4+r3685.20080531+dfsg.orig/debian/pre-up
+++ madwifi-tools-0.9.4+r3685.20080531+dfsg/debian/pre-up
@@ -0,0 +1,85 @@
+#!/bin/sh
+#
+# Debian ifupdown hook script for madwifi-ng
+#
+# Author:   Matt Brown <matt@mattb.net.nz>
+# Modified by: Kel Modderman <kelrin@tpg.com.au>
+#
+# Copyright (C) 2005 - 2006    Matt Brown
+#
+# This is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# This is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+#
+# On Debian GNU/Linux systems, the text of the GPL license can be found in
+# /usr/share/common-licenses/GPL
+
+
+WLANCONFIG=/sbin/wlanconfig
+
+if [ ! -x "$WLANCONFIG" ]; then
+	exit 0
+fi
+
+if [ ! -n "$IF_MADWIFI_BASE" ]; then
+	exit 0
+fi
+
+if [ "$VERBOSITY" = "1" ]; then
+	TO_NULL="/dev/stdout"
+else
+	TO_NULL="/dev/null"
+fi
+
+if [ -n "$IF_MADWIFI_MODE" ]; then
+	MODE="$IF_MADWIFI_MODE"
+elif [ -n "$IF_WIRELESS_MODE" ]; then
+	MODE="$IF_WIRELESS_MODE"
+else
+	exit 0
+fi
+
+if [ -n "$IF_MADWIFI_VAP" ]; then
+	VAP="$IF_MADWIFI_VAP"
+else
+	VAP="$IFACE"
+fi
+
+if [ -d /proc/sys/net/$VAP ]; then
+	$WLANCONFIG $VAP destroy
+fi
+
+case "$MODE" in
+	Managed|managed|MANAGED)
+		MODE="sta"
+		;;
+	Ad-Hoc|ad-hoc|AD-HOC)
+		MODE="adhoc"
+		;;
+	Master|master|MASTER)
+		MODE="ap"
+		;;
+	Monitor|monitor|MONITOR)
+		MODE="monitor"
+		;;
+	sta|ap|wds|adhoc|ahdemo|monitor)
+		MODE="$MODE"
+		;;
+	*)
+		MODE="sta"
+		;;
+esac
+
+if [ -n "$IF_MADWIFI_OPTIONS" ]; then
+	$WLANCONFIG $VAP create wlandev $IF_MADWIFI_BASE wlanmode $MODE "$IF_MADWIFI_OPTIONS" >$TO_NULL
+else
+	$WLANCONFIG $VAP create wlandev $IF_MADWIFI_BASE wlanmode $MODE >$TO_NULL
+fi
+
+exit $?
--- madwifi-tools-0.9.4+r3685.20080531+dfsg.orig/debian/manpages
+++ madwifi-tools-0.9.4+r3685.20080531+dfsg/debian/manpages
@@ -0,0 +1 @@
+tools/*/*.8
--- madwifi-tools-0.9.4+r3685.20080531+dfsg.orig/debian/changelog
+++ madwifi-tools-0.9.4+r3685.20080531+dfsg/debian/changelog
@@ -0,0 +1,95 @@
+madwifi-tools (1:0.9.4+r3685.20080531+dfsg-1) unstable; urgency=low
+
+  * New upstream SVN snapshot.
+  * Remove bogus install-stamp target. [debian/rules]
+  * Remove suggests of wireless-tools, it is not useful. [debian/control]
+  * Build-depend on debhelper >= 7. [debian/control, debian/compat]
+  * Add Matthew W.S. Bell to Uploaders. [debian/control]
+  * Fixup get-orig-source target for standard upstream release. [debian/rules]
+  * Don't refer to non-existant package `madwifi-doc`. [debian/README.Debian]
+  * Do not use wget's -N option with -O option. [debian/rules]
+  * Condense debian/manapages to one line with a wildcard.
+  * Drop debian/patches/02_ath_info_manpage_warnings.patch, applied upstream.
+  * Add brief comment to modprobe file about howto activate ath5k.
+  * Add support to get-orig-source for SVN snapshot tarballs. [debian/rules]
+  * Adapt debian/patches/01_athstats_disable_hal_phy_errors.patch to upstream
+    change.
+  * Add debian/patches/02_fix_makefile_all_def.patch to fix error in upstream
+    Makefile.
+  * Handle new location of upstream ath_info. [debian/rules, debian/manpages]
+
+ -- Kel Modderman <kel@otaku42.de>  Sun, 01 Jun 2008 22:05:06 +1000
+
+madwifi-tools (1:0.9.4~rc2+dfsg-1) unstable; urgency=low
+
+  * New upstream release candidate.
+  * Convert debian/rules to debhelper only from cdbs. Drop build dependency on
+    cdbs. [debian/control, debian/rules]
+  * debian/dirs is no longer required, adjust installation of file in install
+    target of debian/rules to create directories as required. [debian/dirs,
+    debian/rules]
+  * Convert dpatch patch system to quilt. Build depnd on quilt.
+    [debian/patches/*]
+  * Update Standards Version to 3.7.3.
+  * Add debian/madwifi-tools.madwifi.modprobe to provide module blacklist,
+    and allow madwifi to operate when installed alongside an ath5k kernel
+    module when this package is installed (and is a hard dependency of
+    madwifi-modules-_KVERS_). [debian/madwifi-tools.madwifi.modprobe,
+    debian/rules]
+  * Drop Alex Wallis from Uploaders, he hasn't been active for too long.
+    [debian/control]
+  * Cleanup debian/rules get-orig-source target. [debian/rules]
+  * Install the new ath_info upstream tool. [debian/rules, debian/manpages]
+  * Add debian/patches/02_ath_info_manpage_warnings.patch to fix errors in
+    ath_info.8.
+
+ -- Kel Modderman <kel@otaku42.de>  Mon, 11 Feb 2008 21:05:04 +1000
+
+madwifi-tools (1:0.9.3+dfsg-3) unstable; urgency=low
+
+  * Install ifupdown hooks to /etc/network/if-pre-up.d/050madwifi and
+    /etc/network/if-post-down.d/z50madwifi. This also involves management of
+    previous conffiles provided by this package and the movement from old
+    location to new location via preinst/postinst scripts described at
+    http://wiki.debian.org/DpkgConffileHandling. (Closes: #427713)
+  * Do not Recommend madwifi-doc, it no longer exists. (Closes: #435866)
+  * Don't replace madwifi-ng-tools, this package never existed in debian.
+  * Reduce Suggested packages to just wireless-tools.
+  * Adjust Vcs fields of debian/control to format of current concensus.
+  * Use Homepage field of debian/control.
+
+ -- Kel Modderman <kel@otaku42.de>  Tue, 16 Oct 2007 18:02:08 +1000
+
+madwifi-tools (1:0.9.3+dfsg-2) unstable; urgency=low
+
+  * Restrict build archs to alpha amd64 arm hurd-i386 i386 mips mipsel powerpc
+    and sparc. [debian/control]
+  * Format Homepage field. [debian/control]
+  * Add XS-Vcs-* fields. [debian/control]
+
+ -- Kel Modderman <kel@otaku42.de>  Wed, 11 Jul 2007 18:16:26 +1000
+
+madwifi-tools (1:0.9.3+dfsg-1) unstable; urgency=low
+
+  * New upstream release.
+  * Update Uploader email address. [debian/control]
+  * Exit with return status in pre/post ifupdown hooks. [debian/pre-up,
+    debian/post-down]
+  * Allow specification of `madwifi-vap' in /etc/network/interfaces to dictate
+    what vap name is created via ifupdown pre-up script. [debian/pre-up,
+    debian/post-down]
+  * Update get-orig-source target to support SVN snapshots. [debian/rules]
+
+ -- Kel Modderman <kel@otaku42.de>  Mon, 09 Apr 2007 18:41:41 +1000
+
+madwifi-tools (1:0.9.2+dfsg-1) unstable; urgency=low
+
+  [ Kel Modderman ]
+  * Initial release.
+
+  [ Loic Minier ]
+  * Add ${misc:Depends}.
+  * Clarify the origin of the source and the split.
+  * Add CDBS' utils.
+
+ -- Loic Minier <lool@dooz.org>  Sun, 17 Sep 2006 15:42:46 +0200
--- madwifi-tools-0.9.4+r3685.20080531+dfsg.orig/debian/dfsg.files
+++ madwifi-tools-0.9.4+r3685.20080531+dfsg/debian/dfsg.files
@@ -0,0 +1,8 @@
+COPYRIGHT
+ath/if_athioctl.h
+tools
+include/compat.h
+net80211/_ieee80211.h
+net80211/ieee80211.h
+net80211/ieee80211_crypto.h
+net80211/ieee80211_ioctl.h
--- madwifi-tools-0.9.4+r3685.20080531+dfsg.orig/debian/compat
+++ madwifi-tools-0.9.4+r3685.20080531+dfsg/debian/compat
@@ -0,0 +1 @@
+7
--- madwifi-tools-0.9.4+r3685.20080531+dfsg.orig/debian/rules
+++ madwifi-tools-0.9.4+r3685.20080531+dfsg/debian/rules
@@ -0,0 +1,103 @@
+#!/usr/bin/make -f
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+include /usr/share/quilt/quilt.make
+
+build: build-stamp
+build-stamp: $(QUILT_STAMPFN)
+	dh_testdir
+	
+	$(MAKE) -C tools
+	
+	touch $@
+
+clean: unpatch
+	dh_testdir
+	dh_testroot
+	dh_clean build-stamp
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	
+	install -D -m 0755 tools/wlanconfig \
+		debian/madwifi-tools/sbin/wlanconfig
+	
+	install -D -m 0755 tools/ath_info/ath_info \
+		debian/madwifi-tools/usr/sbin/ath_info
+	
+	for t in 80211debug 80211stats athchans athctrl athdebug \
+		 athkey athstats; do \
+		install -D -m 0755 tools/$$t \
+			debian/madwifi-tools/usr/sbin/$$t; \
+	done
+	
+	install -D -m 0755 debian/pre-up \
+		debian/madwifi-tools/etc/network/if-pre-up.d/050madwifi
+	install -D -m 0755 debian/post-down \
+		debian/madwifi-tools/etc/network/if-post-down.d/z50madwifi
+	
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs
+	dh_installdocs
+	dh_install
+	dh_installman
+	dh_installmodules -p madwifi-tools --name=madwifi
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary-indep:
+# We have nothing to do by default.
+
+binary: binary-indep binary-arch
+.PHONY: build clean install binary-indep binary-arch binary
+
+# DFSG tarball variables
+DEBVERS := $(shell dpkg-parsechangelog | sed -n 's/^Version.*:\(.*\)-.*/\1/p')
+UPSVERS := $(shell echo $(DEBVERS) | cut -d'+' -f1 | tr '~' '-')
+SVNVERS := $(shell echo $(DEBVERS) | sed -n 's/.*+\([^+]\+\)+dfsg.*/\1/p' | tr '.' '-')
+ifneq "$(SVNVERS)" ""
+ORIGTAR := madwifi-trunk-$(SVNVERS).tar.gz
+ORIGDIR := madwifi-trunk-$(SVNVERS)
+ORIGURL := http://snapshots.madwifi.org/madwifi-trunk/
+else
+ORIGTAR := madwifi-$(UPSVERS).tar.gz
+ORIGDIR := madwifi-$(UPSVERS)
+ORIGURL := http://optusnet.dl.sourceforge.net/sourceforge/madwifi/
+endif
+DFSGDIR := madwifi-tools-$(DEBVERS)
+DFSGTAR := madwifi-tools_$(DEBVERS).orig.tar.gz
+
+get-orig-source:
+	@dh_testdir
+	
+	@test -d ../tarballs || mkdir -p ../tarballs
+	@rm -rf ../tarballs/$(DFSGDIR) ../tarballs/$(ORIGDIR)
+	
+	@wget -c -O ../tarballs/$(ORIGTAR) $(ORIGURL)$(ORIGTAR)
+	
+	@tar xzf ../tarballs/$(ORIGTAR) -C ../tarballs
+	
+	@echo "Extracting dfsg-free files:"
+	@mkdir -p ../tarballs/$(DFSGDIR)
+	@tar -C ../tarballs/$(ORIGDIR) -cf - -T debian/dfsg.files | \
+		tar -C ../tarballs/$(DFSGDIR) -xvf-
+	@echo ""
+	
+	@echo "Creating dfsg-free tarball:"
+	@tar czf ../tarballs/$(DFSGTAR) -C ../tarballs $(DFSGDIR)
+	@echo "../tarballs/$(DFSGTAR)"
+	@echo ""
+	
+	@rm -rf ../tarballs/$(DFSGDIR) ../tarballs/$(ORIGDIR)
--- madwifi-tools-0.9.4+r3685.20080531+dfsg.orig/debian/README.debian
+++ madwifi-tools-0.9.4+r3685.20080531+dfsg/debian/README.debian
@@ -0,0 +1,119 @@
+madwifi-tools
+=============
+
+The following paragraphs briefly describe the madwifi-tools. They are
+crucial to the normal operation of the MadWifi modules.
+
+
+1. VAP's
+========
+
+What are they and why are they so special?
+
+Virtual AP (VAP) mode [1], allows the operation of multiple concurrent virtual
+access points, and concurrent virtual interfaces running in both AP and station
+mode (only one station mode VAP can exist per device).
+
+By default, one station is created per device (emulating standard behaviour).
+The autocreation behaviour [2] can be manipulated by providing an option to the
+ath_pci module when it is loaded.
+
+Usage: modprobe ath_pci autocreate=[none|sta|ap|wds|adhoc|ahdemo|monitor]
+
+The following example would disable autocreation, and only the "base" device
+would be present:- 
+
+	# modprobe ath_pci autocreate=none
+
+To make this behaviour default, create a /etc/modprobe.d/madwifi file with 
+the following content:-
+
+	options ath_pci autocreate=none
+
+Disabling autocreate is encouraged if you would like to take advantage of the
+automated VAP management techniques discussed in Section #3 of this article.
+
+[1] http://madwifi.org/wiki/ngFeatures#VAPsandwlanconfig
+[2] http://madwifi.org/wiki/UserDocs/autocreate
+
+
+2. wlanconfig
+=============
+
+This is the master tool for creating and destroying VAP's [3]. On Debian
+systems it is located at /usr/sbin/wlanconfig. It's usage is well described in
+the wlanconfig(8) manpage.
+
+[3] http://madwifi.org/wiki/UserDocs#CreatingInterfacesinmadwifing
+
+
+3. Automating VAP creation in /etc/network/interfaces
+=====================================================
+
+The following examples do not work for hotpluggable cardbus cards and the
+like that are started by ifupdown with `allow-hotplug'. To make use of VAP
+autocreation techniques you are required to use the `auto' line for your
+interface or invoke ifup manually. These methods assume that your device is
+always present.
+
+Use pre-up/post-down routines to automate VAP creation and destruction as in
+the following example:-
+
+	iface ath0 inet static
+		pre-up wlanconfig ath0 create wlandev wifi0 wlanmode ap
+		post-down wlanconfig ath0 destroy
+		wireless-essid my-essid
+		...
+
+This package also provides useful scripts for allowing more comfortable
+creation/destruction of madwifi VAP's via special macro's in an interfaces
+/etc/network/interfaces stanza:-
+
+	iface ath0 inet static
+		madwifi-base wifi0
+		madwifi-mode sta
+		wireless-essid my-essid
+
+In the above example an `ath0' VAP would be created in the pre-up phase of ifup
+and destroyed in the post-down phase of ifdown. All VAP modes are supported via
+`madwifi-mode' and `madwifi-base' defines the parent device that the VAP should
+be created from.
+
+
+4. Setting of country code
+==========================
+
+With some cards, and in some countries, you might benefit from country specific
+frequencies by passing the parameter "countrycode" to the ath_pci kernel
+module.
+
+Under 2.6 kernels, this can be done by creating a /etc/modprobe.d/madwifi file
+with the following content:-
+
+	options ath_pci countrycode=123
+
+An online list of country codes can be found at:-
+
+	<http://www.unicode.org/onlinedat/countries.html>
+
+Or in the iso-codes package under:-
+
+	/usr/share/xml/iso-codes/iso_3166.xml
+
+madwifi only recognizes a subset of these codes, eg. "France, Metropolitan"
+(249) won't be recognized while "France" (250) is.
+
+Passing a country code parameter forbids the use of "turbog" modes (where
+multiple frequencies are used to transmit data between turbog-capable chips).
+
+For more information on how and why madwifi must honor regdomain restrictions,
+please see http://madwifi.org/wiki/UserDocs/CountryCode.
+
+
+5. Debugging tools
+==================
+
+athdebug and 80211debug are two programs that can be used to control the amount
+of debugging output (dmesg and /var/log/messages). They are best described at:-
+
+	http://madwifi.org/wiki/DevDocs/AthDebug
--- madwifi-tools-0.9.4+r3685.20080531+dfsg.orig/debian/copyright
+++ madwifi-tools-0.9.4+r3685.20080531+dfsg/debian/copyright
@@ -0,0 +1,65 @@
+This package was debianized by Kel Modderman <kelrin@tpg.com.au> on
+Tue, 05 Sep 2006 17:56:31 +1000.
+
+The original tarball was downloaded from <http://madwifi.org/>, and stripped
+from problematic files which belong to the "madwifi" source in Debian's
+non-free component.  These problematic files included the "Hardware Abstraction
+Layer" and were available under binary form only.
+
+All the files in this source are distributed under a GPL or dual GPL/BSD
+license.
+
+On Debian GNU/Linux systems, the text of the GPL license can be found in
+/usr/share/common-licenses/GPL and the text of the BSD license in the same
+directory.
+
+The file tools/wireless_copy.h is Copyright (c) 1997-2005 Jean Tourrilhes
+and covered by the GPLv2 license.
+
+All other files contained in this distribution are covered by the following
+dual GPL/BSD license:
+
+ Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer,
+    without modification.
+ 2. Redistributions in binary form must reproduce at minimum a disclaimer
+    similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
+    redistribution must be conditioned upon including a substantially
+    similar Disclaimer requirement for further binary redistribution.
+ 3. Neither the names of the above-listed copyright holders nor the names
+    of any contributors may be used to endorse or promote products derived
+    from this software without specific prior written permission.
+
+ Alternatively, this software may be distributed under the terms of the
+ GNU General Public License ("GPL") version 2 as published by the Free
+ Software Foundation.
+
+ NO WARRANTY
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
+ AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+ THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
+ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ THE POSSIBILITY OF SUCH DAMAGES.
+
+The files net80211/ieee80211_crypto.h net80211/_ieee80211.h 
+net80211/ieee80211.h net80211/ieee80211_ioctl.h are covered by the above 
+license but with the following copyright holders:
+	
+	Copyright (c) 2001 Atsushi Onoe
+	Copyright (c) 2002-2005 Sam Leffler, Errno Consulting.
+
+The Debian packaging is (C) 2006, Kel Modderman <kelrin@tpg.com.au> and
+is licensed under the GPL. On Debian systems, the complete text of the GNU
+General Public License can be found in `/usr/share/common-licenses/GPL'.
--- madwifi-tools-0.9.4+r3685.20080531+dfsg.orig/debian/patches/02_fix_makefile_all_def.patch
+++ madwifi-tools-0.9.4+r3685.20080531+dfsg/debian/patches/02_fix_makefile_all_def.patch
@@ -0,0 +1,20 @@
+--- a/tools/Makefile
++++ b/tools/Makefile
+@@ -47,7 +47,7 @@
+ endif
+ 
+ 
+-PROGRAMS = athstats 80211stats athkey athchans athctrl \
++ALL = athstats 80211stats athkey athchans athctrl \
+ 	athdebug 80211debug wlanconfig wpakey
+ 
+ SUBDIRS = ath_info
+@@ -57,7 +57,7 @@
+ ALL_CFLAGS = $(CFLAGS) $(INCS)
+ LDFLAGS =
+ 
+-all: all-subdirs $(PROGRAMS)
++all: all-subdirs $(ALL)
+ 
+ all-subdirs:
+ 	for d in $(SUBDIRS); do \
--- madwifi-tools-0.9.4+r3685.20080531+dfsg.orig/debian/patches/01_athstats_disable_hal_phy_errors.patch
+++ madwifi-tools-0.9.4+r3685.20080531+dfsg/debian/patches/01_athstats_disable_hal_phy_errors.patch
@@ -0,0 +1,61 @@
+athstats_disable_hal_phy_errors.patch by Kel Modderman <kelrin@tpg.com.au>
+
+Disable inclusion of HAL_PHYERR_* via the non-free ah_desc.h header
+Contributed by Pavel Roskin
+---
+
+--- a/tools/athstats.c
++++ b/tools/athstats.c
+@@ -58,7 +58,7 @@
+ 
+ /* We don't need the real TARGET.opt_ah.h */
+ #define OPT_AH_H <stdio.h>
+-#include "ah_desc.h"
++/* #include "ah_desc.h" XXX: DFSG */
+ 
+ #include "wireless_copy.h"
+ #include "if_athioctl.h"
+@@ -66,6 +66,7 @@
+ #undef ARRAY_SIZE
+ #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
+ 
++#if 0
+ static const struct {
+ 	u_int		phyerr;
+ 	const char*	desc;
+@@ -90,6 +91,7 @@
+ 	{ HAL_PHYERR_CCK_SERVICE,	"CCK illegal service" },
+ 	{ HAL_PHYERR_CCK_RESTART,	"CCK restart" },
+ };
++#endif
+ 
+ static void
+ printstats(FILE *fd, const struct ath_stats *stats)
+@@ -98,7 +100,7 @@
+ 	if (stats->ast_##x) fprintf(fd, "%u " fmt "\n", stats->ast_##x)
+ #define	STATI(x,fmt) \
+ 	if (stats->ast_##x) fprintf(fd, "%d " fmt "\n", stats->ast_##x)
+-	int i, j;
++	int i;
+ 
+ 	STAT(watchdog, "watchdog timeouts");
+ 	STAT(hardware, "hardware error interrupts");
+@@ -140,6 +142,7 @@
+ 		for (i = 0; i < 32; i++) {
+ 			if (stats->ast_rx_phy[i] == 0)
+ 				continue;
++			#if 0
+ 			for (j = 0; j < ARRAY_SIZE(phyerrdescriptions); j++)
+ 				if (phyerrdescriptions[j].phyerr == i)
+ 					break;
+@@ -151,6 +154,10 @@
+ 				fprintf(fd, "    %u %s\n",
+ 					stats->ast_rx_phy[i],
+ 					phyerrdescriptions[j].desc);
++			#endif
++			fprintf(fd,
++				"    %u (phy error code %u)\n",
++				stats->ast_rx_phy[i], i);
+ 		}
+ 	}
+ 	STAT(be_nobuf, "no skbuff available for beacon");
--- madwifi-tools-0.9.4+r3685.20080531+dfsg.orig/debian/patches/series
+++ madwifi-tools-0.9.4+r3685.20080531+dfsg/debian/patches/series
@@ -0,0 +1,2 @@
+01_athstats_disable_hal_phy_errors.patch
+02_fix_makefile_all_def.patch
