summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenrik Brix Andersen <brix@gentoo.org>2005-10-20 13:25:28 +0000
committerHenrik Brix Andersen <brix@gentoo.org>2005-10-20 13:25:28 +0000
commit9352689905a8037fc67312252ab8d72a1e9c6264 (patch)
treeac45e6602226c78377f6746e389b791e76596321 /net-wireless
parentPatch from upstream to fix broadcast issues. (diff)
downloadhistorical-9352689905a8037fc67312252ab8d72a1e9c6264.tar.gz
historical-9352689905a8037fc67312252ab8d72a1e9c6264.tar.bz2
historical-9352689905a8037fc67312252ab8d72a1e9c6264.zip
Patch from upstream to fix broadcast issues and compile problems with older wireless extensions.
Package-Manager: portage-2.0.51.22-r3
Diffstat (limited to 'net-wireless')
-rw-r--r--net-wireless/ipw2200/ChangeLog10
-rw-r--r--net-wireless/ipw2200/files/digest-ipw2200-1.0.7-r11
-rw-r--r--net-wireless/ipw2200/files/ipw2200-1.0.7-broadcast.patch61
-rw-r--r--net-wireless/ipw2200/files/ipw2200-1.0.7-wireless_ext-capa.patch40
-rw-r--r--net-wireless/ipw2200/ipw2200-1.0.7-r1.ebuild103
5 files changed, 214 insertions, 1 deletions
diff --git a/net-wireless/ipw2200/ChangeLog b/net-wireless/ipw2200/ChangeLog
index 759926b4b17a..77eab5a95a4b 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.47 2005/10/18 18:26:12 brix Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/ipw2200/ChangeLog,v 1.48 2005/10/20 13:25:28 brix Exp $
+
+*ipw2200-1.0.7-r1 (20 Oct 2005)
+
+ 20 Oct 2005; Henrik Brix Andersen <brix@gentoo.org>
+ +files/ipw2200-1.0.7-broadcast.patch,
+ +files/ipw2200-1.0.7-wireless_ext-capa.patch, +ipw2200-1.0.7-r1.ebuild:
+ Patch from upstream to fix broadcast issues and compile problems with older
+ wireless extensions.
*ipw2200-1.0.7 (18 Oct 2005)
diff --git a/net-wireless/ipw2200/files/digest-ipw2200-1.0.7-r1 b/net-wireless/ipw2200/files/digest-ipw2200-1.0.7-r1
new file mode 100644
index 000000000000..2c7bb25e181c
--- /dev/null
+++ b/net-wireless/ipw2200/files/digest-ipw2200-1.0.7-r1
@@ -0,0 +1 @@
+MD5 52fde406d510099dac34f5cccc009673 ipw2200-1.0.7.tgz 211838
diff --git a/net-wireless/ipw2200/files/ipw2200-1.0.7-broadcast.patch b/net-wireless/ipw2200/files/ipw2200-1.0.7-broadcast.patch
new file mode 100644
index 000000000000..da91fe321d39
--- /dev/null
+++ b/net-wireless/ipw2200/files/ipw2200-1.0.7-broadcast.patch
@@ -0,0 +1,61 @@
+diff -urp ipw2200-1.0.7/ipw2200.c ipw2200-1.0.7-broadcast/ipw2200.c
+--- ipw2200-1.0.7/ipw2200.c 2005-10-14 02:11:50.000000000 +0800
++++ ipw2200-1.0.7-broadcast/ipw2200.c 2005-10-19 15:47:10.000000000 +0800
+@@ -7982,6 +7982,12 @@ static void ipw_rebuild_decrypted_skb(st
+ }
+ }
+
++static inline int ipw_is_broadcast_ether_addr(const u8 * addr)
++{
++ return (addr[0] & 0xff && addr[1] & 0xff && addr[2] & 0xff &&
++ addr[3] & 0xff && addr[4] & 0xff && addr[5] & 0xff);
++}
++
+ static void ipw_handle_data_packet(struct ipw_priv *priv,
+ struct ipw_rx_mem_buffer *rxb,
+ struct ieee80211_rx_stats *stats)
+@@ -8018,8 +8024,9 @@ static void ipw_handle_data_packet(struc
+ /* HW decrypt will not clear the WEP bit, MIC, PN, etc. */
+ hdr = (struct ieee80211_hdr_4addr *)rxb->skb->data;
+ if (priv->ieee->iw_mode != IW_MODE_MONITOR &&
+- (is_multicast_ether_addr(hdr->addr1) ?
+- !priv->ieee->host_mc_decrypt : !priv->ieee->host_decrypt))
++ ((is_multicast_ether_addr(hdr->addr1) ||
++ ipw_is_broadcast_ether_addr(hdr->addr1)) ?
++ !priv->ieee->host_mc_decrypt : !priv->ieee->host_decrypt))
+ ipw_rebuild_decrypted_skb(priv, rxb->skb);
+
+ if (!ieee80211_rx(priv->ieee, rxb->skb, stats))
+@@ -8197,12 +8204,6 @@ static void ipw_handle_data_packet_monit
+ }
+ #endif
+
+-static inline int ipw_is_broadcast_ether_addr(const u8 * addr)
+-{
+- return (addr[0] & 0xff && addr[1] & 0xff && addr[2] & 0xff &&
+- addr[3] & 0xff && addr[4] & 0xff && addr[5] & 0xff);
+-}
+-
+ static inline int is_network_packet(struct ipw_priv *priv,
+ struct ieee80211_hdr_4addr *header)
+ {
+@@ -10225,7 +10226,8 @@ static inline int ipw_tx_skb(struct ipw_
+ switch (priv->ieee->iw_mode) {
+ case IW_MODE_ADHOC:
+ hdr_len = IEEE80211_3ADDR_LEN;
+- unicast = !is_multicast_ether_addr(hdr->addr1);
++ unicast = !(is_multicast_ether_addr(hdr->addr1) ||
++ ipw_is_broadcast_ether_addr(hdr->addr1));
+ id = ipw_find_station(priv, hdr->addr1);
+ if (id == IPW_INVALID_STATION) {
+ id = ipw_add_station(priv, hdr->addr1);
+@@ -10240,7 +10242,8 @@ static inline int ipw_tx_skb(struct ipw_
+
+ case IW_MODE_INFRA:
+ default:
+- unicast = !is_multicast_ether_addr(hdr->addr3);
++ unicast = !(is_multicast_ether_addr(hdr->addr3) ||
++ ipw_is_broadcast_ether_addr(hdr->addr3));
+ hdr_len = IEEE80211_3ADDR_LEN;
+ id = 0;
+ break;
diff --git a/net-wireless/ipw2200/files/ipw2200-1.0.7-wireless_ext-capa.patch b/net-wireless/ipw2200/files/ipw2200-1.0.7-wireless_ext-capa.patch
new file mode 100644
index 000000000000..744711540229
--- /dev/null
+++ b/net-wireless/ipw2200/files/ipw2200-1.0.7-wireless_ext-capa.patch
@@ -0,0 +1,40 @@
+diff -Nup ipw2200-1.0.7-orig/ipw2200.c ipw2200-1.0.7/ipw2200.c
+--- ipw2200-1.0.7-orig/ipw2200.c 2005-10-19 15:21:46.000000000 -0500
++++ ipw2200-1.0.7/ipw2200.c 2005-10-19 15:21:40.000000000 -0500
+@@ -8980,11 +8980,13 @@ static int ipw_wx_get_range(struct net_d
+
+ up(&priv->sem);
+
++#if WIRELESS_EXT >= 17
+ /* Event capability (kernel + driver) */
+ range->event_capa[0] = (IW_EVENT_CAPA_K_0 |
+ IW_EVENT_CAPA_MASK(SIOCGIWTHRSPY) |
+ IW_EVENT_CAPA_MASK(SIOCGIWAP));
+ range->event_capa[1] = IW_EVENT_CAPA_K_1;
++#endif
+
+ IPW_DEBUG_WX("GET Range\n");
+ return 0;
+@@ -10102,7 +10104,9 @@ static struct iw_handler_def ipw_wx_hand
+ .num_private_args = ARRAY_SIZE(ipw_priv_args),
+ .private = ipw_priv_handler,
+ .private_args = ipw_priv_args,
++#if WIRELESS_EXT >= 17
+ .get_wireless_stats = ipw_get_wireless_stats,
++#endif
+ };
+
+ /*
+@@ -11622,9 +11626,12 @@ static int ipw_pci_probe(struct pci_dev
+ priv->wireless_data.ieee80211 = priv->ieee;
+ net_dev->wireless_data = &priv->wireless_data;
+ #else
++ net_dev->get_wireless_stats = ipw_get_wireless_stats;
++#if WIRELESS_EXT == 16
+ ipw_wx_handler_def.spy_offset = offsetof(struct ieee80211_device,
+ spy_data);
+ #endif
++#endif
+ net_dev->wireless_handlers = &ipw_wx_handler_def;
+ net_dev->ethtool_ops = &ipw_ethtool_ops;
+ net_dev->irq = pdev->irq;
diff --git a/net-wireless/ipw2200/ipw2200-1.0.7-r1.ebuild b/net-wireless/ipw2200/ipw2200-1.0.7-r1.ebuild
new file mode 100644
index 000000000000..4fa0bc196170
--- /dev/null
+++ b/net-wireless/ipw2200/ipw2200-1.0.7-r1.ebuild
@@ -0,0 +1,103 @@
+# 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.7-r1.ebuild,v 1.1 2005/10/20 13:25:28 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.1.5-r1"
+FW_VERSION="2.4"
+
+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 radiotap"
+DEPEND=">=net-wireless/ieee80211-${IEEE80211_VERSION}
+ sys-apps/sed"
+RDEPEND=">=net-wireless/ieee80211-${IEEE80211_VERSION}
+ =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 !IPW2200"
+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)."
+ERROR_IPW2200="${P} requires the in-kernel version of the IPW2200 driver to be disabled (CONFIG_IPW2200)"
+
+pkg_setup() {
+ linux-mod_pkg_setup
+
+ if kernel_is 2 4; then
+ die "${P} does not support building against kernel 2.4.x"
+ fi
+
+ if [[ ! -f /lib/modules/${KV_FULL}/net/ieee80211/ieee80211.${KV_OBJ} ]]; then
+ eerror
+ eerror "Looks like you forgot to remerge net-wireless/ieee80211 after"
+ eerror "upgrading your kernel."
+ eerror
+ eerror "Hint: use sys-kernel/module-rebuild for keeping track of which"
+ eerror "modules needs to be remerged after a kernel upgrade."
+ eerror
+ die "/lib/modules/${KV_FULL}/net/ieee80211/ieee80211.${KV_OBJ} not found"
+ fi
+
+ BUILD_PARAMS="KSRC=${KV_DIR} KSRC_OUTPUT=${KV_OUT_DIR} IEEE80211_INC=/usr/include"
+}
+
+src_unpack() {
+ local debug="n" radiotap="n"
+
+ unpack ${A}
+
+ cd ${S}
+ epatch ${FILESDIR}/${P}-broadcast.patch
+ epatch ${FILESDIR}/${P}-wireless_ext-capa.patch
+
+ use debug && debug="y"
+ sed -i -e "s:^\(CONFIG_IPW_DEBUG\)=.*:\1=${debug}:" ${S}/Makefile
+
+
+ use radiotap && radiotap="y"
+ sed -i -e "s:^#\(CONFIG_IEEE80211_RADIOTAP\)=.*:\1=${radiotap}:" ${S}/Makefile || die
+}
+
+src_compile() {
+ linux-mod_src_compile
+
+ einfo
+ einfo "You may safely ignore any warnings from above compilation about"
+ einfo "undefined references to the ieee80211 subsystem."
+ einfo
+}
+
+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
+}