summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenrik Brix Andersen <brix@gentoo.org>2005-08-29 20:02:10 +0000
committerHenrik Brix Andersen <brix@gentoo.org>2005-08-29 20:02:10 +0000
commit60b68c80fc0a5b86f012790668d07a6aa6c5477a (patch)
treea6beac6d135ebba3105d48d3cf681a8bcad58b87 /net-wireless
parentStable on hppa. (diff)
downloadhistorical-60b68c80fc0a5b86f012790668d07a6aa6c5477a.tar.gz
historical-60b68c80fc0a5b86f012790668d07a6aa6c5477a.tar.bz2
historical-60b68c80fc0a5b86f012790668d07a6aa6c5477a.zip
Add fix for WPA when using hwcrypto. Allow compiling against sys-kernel/suspend2-sources-2.6.13.
Package-Manager: portage-2.0.51.22-r2
Diffstat (limited to 'net-wireless')
-rw-r--r--net-wireless/ipw2100/Manifest5
-rw-r--r--net-wireless/ipw2200/ChangeLog10
-rw-r--r--net-wireless/ipw2200/Manifest6
-rw-r--r--net-wireless/ipw2200/files/digest-ipw2200-1.0.6-r11
-rw-r--r--net-wireless/ipw2200/files/ipw2200-1.0.6-hwcrypt-wpa-fix4.patch219
-rw-r--r--net-wireless/ipw2200/files/ipw2200-1.0.6-suspend2.patch15
-rw-r--r--net-wireless/ipw2200/ipw2200-1.0.6-r1.ebuild86
7 files changed, 339 insertions, 3 deletions
diff --git a/net-wireless/ipw2100/Manifest b/net-wireless/ipw2100/Manifest
index 73c4fcd93e2c..0124cad1fae2 100644
--- a/net-wireless/ipw2100/Manifest
+++ b/net-wireless/ipw2100/Manifest
@@ -1,8 +1,9 @@
MD5 b127f38ac73f49d85ec8df711c7f0b83 ipw2100-1.1.0.ebuild 2303
+MD5 7d314c34f4c0162303042f8b0cbc7748 ipw2100-1.1.2-r2.ebuild 2231
MD5 a676f6646db638eab14c1a2b811ddefb ipw2100-1.1.2.ebuild 2124
MD5 0863db88acaaa293aeec4d9e4d8f1097 ipw2100-1.1.2-r1.ebuild 2190
MD5 b798c8a8a65771fb6b6bb0414f4f2517 ipw2100-1.1.1.ebuild 2124
-MD5 8c607b8bc7e86957c3e4ce212a2339c0 ChangeLog 15255
+MD5 b5d2b00448946bb6c13542f874be6163 ChangeLog 15470
MD5 172db10566470c8f64b5911609a8e5f9 metadata.xml 318
MD5 c32c1e1a4a1d8797a8663db73c4cebe4 ipw2100-1.0.5.ebuild 2296
MD5 5fb2369d48eb758371baed2ff166ce10 files/ipw2100-1.1.0-suspend2.patch 1173
@@ -12,6 +13,8 @@ MD5 8c080b5455def312dc8b8fb2da3ffa12 files/digest-ipw2100-1.1.0 62
MD5 b42adf38a171429000f5d3e54bc190c4 files/digest-ipw2100-1.1.1 61
MD5 b99dfc5774c917655aa0b61b35a8e985 files/digest-ipw2100-1.1.2 61
MD5 45b8329213881abb9eb1569b92b1c080 files/ipw2100-1.0.5-suspend2.patch 1173
+MD5 fd4652f3d313404bf302ab38fc73f645 files/ipw2100-1.1.2-suspend2.patch 599
MD5 1d5956b3a796c4efc0ff535405df4e66 files/ipw2100-1.1.2-ieee80211-1.0.3.patch 437
MD5 b99dfc5774c917655aa0b61b35a8e985 files/digest-ipw2100-1.1.2-r1 61
+MD5 b99dfc5774c917655aa0b61b35a8e985 files/digest-ipw2100-1.1.2-r2 61
MD5 963a9937088ce7886c88a7553921d142 files/ipw2100-1.1.0-is_multicast_ether_addr.patch 695
diff --git a/net-wireless/ipw2200/ChangeLog b/net-wireless/ipw2200/ChangeLog
index cfb5883e8bd7..59d50645ded3 100644
--- a/net-wireless/ipw2200/ChangeLog
+++ b/net-wireless/ipw2200/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for net-wireless/ipw2200
# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-wireless/ipw2200/ChangeLog,v 1.41 2005/08/16 12:33:44 brix Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/ipw2200/ChangeLog,v 1.42 2005/08/29 20:02:10 brix Exp $
+
+*ipw2200-1.0.6-r1 (29 Aug 2005)
+
+ 29 Aug 2005; Henrik Brix Andersen <brix@gentoo.org>
+ +files/ipw2200-1.0.6-hwcrypt-wpa-fix4.patch,
+ +files/ipw2200-1.0.6-suspend2.patch, +ipw2200-1.0.6-r1.ebuild:
+ Add fix for WPA when using hwcrypto. Allow compiling against
+ sys-kernel/suspend2-sources-2.6.13.
16 Aug 2005; Henrik Brix Andersen <brix@gentoo.org> ipw2200-1.0.6.ebuild:
Stable on x86.
diff --git a/net-wireless/ipw2200/Manifest b/net-wireless/ipw2200/Manifest
index 9bef466bd48b..8bab478aa937 100644
--- a/net-wireless/ipw2200/Manifest
+++ b/net-wireless/ipw2200/Manifest
@@ -3,13 +3,17 @@ MD5 7afca8db2613b9fc32d5f7005b4db15d ipw2200-1.0.6.ebuild 2158
MD5 a1d82c4728a3f608b762fe63c4910f42 ipw2200-1.0.1.ebuild 2488
MD5 b2138b76ba85eeea301d8fa9f72470df ipw2200-1.0.3.ebuild 2488
MD5 8a1b21691e17dc6de38c7238cd4e4522 ipw2200-1.0.5.ebuild 2145
-MD5 6e5ebacd7974510d3e93dd52abd79cdc ChangeLog 6885
+MD5 9988232d1056d06428dcd595af12385d ipw2200-1.0.6-r1.ebuild 2259
+MD5 c9ecaa12f13b8d289f63ed4fb95744f8 ChangeLog 7186
MD5 b280eebc74d70d85e664debf1adce2c3 metadata.xml 255
MD5 2dc4d1d726fc4dce22dee416d6028353 files/ipw2200-1.0.4-is_multicast_ether_addr.patch 647
+MD5 abdb4f9be556bd09fe711f6a7cd42ee2 files/ipw2200-1.0.6-suspend2.patch 520
+MD5 2ba8f54679172b49a799779c1a02127a files/ipw2200-1.0.6-hwcrypt-wpa-fix4.patch 5840
MD5 9e25eeda7c745bca8c5cf72537dd31f5 files/ipw2200-1.0.1-suspend2.patch 448
MD5 af6756863c64cdfc93cd53556f8b397b files/ipw2200-1.0.1-is_multicast_ether_addr.patch 631
MD5 7a64b674dbd99046028827c6417409e1 files/ipw2200-1.0.3-is_multicast_ether_addr.patch 715
MD5 ba6c39e9a44ef971292c5f8e6a7c6897 files/ipw2200-1.0.3-suspend2.patch 522
+MD5 aab93fcc37b1a1282d7a02e9b64430a3 files/digest-ipw2200-1.0.6-r1 62
MD5 d2a1aca212498ad4de9f4a79ac12026b files/digest-ipw2200-1.0.1 62
MD5 1953868cbb8ae6ee8eee55c5848417ab files/digest-ipw2200-1.0.3 62
MD5 bcf142294729f1a55d7b3fd29c1a8239 files/digest-ipw2200-1.0.4 62
diff --git a/net-wireless/ipw2200/files/digest-ipw2200-1.0.6-r1 b/net-wireless/ipw2200/files/digest-ipw2200-1.0.6-r1
new file mode 100644
index 000000000000..53844e808285
--- /dev/null
+++ b/net-wireless/ipw2200/files/digest-ipw2200-1.0.6-r1
@@ -0,0 +1 @@
+MD5 d49f301ce8cffbd1cfbdb51061df3ac8 ipw2200-1.0.6.tgz 112932
diff --git a/net-wireless/ipw2200/files/ipw2200-1.0.6-hwcrypt-wpa-fix4.patch b/net-wireless/ipw2200/files/ipw2200-1.0.6-hwcrypt-wpa-fix4.patch
new file mode 100644
index 000000000000..f8caa441ab77
--- /dev/null
+++ b/net-wireless/ipw2200/files/ipw2200-1.0.6-hwcrypt-wpa-fix4.patch
@@ -0,0 +1,219 @@
+diff -urp ipw2200-1.0.6/ipw2200.c ipw2200-1.0.6-fix4/ipw2200.c
+--- ipw2200-1.0.6/ipw2200.c 2005-08-03 13:06:51.000000000 +0800
++++ ipw2200-1.0.6-fix4/ipw2200.c 2005-08-03 13:07:14.000000000 +0800
+@@ -5576,6 +5576,55 @@ static void ipw_send_wep_keys(struct ipw
+ }
+ }
+
++static void ipw_set_hw_decrypt_unicast(struct ipw_priv *priv, int level)
++{
++ if (priv->ieee->host_encrypt)
++ return;
++
++ switch (level) {
++ case SEC_LEVEL_3:
++ priv->sys_config.disable_unicast_decryption = 0;
++ priv->ieee->host_decrypt = 0;
++ break;
++ case SEC_LEVEL_2:
++ priv->sys_config.disable_unicast_decryption = 1;
++ priv->ieee->host_decrypt = 1;
++ break;
++ case SEC_LEVEL_1:
++ priv->sys_config.disable_unicast_decryption = 0;
++ priv->ieee->host_decrypt = 0;
++ break;
++ case SEC_LEVEL_0:
++ priv->sys_config.disable_unicast_decryption = 1;
++ break;
++ default:
++ break;
++ }
++}
++
++static void ipw_set_hw_decrypt_multicast(struct ipw_priv *priv, int level)
++{
++ if (priv->ieee->host_encrypt)
++ return;
++
++ switch (level) {
++ case SEC_LEVEL_3:
++ priv->sys_config.disable_multicast_decryption = 0;
++ break;
++ case SEC_LEVEL_2:
++ priv->sys_config.disable_multicast_decryption = 1;
++ break;
++ case SEC_LEVEL_1:
++ priv->sys_config.disable_multicast_decryption = 0;
++ break;
++ case SEC_LEVEL_0:
++ priv->sys_config.disable_multicast_decryption = 1;
++ break;
++ default:
++ break;
++ }
++}
++
+ static void ipw_set_hwcrypto_keys(struct ipw_priv *priv)
+ {
+ switch (priv->ieee->sec.level) {
+@@ -5586,33 +5635,23 @@ static void ipw_set_hwcrypto_keys(struct
+ priv->ieee->sec.active_key);
+
+ ipw_send_wep_keys(priv, DCW_WEP_KEY_SEC_TYPE_CCM);
+- priv->sys_config.disable_unicast_decryption = 0;
+- priv->sys_config.disable_multicast_decryption = 0;
+- priv->ieee->host_decrypt = 0;
+ break;
+ case SEC_LEVEL_2:
+ if (priv->ieee->sec.flags & SEC_ACTIVE_KEY)
+ ipw_send_tgi_tx_key(priv,
+ DCT_FLAG_EXT_SECURITY_TKIP,
+ priv->ieee->sec.active_key);
+-
+- priv->sys_config.disable_unicast_decryption = 1;
+- priv->sys_config.disable_multicast_decryption = 1;
+- priv->ieee->host_decrypt = 1;
+ break;
+ case SEC_LEVEL_1:
+ ipw_send_wep_keys(priv, DCW_WEP_KEY_SEC_TYPE_WEP);
+- priv->sys_config.disable_unicast_decryption = 0;
+- priv->sys_config.disable_multicast_decryption = 0;
+- priv->ieee->host_decrypt = 0;
+ break;
+ case SEC_LEVEL_0:
+- priv->sys_config.disable_unicast_decryption = 1;
+- priv->sys_config.disable_multicast_decryption = 1;
+- break;
+ default:
+ break;
+ }
++
++ ipw_set_hw_decrypt_unicast(priv, priv->ieee->sec.level);
++ ipw_set_hw_decrypt_multicast(priv, priv->ieee->sec.level);
+ }
+
+ static void ipw_adhoc_check(void *data)
+@@ -6194,12 +6233,31 @@ static int ipw_wpa_mlme(struct net_devic
+ return ret;
+ }
+
++static int ipw_wpa_ie_cipher2level(u8 cipher)
++{
++ switch (cipher) {
++ case 4: /* CCMP */
++ return SEC_LEVEL_3;
++ case 2: /* TKIP */
++ return SEC_LEVEL_2;
++ case 5: /* WEP104 */
++ case 1: /* WEP40 */
++ return SEC_LEVEL_1;
++ case 0: /* NONE */
++ return SEC_LEVEL_0;
++ default:
++ return -1;
++ }
++}
++
+ static int ipw_wpa_set_wpa_ie(struct net_device *dev,
+ struct ipw_param *param, int plen)
+ {
+ struct ipw_priv *priv = ieee80211_priv(dev);
+ struct ieee80211_device *ieee = priv->ieee;
+ u8 *buf;
++ u8 *ptk, *gtk;
++ int level;
+
+ if (param->u.wpa_ie.len > MAX_WPA_IE_LEN ||
+ (param->u.wpa_ie.len && param->u.wpa_ie.data == NULL))
+@@ -6218,8 +6276,35 @@ static int ipw_wpa_set_wpa_ie(struct net
+ kfree(ieee->wpa_ie);
+ ieee->wpa_ie = NULL;
+ ieee->wpa_ie_len = 0;
++ goto done;
++ }
++
++ if (priv->ieee->host_encrypt)
++ goto done;
++
++ /* HACK: Parse wpa_ie here to get pairwise suite, otherwise
++ * we need to change driver_ipw.c from wpa_supplicant. This
++ * is OK since -Dipw is deprecated. The -Dwext driver has a
++ * clean way to handle this. */
++ gtk = ptk = (u8 *)ieee->wpa_ie;
++ if (ieee->wpa_ie[0] == 0x30) { /* RSN IE */
++ gtk += 4 + 3;
++ ptk += 4 + 4 + 2 + 3;
++ } else { /* WPA IE */
++ gtk += 8 + 3;
++ ptk += 8 + 4 + 2 + 3;
+ }
+
++ if (ptk - (u8 *)ieee->wpa_ie > ieee->wpa_ie_len)
++ return -EINVAL;
++
++ level = ipw_wpa_ie_cipher2level(*gtk);
++ ipw_set_hw_decrypt_multicast(priv, level);
++
++ level = ipw_wpa_ie_cipher2level(*ptk);
++ ipw_set_hw_decrypt_unicast(priv, level);
++
++done:
+ ipw_wpa_assoc_frame(priv, ieee->wpa_ie, ieee->wpa_ie_len);
+ return 0;
+ }
+@@ -6523,6 +6608,23 @@ out:
+ return err;
+ }
+
++static int wext_cipher2level(int cipher)
++{
++ switch (cipher) {
++ case IW_AUTH_CIPHER_NONE:
++ return SEC_LEVEL_0;
++ case IW_AUTH_CIPHER_WEP40:
++ case IW_AUTH_CIPHER_WEP104:
++ return SEC_LEVEL_1;
++ case IW_AUTH_CIPHER_TKIP:
++ return SEC_LEVEL_2;
++ case IW_AUTH_CIPHER_CCMP:
++ return SEC_LEVEL_3;
++ default:
++ return -1;
++ }
++}
++
+ /* SIOCSIWAUTH */
+ static int ipw_wx_set_auth(struct net_device *dev,
+ struct iw_request_info *info,
+@@ -6535,8 +6637,15 @@ static int ipw_wx_set_auth(struct net_de
+
+ switch (param->flags & IW_AUTH_INDEX) {
+ case IW_AUTH_WPA_VERSION:
++ break;
+ case IW_AUTH_CIPHER_PAIRWISE:
++ ipw_set_hw_decrypt_unicast(
++ priv, wext_cipher2level(param->value));
++ break;
+ case IW_AUTH_CIPHER_GROUP:
++ ipw_set_hw_decrypt_multicast(
++ priv, wext_cipher2level(param->value));
++ break;
+ case IW_AUTH_KEY_MGMT:
+ /*
+ * ipw2200 does not use these parameters
+@@ -10249,11 +10358,11 @@ static void shim__set_security(struct ne
+ priv->ieee->sec.level = sec->level;
+ priv->ieee->sec.flags |= SEC_LEVEL;
+ priv->status |= STATUS_SECURITY_UPDATED;
+-
+- if (!priv->ieee->host_encrypt && (sec->flags & SEC_ENCRYPT))
+- ipw_set_hwcrypto_keys(priv);
+ }
+
++ if (!priv->ieee->host_encrypt && (sec->flags & SEC_ENCRYPT))
++ ipw_set_hwcrypto_keys(priv);
++
+ /* To match current functionality of ipw2100 (which works well w/
+ * various supplicants, we don't force a disassociate if the
+ * privacy capability changes ... */
diff --git a/net-wireless/ipw2200/files/ipw2200-1.0.6-suspend2.patch b/net-wireless/ipw2200/files/ipw2200-1.0.6-suspend2.patch
new file mode 100644
index 000000000000..4c074f0716c1
--- /dev/null
+++ b/net-wireless/ipw2200/files/ipw2200-1.0.6-suspend2.patch
@@ -0,0 +1,15 @@
+diff -urp ipw2200-1.0.6/ipw2200.c ipw2200-1.0.6-suspend2/ipw2200.c
+--- ipw2200-1.0.6/ipw2200.c 2005-07-13 21:00:28.000000000 +0200
++++ ipw2200-1.0.6-suspend2/ipw2200.c 2005-08-29 18:18:05.000000000 +0200
+@@ -10146,11 +10146,7 @@ static int ipw_setup_deferred_work(struc
+ {
+ int ret = 0;
+
+-#ifdef PF_SYNCTHREAD
+- priv->workqueue = create_workqueue(DRV_NAME, 0);
+-#else
+ priv->workqueue = create_workqueue(DRV_NAME);
+-#endif
+ init_waitqueue_head(&priv->wait_command_queue);
+ init_waitqueue_head(&priv->wait_state);
+
diff --git a/net-wireless/ipw2200/ipw2200-1.0.6-r1.ebuild b/net-wireless/ipw2200/ipw2200-1.0.6-r1.ebuild
new file mode 100644
index 000000000000..5104af109558
--- /dev/null
+++ b/net-wireless/ipw2200/ipw2200-1.0.6-r1.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/ipw2200/ipw2200-1.0.6-r1.ebuild,v 1.1 2005/08/29 20:02:10 brix Exp $
+
+inherit eutils linux-mod
+
+# The following works with both pre-releases and releases
+MY_P=${P/_/-}
+S=${WORKDIR}/${MY_P}
+
+IEEE80211_VERSION="1.0.2"
+FW_VERSION="2.3"
+
+DESCRIPTION="Driver for the Intel PRO/Wireless 2200BG/2915ABG miniPCI and 2225BG PCI adapters"
+HOMEPAGE="http://ipw2200.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 x86"
+
+IUSE="debug"
+DEPEND=">=net-wireless/ieee80211-${IEEE80211_VERSION}"
+RDEPEND="${DEPEND}
+ =net-wireless/ipw2200-firmware-${FW_VERSION}
+ net-wireless/wireless-tools"
+
+BUILD_TARGETS="all"
+MODULE_NAMES="ipw2200(net/wireless:)"
+MODULESD_IPW2200_DOCS="README.ipw2200"
+
+CONFIG_CHECK="NET_RADIO FW_LOADER"
+ERROR_NET_RADIO="${P} requires support for Wireless LAN drivers (non-hamradio) & Wireless Extensions (CONFIG_NET_RADIO)."
+ERROR_FW_LOADER="${P} requires Hotplug firmware loading support (CONFIG_FW_LOADER)."
+
+pkg_setup() {
+ linux-mod_pkg_setup
+
+ if kernel_is 2 4; then
+ die "${P} does not support building against kernel 2.4.x"
+ fi
+
+ BUILD_PARAMS="KSRC=${KV_DIR} KSRC_OUTPUT=${KV_OUT_DIR} IEEE80211_INC=/usr/include"
+}
+
+src_unpack() {
+ local debug="n"
+
+ unpack ${A}
+
+ cd ${S}
+ epatch ${FILESDIR}/${P}-hwcrypt-wpa-fix4.patch
+ epatch ${FILESDIR}/${P}-suspend2.patch
+
+ use debug && debug="y"
+ sed -i -e "s:^\(CONFIG_IPW_DEBUG\)=.*:\1=${debug}:" ${S}/Makefile
+}
+
+src_compile() {
+ einfo
+ einfo "You may safely ignore any errors from compilation that contain"
+ einfo "warnings about undefined references to the ieee80211 subsystem."
+ einfo
+
+ linux-mod_src_compile
+}
+
+src_install() {
+ linux-mod_src_install
+
+ dodoc CHANGES ISSUES
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+
+ if [ -f /lib/modules/${KV_FULL}/net/${PN}.ko ]; then
+ einfo
+ einfo "Modules from an earlier installation detected. You will need to manually"
+ einfo "remove those modules by running the following commands:"
+ einfo " # rm -f /lib/modules/${KV_FULL}/net/${PN}.ko"
+ einfo " # rm -f /lib/modules/${KV_FULL}/net/ieee80211*.ko"
+ einfo " # depmod -a"
+ einfo
+ fi
+}