diff --git a/net-wireless/compat-wireless/Manifest b/net-wireless/compat-wireless/Manifest index 08a2a3ea6..4ccd25532 100644 --- a/net-wireless/compat-wireless/Manifest +++ b/net-wireless/compat-wireless/Manifest @@ -19,6 +19,7 @@ AUX failed_linux-wlanng-kernel-2.6.28.patch 11623 RMD160 23d11bb21ba059b7a0d7a2c AUX failed_openembedded-orinoco-remove-all-which-are-in-hostap-HACK.patch 6606 RMD160 e479eb0e796aec521e2269d50e9ccc4426e1da55 SHA1 c76220bb8f3a118a224e555517b7e111603da47e SHA256 6b761693587871591fc0ce96273d37f769f61d28f637c1692d931300c4f04504 AUX fix-typos-2.6.35_rc2.patch 704 RMD160 2d55dc2ddb46c8f2cb02b9d0e50efc6b7c6e626a SHA1 6c95de6b6c9c4275f1a89f295bbb78d4de34fb54 SHA256 8319c6e70cf5c7a9d6b43a0bd7699c67504584ddc1d6d70ba4bf87625d2bb1b2 AUX fix-typos-2.6.36_rc5.patch 479 RMD160 96a03226c94134502766970b1272cee6e8c7a533 SHA1 c5f3e8a33048a41544d4ebba29294553aa60855f SHA256 8496796f97cd3074935623c59e155333164588f24556ab7c45bf3a3f71d20bb9 +AUX force-enable-new-ralink-2.6.38_rc3.patch 769 RMD160 1b73345479e4d36f1305fd8f82c7d89121f2c8a1 SHA1 a1a5e2905429f38cf5e23b3c3ec6ffafbb1c59eb SHA256 fcc7fa9a0f94776b263ac2215f7eb67c943840650a631dd9ca0171adce63dd74 AUX force-enable-new-ralink-pci-2.6.36-rc5.patch 529 RMD160 f6d76a1db48cc227843fe1acf2e7b71121980f6d SHA1 15a43e4d69e4d317cc44ae5c29006b8946091111 SHA256 ed23620a9682c8023d5095007cdc0f7e2602e8d5e580faf446ad9189300ca17e AUX force-enable-new-ralink-pci.patch 371 RMD160 33206cfd78ff0c1e2694c7236915f4d74fd2875f SHA1 b6dd5ad0802c6186eca2b3da2e4afe3baea79456 SHA256 5ca2668bd930d2bba7eedbd78f2d538bf1a2ba3c8e1deb60af77580e66078a47 AUX force-enable-new-ralink.patch 558 RMD160 4cc8c5d09d49fcc831b4895d05ec6a14d5e16e22 SHA1 d3cc6b53ac5ef6644702d0ae227ac67a4832d075 SHA256 b6a411562c8c0964d36817f4d276a8db2c3169d6044b648650eb8b742c2dc898 @@ -30,8 +31,10 @@ AUX leds-disable.patch 1232 RMD160 5d82d47828e01462312ba3dd9cdc71564dc05f9a SHA1 AUX mac80211.compat08082009.wl_frag+ack_v1.patch 1049 RMD160 e864ee2e0c70ce344000baa8ee5fca3b23c3305a SHA1 85f7a1b141549b774f5631fba259bc414aeeffb8 SHA256 e04ed9997e1578cc1becd4ef9d9f2f6f606590aa91a56e42835963913e1b0f52 AUX orinoco-remove-all-which-are-in-hostap-OFFICIAL.patch 12945 RMD160 a9453bfccd20520dc592275b4dd90fe681f272fa SHA1 f032aa4c51360ba793d2a8bf5a393bbfe33b94fa SHA256 38705e63f5034052d48c50a29d5a8bf114a692ce6e76a53b73371180d0e0f14b AUX reinette-test2.patch 1460 RMD160 a38149b45787ad313a30716349c7e3c4590f5b69 SHA1 dd9e57593fb8955a8126478f4db430aa4f51800d SHA256 1de6d6ed109c4c9c23758c7eb02aeac2844f680cfc3c1e568c53f366cd3f4727 +AUX remove_broken_atl1c.patch 589 RMD160 6912a350982657e4c333f1f9e503352b62dcd500 SHA1 464e19fcb9ec38e32f075ff93d30d05af53db58a SHA256 dbe4aee38c4e65ce2985ba0ce5a68d1a4b260bf42278c8915a212cc5dc297741 AUX rtl8187-mac80211-injection-speed-2.6.30-rc3.patch 1179 RMD160 e06fc37c08ce457ebeef7a7eaae8a05fb8aa7513 SHA1 77281c04d0e451860f27d0f621955a77b5e133d6 SHA256 bf6846089eb3d8cf7ebe119b4ffd1c32f7075a98d403fc8f96a5b49017c385b6 AUX super_secret_patch.diff 13499 RMD160 74c96addab52a869141e0791942357efbc230265 SHA1 49b8c23bd887bbb7656cd2146dba8fdbaac7d5fe SHA256 f4bd054b3348e98700e4481f50a1d809f2d2c89bfd24419b4d17e01bf6a0168e +AUX ubnt-wifi-station-ext2.patch 1006 RMD160 986218c0099e2ea95347391cd09c69ad51fa0d5c SHA1 1e63718cfb7041dadba3500663a6cb7c9ac022f1 SHA256 c0ebdd30b5ef141e39977fd529a4bd3e6062b20984c0eb53836fa4b0fb6f4b1e AUX whynot-2.6.31.patch 4272 RMD160 74ec1c66cfb376cf2c83401aa3edcdbfdd019438 SHA1 18f5680625ad68ebba773c8f39a04edf6456e2f2 SHA256 a1839efde553fb6c78b7121f94a3dc5401c146f9ff3e017e61de1b0298f4b371 AUX whynot-2.6.32.patch 666 RMD160 fcca9ac8d2152bebe51643a4250dffed383aae68 SHA1 5d7261437f5c98758f13c6c3f8a5676769b05013 SHA256 07cfc03d0ad5c47bec08d320afa63c79c0e6be9109dcf42b9811aad10bdc9c63 AUX whynot.patch 4106 RMD160 ac38e8dbbe1a59607fe16b36f327a9ba73a001e7 SHA1 2208598c9f9811d368db099c863be2a2af11681e SHA256 956cf3a0a8b8e1f0f0e3df985e351799f325a44e4cddf042d677a9e8109b7c9e @@ -42,6 +45,8 @@ DIST compat-wireless-2.6.35-1.tar.bz2 2548928 RMD160 646c93e01ddd4dbfde402b00588 DIST compat-wireless-2.6.36-5-spn.tar.bz2 2664927 RMD160 f45b6e106c024366b7a064f3571254d515b7ab6c SHA1 e2391cc37d762dab146c2e067534f3f20eb4469f SHA256 da4362445405bf7de55947b79ee72a3a9c56cf4a91e3eef74f7896aad59b02df DIST compat-wireless-2.6.37-3-sn.tar.bz2 3897162 RMD160 c0dbbca7860d04b304edd23b4fe6e1ab272fe9a6 SHA1 f244fa2f442a67fc02a52301b9c6d1572cb67ea0 SHA256 c6dec8415d4c0fc6a4297028dfcdd1f8738ea3a295b3089c3d4cd30b9499b708 DIST compat-wireless-2.6.37-4-sn.tar.bz2 3874734 RMD160 86cce3f4f6e21cb00a2e1c3d18faf0aac345c43b SHA1 54b8d777287fdcc7a716d71cfb21884f1ae07157 SHA256 95bbc94885bfbccb50d42b4d677f1f1442713fc5db08905aaa05e2955b34b133 +DIST compat-wireless-2.6.38-rc3-3-s.tar.bz2 4034978 RMD160 b9632ec15169eb957cbb984326c0ae4c4dade27e SHA1 367c5d99a20fbd54561bd1b0b79b41c3a3393fa9 SHA256 2a9446f60819f70dbf54bf373ea32931d9622430f72f2f2eb81b0e456221ccb6 +DIST compat-wireless-2.6.38-rc4-1.tar.bz2 4032335 RMD160 4a3de80038fd64e696d7be6d952e3794c39774ab SHA1 5355ee660ba607ac08c78647765c2ed50ee5560c SHA256 24726b8d635a21f1f462ae0f03f4414ac897f550c0dbf6ac826f3858e2d2c90d EBUILD compat-wireless-2.6.32.8.ebuild 2368 RMD160 53d1a1401310d34cd03f2fa6bb41e60d2a16dcfd SHA1 c19445050e394bc0239c61fec11eab69e4f08daa SHA256 705bb5ad89ec2433edd4252488b3e7322c5137c49520203a3cbea44314ab9234 EBUILD compat-wireless-2.6.33-r1.ebuild 2747 RMD160 c120f1c92a7205097839c5dc42235bfd10cbf555 SHA1 2144302eab89dd5881eecf3725124d6c5b288f3f SHA256 0d425eec9472ed83cd1a29945ead1116612c938248c430653510011d56307a6b EBUILD compat-wireless-2.6.34-r2.ebuild 3918 RMD160 48f91620cf68a993e63d3c9dfe565850650e6fc5 SHA1 44e4bec8543c93e456d3a2ac3e4ab1c7b55a8f01 SHA256 a729ecc6955dac802ed9b1585f23a48c54fdd45434d2673930322c792c77e159 @@ -50,4 +55,7 @@ EBUILD compat-wireless-2.6.36.ebuild 5332 RMD160 c4a19864f8703fce0b9369fc597f165 EBUILD compat-wireless-2.6.37-r3.ebuild 5435 RMD160 30788167a2178c7aa938748995d463b94ba93722 SHA1 102a976b067c2adea7e94ddfe09dece88b98e567 SHA256 468114a1339f0b6b5f8af96a74e0d720eea1b205916fc1ef343628f18313b9f5 EBUILD compat-wireless-2.6.37-r4.ebuild 5435 RMD160 f21a0918f32a430cb99c8b429e2190bdfd657891 SHA1 005db89cf334deb6182d9c1279702fdc210db1f9 SHA256 c8a9a20e11291f6856777fa18047428f87b7597155a646c1187d68c7d0e6cb19 EBUILD compat-wireless-2.6.37-r5.ebuild 5534 RMD160 fdd01b6a756cb21e0f6408e95b52d75ebeca8a71 SHA1 75689d48d080e8ce8432f3b0e8b5df797d4ce2f6 SHA256 bbdeca31156efb5333f407e66c9b737e42415dfa884b6b0bd167068d1f1d60fd +EBUILD compat-wireless-2.6.37-r6.ebuild 5542 RMD160 9558974e2d750b6594d903caa227c56b5762f722 SHA1 fa6490334a162883a1f0fb708d8f6576eadd1cdd SHA256 0c24ace6b56c30d905e950b874edd434406b2faf0a454f26157a3db56bc643c5 +EBUILD compat-wireless-2.6.38_rc3.ebuild 5450 RMD160 30e78a91d8e3c4776c6cd902946592ab70491505 SHA1 551d0f1472c848449b896501f962831c4c6775bf SHA256 ff87237ddfbe9fa8e63bf6a8246e9571a5a6968188836081187d5f7d4ebeb9f2 +EBUILD compat-wireless-2.6.38_rc4.ebuild 5448 RMD160 d253bc91cba5f4535169d65e602e6ba5d43aa091 SHA1 d2897d3b7e9610087f3df6f3bf681e80073219b6 SHA256 805518c25ea42d3ad8d5111e1d7e9c7b453754eaed453f277bda7580cc92d8b9 MISC metadata.xml 228 RMD160 cd3fb26b5d8049ab5dba38f21d7654ec033aa0eb SHA1 3148dfbdced7a623a311d21c6f728ab9c7135dae SHA256 8715828d1bff71d5d96b991ba600bae9376c1c80c96f0f102260fc335ca22487 diff --git a/net-wireless/compat-wireless/compat-wireless-2.6.37-r6.ebuild b/net-wireless/compat-wireless/compat-wireless-2.6.37-r6.ebuild new file mode 100644 index 000000000..dc9f53911 --- /dev/null +++ b/net-wireless/compat-wireless/compat-wireless-2.6.37-r6.ebuild @@ -0,0 +1,140 @@ +# 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="4-sn" +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="x86 amd64 arm" +IUSE="atheros_obey_crda debugfs debug-driver full-debug injection intel-exp-firmware 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-pci-2.6.36-rc5.patch + + #this may or may not HELP the channel -1 issue. this is not a fix + epatch "${FILESDIR}"/channel-negative-one-maxim.patch + + #add support for ubiquiti toy for Ray + epatch "${FILESDIR}"/ubnt-wifi-station-ext2.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 + use intel-exp-firmware && epatch "${FILESDIR}"/iwlwifi-5000-exp-firmware.patch +} + +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 +} diff --git a/net-wireless/compat-wireless/compat-wireless-2.6.38_rc3.ebuild b/net-wireless/compat-wireless/compat-wireless-2.6.38_rc3.ebuild new file mode 100644 index 000000000..78882839d --- /dev/null +++ b/net-wireless/compat-wireless/compat-wireless-2.6.38_rc3.ebuild @@ -0,0 +1,137 @@ +# 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="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 intel-exp-firmware 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 + + #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 + use intel-exp-firmware && epatch "${FILESDIR}"/iwlwifi-5000-exp-firmware.patch +} + +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 +} diff --git a/net-wireless/compat-wireless/compat-wireless-2.6.38_rc4.ebuild b/net-wireless/compat-wireless/compat-wireless-2.6.38_rc4.ebuild new file mode 100644 index 000000000..2f739e1d6 --- /dev/null +++ b/net-wireless/compat-wireless/compat-wireless-2.6.38_rc4.ebuild @@ -0,0 +1,137 @@ +# 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="1" +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 intel-exp-firmware 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 + + #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 + use intel-exp-firmware && epatch "${FILESDIR}"/iwlwifi-5000-exp-firmware.patch +} + +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 +} diff --git a/net-wireless/compat-wireless/files/force-enable-new-ralink-2.6.38_rc3.patch b/net-wireless/compat-wireless/files/force-enable-new-ralink-2.6.38_rc3.patch new file mode 100644 index 000000000..cb53ac587 --- /dev/null +++ b/net-wireless/compat-wireless/files/force-enable-new-ralink-2.6.38_rc3.patch @@ -0,0 +1,25 @@ +diff -Naur compat-wireless-2.6.38-rc3-2-orig/config.mk compat-wireless-2.6.38-rc3-2/config.mk +--- compat-wireless-2.6.38-rc3-2-orig/config.mk 2011-02-04 16:42:10.000000000 -0500 ++++ compat-wireless-2.6.38-rc3-2/config.mk 2011-02-04 19:25:58.000000000 -0500 +@@ -323,8 +323,8 @@ + CONFIG_RT2500PCI=m + ifdef CONFIG_CRC_CCITT + CONFIG_RT2800PCI=m +-# CONFIG_RT2800PCI_RT33XX=y +-# CONFIG_RT2800PCI_RT35XX=y ++CONFIG_RT2800PCI_RT33XX=y ++CONFIG_RT2800PCI_RT35XX=y + endif #CONFIG_CRC_CCITT + NEED_RT2X00=y + +@@ -452,8 +452,8 @@ + CONFIG_RT2500USB=m + ifdef CONFIG_CRC_CCITT + CONFIG_RT2800USB=m +-# CONFIG_RT2800USB_RT33XX=y +-# CONFIG_RT2800USB_RT35XX=y ++CONFIG_RT2800USB_RT33XX=y ++CONFIG_RT2800USB_RT35XX=y + CONFIG_RT2800USB_UNKNOWN=y + endif #CONFIG_CRC_CCITT + CONFIG_RT2X00_LIB_USB=m diff --git a/net-wireless/compat-wireless/files/ubnt-wifi-station-ext2.patch b/net-wireless/compat-wireless/files/ubnt-wifi-station-ext2.patch new file mode 100644 index 000000000..ba455c98f --- /dev/null +++ b/net-wireless/compat-wireless/files/ubnt-wifi-station-ext2.patch @@ -0,0 +1,20 @@ +commit 452d7dd816744efb5d0c22c2b038f2ffa5c7ec14 +Author: Sujith Manoharan +Date: Mon Dec 13 07:39:32 2010 +0530 + + ath9k_htc: Add Ubiquiti wifistation ext to supported devices + + Signed-off-by: Sujith Manoharan + Signed-off-by: John W. Linville + +diff -Naur compat-wireless-2.6.37-4-sn-orig/drivers/net/wireless/ath/ath9k/hif_usb.c compat-wireless-2.6.37-4-sn/drivers/net/wireless/ath/ath9k/hif_usb.c +--- compat-wireless-2.6.37-4-sn-orig/drivers/net/wireless/ath/ath9k/hif_usb.c 2011-02-07 21:07:16.000000000 -0500 ++++ compat-wireless-2.6.37-4-sn/drivers/net/wireless/ath/ath9k/hif_usb.c 2011-02-07 21:07:56.000000000 -0500 +@@ -42,6 +42,7 @@ + { USB_DEVICE(0x04CA, 0x4605) }, /* Liteon */ + { USB_DEVICE(0x083A, 0xA704) }, /* SMC Networks */ + { USB_DEVICE(0x040D, 0x3801) }, /* VIA */ ++ { USB_DEVICE(0x0cf3, 0xb003) }, /* Ubiquiti WifiStation Ext */ + { USB_DEVICE(0x1668, 0x1200) }, /* Verizon */ + { }, + };