summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schweizer <genstef@gentoo.org>2005-06-04 15:52:52 +0000
committerStefan Schweizer <genstef@gentoo.org>2005-06-04 15:52:52 +0000
commitb3fe618986e0377dc9e5f428c8633303416cb1a2 (patch)
tree55103de192bac43ea3aacd4727ad5527e765b2ee /net-wireless
parentStable on ppc. (diff)
downloadgentoo-2-b3fe618986e0377dc9e5f428c8633303416cb1a2.tar.gz
gentoo-2-b3fe618986e0377dc9e5f428c8633303416cb1a2.tar.bz2
gentoo-2-b3fe618986e0377dc9e5f428c8633303416cb1a2.zip
New ebuild thanks to phaidros <phaidros@subsignal.org> in bug 94914, adding the aireplay patch thanks to strerror
(Portage version: 1.589-cvs)
Diffstat (limited to 'net-wireless')
-rw-r--r--net-wireless/madwifi-bsd/ChangeLog12
-rw-r--r--net-wireless/madwifi-bsd/Manifest4
-rw-r--r--net-wireless/madwifi-bsd/files/aireplay-2.2.patch122
-rw-r--r--net-wireless/madwifi-bsd/files/digest-madwifi-bsd-0.1_pre200506021
-rw-r--r--net-wireless/madwifi-bsd/madwifi-bsd-0.1_pre20050602.ebuild54
-rw-r--r--net-wireless/madwifi-bsd/metadata.xml5
6 files changed, 198 insertions, 0 deletions
diff --git a/net-wireless/madwifi-bsd/ChangeLog b/net-wireless/madwifi-bsd/ChangeLog
new file mode 100644
index 000000000000..8edcdbc2578d
--- /dev/null
+++ b/net-wireless/madwifi-bsd/ChangeLog
@@ -0,0 +1,12 @@
+# ChangeLog for net-wireless/madwifi-bsd
+# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/madwifi-bsd/ChangeLog,v 1.1 2005/06/04 15:52:52 genstef Exp $
+
+*madwifi-bsd-0.1_pre20050602 (04 Jun 2005)
+
+ 04 Jun 2005; Stefan Schweizer <genstef@gentoo.org>
+ +files/aireplay-2.2.patch, +metadata.xml,
+ +madwifi-bsd-0.1_pre20050602.ebuild:
+ New ebuild thanks to phaidros <phaidros@subsignal.org> in bug 94914, adding
+ the aireplay patch thanks to strerror
+
diff --git a/net-wireless/madwifi-bsd/Manifest b/net-wireless/madwifi-bsd/Manifest
new file mode 100644
index 000000000000..9d4dab17efb2
--- /dev/null
+++ b/net-wireless/madwifi-bsd/Manifest
@@ -0,0 +1,4 @@
+MD5 1e6eef1a6333a49953684187e5702c47 madwifi-bsd-0.1_pre20050602.ebuild 1622
+MD5 19fd766bac8e110b4620363a1ace26dd metadata.xml 159
+MD5 42a486960e160ec30b62f0389f118598 files/digest-madwifi-bsd-0.1_pre20050602 74
+MD5 e6af3f4aec6aa869489a85ab3f5e78e9 files/aireplay-2.2.patch 3959
diff --git a/net-wireless/madwifi-bsd/files/aireplay-2.2.patch b/net-wireless/madwifi-bsd/files/aireplay-2.2.patch
new file mode 100644
index 000000000000..9bf436ec9d73
--- /dev/null
+++ b/net-wireless/madwifi-bsd/files/aireplay-2.2.patch
@@ -0,0 +1,122 @@
+--- madwifi-bsd/ath/if_ath.c.orig 2005-06-02 08:23:52.000000000 +0200
++++ madwifi-bsd/ath/if_ath.c 2005-06-04 14:37:13.000000000 +0200
+@@ -1750,7 +1750,8 @@
+ /*
+ * Encapsulate the packet for transmission.
+ */
+- skb = ieee80211_encap(ic, skb, ni);
++ if (ic->ic_opmode != IEEE80211_M_MONITOR)
++ skb = ieee80211_encap(ic, skb, ni);
+ if (skb == NULL) {
+ DPRINTF(sc, ATH_DEBUG_ANY,
+ "%s: encapsulation failure\n",
+@@ -3968,7 +3969,7 @@
+ //TODO: ??? pktlen = m0->m_pkthdr.len - (hdrlen & 3);
+ pktlen = skb->len - (hdrlen & 3);
+
+- if (iswep) {
++ if (iswep && ic->ic_opmode != IEEE80211_M_MONITOR) {
+ const struct ieee80211_cipher *cip;
+ struct ieee80211_key *k;
+
+@@ -4038,7 +4039,7 @@
+ * use short preamble based on the current mode and
+ * negotiated parameters.
+ */
+- if ((ic->ic_flags & IEEE80211_F_SHPREAMBLE) &&
++ if ((ic->ic_flags & IEEE80211_F_SHPREAMBLE) && ni != NULL &&
+ (ni->ni_capinfo & IEEE80211_CAPINFO_SHORT_PREAMBLE)) {
+ shortPreamble = AH_TRUE;
+ sc->sc_stats.ast_tx_shortpre++;
+@@ -4054,6 +4055,11 @@
+ */
+ switch (wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) {
+ case IEEE80211_FC0_TYPE_MGT:
++ if (ic->ic_opmode == IEEE80211_M_MONITOR) {
++ atype = HAL_PKT_TYPE_NORMAL; /* default */
++ txq = sc->sc_ac2q[skb->priority];
++ break;
++ }
+ subtype = wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK;
+ if (subtype == IEEE80211_FC0_SUBTYPE_BEACON)
+ atype = HAL_PKT_TYPE_BEACON;
+@@ -4077,6 +4083,11 @@
+ flags |= HAL_TXDESC_INTREQ; /* force interrupt */
+ break;
+ case IEEE80211_FC0_TYPE_CTL:
++ if (ic->ic_opmode == IEEE80211_M_MONITOR) {
++ atype = HAL_PKT_TYPE_NORMAL; /* default */
++ txq = sc->sc_ac2q[skb->priority];
++ break;
++ }
+ atype = HAL_PKT_TYPE_PSPOLL; /* stop setting of duration */
+ rix = 0; /* XXX lowest rate */
+ try0 = ATH_TXMAXTRY;
+@@ -4111,11 +4122,14 @@
+ flags |= HAL_TXDESC_INTREQ; /* force interrupt */
+ } else {
+ if (ic->ic_fixed_rate == -1) {
++ rix = 0; /* XXX lowest rate */
++ try0 = ATH_TXMAXTRY;
+ /*
+ * Data frames; consult the rate control module.
+ */
+- ath_rate_findrate(sc, an, shortPreamble, pktlen,
+- &rix, &try0, &txrate);
++ if (ic->ic_opmode != IEEE80211_M_MONITOR)
++ ath_rate_findrate(sc, an, shortPreamble, pktlen,
++ &rix, &try0, &txrate);
+ }
+ else {
+ rix = ic->ic_fixed_rate;
+@@ -4140,6 +4154,11 @@
+ pri = WME_AC_BE;
+ break;
+ default:
++ if (ic->ic_opmode == IEEE80211_M_MONITOR) {
++ atype = HAL_PKT_TYPE_NORMAL; /* default */
++ txq = sc->sc_ac2q[skb->priority];
++ break;
++ }
+ if_printf(dev, "bogus frame type 0x%x (%s)\n",
+ wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK, __func__);
+ /* XXX statistic */
+@@ -4260,6 +4279,12 @@
+ ieee80211_dump_pkt(skb->data, skb->len,
+ sc->sc_hwmap[txrate].ieeerate, -1);
+
++ /* Let those crazy kids transmit frames in monitor mode */
++ if (ic->ic_opmode == IEEE80211_M_MONITOR) {
++ /* Only transmit one frame, disable retrans */
++ try0 = 1;
++ }
++
+ /*
+ * Determine if a tx interrupt should be generated for
+ * this descriptor. We take a tx interrupt to reap
+@@ -4290,7 +4315,7 @@
+ , pktlen /* packet length */
+ , hdrlen /* header length */
+ , atype /* Atheros packet type */
+- , ni->ni_txpower /* txpower */
++ , 60 /* txpower */
+ , txrate, try0 /* series 0 rate/tries */
+ , keyix /* key cache index */
+ , sc->sc_txantenna /* antenna mode */
+@@ -4298,6 +4323,7 @@
+ , ctsrate /* rts/cts rate */
+ , ctsduration /* rts/cts duration */
+ );
++
+ /*
+ * Setup the multi-rate retry state only when we're
+ * going to use it. This assumes ath_hal_setuptxdesc
+@@ -4305,7 +4331,7 @@
+ * when the hardware supports multi-rate retry and
+ * we don't use it.
+ */
+- if (try0 != ATH_TXMAXTRY)
++ if (try0 != ATH_TXMAXTRY && ic->ic_opmode != IEEE80211_M_MONITOR)
+ ath_rate_setupxtxdesc(sc, an, ds, shortPreamble, rix);
+
+ /*
diff --git a/net-wireless/madwifi-bsd/files/digest-madwifi-bsd-0.1_pre20050602 b/net-wireless/madwifi-bsd/files/digest-madwifi-bsd-0.1_pre20050602
new file mode 100644
index 000000000000..e4ee591bda12
--- /dev/null
+++ b/net-wireless/madwifi-bsd/files/digest-madwifi-bsd-0.1_pre20050602
@@ -0,0 +1 @@
+MD5 9b9a01a95ec3612ef54fe108ab5f772b madwifi-bsd-20050602.tar.bz2 2019635
diff --git a/net-wireless/madwifi-bsd/madwifi-bsd-0.1_pre20050602.ebuild b/net-wireless/madwifi-bsd/madwifi-bsd-0.1_pre20050602.ebuild
new file mode 100644
index 000000000000..a26b7d8039d7
--- /dev/null
+++ b/net-wireless/madwifi-bsd/madwifi-bsd-0.1_pre20050602.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/madwifi-bsd/madwifi-bsd-0.1_pre20050602.ebuild,v 1.1 2005/06/04 15:52:52 genstef Exp $
+
+inherit linux-mod eutils
+
+DESCRIPTION="Wireless driver for Atheros chipset a/b/g cards"
+HOMEPAGE="http://madwifi.sourceforge.net/"
+SRC_URI="http://madwifi.otaku42.de/BSD/madwifi-bsd-${PV:7:4}${PV:11:2}${PV:13:2}.tar.bz2"
+LICENSE="GPL-2"
+KEYWORDS="~x86 ~amd64"
+IUSE=""
+DEPEND="app-arch/sharutils"
+RDEPEND=""
+S=${WORKDIR}/madwifi-bsd
+
+pkg_setup() {
+ linux-mod_pkg_setup
+
+ use x86 && TARGET=i386-elf
+ use amd64 && TARGET=x86_64-elf
+ MODULE_NAMES="ath_hal(net:${S}/ath_hal) wlan(net:${S}/net80211) wlan_acl(net:${S}/net80211)
+ wlan_ccmp(net:${S}/net80211) wlan_tkip(net:${S}/net80211) wlan_wep(net:${S}/net80211)
+ wlan_xauth(net:${S}/net80211) ath_rate_amrr(net:${S}/ath_rate/amrr)
+ ath_rate_onoe(net:${S}/ath_rate/onoe) ath_pci(net:${S}/ath)"
+ BUILD_PARAMS="KERNELPATH=${ROOT}${KV_OUT_DIR} KERNELRELEASE=${KV_FULL}
+ TARGET=${TARGET} TOOLPREFIX=/usr/bin/"
+ BUILD_TARGETS="all"
+}
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ epatch ${FILESDIR}/aireplay-2.2.patch
+ for dir in ath ath_hal net80211 ath_rate/amrr ath_rate/onoe; do
+ convert_to_m ${S}/${dir}/Makefile
+ done
+}
+
+src_install() {
+ dodoc README COPYRIGHT
+
+ linux-mod_src_install
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+
+ einfo ""
+ einfo "The madwifi drivers create an interface named 'athX'"
+ einfo "Create /etc/init.d/net.ath0 and add a line for athX"
+ einfo "in /etc/conf.d/net like 'iface_ath0=\"dhcp\"'"
+ einfo ""
+}
diff --git a/net-wireless/madwifi-bsd/metadata.xml b/net-wireless/madwifi-bsd/metadata.xml
new file mode 100644
index 000000000000..b27ff8eb4ed6
--- /dev/null
+++ b/net-wireless/madwifi-bsd/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>mobile</herd>
+</pkgmetadata>