mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-04-27 01:03:18 +02:00
compat-wireless: added ath9k_htc fix to stable and testing
This commit is contained in:
parent
93602fbab5
commit
fd748fd64a
4 changed files with 318 additions and 0 deletions
|
|
@ -8,6 +8,7 @@ AUX 4012_openwrt-b43-disable_qos_when_openfw.patch 721 RMD160 cd67c2425cd5b29f63
|
|||
AUX 4013-runtime-enable-disable-of-mac80211-packet-injection.patch 1490 RMD160 53c728303c77b2ffd93917bceaaad6a38ee80236 SHA1 3b6aa934cf4c09deb8e93fcb08b10bfb1f6bdbb9 SHA256 88f997a54768feeb40a9f985e412e90e9fda2491f32cf6b078eb2a0a9f81e785
|
||||
AUX 4099-2.6.32-rc7-mac80211-security-fixes.patch 5951 RMD160 fb07610df222a12f81e66b4e69f35737ccf8003c SHA1 089a6ab27f14db15ce3b9280bd173f2cba124406 SHA256 61d0c5e5681f0fb20cf65925b49eeebf34d3b026906e052c086f1f17147a9359
|
||||
AUX WEXT-EXT-nuts.patch 3150 RMD160 a89ceb7e6f34e4b2be1b8c35ed8ed141c20a2f20 SHA1 d71520c21765fcec6f710970df40e1091d2feb75 SHA256 be6a5f2746ff6cf5963e95b1c7a895cc343c930de22a47e41b4ed0d24a60a6f0
|
||||
AUX ath9k_htc_ethtool_driver.patch 1242 RMD160 49838be1d386765166b357be2a3ac59746a4c850 SHA1 16cb804d64ce0ec21b509052bbd7004554147657 SHA256 b27463b3f6cfe64e6b09835e1a06bc3ae83207f6800710ff0c461a6bef363460
|
||||
AUX ath_ignore_eeprom.patch 2096 RMD160 87f268cfcf06115464b64377e5dd05bfc467203d SHA1 ffb607d19a8622f0a9ea11ee09269f0af2a1ea28 SHA256 def6985a8c1486bfe78c8cf72333f620d88730fc1c3116d016a03725a6ba2226
|
||||
AUX blinky.patch 357 RMD160 6c93e916efc56412f316076e836c1c5d98e58047 SHA1 e23568801309cdf2a01fa5be8cd3b9a3fcff5edd SHA256 1c2f0e18ecbcf2c07ba732671e77408326d2566d260f0252002c5698f9e65e30
|
||||
AUX channel-negative-one-maxim.patch 1021 RMD160 39a56a0fdc4c5932e507985c5a213b703ff8df7c SHA1 a611acdd7994b07b0b39417ef7a5a6ffc866a733 SHA256 19f7fc0753636c32026e444e23bd101bd21cfeb59661284678bf157dc35212f2
|
||||
|
|
@ -52,7 +53,9 @@ EBUILD compat-wireless-2.6.34-r2.ebuild 3918 RMD160 48f91620cf68a993e63d3c9dfe56
|
|||
EBUILD compat-wireless-2.6.35-r1.ebuild 5471 RMD160 dcc6f3666823faee305165a846cd37065ac9e2cb SHA1 74c3474682925c35629cffaad6a7ec522e31f5c9 SHA256 25c0b5e0db7fe4d1e9942acbe7f0325e1ef8d7e92488f0f554734bca2d0e86e0
|
||||
EBUILD compat-wireless-2.6.36.ebuild 5332 RMD160 c4a19864f8703fce0b9369fc597f165290c56661 SHA1 efb406e9ab4ea21021f0e09edbfdb2e5d2a08f7e SHA256 52f02128f594db9950425aa03cd90cf9d5ff54d6475b25db696c58cd8c0a75d2
|
||||
EBUILD compat-wireless-2.6.37-r7.ebuild 5443 RMD160 629fefa357220ebbad14d4f42979072a6ced87cc SHA1 7cd2e349de253e0f62abbe6c11bbfdc1558877e7 SHA256 f08fb77d9972331aae217e050e034e3bfd17d933c5eb22a272d05c7022f70462
|
||||
EBUILD compat-wireless-2.6.38.2-r1.ebuild 5434 RMD160 fdfbb30d004db6b466fb01a4c6b2a72236e1a458 SHA1 b189a8fb941bd978c50f9af350bdeb214eb3862f SHA256 82b14772f1dde5a4578d8663951b7ae8c727869971782a0f2a72ead0d867a272
|
||||
EBUILD compat-wireless-2.6.38.2.ebuild 5349 RMD160 997fe67289661b4b59f7b0751745a7b186bf2417 SHA1 43983e2a9b924c11590feffa516563ec2a5add1e SHA256 de62ecf3300a5d1eb52780fb4fe784f5c3702c2ecb3d4acaef0b051d0c0ec52d
|
||||
EBUILD compat-wireless-2.6.38.ebuild 5349 RMD160 0ee4a4189fdfcf79549f1322149ca562b4ac8f8a SHA1 d2d22dfa0a7d3fc663779a680d7ac489f02740f5 SHA256 6e842396c1d468750be6a91fd94a784168d56b68513a3e9e660fc0e97c556556
|
||||
EBUILD compat-wireless-2.6.39_rc1-r1.ebuild 5440 RMD160 1a664ec4a2b759c4c88e4705fbf7b1000e90f6d7 SHA1 d76862c3cfa44bf49907b5df77b08399500b30ab SHA256 0b8b6782fb6ad61ea0ea4d0e56ca5bba62097002f8d39b169740da79626f4b30
|
||||
EBUILD compat-wireless-2.6.39_rc1.ebuild 5352 RMD160 843acbacc6d8c1c30c873f4e050a757314ab8707 SHA1 ba8ba48bf7acf5d1287faa287022ecafcdec7732 SHA256 9f24ba20c29c1efe402c51e56ca5f716d680b0ebc5507d66132d74552d3cf6b0
|
||||
MISC metadata.xml 228 RMD160 cd3fb26b5d8049ab5dba38f21d7654ec033aa0eb SHA1 3148dfbdced7a623a311d21c6f728ab9c7135dae SHA256 8715828d1bff71d5d96b991ba600bae9376c1c80c96f0f102260fc335ca22487
|
||||
|
|
|
|||
139
net-wireless/compat-wireless/compat-wireless-2.6.38.2-r1.ebuild
Normal file
139
net-wireless/compat-wireless/compat-wireless-2.6.38.2-r1.ebuild
Normal file
|
|
@ -0,0 +1,139 @@
|
|||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI="2"
|
||||
inherit linux-mod linux-info versionator eutils
|
||||
|
||||
##Stable
|
||||
|
||||
MY_P=${P/_rc/-rc}
|
||||
|
||||
MY_PV=v$(get_version_component_range 1-3)
|
||||
DESCRIPTION="Stable kernel pre-release wifi subsystem backport"
|
||||
HOMEPAGE="http://wireless.kernel.org/en/users/Download/stable"
|
||||
CRAZY_VERSIONING="2-ns"
|
||||
SRC_URI="http://www.orbit-lab.org/kernel/${PN}-2.6-stable/${MY_PV}/${MY_P}-${CRAZY_VERSIONING}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="arm amd64 x86"
|
||||
IUSE="atheros_obey_crda debugfs debug-driver full-debug injection noleds tinyversionoverride"
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND="=sys-kernel/linux-firmware-99999999"
|
||||
|
||||
S="${WORKDIR}"/"${MY_P}"-${CRAZY_VERSIONING}
|
||||
RESTRICT="strip"
|
||||
|
||||
CONFIG_CHECK="!DYNAMIC_FTRACE"
|
||||
|
||||
pkg_setup() {
|
||||
linux-mod_pkg_setup
|
||||
kernel_is -lt 2 6 27 && die "kernel 2.6.27 or higher is required for compat wireless to be installed"
|
||||
kernel_is -gt $(get_version_component_range 1) $(get_version_component_range 2) $(get_version_component_range 3) && die "The version of compat-wireless you are trying to install contains older modules than your kernel. Failing before downgrading your system."
|
||||
if kernel_is -eq $(get_version_component_range 1) $(get_version_component_range 2) $(get_version_component_range 3); then
|
||||
if use tinyversionoverride; then
|
||||
ewarn "You have the tinyversionoverride use flag set which means you know for a fact that your"
|
||||
ewarn "kernel is older than the compat-wireless you are installing."
|
||||
ewarn "Most likely you have no clue what you are doing and should hit control-C now"
|
||||
ewarn "before you downgrade your system. Ten seconds to think about it."
|
||||
epause 10
|
||||
else
|
||||
ewarn "Your kernel version is most likely newer than the compat-wireless release you are"
|
||||
ewarn "trying to install. If you are certain that your kernel is older then you can set"
|
||||
ewarn "the tinyversionoverride use flag to override this safety check."
|
||||
epause 5
|
||||
die "Your kernel version is too close to the compat-wireless version to risk installation."
|
||||
fi
|
||||
fi
|
||||
linux_chkconfig_module MAC80211 || die "CONFIG_MAC80211 must be built as a _module_ !"
|
||||
linux_chkconfig_module CFG80211 || die "CONFIG_CFG80211 must be built as a _module_ !"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
#this patch fixes a trivial typo in the config.mk
|
||||
epatch "${FILESDIR}"/fix-typos-2.6.36_rc5.patch
|
||||
|
||||
#this patch is needed to forcibly enable new ralink chips because the shipped config.mk doesn't enable them
|
||||
epatch "${FILESDIR}"/force-enable-new-ralink-2.6.38_rc3.patch
|
||||
|
||||
#ath9k_htc ethtool driver fix
|
||||
epatch "${FILESDIR}"/ath9k_htc_ethtool_driver.patch
|
||||
|
||||
#this may or may not HELP the channel -1 issue. this is not a fix
|
||||
epatch "${FILESDIR}"/channel-negative-one-maxim.patch
|
||||
|
||||
#this patch ignores the regulatory settings of an atheros card and uses what CRDA thinks is right
|
||||
if use atheros_obey_crda; then
|
||||
ewarn "You have enabled atheros_obey_crda which doesn't do what you think."
|
||||
ewarn "This use flag will cause the eeprom of the card to be ignored and force"
|
||||
ewarn "world roaming on the device until crda provides a valid regdomain."
|
||||
ewarn "Short version, this is not a way to break the law, this will automatically"
|
||||
ewarn "make your card less functional unless you set a proper regdomain with iw/crda."
|
||||
ewarn "Pausing for 10 secs..."
|
||||
epause 10
|
||||
epatch "${FILESDIR}"/ath_ignore_eeprom.patch
|
||||
fi
|
||||
|
||||
if use injection; then
|
||||
epatch "${FILESDIR}"/4002_mac80211-2.6.29-fix-tx-ctl-no-ack-retry-count.patch
|
||||
epatch "${FILESDIR}"/4004_zd1211rw-2.6.28.patch
|
||||
epatch "${FILESDIR}"/mac80211.compat08082009.wl_frag+ack_v1.patch
|
||||
epatch "${FILESDIR}"/4013-runtime-enable-disable-of-mac80211-packet-injection.patch
|
||||
# epatch "${FILESDIR}"/compat-chaos.patch
|
||||
# epatch "${FILESDIR}"/rtl8187-mac80211-injection-speed-2.6.30-rc3.patch
|
||||
# epatch "${FILESDIR}"/super_secret_patch.diff
|
||||
epatch "${FILESDIR}"/ipw2200-inject.2.6.36.patch
|
||||
fi
|
||||
use noleds && epatch "${FILESDIR}"/leds-disable-strict.patch
|
||||
use debug-driver && epatch "${FILESDIR}"/driver-debug.patch
|
||||
use debugfs && sed -i '/DEBUGFS/s/^# *//' "${S}"/config.mk
|
||||
if use full-debug; then
|
||||
if use debug-driver ; then
|
||||
sed -i '/CONFIG=/s/^# *//' "${S}"/config.mk
|
||||
else
|
||||
ewarn "Enabling full-debug includes debug-driver."
|
||||
sed -i '/DEBUG=/s/^# *//' "${S}"/config.mk
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
addpredict "${KERNEL_DIR}"
|
||||
set_arch_to_kernel
|
||||
emake KLIB_BUILD="${DESTDIR}"/lib/modules/"${KV_FULL}"/build || die "emake failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
for file in $(find -name \*.ko); do
|
||||
insinto "/lib/modules/${KV_FULL}/updates/$(dirname ${file})"
|
||||
doins "${file}" || die "failed to install module ${file}"
|
||||
done
|
||||
dosbin scripts/athenable scripts/b43load scripts/iwl-enable \
|
||||
scripts/madwifi-unload scripts/athload scripts/iwl-load \
|
||||
scripts/b43enable scripts/unload.sh || die "script installation failed"
|
||||
|
||||
dodir /usr/lib/compat-wireless
|
||||
exeinto /usr/lib/compat-wireless
|
||||
doexe scripts/modlib.sh || die
|
||||
|
||||
dodoc README || die
|
||||
dodir /$(get_libdir)/udev/rules.d/
|
||||
insinto /$(get_libdir)/udev/rules.d/
|
||||
doins udev/50-compat_firmware.rules
|
||||
exeinto /$(get_libdir)/udev/
|
||||
doexe udev/compat_firmware.sh
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
update_depmod
|
||||
update_moduledb
|
||||
einfo 'You may have problem if you do not run "depmod -ae" after this installation'
|
||||
einfo 'To switch to the new drivers without reboot run unload.sh then load
|
||||
your needed driver.'
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
remove_moduledb
|
||||
}
|
||||
|
|
@ -0,0 +1,139 @@
|
|||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI="2"
|
||||
inherit linux-mod linux-info versionator eutils
|
||||
|
||||
##Stable
|
||||
|
||||
MY_P=${P/_rc/-rc}
|
||||
|
||||
MY_PV=v$(get_version_component_range 1-3)
|
||||
DESCRIPTION="Stable kernel pre-release wifi subsystem backport"
|
||||
HOMEPAGE="http://wireless.kernel.org/en/users/Download/stable"
|
||||
CRAZY_VERSIONING="3-s"
|
||||
SRC_URI="http://www.orbit-lab.org/kernel/${PN}-2.6-stable/${MY_PV}/${MY_P}-${CRAZY_VERSIONING}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~arm ~amd64 ~x86"
|
||||
IUSE="atheros_obey_crda debugfs debug-driver full-debug injection noleds tinyversionoverride"
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND="=sys-kernel/linux-firmware-99999999"
|
||||
|
||||
S="${WORKDIR}"/"${MY_P}"-${CRAZY_VERSIONING}
|
||||
RESTRICT="strip"
|
||||
|
||||
CONFIG_CHECK="!DYNAMIC_FTRACE"
|
||||
|
||||
pkg_setup() {
|
||||
linux-mod_pkg_setup
|
||||
kernel_is -lt 2 6 27 && die "kernel 2.6.27 or higher is required for compat wireless to be installed"
|
||||
kernel_is -gt $(get_version_component_range 1) $(get_version_component_range 2) $(get_version_component_range 3) && die "The version of compat-wireless you are trying to install contains older modules than your kernel. Failing before downgrading your system."
|
||||
if kernel_is -eq $(get_version_component_range 1) $(get_version_component_range 2) $(get_version_component_range 3); then
|
||||
if use tinyversionoverride; then
|
||||
ewarn "You have the tinyversionoverride use flag set which means you know for a fact that your"
|
||||
ewarn "kernel is older than the compat-wireless you are installing."
|
||||
ewarn "Most likely you have no clue what you are doing and should hit control-C now"
|
||||
ewarn "before you downgrade your system. Ten seconds to think about it."
|
||||
epause 10
|
||||
else
|
||||
ewarn "Your kernel version is most likely newer than the compat-wireless release you are"
|
||||
ewarn "trying to install. If you are certain that your kernel is older then you can set"
|
||||
ewarn "the tinyversionoverride use flag to override this safety check."
|
||||
epause 5
|
||||
die "Your kernel version is too close to the compat-wireless version to risk installation."
|
||||
fi
|
||||
fi
|
||||
linux_chkconfig_module MAC80211 || die "CONFIG_MAC80211 must be built as a _module_ !"
|
||||
linux_chkconfig_module CFG80211 || die "CONFIG_CFG80211 must be built as a _module_ !"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
#this patch fixes a trivial typo in the config.mk
|
||||
epatch "${FILESDIR}"/fix-typos-2.6.36_rc5.patch
|
||||
|
||||
#ath9k_htc ethtool driver support
|
||||
epatch "${FILESDIR}"/ath9k_htc_ethtool_driver.patch
|
||||
|
||||
#this patch is needed to forcibly enable new ralink chips because the shipped config.mk doesn't enable them
|
||||
#epatch "${FILESDIR}"/force-enable-new-ralink-2.6.38_rc3.patch
|
||||
|
||||
#this may or may not HELP the channel -1 issue. this is not a fix
|
||||
epatch "${FILESDIR}"/channel-negative-one-maxim.patch
|
||||
|
||||
#this patch ignores the regulatory settings of an atheros card and uses what CRDA thinks is right
|
||||
if use atheros_obey_crda; then
|
||||
ewarn "You have enabled atheros_obey_crda which doesn't do what you think."
|
||||
ewarn "This use flag will cause the eeprom of the card to be ignored and force"
|
||||
ewarn "world roaming on the device until crda provides a valid regdomain."
|
||||
ewarn "Short version, this is not a way to break the law, this will automatically"
|
||||
ewarn "make your card less functional unless you set a proper regdomain with iw/crda."
|
||||
ewarn "Pausing for 10 secs..."
|
||||
epause 10
|
||||
epatch "${FILESDIR}"/ath_ignore_eeprom.patch
|
||||
fi
|
||||
|
||||
if use injection; then
|
||||
epatch "${FILESDIR}"/4002_mac80211-2.6.29-fix-tx-ctl-no-ack-retry-count.patch
|
||||
epatch "${FILESDIR}"/4004_zd1211rw-2.6.28.patch
|
||||
epatch "${FILESDIR}"/mac80211.compat08082009.wl_frag+ack_v1.patch
|
||||
epatch "${FILESDIR}"/4013-runtime-enable-disable-of-mac80211-packet-injection.patch
|
||||
# epatch "${FILESDIR}"/compat-chaos.patch
|
||||
# epatch "${FILESDIR}"/rtl8187-mac80211-injection-speed-2.6.30-rc3.patch
|
||||
# epatch "${FILESDIR}"/super_secret_patch.diff
|
||||
epatch "${FILESDIR}"/ipw2200-inject.2.6.36.patch
|
||||
fi
|
||||
use noleds && epatch "${FILESDIR}"/leds-disable-strict.patch
|
||||
use debug-driver && epatch "${FILESDIR}"/driver-debug.patch
|
||||
use debugfs && sed -i '/DEBUGFS/s/^# *//' "${S}"/config.mk
|
||||
if use full-debug; then
|
||||
if use debug-driver ; then
|
||||
sed -i '/CONFIG=/s/^# *//' "${S}"/config.mk
|
||||
else
|
||||
ewarn "Enabling full-debug includes debug-driver."
|
||||
sed -i '/DEBUG=/s/^# *//' "${S}"/config.mk
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
addpredict "${KERNEL_DIR}"
|
||||
set_arch_to_kernel
|
||||
emake KLIB_BUILD="${DESTDIR}"/lib/modules/"${KV_FULL}"/build || die "emake failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
for file in $(find -name \*.ko); do
|
||||
insinto "/lib/modules/${KV_FULL}/updates/$(dirname ${file})"
|
||||
doins "${file}" || die "failed to install module ${file}"
|
||||
done
|
||||
dosbin scripts/athenable scripts/b43load scripts/iwl-enable \
|
||||
scripts/madwifi-unload scripts/athload scripts/iwl-load \
|
||||
scripts/b43enable scripts/unload.sh || die "script installation failed"
|
||||
|
||||
dodir /usr/lib/compat-wireless
|
||||
exeinto /usr/lib/compat-wireless
|
||||
doexe scripts/modlib.sh || die
|
||||
|
||||
dodoc README || die
|
||||
dodir /$(get_libdir)/udev/rules.d/
|
||||
insinto /$(get_libdir)/udev/rules.d/
|
||||
doins udev/50-compat_firmware.rules
|
||||
exeinto /$(get_libdir)/udev/
|
||||
doexe udev/compat_firmware.sh
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
update_depmod
|
||||
update_moduledb
|
||||
einfo 'You may have problem if you do not run "depmod -ae" after this installation'
|
||||
einfo 'To switch to the new drivers without reboot run unload.sh then load
|
||||
your needed driver.'
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
remove_moduledb
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
From: Sujith Manoharan <Sujith.Manoharan@atheros.com>
|
||||
|
||||
Pass the correct module name and device interface so that
|
||||
ethtool can display the proper values.
|
||||
|
||||
The firmware version will be fixed later on when the FW
|
||||
can actually report a version. :)
|
||||
|
||||
Reported-by: Richard Farina <sidhayn@gmail.com>
|
||||
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
|
||||
---
|
||||
drivers/net/wireless/ath/ath9k/hif_usb.c | 4 ++--
|
||||
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
|
||||
index f1b8af6..2d10239 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/hif_usb.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
|
||||
@@ -1040,7 +1040,7 @@ static int ath9k_hif_usb_probe(struct usb_interface *interface,
|
||||
}
|
||||
|
||||
ret = ath9k_htc_hw_init(hif_dev->htc_handle,
|
||||
- &hif_dev->udev->dev, hif_dev->device_id,
|
||||
+ &interface->dev, hif_dev->device_id,
|
||||
hif_dev->udev->product, id->driver_info);
|
||||
if (ret) {
|
||||
ret = -EINVAL;
|
||||
@@ -1158,7 +1158,7 @@ fail_resume:
|
||||
#endif
|
||||
|
||||
static struct usb_driver ath9k_hif_usb_driver = {
|
||||
- .name = "ath9k_hif_usb",
|
||||
+ .name = KBUILD_MODNAME,
|
||||
.probe = ath9k_hif_usb_probe,
|
||||
.disconnect = ath9k_hif_usb_disconnect,
|
||||
#ifdef CONFIG_PM
|
||||
-- 1.7.4.4
|
||||
Loading…
Reference in a new issue