summaryrefslogtreecommitdiffstats
path: root/recipes/madwifi
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/madwifi
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
downloadopenembedded-709c4d66e0b107ca606941b988bad717c0b45d9b.tar.gz
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/madwifi')
-rw-r--r--recipes/madwifi/files/10-sh4-le-elf-copts.patch12
-rw-r--r--recipes/madwifi/files/10-xscale-be-elf-copts.patch10
-rw-r--r--recipes/madwifi/files/10-xscale-le-elf-copts.patch8
-rw-r--r--recipes/madwifi/files/20-xscale-VFP-wackelf-v2.patch20
-rw-r--r--recipes/madwifi/files/20-xscale-VFP-wackelf.patch20
-rw-r--r--recipes/madwifi/files/30-define-ioreadwrite32be-for-little-endian-too.patch13
-rw-r--r--recipes/madwifi/madwifi-modules-0.9.3/madwifi-devname.patch115
-rw-r--r--recipes/madwifi/madwifi-modules-0.9.3/madwifi-skbpanic.patch16
-rw-r--r--recipes/madwifi/madwifi-modules_0.9.3.bb57
-rw-r--r--recipes/madwifi/madwifi-modules_cvs-bsd.bb52
-rw-r--r--recipes/madwifi/madwifi-modules_cvs.bb55
-rw-r--r--recipes/madwifi/madwifi-ng_r.inc63
-rw-r--r--recipes/madwifi/madwifi-ng_r2826-20071105.bb14
-rw-r--r--recipes/madwifi/madwifi-ng_r3314-20080131.bb14
-rw-r--r--recipes/madwifi/madwifi-ng_r3837-20080802.bb18
-rw-r--r--recipes/madwifi/madwifi-ng_r3878-20081204.bb25
16 files changed, 512 insertions, 0 deletions
diff --git a/recipes/madwifi/files/10-sh4-le-elf-copts.patch b/recipes/madwifi/files/10-sh4-le-elf-copts.patch
new file mode 100644
index 0000000000..f6a9e0020b
--- /dev/null
+++ b/recipes/madwifi/files/10-sh4-le-elf-copts.patch
@@ -0,0 +1,12 @@
+The -mno-implicit-fp is for gcc 4.x while for gcc 3.x we need -m4-nofpu.
+Since kernels built with gcc 4.x don't work on sh4 anwyay we patch this
+unconditionally for building with gcc 3.x
+
+--- madwifi-ng-r1527-20060425/hal/public/sh4-le-elf.inc~ 2006-07-25 13:41:29.000000000 +1000
++++ madwifi-ng-r1527-20060425/hal/public/sh4-le-elf.inc 2006-07-25 13:41:29.000000000 +1000
+@@ -59,4 +59,4 @@
+
+ LDOPTS= -EL
+ COPTS+= -DAH_BYTE_ORDER=AH_LITTLE_ENDIAN
+-COPTS+= -ml -m4 -mno-implicit-fp
++COPTS+= -ml -m4 -m4-nofpu
diff --git a/recipes/madwifi/files/10-xscale-be-elf-copts.patch b/recipes/madwifi/files/10-xscale-be-elf-copts.patch
new file mode 100644
index 0000000000..1a08f3756e
--- /dev/null
+++ b/recipes/madwifi/files/10-xscale-be-elf-copts.patch
@@ -0,0 +1,10 @@
+--- madwifi.orig/hal/public/xscale-be-elf.inc 2007-01-03 23:42:09.000000000 -0600
++++ madwifi/hal/public/xscale-be-elf.inc 2007-01-03 23:48:50.000000000 -0600
+@@ -77,5 +77,5 @@
+
+ LDOPTS= -EB
+ COPTS+= -DAH_BYTE_ORDER=AH_BIG_ENDIAN
+-COPTS+= -march=armv4 -mbig-endian -fno-strict-aliasing -fno-common -mapcs-32 \
+- -mtune=xscale -mshort-load-bytes
++COPTS+= -march=armv4 -mbig-endian -fno-strict-aliasing -fno-common \
++ -mtune=xscale
diff --git a/recipes/madwifi/files/10-xscale-le-elf-copts.patch b/recipes/madwifi/files/10-xscale-le-elf-copts.patch
new file mode 100644
index 0000000000..c4d9937220
--- /dev/null
+++ b/recipes/madwifi/files/10-xscale-le-elf-copts.patch
@@ -0,0 +1,8 @@
+--- madwifi.orig/hal/public/xscale-le-elf.inc 2007-01-03 23:42:06.000000000 -0600
++++ madwifi/hal/public/xscale-le-elf.inc 2007-01-03 23:48:50.000000000 -0600
+@@ -79,4 +79,4 @@
+ LDOPTS= -EL
+ COPTS+= -DAH_BYTE_ORDER=AH_LITTLE_ENDIAN
+ COPTS+= -march=armv4 -mlittle-endian -fno-strict-aliasing -fno-common \
+- -mapcs-32 -mtune=xscale -mshort-load-bytes
++ -mtune=xscale
diff --git a/recipes/madwifi/files/20-xscale-VFP-wackelf-v2.patch b/recipes/madwifi/files/20-xscale-VFP-wackelf-v2.patch
new file mode 100644
index 0000000000..ed805575ba
--- /dev/null
+++ b/recipes/madwifi/files/20-xscale-VFP-wackelf-v2.patch
@@ -0,0 +1,20 @@
+--- madwifi-trunk-r3837-20080802/ath_hal/Makefile.orig 2008-09-06 22:23:21.000000000 -0500
++++ madwifi-trunk-r3837-20080802/ath_hal/Makefile 2008-09-06 22:29:50.000000000 -0500
+@@ -82,12 +82,16 @@ endif
+ quiet_cmd_uudecode = UUDECODE $@
+ cmd_uudecode = $(obj)/uudecode -o $@ $<
+
+-$(filter-out ./,$(obj)/)$(HALBIN): $(HAL)/public/$(TARGET).hal.o.uu $(obj)/uudecode
++$(obj)/wackelf: $(HAL)/public/wackelf.c
++ $(HOSTCC) $(HOSTCFLAGS) -o $@ $<
++
++$(filter-out ./,$(obj)/)$(HALBIN): $(HAL)/public/$(TARGET).hal.o.uu $(obj)/uudecode $(obj)/wackelf
+ ifdef LINUX24
+ $(cmd_uudecode)
+ else
+ $(call if_changed,uudecode)
+ endif
++ $(obj)/wackelf -fpa $@
+
+ # Replace as many hashed names as possible with meaningful
+ # ones in the symbol table of the binary kernel module for HAL.
diff --git a/recipes/madwifi/files/20-xscale-VFP-wackelf.patch b/recipes/madwifi/files/20-xscale-VFP-wackelf.patch
new file mode 100644
index 0000000000..a47eed79e7
--- /dev/null
+++ b/recipes/madwifi/files/20-xscale-VFP-wackelf.patch
@@ -0,0 +1,20 @@
+--- madwifi.orig/ath_hal/Makefile 2007-01-03 23:44:10.000000000 -0600
++++ madwifi/ath_hal/Makefile 2007-01-03 23:47:55.000000000 -0600
+@@ -81,12 +81,16 @@
+ quiet_cmd_uudecode = UUDECODE $@
+ cmd_uudecode = $(obj)/uudecode -o $@ $<
+
+-$(obj)/$(TARGET).hal.o: $(HAL)/public/$(TARGET).hal.o.uu $(obj)/uudecode
++$(obj)/wackelf: $(HAL)/public/wackelf.c
++ $(HOSTCC) $(HOSTCFLAGS) -o $@ $<
++
++$(obj)/$(TARGET).hal.o: $(HAL)/public/$(TARGET).hal.o.uu $(obj)/uudecode $(obj)/wackelf
+ ifdef LINUX24
+ $(Q)$(obj)/uudecode -o $@ $<
+ else
+ $(call if_changed,uudecode)
+ endif
++ $(Q)$(obj)/wackelf -fpa $@
+
+ install:
+ test -d $(DESTDIR)/$(KMODPATH) || mkdir -p $(DESTDIR)/$(KMODPATH)
diff --git a/recipes/madwifi/files/30-define-ioreadwrite32be-for-little-endian-too.patch b/recipes/madwifi/files/30-define-ioreadwrite32be-for-little-endian-too.patch
new file mode 100644
index 0000000000..3752a554cd
--- /dev/null
+++ b/recipes/madwifi/files/30-define-ioreadwrite32be-for-little-endian-too.patch
@@ -0,0 +1,13 @@
+Reported as http://madwifi.org/ticket/1783 ...
+
+--- madwifi-ng-r3314-20080131/ath_hal/ah_os.h~ 2007-11-23 20:08:18.000000000 +1030
++++ madwifi-ng-r3314-20080131/ath_hal/ah_os.h 2008-02-11 23:12:11.000000000 +1030
+@@ -168,7 +168,7 @@
+ * for the second time, so the native implementations should be preferred.
+ */
+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)) && \
+- !defined(CONFIG_GENERIC_IOMAP) && (AH_BYTE_ORDER == AH_BIG_ENDIAN) && \
++ !defined(CONFIG_GENERIC_IOMAP) && \
+ !defined(__mips__) && !defined(__hppa__) && !defined(__powerpc__)
+ # ifndef iowrite32be
+ # define iowrite32be(_val, _addr) iowrite32(swab32((_val)), (_addr))
diff --git a/recipes/madwifi/madwifi-modules-0.9.3/madwifi-devname.patch b/recipes/madwifi/madwifi-modules-0.9.3/madwifi-devname.patch
new file mode 100644
index 0000000000..8f56b0485e
--- /dev/null
+++ b/recipes/madwifi/madwifi-modules-0.9.3/madwifi-devname.patch
@@ -0,0 +1,115 @@
+diff -uNr madwifi-0.9.3-orig/ath/if_ath.c madwifi-0.9.3/ath/if_ath.c
+--- madwifi-0.9.3-orig/ath/if_ath.c 2007-03-03 07:20:46.000000000 +0100
++++ madwifi-0.9.3/ath/if_ath.c 2007-03-27 20:02:15.004192220 +0200
+@@ -903,7 +903,8 @@
+
+ if (autocreatemode != -1) {
+ rtnl_lock();
+- error = ieee80211_create_vap(ic, "ath%d", dev,
++ /*error = ieee80211_create_vap(ic, "ath%d", dev,*/
++ error = ieee80211_create_vap(ic, "wlan%d", dev,
+ autocreatemode, IEEE80211_CLONE_BSSID);
+ rtnl_unlock();
+ if (error)
+@@ -9730,7 +9731,7 @@
+ };
+ static ctl_table ath_ath_table[] = {
+ { .ctl_name = DEV_ATH,
+- .procname = "ath",
++ .procname = "wlan",
+ .mode = 0555,
+ .child = ath_static_sysctls
+ }, { 0 }
+diff -uNr madwifi-0.9.3-orig/ath_hal/ah_os.c madwifi-0.9.3/ath_hal/ah_os.c
+--- madwifi-0.9.3-orig/ath_hal/ah_os.c 2007-02-21 07:46:24.000000000 +0100
++++ madwifi-0.9.3/ath_hal/ah_os.c 2007-03-27 20:02:05.571774828 +0200
+@@ -503,7 +503,7 @@
+ };
+ static ctl_table ath_ath_table[] = {
+ { .ctl_name = DEV_ATH,
+- .procname = "ath",
++ .procname = "wlan",
+ .mode = 0555,
+ .child = ath_hal_table
+ }, { 0 }
+diff -uNr madwifi-0.9.3-orig/ath_rate/amrr/amrr.c madwifi-0.9.3/ath_rate/amrr/amrr.c
+--- madwifi-0.9.3-orig/ath_rate/amrr/amrr.c 2007-02-21 07:46:24.000000000 +0100
++++ madwifi-0.9.3/ath_rate/amrr/amrr.c 2007-03-27 20:01:47.450972963 +0200
+@@ -530,7 +530,7 @@
+ };
+ static ctl_table ath_ath_table[] = {
+ { .ctl_name = DEV_ATH,
+- .procname = "ath",
++ .procname = "wlan",
+ .mode = 0555,
+ .child = ath_rate_table
+ }, { 0 }
+diff -uNr madwifi-0.9.3-orig/ath_rate/onoe/onoe.c madwifi-0.9.3/ath_rate/onoe/onoe.c
+--- madwifi-0.9.3-orig/ath_rate/onoe/onoe.c 2007-02-21 07:46:24.000000000 +0100
++++ madwifi-0.9.3/ath_rate/onoe/onoe.c 2007-03-27 20:01:35.362438027 +0200
+@@ -477,7 +477,7 @@
+ };
+ static ctl_table ath_ath_table[] = {
+ { .ctl_name = DEV_ATH,
+- .procname = "ath",
++ .procname = "wlan",
+ .mode = 0555,
+ .child = ath_rate_table
+ }, { 0 }
+diff -uNr madwifi-0.9.3-orig/tools/80211debug.c madwifi-0.9.3/tools/80211debug.c
+--- madwifi-0.9.3-orig/tools/80211debug.c 2006-12-08 18:20:08.000000000 +0100
++++ madwifi-0.9.3/tools/80211debug.c 2007-03-27 20:07:02.808926708 +0200
+@@ -183,7 +183,7 @@
+ int
+ main(int argc, char *argv[])
+ {
+- const char *ifname = "ath0";
++ const char *ifname = "wlan0";
+ const char *cp, *tp;
+ const char *sep;
+ int op, i;
+diff -uNr madwifi-0.9.3-orig/tools/80211stats.c madwifi-0.9.3/tools/80211stats.c
+--- madwifi-0.9.3-orig/tools/80211stats.c 2007-02-07 04:18:49.000000000 +0100
++++ madwifi-0.9.3/tools/80211stats.c 2007-03-27 20:04:16.297559340 +0200
+@@ -252,7 +252,7 @@
+ struct iwreq iwr;
+ int allnodes = 0;
+
+- const char *ifname = "ath0";
++ const char *ifname = "wlan0";
+
+ s = socket(AF_INET, SOCK_DGRAM, 0);
+ if (s < 0)
+diff -uNr madwifi-0.9.3-orig/tools/athdebug.c madwifi-0.9.3/tools/athdebug.c
+--- madwifi-0.9.3-orig/tools/athdebug.c 2006-12-08 18:20:08.000000000 +0100
++++ madwifi-0.9.3/tools/athdebug.c 2007-03-27 20:03:32.583625082 +0200
+@@ -185,7 +185,7 @@
+ #ifdef __linux__
+ const char *ifname = "wifi0";
+ #else
+- const char *ifname = "ath0";
++ const char *ifname = "wlan0";
+ #endif
+ const char *cp, *tp;
+ const char *sep;
+@@ -209,7 +209,7 @@
+ #ifdef __linux__
+ snprintf(oid, sizeof(oid), "dev.%s.debug", ifname);
+ #else
+- snprintf(oid, sizeof(oid), "dev.ath.%s.debug", ifname+3);
++ snprintf(oid, sizeof(oid), "dev.wlan.%s.debug", ifname+3);
+ #endif
+ debuglen = sizeof(debug);
+ if (sysctlbyname(oid, &debug, &debuglen, NULL, 0) < 0)
+diff -uNr madwifi-0.9.3-orig/tools/athstats.c madwifi-0.9.3/tools/athstats.c
+--- madwifi-0.9.3-orig/tools/athstats.c 2007-01-12 03:45:36.000000000 +0100
++++ madwifi-0.9.3/tools/athstats.c 2007-03-27 20:03:54.176580535 +0200
+@@ -229,7 +229,7 @@
+ #ifdef __linux__
+ const char *ifname = "wifi0";
+ #else
+- const char *ifname = "ath0";
++ const char *ifname = "wlan0";
+ #endif
+ int s;
+ struct ifreq ifr;
diff --git a/recipes/madwifi/madwifi-modules-0.9.3/madwifi-skbpanic.patch b/recipes/madwifi/madwifi-modules-0.9.3/madwifi-skbpanic.patch
new file mode 100644
index 0000000000..bad4989f60
--- /dev/null
+++ b/recipes/madwifi/madwifi-modules-0.9.3/madwifi-skbpanic.patch
@@ -0,0 +1,16 @@
+--- madwifi-0.9.3-orig/ath/if_ath.c 2007-04-12 12:53:01.000000000 +0200
++++ madwifi-0.9.3/ath/if_ath.c 2007-04-12 12:40:37.078056016 +0200
+@@ -5634,6 +5634,13 @@
+ sc->sc_devstats.rx_packets++;
+ sc->sc_devstats.rx_bytes += len;
+
++ if((skb->tail + len) > skb->end) {
++ printk(" --------- found dodgy wifi rx skb_put\n");
++ dev_kfree_skb(skb);
++ skb = NULL;
++ goto rx_next;
++ }
++
+ skb_put(skb, len);
+ skb->protocol = __constant_htons(ETH_P_CONTROL);
+
diff --git a/recipes/madwifi/madwifi-modules_0.9.3.bb b/recipes/madwifi/madwifi-modules_0.9.3.bb
new file mode 100644
index 0000000000..25c5aae1d3
--- /dev/null
+++ b/recipes/madwifi/madwifi-modules_0.9.3.bb
@@ -0,0 +1,57 @@
+DESCRIPTION = "Linux driver for 802.11a/b/g universal NIC cards using Atheros chip sets"
+SECTION = "base"
+PRIORITY = "optional"
+LICENSE = "GPL"
+RDEPENDS = "kernel (${KERNEL_VERSION}) wireless-tools (>=27)"
+DEPENDS = "virtual/kernel"
+CONFLICTS = "hostap-daemon (<0.4.8)"
+SRCDATE = "20050803"
+PV = "0.9.3"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/madwifi/madwifi-${PV}.tar.bz2 \
+ file://madwifi-devname.patch;patch=1 \
+ file://madwifi-skbpanic.patch;patch=1"
+S = "${WORKDIR}/madwifi-${PV}"
+
+inherit module-base
+
+# Hack Alert :D
+ARCH_mipsel = "mips"
+EXTRA_OEMAKE_mtx-1 = "TARGET=mips-le-elf KERNELPATH=${STAGING_KERNEL_DIR} KERNELRELEASE=${KERNEL_VERSION} TOOLPREFIX=${TARGET_PREFIX} \
+COPTS='-G 0 -mno-abicalls -fno-pic -Wa,--trap -fno-strict-aliasing -fno-common -fomit-frame-pointer -mlong-calls -DATH_PCI'"
+EXTRA_OEMAKE_mtx-2 = "TARGET=mips-le-elf KERNELPATH=${STAGING_KERNEL_DIR} KERNELRELEASE=${KERNEL_VERSION} TOOLPREFIX=${TARGET_PREFIX} \
+COPTS='-G 0 -mno-abicalls -fno-pic -Wa,--trap -fno-strict-aliasing -fno-common -fomit-frame-pointer -mlong-calls -DATH_PCI'"
+
+do_compile() {
+ oe_runmake
+ cd tools; oe_runmake
+}
+
+do_install() {
+ oe_runmake DESTDIR=${D} install
+ install -d ${D}/${sbindir}
+ cd tools;
+ oe_runmake DESTDIR=${D} BINDIR=${sbindir} install
+ install -m 755 athchans athctrl athkey ${D}/${sbindir}
+}
+
+do_stage() {
+ # hostapd and wpa_supplicant need these files
+ install -d ${STAGING_INCDIR}/madwifi/net80211/ ${STAGING_INCDIR}/madwifi/include
+ install -m 0644 net80211/*.h ${STAGING_INCDIR}/madwifi/net80211/
+ install -m 0644 include/compat.h ${STAGING_INCDIR}/madwifi/include/
+ cd ${STAGING_INCDIR}/madwifi/net80211/
+ rm -f compat.h; ln -s ../include/compat.h .
+}
+
+pkg_postinst() {
+if test "x$D" != "x"; then
+ exit 1
+else
+ depmod -ae
+fi
+}
+
+PACKAGES = "${PN}-dbg madwifi-tools ${PN}"
+FILES_${PN} = "/lib/modules/"
+FILES_madwifi-tools = "/usr/sbin/"
diff --git a/recipes/madwifi/madwifi-modules_cvs-bsd.bb b/recipes/madwifi/madwifi-modules_cvs-bsd.bb
new file mode 100644
index 0000000000..d570816fc1
--- /dev/null
+++ b/recipes/madwifi/madwifi-modules_cvs-bsd.bb
@@ -0,0 +1,52 @@
+DESCRIPTION = "Linux driver for 802.11a/b/g universal NIC cards using Atheros chip sets"
+SECTION = "base"
+PRIORITY = "optional"
+LICENSE = "GPL"
+RDEPENDS = "kernel (${KERNEL_VERSION})"
+DEPENDS = "virtual/kernel"
+PV = "1.0.0+cvs${SRCDATE}-bsd"
+DEFAULT_PREFERENCE = "-1"
+
+SRC_URI = "cvs://anonymous@madwifi.cvs.sourceforge.net/cvsroot/madwifi;module=madwifi;tag=BSD;date=${SRCDATE}"
+
+S = "${WORKDIR}/madwifi"
+
+inherit module-base
+
+# Hack Alert :D
+ARCH_mipsel = "mips"
+EXTRA_OEMAKE_mtx-1 = "TARGET=mips-le-elf KERNELPATH=${STAGING_KERNEL_DIR} KERNELRELEASE=${KERNEL_VERSION} TOOLPREFIX=${TARGET_PREFIX} \
+EXTRA_OEMAKE_mtx-2 = "TARGET=mips-le-elf KERNELPATH=${STAGING_KERNEL_DIR} KERNELRELEASE=${KERNEL_VERSION} TOOLPREFIX=${TARGET_PREFIX} \
+COPTS='-G 0 -mno-abicalls -fno-pic -Wa,--trap -fno-strict-aliasing -fno-common -fomit-frame-pointer -mlong-calls -DATH_PCI'"
+
+do_compile() {
+ oe_runmake
+ cd tools; oe_runmake
+}
+
+do_install() {
+ oe_runmake DESTDIR=${D} install
+ install -d ${D}${sbindir}
+ cd tools;
+ oe_runmake DESTDIR=${D} BINDIR=${sbindir} install
+ install -m 755 athchans athctrl athkey ${D}${sbindir}
+}
+
+do_stage() {
+ # hostapd needs these files
+ install -d ${STAGING_INCDIR}/net80211
+ install -m 0644 net80211/*.h ${STAGING_INCDIR}/net80211
+ install -m 0644 include/compat.h ${STAGING_INCDIR}/net80211
+}
+
+pkg_postinst() {
+if test "x$D" != "x"; then
+ exit 1
+else
+ depmod -ae
+fi
+}
+
+PACKAGES = "${PN}-dbg madwifi-tools ${PN}"
+FILES_${PN} = "/lib/modules/"
+FILES_madwifi-tools = "/usr/"
diff --git a/recipes/madwifi/madwifi-modules_cvs.bb b/recipes/madwifi/madwifi-modules_cvs.bb
new file mode 100644
index 0000000000..c5cf6cf806
--- /dev/null
+++ b/recipes/madwifi/madwifi-modules_cvs.bb
@@ -0,0 +1,55 @@
+DESCRIPTION = "Linux driver for 802.11a/b/g universal NIC cards using Atheros chip sets"
+SECTION = "base"
+PRIORITY = "optional"
+LICENSE = "GPL"
+RDEPENDS = "kernel (${KERNEL_VERSION})"
+DEPENDS = "virtual/kernel"
+SRCDATE = "20050803"
+PV = "1.0.0+cvs${SRCDATE}"
+
+SRC_URI = "cvs://anonymous@madwifi.cvs.sourceforge.net/cvsroot/madwifi;module=madwifi;date=${SRCDATE}"
+
+S = "${WORKDIR}/madwifi"
+
+inherit module-base
+
+# Hack Alert :D
+ARCH_mipsel = "mips"
+EXTRA_OEMAKE_mtx-1 = "TARGET=mips-le-elf KERNELPATH=${STAGING_KERNEL_DIR} KERNELRELEASE=${KERNEL_VERSION} TOOLPREFIX=${TARGET_PREFIX} \
+COPTS='-G 0 -mno-abicalls -fno-pic -Wa,--trap -fno-strict-aliasing -fno-common -fomit-frame-pointer -mlong-calls -DATH_PCI'"
+EXTRA_OEMAKE_mtx-2 = "TARGET=mips-le-elf KERNELPATH=${STAGING_KERNEL_DIR} KERNELRELEASE=${KERNEL_VERSION} TOOLPREFIX=${TARGET_PREFIX} \
+COPTS='-G 0 -mno-abicalls -fno-pic -Wa,--trap -fno-strict-aliasing -fno-common -fomit-frame-pointer -mlong-calls -DATH_PCI'"
+
+do_compile() {
+ oe_runmake
+ cd tools; oe_runmake
+}
+
+do_install() {
+ oe_runmake DESTDIR=${D} install
+ install -d ${D}/${sbindir}
+ cd tools;
+ oe_runmake DESTDIR=${D} BINDIR=${sbindir} install
+ install -m 755 athchans athctrl athkey ${D}/${sbindir}
+}
+
+do_stage() {
+ # hostapd and wpa_supplicant need these files
+ install -d ${STAGING_INCDIR}/madwifi/net80211/ ${STAGING_INCDIR}/madwifi/include
+ install -m 0644 net80211/*.h ${STAGING_INCDIR}/madwifi/net80211/
+ install -m 0644 include/compat.h ${STAGING_INCDIR}/madwifi/include/
+ cd ${STAGING_INCDIR}/madwifi/net80211/
+ rm -f compat.h; ln -s ../include/compat.h .
+}
+
+pkg_postinst() {
+if test "x$D" != "x"; then
+ exit 1
+else
+ depmod -ae
+fi
+}
+
+PACKAGES = "${PN}-dbg madwifi-tools ${PN}"
+FILES_${PN} = "/lib/modules/"
+FILES_madwifi-tools = "/usr/"
diff --git a/recipes/madwifi/madwifi-ng_r.inc b/recipes/madwifi/madwifi-ng_r.inc
new file mode 100644
index 0000000000..8fc3065eb9
--- /dev/null
+++ b/recipes/madwifi/madwifi-ng_r.inc
@@ -0,0 +1,63 @@
+DESCRIPTION = "Linux driver for 802.11a/b/g universal NIC cards using Atheros chip sets"
+SECTION = "base"
+PRIORITY = "optional"
+LICENSE = "GPL"
+RDEPENDS = "kernel (${KERNEL_VERSION})"
+DEPENDS = "virtual/kernel"
+PR ="r5"
+
+WACKELF_SRC_URI = ""
+WACKELF_SRC_URI_ixp4xx = " file://20-xscale-VFP-wackelf.patch;patch=1"
+WACKELF_SRC_URI_compulab-pxa270 = " file://20-xscale-VFP-wackelf.patch;patch=1"
+
+SRCNAME = "${PN}"
+SRC_URI = "http://snapshots.madwifi.org/madwifi-trunk/${SRCNAME}-${PV}.tar.gz \
+ file://10-xscale-be-elf-copts.patch;patch=1 \
+ file://10-xscale-le-elf-copts.patch;patch=1 \
+ file://10-sh4-le-elf-copts.patch;patch=1 \
+ ${WACKELF_SRC_URI}"
+
+S = "${WORKDIR}/${SRCNAME}-${PV}"
+
+inherit module-base
+
+ARCH_efika="powerpc"
+ARCH_dht-walnut="ppc"
+ARCH_magicbox="ppc"
+ARCH_sequoia="ppc"
+
+EXTRA_OEMAKE = "LDFLAGS= KERNELPATH=${STAGING_KERNEL_DIR} KERNELRELEASE=${KERNEL_VERSION} TOOLPREFIX=${TARGET_PREFIX}"
+
+EXTRA_OEMAKE_prepend_ixp4xxle = "TARGET=xscale-le-elf "
+EXTRA_OEMAKE_prepend_ixp4xxbe = "TARGET=xscale-be-elf "
+
+
+do_compile() {
+ unset LDFLAGS
+ oe_runmake all
+}
+
+do_stage() {
+ install -d ${STAGING_INCDIR}/${PN}/include
+ install -d ${STAGING_INCDIR}/${PN}/net80211
+ cp --dereference include/compat.h ${STAGING_INCDIR}/${PN}/include/
+ cp --dereference net80211/*.h ${STAGING_INCDIR}/${PN}/net80211/
+}
+
+do_install() {
+ install -d ${D}${sbindir}
+ unset LDFLAGS
+ oe_runmake DESTDIR=${D} BINDIR=${sbindir} install
+}
+
+pkg_postinst() {
+if test "x$D" != "x"; then
+ exit 1
+else
+ depmod -ae
+fi
+}
+
+PACKAGES += "${PN}-modules ${PN}-tools"
+FILES_${PN}-modules = "/lib/modules/"
+FILES_${PN}-tools = "/usr/"
diff --git a/recipes/madwifi/madwifi-ng_r2826-20071105.bb b/recipes/madwifi/madwifi-ng_r2826-20071105.bb
new file mode 100644
index 0000000000..5301e3bd42
--- /dev/null
+++ b/recipes/madwifi/madwifi-ng_r2826-20071105.bb
@@ -0,0 +1,14 @@
+# Bitbake recipe for the madwifi-ng driver
+
+DEFAULT_PREFERENCE = "-1"
+DEFAULT_PREFERENCE_alix = "1"
+DEFAULT_PREFERENCE_mpc8323e-rdb = "1"
+
+# Disable stripping of kernel modules, since this action strips too
+# much out, and the resulting module won't load.
+INHIBIT_PACKAGE_STRIP = "1"
+
+require madwifi-ng_r.inc
+
+# PR set after the include, to override what's set in the included file.
+PR = "r1"
diff --git a/recipes/madwifi/madwifi-ng_r3314-20080131.bb b/recipes/madwifi/madwifi-ng_r3314-20080131.bb
new file mode 100644
index 0000000000..fb5cde036f
--- /dev/null
+++ b/recipes/madwifi/madwifi-ng_r3314-20080131.bb
@@ -0,0 +1,14 @@
+# Bitbake recipe for the madwifi-ng driver
+
+# Disable stripping of kernel modules, since this action strips too
+# much out, and the resulting module won't load.
+INHIBIT_PACKAGE_STRIP = "1"
+
+require madwifi-ng_r.inc
+
+SRC_URI += " \
+ file://30-define-ioreadwrite32be-for-little-endian-too.patch;patch=1 \
+ "
+
+# PR set after the include, to override what's set in the included file.
+PR = "r6"
diff --git a/recipes/madwifi/madwifi-ng_r3837-20080802.bb b/recipes/madwifi/madwifi-ng_r3837-20080802.bb
new file mode 100644
index 0000000000..bf14c33f83
--- /dev/null
+++ b/recipes/madwifi/madwifi-ng_r3837-20080802.bb
@@ -0,0 +1,18 @@
+# Bitbake recipe for the madwifi-ng driver
+
+# Disable stripping of kernel modules, since this action strips too
+# much out, and the resulting module won't load.
+INHIBIT_PACKAGE_STRIP = "1"
+
+require madwifi-ng_r.inc
+
+# Due to a minor Makefile restructuring, newer versions require an updated
+# patch; this is really ugly and some alternate way to do this that's more
+# generic should be figured out.
+WACKELF_SRC_URI_ixp4xx = " file://20-xscale-VFP-wackelf-v2.patch;patch=1"
+WACKELF_SRC_URI_compulab-pxa270 = " file://20-xscale-VFP-wackelf-v2.patch;patch=1"
+
+SRCNAME = "madwifi-trunk"
+
+# PR set after the include, to override what's set in the included file.
+PR = "r1"
diff --git a/recipes/madwifi/madwifi-ng_r3878-20081204.bb b/recipes/madwifi/madwifi-ng_r3878-20081204.bb
new file mode 100644
index 0000000000..3db8244158
--- /dev/null
+++ b/recipes/madwifi/madwifi-ng_r3878-20081204.bb
@@ -0,0 +1,25 @@
+# Bitbake recipe for the madwifi-ng driver
+
+# This recipe needs testing by other than ixp4xx distros before
+# it can become the default:
+DEFAULT_PREFERENCE = "-1"
+DEFAULT_PREFERENCE_slugos = "1"
+
+# Disable stripping of kernel modules, since this action strips too
+# much out, and the resulting module won't load.
+INHIBIT_PACKAGE_STRIP = "1"
+
+require madwifi-ng_r.inc
+
+SRCNAME = "madwifi-trunk"
+
+# PR set after the include, to override what's set in the included file.
+PR = "r0"
+
+# It's not clear that we even need the wackelf patches any longer; certainly
+# they are not required for ixp4xx builds. This needs testing on pxa270.
+WACKELF_SRC_URI_ixp4xx = ""
+WACKELF_SRC_URI_compulab-pxa270 = ""
+
+# This works for EABI as well as the original OABI IXP4xx.
+EXTRA_OEMAKE = "V=1 KERNELPATH=${STAGING_KERNEL_DIR} KERNELRELEASE=${KERNEL_VERSION} TOOLPREFIX=${TARGET_PREFIX}"