aboutsummaryrefslogtreecommitdiffstats
path: root/packages/madwifi
diff options
context:
space:
mode:
authorMartin Dietze <di@fh-wedel.de>2007-04-18 16:54:51 +0000
committerMartin Dietze <di@fh-wedel.de>2007-04-18 16:54:51 +0000
commit39187764e17593dcdbce4177bc1c035cc52d0c19 (patch)
tree6a6dfb9c9359423d69d595f4027eec4066539c86 /packages/madwifi
parent621203193b3ed35610e8801e1323aa94cb50d7f5 (diff)
downloadopenembedded-39187764e17593dcdbce4177bc1c035cc52d0c19.tar.gz
madwifi: added package for madwifi-modules 0.9.3
Diffstat (limited to 'packages/madwifi')
-rw-r--r--packages/madwifi/madwifi-modules-0.9.3/.mtn2git_empty0
-rw-r--r--packages/madwifi/madwifi-modules-0.9.3/madwifi-devname.patch115
-rw-r--r--packages/madwifi/madwifi-modules-0.9.3/madwifi-skbpanic.patch16
-rw-r--r--packages/madwifi/madwifi-modules_0.9.3.bb57
4 files changed, 188 insertions, 0 deletions
diff --git a/packages/madwifi/madwifi-modules-0.9.3/.mtn2git_empty b/packages/madwifi/madwifi-modules-0.9.3/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/madwifi/madwifi-modules-0.9.3/.mtn2git_empty
diff --git a/packages/madwifi/madwifi-modules-0.9.3/madwifi-devname.patch b/packages/madwifi/madwifi-modules-0.9.3/madwifi-devname.patch
new file mode 100644
index 0000000000..8f56b0485e
--- /dev/null
+++ b/packages/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/packages/madwifi/madwifi-modules-0.9.3/madwifi-skbpanic.patch b/packages/madwifi/madwifi-modules-0.9.3/madwifi-skbpanic.patch
new file mode 100644
index 0000000000..bad4989f60
--- /dev/null
+++ b/packages/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/packages/madwifi/madwifi-modules_0.9.3.bb b/packages/madwifi/madwifi-modules_0.9.3.bb
new file mode 100644
index 0000000000..523b01c9e0
--- /dev/null
+++ b/packages/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 = "madwifi-tools ${PN}"
+FILES_${PN} = "/lib/modules/"
+FILES_madwifi-tools = "/usr/sbin/"