stupid madwifi sucks. updated driver, fixed to properly disable on install to not

mess up livecd, removed completely broken karma...sorry
This commit is contained in:
Zero_Chaos 2009-09-08 01:50:22 +00:00
parent 3742cef337
commit 230c7486cf
4 changed files with 228 additions and 0 deletions

View file

@ -2,7 +2,9 @@ DIST madwifi-hal-0.10.5.6-r3917-20090116.tar.gz 4421921 RMD160 833301ec92cda6837
DIST madwifi-hal-0.10.5.6-r3942-20090205.tar.gz 4421112 RMD160 6c2589d08e64c1ec12611a96c30b460abbedbb1d SHA1 1e14b41f6cb13dbbe8b095bea2bdeff43ad69f82 SHA256 285b7aacaa05ea214277647c0f3ff2ca2ba86b1760dc9328a4ad6f5027b08cf5
DIST madwifi-hal-0.10.5.6-r3977-20090408.tar.gz 4422482 RMD160 3e65325e4985b88a1e3bc522d0129cd18af90dc1 SHA1 c6aa1c3cd75c60c3d01a363606a3803784c13d37 SHA256 36caffc316a329f77c5a90adc9230c6f4181ac16dc2fe7ef76c0a2eb34dfc983
DIST madwifi-hal-0.10.5.6-r4016-20090429.tar.gz 4423386 RMD160 7e464addc4bd7433d25c0ecf1b644b3551995206 SHA1 1d19d72d715744bf79a44a1f0b861f47ea1f0cb7 SHA256 2f4022c4a42c08cdeb6bbf5fb3c6f4296da506025ae2ed76a34563b470797ee9
DIST madwifi-hal-0.10.5.6-r4068-20090705.tar.gz 4424585 RMD160 dbc8c284be7ae603bf547ce8c879528b1c9f2bbe SHA1 b7bec607f42dfdd7b708554d80896929ad5759a9 SHA256 7a1acd8451ae446f2cca1ba0c4181d33b3112e6cae9abdc331058038e705e9b2
EBUILD madwifi-hal-tools-0.10.5.6-r3917.ebuild 2034 RMD160 7465e257bee58b116f8bc8be9523391be389ecee SHA1 3a89acca12f02345db4d1fcd2ed04e600368d259 SHA256 0707327bf089141370caa9cd4d1572fc20320c8ad25b7ec63eb98456a2cad225
EBUILD madwifi-hal-tools-0.10.5.6-r3942.ebuild 2032 RMD160 dcb3316849f99183b1c4c4b8acdde9d2fabb7851 SHA1 38ebcbde38bdadac905364788dc8934d23f5167c SHA256 6ffd80be04c64cec8f2f53ff31456901a1def19de5b03a780256a2d7cb9aec86
EBUILD madwifi-hal-tools-0.10.5.6-r3977.ebuild 2065 RMD160 e22b8c7cef1337f30d6c95f0642e7502a7fb3af2 SHA1 8abdbe16ee59045811ee45fe2471895dd70775d1 SHA256 0238c52fdc78f32e42bd734d671838b495b9076f62baa35ca9f971597c0fb7f9
EBUILD madwifi-hal-tools-0.10.5.6-r4016.ebuild 2065 RMD160 7b437624be13fd3e52dbc610cfe82c29397e1f2a SHA1 82e31919f73e7ccef87b79f8a7859fbea9ddd060 SHA256 f179664f9b695af5ee22a0b1b638a3aa3c936fc41e6e98b765d3fa1a4a689241
EBUILD madwifi-hal-tools-0.10.5.6-r4068.ebuild 2065 RMD160 be11807140abe1e0d94550d5d2de7600dcf2a640 SHA1 933e7851bc5bb23b5e41f70340d7aa6aef4e1a72 SHA256 48a9ca5ad86eb924581533a5c19ab8750a7a46acc79e0f4b668133a62edb7378

View file

@ -0,0 +1,79 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-wireless/madwifi-ng-tools/madwifi-ng-tools-0.9.4.ebuild,v 1.5 2008/11/15 16:30:30 pva Exp $
inherit toolchain-funcs
MADWIFI_HAL_SNAPSHOT="20090705"
MY_P=${P/-tools/}
MY_PVR=${MY_P}-${PR}-${MADWIFI_HAL_SNAPSHOT}
S="${WORKDIR}/${MY_PVR}/tools"
DESCRIPTION="Next Generation tools for configuration of Atheros based IEEE 802.11a/b/g wireless LAN cards"
HOMEPAGE="http://www.madwifi-project.org/"
SRC_URI="http://snapshots.madwifi-project.org/${MY_P}/${MY_PVR}.tar.gz"
LICENSE="|| ( BSD GPL-2 )"
SLOT="0"
KEYWORDS="amd64 ~ppc x86"
IUSE=""
DEPEND="virtual/libc"
RDEPEND="!net-wireless/madwifi-old-tools
!net-wireless/madwifi-ng-tools
${DEPEND}"
src_unpack() {
unpack ${A}
# format string fix from solar
#sed -i \
# -e 's:err(1, ifr.ifr_name);:err(1, "%s", ifr.ifr_name);:g' \
# ${S}/tools/athstats.c || die
einfo "S=$S"
einfo "PV=$PV"
sed -i \
-e "s:CC =.*:CC = $(tc-getCC):" \
-e "s:CFLAGS=:CFLAGS+=:" \
-e "s:LDFLAGS=:LDFLAGS+=:" \
"${S}"/Makefile || die
}
src_compile() {
emake || die "emake failed"
}
src_install() {
emake DESTDIR="${D}" BINDIR=/usr/bin MANDIR=/usr/share/man STRIP=echo \
install || die "emake install failed"
dodir /sbin
mv "${D}"/usr/bin/wlanconfig "${D}"/sbin
# install headers for use by
# net-wireless/wpa_supplicant and net-wireless/hostapd
cd "${S}"/..
insinto /usr/include/madwifi/include/
doins include/*.h
insinto /usr/include/madwifi/net80211
doins net80211/*.h
}
pkg_postinst() {
if [ -e "${ROOT}"/etc/udev/rules.d/65-madwifi.rules ]; then
ewarn
ewarn "The udev rules for creating interfaces (athX) are no longer needed."
ewarn
ewarn "You should manually remove the /etc/udev/rules.d/65-madwifi.rules file"
ewarn "and either run 'udevstart' or reboot for the changes to take effect."
ewarn
fi
einfo
einfo "If you use net-wireless/wpa_supplicant or net-wireless/hostapd with
madwifi"
einfo "you should remerge them now."
einfo
}

View file

@ -5,7 +5,9 @@ DIST madwifi-hal-0.10.5.6-r3917-20090116.tar.gz 4421921 RMD160 833301ec92cda6837
DIST madwifi-hal-0.10.5.6-r3942-20090205.tar.gz 4421112 RMD160 6c2589d08e64c1ec12611a96c30b460abbedbb1d SHA1 1e14b41f6cb13dbbe8b095bea2bdeff43ad69f82 SHA256 285b7aacaa05ea214277647c0f3ff2ca2ba86b1760dc9328a4ad6f5027b08cf5
DIST madwifi-hal-0.10.5.6-r3977-20090408.tar.gz 4422482 RMD160 3e65325e4985b88a1e3bc522d0129cd18af90dc1 SHA1 c6aa1c3cd75c60c3d01a363606a3803784c13d37 SHA256 36caffc316a329f77c5a90adc9230c6f4181ac16dc2fe7ef76c0a2eb34dfc983
DIST madwifi-hal-0.10.5.6-r4016-20090429.tar.gz 4423386 RMD160 7e464addc4bd7433d25c0ecf1b644b3551995206 SHA1 1d19d72d715744bf79a44a1f0b861f47ea1f0cb7 SHA256 2f4022c4a42c08cdeb6bbf5fb3c6f4296da506025ae2ed76a34563b470797ee9
DIST madwifi-hal-0.10.5.6-r4068-20090705.tar.gz 4424585 RMD160 dbc8c284be7ae603bf547ce8c879528b1c9f2bbe SHA1 b7bec607f42dfdd7b708554d80896929ad5759a9 SHA256 7a1acd8451ae446f2cca1ba0c4181d33b3112e6cae9abdc331058038e705e9b2
EBUILD madwifi-hal-0.10.5.6-r3917.ebuild 3154 RMD160 b16c74c718c6d4ca5e97cc0b365a4a06361ea3c0 SHA1 2c2b7628e0633107b3c5d30f4cb2a2fc12549115 SHA256 975f979ddfd9578b431ebdedd8c1d4bcb2246521c99d50e327032adcc65b3835
EBUILD madwifi-hal-0.10.5.6-r3942.ebuild 4798 RMD160 52e1771a9854d8eef55523ac70428bcc3c565cf9 SHA1 f136073d1a8f3c27fc1799eddc1a9050936ec457 SHA256 b1d56cf0769dfeaa9f2112fd8fb3674f012e99eac6960215262a9eb19f6074a0
EBUILD madwifi-hal-0.10.5.6-r3977.ebuild 4888 RMD160 044252a3b985e69db5467860999bf890bb1d1ec2 SHA1 9010bb141413ae9140ee4af20c0c43f1a030b87d SHA256 8a15240e59e38bcafffdee8a20349d601b9cddd2124f47751966ec17d4d46771
EBUILD madwifi-hal-0.10.5.6-r4016.ebuild 4963 RMD160 d051da447f388a36ca6f3ca36bf18b79128db404 SHA1 0f7452db6104a8cc50b29c8121e3c287911c245e SHA256 9ed8c19ea0ccf352740828ff7478a08951dee6f8c85321a6c30f645d5f320b81
EBUILD madwifi-hal-0.10.5.6-r4068.ebuild 5207 RMD160 aae0395d44162058d2daebecb5c1e209f30d49fd SHA1 9869dc7754ef4b64ff84bf20873af43d8ed8080e SHA256 ebe26ee4f1c6f94ad79c9034720efe080053d431566c42d34fe8a3d0cd1ea387

View file

@ -0,0 +1,145 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-wireless/madwifi-ng/madwifi-ng-0.9.4.ebuild,v 1.4 2008/07/21 19:13:53 steev Exp $
inherit linux-mod
MADWIFI_HAL_SNAPSHOT="20090705"
MY_PVR=${PF}-${MADWIFI_HAL_SNAPSHOT}
S="${WORKDIR}"/${MY_PVR}
DESCRIPTION="Next Generation driver for Atheros based IEEE 802.11a/b/g wireless LAN cards"
HOMEPAGE="http://www.madwifi-project.org/"
SRC_URI="http://snapshots.madwifi-project.org/${P}/${MY_PVR}.tar.gz"
LICENSE="atheros-hal
|| ( BSD GPL-2 )"
SLOT="0"
KEYWORDS="amd64 ~ppc x86"
IUSE="+injection default"
DEPEND="app-arch/sharutils
!net-wireless/madwifi-old
!net-wireless/madwifi-ng
net-wireless/compat-wireless"
RDEPEND="!net-wireless/madwifi-old
!net-wireless/madwifi-ng
=net-wireless/madwifi-hal-tools-${PVR}
net-wireless/compat-wireless"
CONFIG_CHECK="CRYPTO WIRELESS_EXT SYSCTL MODULES"
ERROR_CRYPTO="${P} requires Cryptographic API support (CONFIG_CRYPTO)."
ERROR_WIRELESS_EXT="${P} requires CONFIG_WIRELESS_EXT selected by Wireless LAN drivers (non-hamradio) & Wireless Extensions"
ERROR_SYSCTL="${P} requires Sysctl support (CONFIG_SYSCTL)."
ERROR_KMOD="${F} requires CONFIG_KMOD to be set to y or m"
BUILD_TARGETS="all"
MODULESD_ATH_PCI_DOCS="README"
pkg_setup() {
linux-mod_pkg_setup
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)
wlan_scan_sta(net:"${S}"/net80211)
wlan_scan_ap(net:"${S}"/net80211)
ath_rate_amrr(net:"${S}"/ath_rate/amrr)
ath_rate_onoe(net:"${S}"/ath_rate/onoe)
ath_rate_sample(net:"${S}"/ath_rate/sample)
ath_rate_minstrel(net:"${S}"/ath_rate/minstrel)
ath_pci(net:"${S}"/ath)'
BUILD_PARAMS="KERNELPATH=${KV_OUT_DIR}"
}
src_unpack() {
if linux_chkconfig_builtin ATH5K; then
die "Warning: ATH5k was built into the kernel, if you want to use madwifi \
then you must set ath5k to disabled or module in your kernel config."
fi
unpack ${A}
cd "${S}"
epatch "${FILESDIR}"/${PN}-release_header_fix.patch
if use injection; then epatch "${FILESDIR}/${PN}-injection-r3925.patch"; fi
# if use amd64; then
# if use karma; then ewarn "Karma patches don't work on amd64 right now, sorry about your luck"; fi
# else
# if use karma; then epatch "${FILESDIR}/${PN}-digininja-karma-updated_1.patch"; fi
# fi
for dir in ath ath_hal net80211 ath_rate ath_rate/amrr ath_rate/minstrel ath_rate/onoe ath_rate/sample; do
convert_to_m "${S}"/${dir}/Makefile
done
}
src_install() {
linux-mod_src_install
if use !default; then mv ${D}/lib/modules/${KV_FULL}/net/ath_pci.ko ${D}/lib/modules/${KV_FULL}/net/ath_pci.ko.ignore; fi
dodoc README THANKS
}
pkg_postinst() {
local moddir="${ROOT}/lib/modules/${KV_FULL}/net/"
linux-mod_pkg_postinst
einfo
einfo "The type of the created interface can be controlled through the 'autocreate'"
einfo "module parameter."
if linux_chkconfig_module ATH5K; then
if use default; then
/usr/sbin/athenable madwifi
ewarn "Madwifi has been set to default, this is a bad idea, I hope you know what you are doing."
ewarn "If you want to use a card that is already inserted you need to modprobe ath_pci."
fi
if use !default; then
/usr/sbin/athenable ath5k
ewarn "Ath5k has been set to default, if you know what you are doing and you really do"
ewarn "not want this then set the default use flag and rebuild this package. It is strongly"
ewarn "recommended that you keep ath5k as default and use 'athload madwifi' if you need to switch"
ewarn "If you want to use a card that is already inserted you may need to modprobe ath5k"
ewarn "You can switch between madwifi and ath5k using athload <driver>"
fi
else
if use default; then
/usr/sbin/athenable madwifi
ewarn "Madwifi has been set to default and ath5k isn't installed. It is recommened to"
ewarn "use ath5k instead of madwifi, you should enable it as a module in your kernel."
ewarn "If you enable ath5k as a module you can switch between madwifi and ath5k"
ewarn "using athload <driver>"
fi
if use !default; then
/usr/sbin/athenable ath5k
ewarn "Madwifi was not installed as default and you don't have ath5k enabled in the kernel"
ewarn "as a module. You need to either enable ath5k in the kernel or rebuild with madwifi"
ewarn "and the default use flag or no driver will claim atheros a/b/g cards."
ewarn "If you enable ath5k as a module you can switch between madwifi and ath5k"
ewarn "using athload <driver>"
fi
fi
}
pkg_postrm()
{
if linux_chkconfig_present ATH5K; then
if use default; then
/usr/sbin/athenable ath5k
ewarn "Default driver has been switched from madwifi to ath5k"
fi
if use !default; then
/usr/sbin/athenable ath5k
ewarn "Default driver for atheros a/b/g cards is ath5k"
fi
else
ewarn "Ath5k is not enabled in the kernel at all, this means you now have no driver to"
ewarn "use atheros a/b/g cards. Likely you wish to enable ath5k as a module in the kernel"
fi
}