rpms/kernel/devel linux-2.6-rt2x00-configure_filter.patch, NONE, 1.1 kernel.spec, 1.617, 1.618 linux-2.6-wireless.patch, 1.33, 1.34

John W. Linville (linville) fedora-extras-commits at redhat.com
Tue Apr 15 20:28:16 UTC 2008


Author: linville

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9778

Modified Files:
	kernel.spec linux-2.6-wireless.patch 
Added Files:
	linux-2.6-rt2x00-configure_filter.patch 
Log Message:
upstream wireless fixes from 2008-04-15

linux-2.6-rt2x00-configure_filter.patch:

--- NEW FILE linux-2.6-rt2x00-configure_filter.patch ---
commit 133adf08266740cd886d544aa9fe80b9873cf699
Author: Ivo van Doorn <ivdoorn at gmail.com>
Date:   Fri Apr 4 00:01:43 2008 +0200

    rt2x00: Use lib->config_filter() during scheduled packet filter config
    
    Now rt2x00lib handles the initial configure_filter() command, we can
    directly call lib->config_filter() in scheduled context since the
    called function will no longer check if anything has changed (which is
    now handled in rt2x00lib as well).
    
    This fixes a endless loop with USB drivers where the config_filter
    command was scheduled time and time again without sending any command
    to the device.
    
    Signed-off-by: Ivo van Doorn <IvDoorn at gmail.com>
    Signed-off-by: John W. Linville <linville at tuxdriver.com>

diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index 50ea7bd..0361524 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -404,18 +404,8 @@ static void rt2x00lib_packetfilter_scheduled(struct work_struct *work)
 {
 	struct rt2x00_dev *rt2x00dev =
 	    container_of(work, struct rt2x00_dev, filter_work);
-	unsigned int filter = rt2x00dev->packet_filter;
 
-	/*
-	 * Since we had stored the filter inside rt2x00dev->packet_filter,
-	 * we should now clear that field. Otherwise the driver will
-	 * assume nothing has changed (*total_flags will be compared
-	 * to rt2x00dev->packet_filter to determine if any action is required).
-	 */
-	rt2x00dev->packet_filter = 0;
-
-	rt2x00dev->ops->hw->configure_filter(rt2x00dev->hw,
-					     filter, &filter, 0, NULL);
+	rt2x00dev->ops->lib->config_filter(rt2x00dev, rt2x00dev->packet_filter);
 }
 
 static void rt2x00lib_intf_scheduled_iter(void *data, u8 *mac,


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.617
retrieving revision 1.618
diff -u -r1.617 -r1.618
--- kernel.spec	15 Apr 2008 15:29:52 -0000	1.617
+++ kernel.spec	15 Apr 2008 20:27:37 -0000	1.618
@@ -610,6 +610,7 @@
 
 Patch680: linux-2.6-wireless.patch
 Patch681: linux-2.6-wireless-pending.patch
+Patch682: linux-2.6-rt2x00-configure_filter.patch
 Patch690: linux-2.6-at76.patch
 
 Patch700: linux-2.6-nfs-client-mounts-hang.patch
@@ -1118,9 +1119,11 @@
 ApplyPatch linux-2.6-ata-quirk.patch
 
 # wireless patches headed for 2.6.25
-#ApplyPatch linux-2.6-wireless.patch
+ApplyPatch linux-2.6-wireless.patch
 # wireless patches headed for 2.6.26
 ApplyPatch linux-2.6-wireless-pending.patch
+# rt2x00 configure_filter fix to avoid endless loop on insert for USB devices
+ApplyPatch linux-2.6-rt2x00-configure_filter.patch
 
 # Add misc wireless bits from upstream wireless tree
 ApplyPatch linux-2.6-at76.patch
@@ -1763,6 +1766,20 @@
 
 %changelog
 * Tue Apr 15 2008 John W. Linville <linville at redhat.com>
+- rfkill: Fix device type check when toggling states
+- rtl8187: Add missing priv->vif assignments
+- Add rfkill to MAINTAINERS file
+- Update rt2x00 MAINTAINERS entry
+- mac80211: remove message on receiving unexpected unencrypted frames
+- PS3: gelic: fix the oops on the broken IE returned from the hypervisor
+- ssb: Fix usage of struct device used for DMAing
+- b43legacy: Fix usage of struct device used for DMAing
+- MAINTAINERS: move to generic repository for iwlwifi
+- b43legacy: fix initvals loading on bcm4303
+- b43legacy: fix DMA mapping leakage
+- rt2x00: Use lib->config_filter() during scheduled packet filter config
+
+* Tue Apr 15 2008 John W. Linville <linville at redhat.com>
 - Reenable wireless patches
 
 * Tue Apr 15 2008 Jarod Wilson <jwilson at redhat.com>

linux-2.6-wireless.patch:

Index: linux-2.6-wireless.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-wireless.patch,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- linux-2.6-wireless.patch	8 Apr 2008 03:38:38 -0000	1.33
+++ linux-2.6-wireless.patch	15 Apr 2008 20:27:37 -0000	1.34
@@ -1,130 +1,860 @@
-commit 16f2e85d3151efa643879fa5aa87c9d77d60f57e
+commit b358492cd2a9c67bff352c5a60d86e7fc9627477
+Author: Masakazu Mokuno <mokuno at sm.sony.co.jp>
+Date:   Mon Apr 14 18:07:21 2008 +0900
+
+    PS3: gelic: fix the oops on the broken IE returned from the hypervisor
+    
+    This fixes the bug that the driver would try to over-scan the memory
+    if the sum of the length field of every IEs does not match the length
+    returned from the hypervisor.
+    
+    Signed-off-by: Masakazu Mokuno <mokuno at sm.sony.co.jp>
+    Signed-off-by: John W. Linville <linville at tuxdriver.com>
+
+commit dc4ae1f46dbbcd08b3b5e23ad5ef87bf4bb41adf
+Author: Stefano Brivio <stefano.brivio at polimi.it>
+Date:   Mon Apr 14 00:59:49 2008 +0200
+
+    b43legacy: fix DMA mapping leakage
+    
+    This fixes a DMA mapping leakage in the case where we reject a DMA buffer
+    because of its address.
+    The patch by Michael Buesch has been ported to b43legacy.
+    
+    Signed-off-by: Stefano Brivio <stefano.brivio at polimi.it>
+    Cc: Christian Casteyde <casteyde.christian at free.fr>
+    Signed-off-by: John W. Linville <linville at tuxdriver.com>
+
+commit b3fc9c6c58c986f7a24fd8b0794d1e0794935a28
 Author: Johannes Berg <johannes at sipsolutions.net>
-Date:   Mon Apr 7 14:35:46 2008 +0200
+Date:   Sun Apr 13 10:12:47 2008 +0200
 
-    nl80211: fix STA AID bug
+    mac80211: remove message on receiving unexpected unencrypted frames
     
-    This fixes the STA AID setting and actually makes hostapd/mac80211
-    work properly in presence of power-saving stations.
+    Some people are getting this message a lot, and we have traced it to
+    broken access points that much too often send completely empty frames
+    (all bytes zeroed, which they shouldn't do at all.)
+    
+    Since we cannot do anything about such frames in any case except the
+    special case where we're debugging an AP, just remove the message.
     
     Signed-off-by: Johannes Berg <johannes at sipsolutions.net>
     Signed-off-by: John W. Linville <linville at tuxdriver.com>
 
-commit 881400a20c3551e90eed1062cf0387fa686a2fd0
+commit 2dd0f69222c481574baf6a4affb9256a7c7410e7
+Author: Ivo van Doorn <ivdoorn at gmail.com>
+Date:   Sat Apr 12 19:25:00 2008 +0200
+
+    Update rt2x00 MAINTAINERS entry
+    
+    Add the tree entry for rt2x00 to inform people about the
+    rt2x00.git tree.
+    
+    Signed-off-by: Ivo van Doorn <IvDoorn at gmail.com>
+    Signed-off-by: John W. Linville <linville at tuxdriver.com>
+
+commit e089764596ccde1037f2849fcee002c68986e67c
+Author: Ivo van Doorn <ivdoorn at gmail.com>
+Date:   Sat Apr 12 19:23:55 2008 +0200
+
+    Add rfkill to MAINTAINERS file
+    
+    I have been acting as the maintainer since the rfkill introduction,
+    so lets make it official by adding a rfkill entry in the MAINTAINERS file.
+    
+    Signed-off-by: Ivo van Doorn <IvDoorn at gmail.com>
+    Signed-off-by: John W. Linville <linville at tuxdriver.com>
+
+commit 89796f64a20d31e74ee0051df2e26812c852e734
+Author: Carlos Corbacho <carlos at strangeworlds.co.uk>
+Date:   Sat Apr 12 16:39:47 2008 +0100
+
+    rfkill: Fix device type check when toggling states
+    
+    rfkill_switch_all() is supposed to only switch all the interfaces of a
+    given type, but does not actually do this; instead, it just switches
+    everything currently in the same state.
+    
+    Add the necessary type check in.
+    
+    (This fixes a bug I've been seeing while developing an rfkill laptop
+    driver, with both bluetooth and wireless simultaneously changing state
+    after only pressing either KEY_WLAN or KEY_BLUETOOTH).
+    
+    Signed-off-by: Carlos Corbacho <carlos at strangeworlds.co.uk>
+    Signed-off-by: John W. Linville <linville at tuxdriver.com>
+
+commit cdbbe3d1f53086ece706674d3bf4f6d148083694
+Author: Michael Buesch <mb at bu3sch.de>
+Date:   Fri Apr 11 12:16:36 2008 +0200
+
+    b43legacy: Fix usage of struct device used for DMAing
+    
+    This fixes b43legacy for the SSB DMA API change.
+    
+    Signed-off-by: Michael Buesch <mb at bu3sch.de>
+    Cc: Stefano Brivio <stefano.brivio at polimi.it>
+    Signed-off-by: John W. Linville <linville at tuxdriver.com>
+
+commit 4ac58469f13028e1eb97f8bc7b0fca5072591d8d
+Author: Michael Buesch <mb at bu3sch.de>
+Date:   Fri Apr 11 11:59:00 2008 +0200
+
+    ssb: Fix usage of struct device used for DMAing
+    
+    This fixes DMA on architectures where DMA is nontrivial, like PPC64.
+    We must use the host-device's (PCI) struct device for any DMA
+    operation instead of the SSB device. For this we add a new
+    struct device pointer to the SSB device structure that will always
+    point to the right device for DMAing.
+    
+    Without this patch b43 and b44 drivers won't work on complex-DMA
+    architectures, that for example need dev->archdata for DMA operations.
+    
+    Signed-off-by: Michael Buesch <mb at bu3sch.de>
+    Signed-off-by: John W. Linville <linville at tuxdriver.com>
+
+commit 2d4543fdb487b1301ae48703dea3e66ead2d3c75
+Author: Reinette Chatre <reinette.chatre at intel.com>
+Date:   Thu Apr 10 13:16:27 2008 -0700
+
+    MAINTAINERS: move to generic repository for iwlwifi
+    
+    Signed-off-by: Reinette Chatre <reinette.chatre at intel.com>
+    Signed-off-by: John W. Linville <linville at tuxdriver.com>
+
+commit 385f848a986b4677bc91e5f5f9033449a876819d
 Author: Stefano Brivio <stefano.brivio at polimi.it>
-Date:   Sun Apr 6 17:05:07 2008 +0200
+Date:   Sun Apr 6 17:10:53 2008 +0200
 
-    b43legacy: fix bcm4303 crash
+    b43legacy: fix initvals loading on bcm4303
     
-    This fixes an hard crash which happened upon driver loading on bcm4303 rev.
-    2 devices.
+    This allows for the correct initial values to be uploaded to bcm4303
+    devices. It should be correct, but I can't reliably test this as I suspect
+    there's something going wrong with an hardware rfkill switch on my laptop.
+    Please test.
     
     Signed-off-by: Stefano Brivio <stefano.brivio at polimi.it>
     Signed-off-by: John W. Linville <linville at tuxdriver.com>
 
-commit 7981a35ed0f64ca49b1a0c0acecbc9b644a8a2e3
-Author: Abhijeet Kolekar <abhijeet.kolekar at intel.com>
-Date:   Fri Apr 4 14:32:01 2008 -0700
+commit aa979a6acbb468b0ebe8cf36dc782a5b3cc1e28d
+Author: Herton Ronaldo Krzesinski <herton at mandriva.com.br>
+Date:   Wed Apr 9 16:38:31 2008 -0300
 
-    iwlwifi: fix n-band association problem
+    rtl8187: Add missing priv->vif assignments
     
-    This patch enables the IWL4965_HT flag (n-band) in Kconfig.
-    Removed the "depends on n" from Kconfig for config IWL4965_HT
+    This adds missing priv->vif assignments after "mac80211: don't use
+    interface indices in drivers" change. As rtl8180, rtl8187 also needs
+    priv->vif to be set, as without this an oops can happen in rtl8187_tx
+    function (priv->vif is passed to ieee80211_rts_duration).
     
-    Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar at intel.com>
-    Signed-off-by: Reinette Chatre <reinette.chatre at intel.com>
+    Signed-off-by: Herton Ronaldo Krzesinski <herton at mandriva.com.br>
+    Acked-by: Pavel Roskin <proski at gnu.org>
     Signed-off-by: John W. Linville <linville at tuxdriver.com>
 
-commit 3f2eeac97952b262f2b904c6150a9879777995eb
-Author: Daniel Drake <dsd at gentoo.org>
-Date:   Wed Apr 2 20:33:54 2008 +0100
-
-    ipw2200: set MAC address on radiotap interface
-    
-    Commit bada339ba24dee9e143bfb42e1dc61f146619846 enforces that all
-    interfaces have a valid MAC address before they are brought up.
-    
-    ipw2200 does not assign a MAC address to it's radiotap interface, meaning
-    that the radiotap interface cannot be brought up in 2.6.24.
-    https://bugs.gentoo.org/show_bug.cgi?id=215714
-    
-    Fix this by copying the MAC address from the real interface.
-    
-    Signed-off-by: Daniel Drake <dsd at gentoo.org>
-    Signed-off-by: John W. Linville <linville at tuxdriver.com>
-
-commit 877cb0d4af2658beb5f89d38ae51968782f62fad
-Author: Holger Schurig <hs4233 at mail.mn-solutions.de>
-Date:   Wed Apr 2 16:34:51 2008 +0200
-
-    libertas: fix mode initialization problem
-    
-    After moving lbs_find_best_network_ssid() from scan.c to assoc.c gcc was
-    able to deduce that new_mode might stay uninitialized.
-    
-    Signed-off-by: Holger Schurig <hs4233 at mail.mn-solutions.de>
-    Acked-by: Dan Williams <dcbw at redhat.com>
-    Signed-off-by: John W. Linville <linville at tuxdriver.com>
-
-diff -up linux-2.6.24.noarch/net/wireless/nl80211.c.orig linux-2.6.24.noarch/net/wireless/nl80211.c
---- linux-2.6.24.noarch/net/wireless/nl80211.c.orig	2008-04-07 23:22:10.000000000 -0400
-+++ linux-2.6.24.noarch/net/wireless/nl80211.c	2008-04-07 23:27:24.000000000 -0400
-@@ -945,7 +945,7 @@ static int nl80211_new_station(struct sk
- 		nla_len(info->attrs[NL80211_ATTR_STA_SUPPORTED_RATES]);
- 	params.listen_interval =
- 		nla_get_u16(info->attrs[NL80211_ATTR_STA_LISTEN_INTERVAL]);
--	params.listen_interval = nla_get_u16(info->attrs[NL80211_ATTR_STA_AID]);
-+	params.aid = nla_get_u16(info->attrs[NL80211_ATTR_STA_AID]);
- 
- 	if (parse_station_flags(info->attrs[NL80211_ATTR_STA_FLAGS],
- 				&params.station_flags))
-diff -up linux-2.6.24.noarch/drivers/net/wireless/libertas/assoc.c.orig linux-2.6.24.noarch/drivers/net/wireless/libertas/assoc.c
---- linux-2.6.24.noarch/drivers/net/wireless/libertas/assoc.c.orig	2008-04-07 23:21:35.000000000 -0400
-+++ linux-2.6.24.noarch/drivers/net/wireless/libertas/assoc.c	2008-04-07 23:27:24.000000000 -0400
-@@ -541,7 +541,7 @@ void lbs_association_worker(struct work_
- 	}
- 
- 	if (find_any_ssid) {
--		u8 new_mode;
-+		u8 new_mode = assoc_req->mode;
- 
- 		ret = lbs_find_best_network_ssid(priv, assoc_req->ssid,
- 				&assoc_req->ssid_len, assoc_req->mode, &new_mode);
-diff -up linux-2.6.24.noarch/drivers/net/wireless/ipw2200.c.orig linux-2.6.24.noarch/drivers/net/wireless/ipw2200.c
---- linux-2.6.24.noarch/drivers/net/wireless/ipw2200.c.orig	2008-04-07 23:21:34.000000000 -0400
-+++ linux-2.6.24.noarch/drivers/net/wireless/ipw2200.c	2008-04-07 23:27:24.000000000 -0400
-@@ -11576,6 +11576,7 @@ static int ipw_prom_alloc(struct ipw_pri
- 	priv->prom_priv->priv = priv;
- 
- 	strcpy(priv->prom_net_dev->name, "rtap%d");
-+	memcpy(priv->prom_net_dev->dev_addr, priv->mac_addr, ETH_ALEN);
- 
- 	priv->prom_net_dev->type = ARPHRD_IEEE80211_RADIOTAP;
- 	priv->prom_net_dev->open = ipw_prom_open;
-diff -up linux-2.6.24.noarch/drivers/net/wireless/iwlwifi/Kconfig.orig linux-2.6.24.noarch/drivers/net/wireless/iwlwifi/Kconfig
---- linux-2.6.24.noarch/drivers/net/wireless/iwlwifi/Kconfig.orig	2008-04-07 23:21:34.000000000 -0400
-+++ linux-2.6.24.noarch/drivers/net/wireless/iwlwifi/Kconfig	2008-04-07 23:27:24.000000000 -0400
-@@ -35,7 +35,6 @@ config IWL4965_HT
- 	bool "Enable 802.11n HT features in iwl4965 driver"
- 	depends on EXPERIMENTAL
- 	depends on IWL4965 && IWL4965_QOS
--	depends on n
- 	---help---
- 	  This option enables IEEE 802.11n High Throughput features
- 	  for the iwl4965 driver.
+diff -up linux-2.6.24.noarch/include/linux/ssb/ssb.h.orig linux-2.6.24.noarch/include/linux/ssb/ssb.h
+--- linux-2.6.24.noarch/include/linux/ssb/ssb.h.orig	2008-04-15 16:00:47.000000000 -0400
++++ linux-2.6.24.noarch/include/linux/ssb/ssb.h	2008-04-15 16:00:51.000000000 -0400
+@@ -129,6 +129,10 @@ struct ssb_device {
+ 	const struct ssb_bus_ops *ops;
+ 
+ 	struct device *dev;
++	/* Pointer to the device that has to be used for
++	 * any DMA related operation. */
++	struct device *dma_dev;
++
+ 	struct ssb_bus *bus;
+ 	struct ssb_device_id id;
+ 
+diff -up linux-2.6.24.noarch/MAINTAINERS.orig linux-2.6.24.noarch/MAINTAINERS
+--- linux-2.6.24.noarch/MAINTAINERS.orig	2008-04-15 16:00:46.000000000 -0400
++++ linux-2.6.24.noarch/MAINTAINERS	2008-04-15 16:00:51.000000000 -0400
+@@ -2116,7 +2116,7 @@ M:	reinette.chatre at intel.com
+ L:	linux-wireless at vger.kernel.org
+ L:	ipw3945-devel at lists.sourceforge.net
+ W:	http://intellinuxwireless.org
+-T:	git git://git.kernel.org/pub/scm/linux/kernel/git/rchatre/iwlwifi-2.6.git
++T:	git kernel.org:/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6.git
+ S:	Supported
+ 
+ IOC3 ETHERNET DRIVER
+@@ -3280,6 +3280,7 @@ L:	linux-wireless at vger.kernel.org
+ L:	rt2400-devel at lists.sourceforge.net
+ W:	http://rt2x00.serialmonkey.com/
+ S:	Maintained
++T:	git kernel.org:/pub/scm/linux/kernel/git/ivd/rt2x00.git
+ F:	drivers/net/wireless/rt2x00/
+ 
+ RAMDISK RAM BLOCK DEVICE DRIVER
+@@ -3342,6 +3343,13 @@ L:	reiserfs-devel at vger.kernel.org
+ W:	http://www.namesys.com
+ S:	Supported
+ 
++RFKILL
++P:	Ivo van Doorn
++M:	IvDoorn at gmail.com
++L:	netdev at vger.kernel.org
++S:	Maintained
++F:	net/rfkill
++
+ ROCKETPORT DRIVER
+ P:	Comtrol Corp.
+ W:	http://www.comtrol.com
+diff -up linux-2.6.24.noarch/net/rfkill/rfkill.c.orig linux-2.6.24.noarch/net/rfkill/rfkill.c
+--- linux-2.6.24.noarch/net/rfkill/rfkill.c.orig	2008-04-15 16:00:47.000000000 -0400
++++ linux-2.6.24.noarch/net/rfkill/rfkill.c	2008-04-15 16:00:51.000000000 -0400
+@@ -92,7 +92,7 @@ void rfkill_switch_all(enum rfkill_type 
+ 	rfkill_states[type] = state;
+ 
+ 	list_for_each_entry(rfkill, &rfkill_list, node) {
+-		if (!rfkill->user_claim)
++		if ((!rfkill->user_claim) && (rfkill->type == type))
+ 			rfkill_toggle_radio(rfkill, state);
+ 	}
+ 
+diff -up linux-2.6.24.noarch/net/mac80211/rx.c.orig linux-2.6.24.noarch/net/mac80211/rx.c
+--- linux-2.6.24.noarch/net/mac80211/rx.c.orig	2008-04-15 16:00:47.000000000 -0400
++++ linux-2.6.24.noarch/net/mac80211/rx.c	2008-04-15 16:00:51.000000000 -0400
+@@ -1050,12 +1050,9 @@ ieee80211_drop_unencrypted(struct ieee80
+ 	if (unlikely(!(rx->fc & IEEE80211_FCTL_PROTECTED) &&
+ 		     (rx->fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA &&
+ 		     (rx->fc & IEEE80211_FCTL_STYPE) != IEEE80211_STYPE_NULLFUNC &&
+-		     (rx->key || rx->sdata->drop_unencrypted))) {
+-		if (net_ratelimit())
+-			printk(KERN_DEBUG "%s: RX non-WEP frame, but expected "
+-			       "encryption\n", rx->dev->name);
++		     (rx->key || rx->sdata->drop_unencrypted)))
+ 		return -EACCES;
+-	}
++
+ 	return 0;
+ }
+ 
+diff -up linux-2.6.24.noarch/drivers/net/b44.c.orig linux-2.6.24.noarch/drivers/net/b44.c
+--- linux-2.6.24.noarch/drivers/net/b44.c.orig	2008-04-15 16:00:47.000000000 -0400
++++ linux-2.6.24.noarch/drivers/net/b44.c	2008-04-15 16:00:51.000000000 -0400
+@@ -148,7 +148,7 @@ static inline void b44_sync_dma_desc_for
+ 						unsigned long offset,
+ 						enum dma_data_direction dir)
+ {
+-	dma_sync_single_range_for_device(sdev->dev, dma_base,
++	dma_sync_single_range_for_device(sdev->dma_dev, dma_base,
+ 					 offset & dma_desc_align_mask,
+ 					 dma_desc_sync_size, dir);
+ }
+@@ -158,7 +158,7 @@ static inline void b44_sync_dma_desc_for
+ 					     unsigned long offset,
+ 					     enum dma_data_direction dir)
+ {
+-	dma_sync_single_range_for_cpu(sdev->dev, dma_base,
++	dma_sync_single_range_for_cpu(sdev->dma_dev, dma_base,
+ 				      offset & dma_desc_align_mask,
+ 				      dma_desc_sync_size, dir);
+ }
+@@ -613,7 +613,7 @@ static void b44_tx(struct b44 *bp)
+ 
+ 		BUG_ON(skb == NULL);
+ 
+-		dma_unmap_single(bp->sdev->dev,
++		dma_unmap_single(bp->sdev->dma_dev,
+ 				 rp->mapping,
+ 				 skb->len,
+ 				 DMA_TO_DEVICE);
+@@ -653,7 +653,7 @@ static int b44_alloc_rx_skb(struct b44 *
+ 	if (skb == NULL)
+ 		return -ENOMEM;
+ 
+-	mapping = dma_map_single(bp->sdev->dev, skb->data,
++	mapping = dma_map_single(bp->sdev->dma_dev, skb->data,
+ 				 RX_PKT_BUF_SZ,
+ 				 DMA_FROM_DEVICE);
+ 
+@@ -663,19 +663,19 @@ static int b44_alloc_rx_skb(struct b44 *
+ 		mapping + RX_PKT_BUF_SZ > DMA_30BIT_MASK) {
+ 		/* Sigh... */
+ 		if (!dma_mapping_error(mapping))
+-			dma_unmap_single(bp->sdev->dev, mapping,
++			dma_unmap_single(bp->sdev->dma_dev, mapping,
+ 					RX_PKT_BUF_SZ, DMA_FROM_DEVICE);
+ 		dev_kfree_skb_any(skb);
+ 		skb = __netdev_alloc_skb(bp->dev, RX_PKT_BUF_SZ, GFP_ATOMIC|GFP_DMA);
+ 		if (skb == NULL)
+ 			return -ENOMEM;
+-		mapping = dma_map_single(bp->sdev->dev, skb->data,
++		mapping = dma_map_single(bp->sdev->dma_dev, skb->data,
+ 					 RX_PKT_BUF_SZ,
+ 					 DMA_FROM_DEVICE);
+ 		if (dma_mapping_error(mapping) ||
+ 			mapping + RX_PKT_BUF_SZ > DMA_30BIT_MASK) {
+ 			if (!dma_mapping_error(mapping))
+-				dma_unmap_single(bp->sdev->dev, mapping, RX_PKT_BUF_SZ,DMA_FROM_DEVICE);
++				dma_unmap_single(bp->sdev->dma_dev, mapping, RX_PKT_BUF_SZ,DMA_FROM_DEVICE);
+ 			dev_kfree_skb_any(skb);
+ 			return -ENOMEM;
+ 		}
+@@ -750,7 +750,7 @@ static void b44_recycle_rx(struct b44 *b
+ 					     dest_idx * sizeof(dest_desc),
+ 					     DMA_BIDIRECTIONAL);
+ 
+-	dma_sync_single_for_device(bp->sdev->dev, le32_to_cpu(src_desc->addr),
++	dma_sync_single_for_device(bp->sdev->dma_dev, le32_to_cpu(src_desc->addr),
+ 				   RX_PKT_BUF_SZ,
+ 				   DMA_FROM_DEVICE);
+ }
+@@ -772,7 +772,7 @@ static int b44_rx(struct b44 *bp, int bu
+ 		struct rx_header *rh;
+ 		u16 len;
+ 
+-		dma_sync_single_for_cpu(bp->sdev->dev, map,
++		dma_sync_single_for_cpu(bp->sdev->dma_dev, map,
+ 					    RX_PKT_BUF_SZ,
+ 					    DMA_FROM_DEVICE);
+ 		rh = (struct rx_header *) skb->data;
+@@ -806,7 +806,7 @@ static int b44_rx(struct b44 *bp, int bu
+ 			skb_size = b44_alloc_rx_skb(bp, cons, bp->rx_prod);
+ 			if (skb_size < 0)
+ 				goto drop_it;
+-			dma_unmap_single(bp->sdev->dev, map,
++			dma_unmap_single(bp->sdev->dma_dev, map,
+ 					 skb_size, DMA_FROM_DEVICE);
+ 			/* Leave out rx_header */
+                 	skb_put(skb, len + RX_PKT_OFFSET);
+@@ -966,24 +966,24 @@ static int b44_start_xmit(struct sk_buff
+ 		goto err_out;
+ 	}
+ 
+-	mapping = dma_map_single(bp->sdev->dev, skb->data, len, DMA_TO_DEVICE);
++	mapping = dma_map_single(bp->sdev->dma_dev, skb->data, len, DMA_TO_DEVICE);
+ 	if (dma_mapping_error(mapping) || mapping + len > DMA_30BIT_MASK) {
+ 		struct sk_buff *bounce_skb;
+ 
+ 		/* Chip can't handle DMA to/from >1GB, use bounce buffer */
+ 		if (!dma_mapping_error(mapping))
+-			dma_unmap_single(bp->sdev->dev, mapping, len,
++			dma_unmap_single(bp->sdev->dma_dev, mapping, len,
+ 					DMA_TO_DEVICE);
+ 
+ 		bounce_skb = __dev_alloc_skb(len, GFP_ATOMIC | GFP_DMA);
+ 		if (!bounce_skb)
+ 			goto err_out;
+ 
+-		mapping = dma_map_single(bp->sdev->dev, bounce_skb->data,
++		mapping = dma_map_single(bp->sdev->dma_dev, bounce_skb->data,
+ 					 len, DMA_TO_DEVICE);
+ 		if (dma_mapping_error(mapping) || mapping + len > DMA_30BIT_MASK) {
+ 			if (!dma_mapping_error(mapping))
+-				dma_unmap_single(bp->sdev->dev, mapping,
++				dma_unmap_single(bp->sdev->dma_dev, mapping,
+ 					 len, DMA_TO_DEVICE);
+ 			dev_kfree_skb_any(bounce_skb);
+ 			goto err_out;
+@@ -1082,7 +1082,7 @@ static void b44_free_rings(struct b44 *b
+ 
+ 		if (rp->skb == NULL)
+ 			continue;
+-		dma_unmap_single(bp->sdev->dev, rp->mapping, RX_PKT_BUF_SZ,
++		dma_unmap_single(bp->sdev->dma_dev, rp->mapping, RX_PKT_BUF_SZ,
+ 					DMA_FROM_DEVICE);
+ 		dev_kfree_skb_any(rp->skb);
+ 		rp->skb = NULL;
+@@ -1094,7 +1094,7 @@ static void b44_free_rings(struct b44 *b
+ 
+ 		if (rp->skb == NULL)
+ 			continue;
+-		dma_unmap_single(bp->sdev->dev, rp->mapping, rp->skb->len,
++		dma_unmap_single(bp->sdev->dma_dev, rp->mapping, rp->skb->len,
+ 					DMA_TO_DEVICE);
+ 		dev_kfree_skb_any(rp->skb);
+ 		rp->skb = NULL;
+@@ -1117,12 +1117,12 @@ static void b44_init_rings(struct b44 *b
+ 	memset(bp->tx_ring, 0, B44_TX_RING_BYTES);
+ 
+ 	if (bp->flags & B44_FLAG_RX_RING_HACK)
+-		dma_sync_single_for_device(bp->sdev->dev, bp->rx_ring_dma,
++		dma_sync_single_for_device(bp->sdev->dma_dev, bp->rx_ring_dma,
+ 			                  DMA_TABLE_BYTES,
+ 			                  DMA_BIDIRECTIONAL);
+ 
+ 	if (bp->flags & B44_FLAG_TX_RING_HACK)
+-		dma_sync_single_for_device(bp->sdev->dev, bp->tx_ring_dma,
++		dma_sync_single_for_device(bp->sdev->dma_dev, bp->tx_ring_dma,
+ 			                  DMA_TABLE_BYTES,
+ 			                  DMA_TO_DEVICE);
+ 
+@@ -1144,24 +1144,24 @@ static void b44_free_consistent(struct b
+ 	bp->tx_buffers = NULL;
+ 	if (bp->rx_ring) {
+ 		if (bp->flags & B44_FLAG_RX_RING_HACK) {
+-			dma_unmap_single(bp->sdev->dev, bp->rx_ring_dma,
++			dma_unmap_single(bp->sdev->dma_dev, bp->rx_ring_dma,
+ 					DMA_TABLE_BYTES,
+ 					DMA_BIDIRECTIONAL);
+ 			kfree(bp->rx_ring);
+ 		} else
+-			dma_free_coherent(bp->sdev->dev, DMA_TABLE_BYTES,
++			dma_free_coherent(bp->sdev->dma_dev, DMA_TABLE_BYTES,
+ 					    bp->rx_ring, bp->rx_ring_dma);
+ 		bp->rx_ring = NULL;
+ 		bp->flags &= ~B44_FLAG_RX_RING_HACK;
+ 	}
+ 	if (bp->tx_ring) {
+ 		if (bp->flags & B44_FLAG_TX_RING_HACK) {
+-			dma_unmap_single(bp->sdev->dev, bp->tx_ring_dma,
++			dma_unmap_single(bp->sdev->dma_dev, bp->tx_ring_dma,
+ 					DMA_TABLE_BYTES,
+ 					DMA_TO_DEVICE);
+ 			kfree(bp->tx_ring);
+ 		} else
+-			dma_free_coherent(bp->sdev->dev, DMA_TABLE_BYTES,
++			dma_free_coherent(bp->sdev->dma_dev, DMA_TABLE_BYTES,
+ 					    bp->tx_ring, bp->tx_ring_dma);
+ 		bp->tx_ring = NULL;
+ 		bp->flags &= ~B44_FLAG_TX_RING_HACK;
+@@ -1187,7 +1187,7 @@ static int b44_alloc_consistent(struct b
+ 		goto out_err;
+ 
+ 	size = DMA_TABLE_BYTES;
+-	bp->rx_ring = dma_alloc_coherent(bp->sdev->dev, size, &bp->rx_ring_dma, gfp);
++	bp->rx_ring = dma_alloc_coherent(bp->sdev->dma_dev, size, &bp->rx_ring_dma, gfp);
+ 	if (!bp->rx_ring) {
+ 		/* Allocation may have failed due to pci_alloc_consistent
+ 		   insisting on use of GFP_DMA, which is more restrictive
+@@ -1199,7 +1199,7 @@ static int b44_alloc_consistent(struct b
+ 		if (!rx_ring)
+ 			goto out_err;
+ 
+-		rx_ring_dma = dma_map_single(bp->sdev->dev, rx_ring,
++		rx_ring_dma = dma_map_single(bp->sdev->dma_dev, rx_ring,
+ 			                    DMA_TABLE_BYTES,
+ 			                    DMA_BIDIRECTIONAL);
+ 
+@@ -1214,7 +1214,7 @@ static int b44_alloc_consistent(struct b
+ 		bp->flags |= B44_FLAG_RX_RING_HACK;
+ 	}
+ 
+-	bp->tx_ring = dma_alloc_coherent(bp->sdev->dev, size, &bp->tx_ring_dma, gfp);
++	bp->tx_ring = dma_alloc_coherent(bp->sdev->dma_dev, size, &bp->tx_ring_dma, gfp);
+ 	if (!bp->tx_ring) {
+ 		/* Allocation may have failed due to dma_alloc_coherent
+ 		   insisting on use of GFP_DMA, which is more restrictive
+@@ -1226,7 +1226,7 @@ static int b44_alloc_consistent(struct b
+ 		if (!tx_ring)
+ 			goto out_err;
+ 
+-		tx_ring_dma = dma_map_single(bp->sdev->dev, tx_ring,
++		tx_ring_dma = dma_map_single(bp->sdev->dma_dev, tx_ring,
+ 			                    DMA_TABLE_BYTES,
+ 			                    DMA_TO_DEVICE);
+ 
+diff -up linux-2.6.24.noarch/drivers/net/ps3_gelic_wireless.c.orig linux-2.6.24.noarch/drivers/net/ps3_gelic_wireless.c
+--- linux-2.6.24.noarch/drivers/net/ps3_gelic_wireless.c.orig	2008-04-15 16:00:47.000000000 -0400
++++ linux-2.6.24.noarch/drivers/net/ps3_gelic_wireless.c	2008-04-15 16:00:51.000000000 -0400
+@@ -512,13 +512,18 @@ static void gelic_wl_parse_ie(u8 *data, 
+ 		 data, len);
+ 	memset(ie_info, 0, sizeof(struct ie_info));
+ 
+-	while (0 < data_left) {
++	while (2 <= data_left) {
+ 		item_id = *pos++;
+ 		item_len = *pos++;
++		data_left -= 2;
++
++		if (data_left < item_len)
++			break;
+ 
+ 		switch (item_id) {
+ 		case MFIE_TYPE_GENERIC:
+-			if (!memcmp(pos, wpa_oui, OUI_LEN) &&
++			if ((OUI_LEN + 1 <= item_len) &&
++			    !memcmp(pos, wpa_oui, OUI_LEN) &&
+ 			    pos[OUI_LEN] == 0x01) {
+ 				ie_info->wpa.data = pos - 2;
+ 				ie_info->wpa.len = item_len + 2;
+@@ -535,7 +540,7 @@ static void gelic_wl_parse_ie(u8 *data, 
+ 			break;
+ 		}
+ 		pos += item_len;
+-		data_left -= item_len + 2;
++		data_left -= item_len;
+ 	}
+ 	pr_debug("%s: wpa=%p,%d wpa2=%p,%d\n", __func__,
+ 		 ie_info->wpa.data, ie_info->wpa.len,
+diff -up linux-2.6.24.noarch/drivers/net/wireless/b43/dma.c.orig linux-2.6.24.noarch/drivers/net/wireless/b43/dma.c
+--- linux-2.6.24.noarch/drivers/net/wireless/b43/dma.c.orig	2008-04-15 16:00:47.000000000 -0400
++++ linux-2.6.24.noarch/drivers/net/wireless/b43/dma.c	2008-04-15 16:00:51.000000000 -0400
+@@ -373,10 +373,10 @@ static inline
+ 	dma_addr_t dmaaddr;
+ 
+ 	if (tx) {
+-		dmaaddr = dma_map_single(ring->dev->dev->dev,
++		dmaaddr = dma_map_single(ring->dev->dev->dma_dev,
+ 					 buf, len, DMA_TO_DEVICE);
+ 	} else {
+-		dmaaddr = dma_map_single(ring->dev->dev->dev,
++		dmaaddr = dma_map_single(ring->dev->dev->dma_dev,
+ 					 buf, len, DMA_FROM_DEVICE);
+ 	}
+ 
+@@ -388,9 +388,10 @@ static inline
+ 			  dma_addr_t addr, size_t len, int tx)
+ {
+ 	if (tx) {
+-		dma_unmap_single(ring->dev->dev->dev, addr, len, DMA_TO_DEVICE);
++		dma_unmap_single(ring->dev->dev->dma_dev,
++				 addr, len, DMA_TO_DEVICE);
+ 	} else {
+-		dma_unmap_single(ring->dev->dev->dev,
++		dma_unmap_single(ring->dev->dev->dma_dev,
+ 				 addr, len, DMA_FROM_DEVICE);
+ 	}
+ }
+@@ -400,7 +401,7 @@ static inline
+ 				 dma_addr_t addr, size_t len)
+ {
+ 	B43_WARN_ON(ring->tx);
+-	dma_sync_single_for_cpu(ring->dev->dev->dev,
++	dma_sync_single_for_cpu(ring->dev->dev->dma_dev,
+ 				addr, len, DMA_FROM_DEVICE);
+ }
+ 
+@@ -409,7 +410,7 @@ static inline
+ 				    dma_addr_t addr, size_t len)
+ {
+ 	B43_WARN_ON(ring->tx);
+-	dma_sync_single_for_device(ring->dev->dev->dev,
++	dma_sync_single_for_device(ring->dev->dev->dma_dev,
+ 				   addr, len, DMA_FROM_DEVICE);
+ }
+ 
+@@ -425,7 +426,7 @@ static inline
+ 
+ static int alloc_ringmemory(struct b43_dmaring *ring)
+ {
+-	struct device *dev = ring->dev->dev->dev;
++	struct device *dma_dev = ring->dev->dev->dma_dev;
+ 	gfp_t flags = GFP_KERNEL;
+ 
+ 	/* The specs call for 4K buffers for 30- and 32-bit DMA with 4K
+@@ -439,7 +440,7 @@ static int alloc_ringmemory(struct b43_d
+ 	 */
+ 	if (ring->type == B43_DMA_64BIT)
+ 		flags |= GFP_DMA;
+-	ring->descbase = dma_alloc_coherent(dev, B43_DMA_RINGMEMSIZE,
++	ring->descbase = dma_alloc_coherent(dma_dev, B43_DMA_RINGMEMSIZE,
+ 					    &(ring->dmabase), flags);
+ 	if (!ring->descbase) {
+ 		b43err(ring->dev->wl, "DMA ringmemory allocation failed\n");
+@@ -452,9 +453,9 @@ static int alloc_ringmemory(struct b43_d
+ 
+ static void free_ringmemory(struct b43_dmaring *ring)
+ {
+-	struct device *dev = ring->dev->dev->dev;
++	struct device *dma_dev = ring->dev->dev->dma_dev;
+ 
+-	dma_free_coherent(dev, B43_DMA_RINGMEMSIZE,
++	dma_free_coherent(dma_dev, B43_DMA_RINGMEMSIZE,
+ 			  ring->descbase, ring->dmabase);
+ }
+ 
+@@ -854,7 +855,7 @@ struct b43_dmaring *b43_setup_dmaring(st
+ 			goto err_kfree_meta;
+ 
+ 		/* test for ability to dma to txhdr_cache */
+-		dma_test = dma_map_single(dev->dev->dev,
++		dma_test = dma_map_single(dev->dev->dma_dev,
+ 					  ring->txhdr_cache,
+ 					  b43_txhdr_size(dev),
+ 					  DMA_TO_DEVICE);
+@@ -869,7 +870,7 @@ struct b43_dmaring *b43_setup_dmaring(st
+ 			if (!ring->txhdr_cache)
+ 				goto err_kfree_meta;
+ 
+-			dma_test = dma_map_single(dev->dev->dev,
++			dma_test = dma_map_single(dev->dev->dma_dev,
+ 						  ring->txhdr_cache,
+ 						  b43_txhdr_size(dev),
+ 						  DMA_TO_DEVICE);
+@@ -883,7 +884,7 @@ struct b43_dmaring *b43_setup_dmaring(st
+ 			}
+ 		}
+ 
+-		dma_unmap_single(dev->dev->dev,
++		dma_unmap_single(dev->dev->dma_dev,
+ 				 dma_test, b43_txhdr_size(dev),
+ 				 DMA_TO_DEVICE);
+ 	}
+diff -up linux-2.6.24.noarch/drivers/net/wireless/b43legacy/main.c.orig linux-2.6.24.noarch/drivers/net/wireless/b43legacy/main.c
+--- linux-2.6.24.noarch/drivers/net/wireless/b43legacy/main.c.orig	2008-04-15 16:00:47.000000000 -0400
++++ linux-2.6.24.noarch/drivers/net/wireless/b43legacy/main.c	2008-04-15 16:00:51.000000000 -0400
+@@ -1488,6 +1488,7 @@ static int b43legacy_request_firmware(st
+ 	}
+ 	if (!fw->initvals) {
+ 		switch (dev->phy.type) {
++		case B43legacy_PHYTYPE_B:
+ 		case B43legacy_PHYTYPE_G:
+ 			if ((rev >= 5) && (rev <= 10))
+ 				filename = "b0g0initvals5";
+@@ -1505,6 +1506,7 @@ static int b43legacy_request_firmware(st
+ 	}
+ 	if (!fw->initvals_band) {
+ 		switch (dev->phy.type) {
++		case B43legacy_PHYTYPE_B:
+ 		case B43legacy_PHYTYPE_G:
+ 			if ((rev >= 5) && (rev <= 10))
+ 				filename = "b0g0bsinitvals5";
+diff -up linux-2.6.24.noarch/drivers/net/wireless/b43legacy/dma.c.orig linux-2.6.24.noarch/drivers/net/wireless/b43legacy/dma.c
+--- linux-2.6.24.noarch/drivers/net/wireless/b43legacy/dma.c.orig	2008-04-15 16:00:47.000000000 -0400
++++ linux-2.6.24.noarch/drivers/net/wireless/b43legacy/dma.c	2008-04-15 16:00:51.000000000 -0400
+@@ -393,11 +393,11 @@ dma_addr_t map_descbuffer(struct b43lega
+ 	dma_addr_t dmaaddr;
+ 
+ 	if (tx)
+-		dmaaddr = dma_map_single(ring->dev->dev->dev,
++		dmaaddr = dma_map_single(ring->dev->dev->dma_dev,
+ 					 buf, len,
+ 					 DMA_TO_DEVICE);
+ 	else
+-		dmaaddr = dma_map_single(ring->dev->dev->dev,
++		dmaaddr = dma_map_single(ring->dev->dev->dma_dev,
+ 					 buf, len,
+ 					 DMA_FROM_DEVICE);
+ 
+@@ -411,11 +411,11 @@ void unmap_descbuffer(struct b43legacy_d
+ 		      int tx)
+ {
+ 	if (tx)
+-		dma_unmap_single(ring->dev->dev->dev,
++		dma_unmap_single(ring->dev->dev->dma_dev,
+ 				 addr, len,
+ 				 DMA_TO_DEVICE);
+ 	else
+-		dma_unmap_single(ring->dev->dev->dev,
++		dma_unmap_single(ring->dev->dev->dma_dev,
+ 				 addr, len,
+ 				 DMA_FROM_DEVICE);
+ }
+@@ -427,7 +427,7 @@ void sync_descbuffer_for_cpu(struct b43l
+ {
+ 	B43legacy_WARN_ON(ring->tx);
+ 
+-	dma_sync_single_for_cpu(ring->dev->dev->dev,
++	dma_sync_single_for_cpu(ring->dev->dev->dma_dev,
+ 				addr, len, DMA_FROM_DEVICE);
+ }
+ 
+@@ -438,7 +438,7 @@ void sync_descbuffer_for_device(struct b
+ {
+ 	B43legacy_WARN_ON(ring->tx);
+ 
+-	dma_sync_single_for_device(ring->dev->dev->dev,
++	dma_sync_single_for_device(ring->dev->dev->dma_dev,
+ 				   addr, len, DMA_FROM_DEVICE);
+ }
+ 
+@@ -458,9 +458,9 @@ void free_descriptor_buffer(struct b43le
+ 
+ static int alloc_ringmemory(struct b43legacy_dmaring *ring)
+ {
+-	struct device *dev = ring->dev->dev->dev;
++	struct device *dma_dev = ring->dev->dev->dma_dev;
+ 
+-	ring->descbase = dma_alloc_coherent(dev, B43legacy_DMA_RINGMEMSIZE,
++	ring->descbase = dma_alloc_coherent(dma_dev, B43legacy_DMA_RINGMEMSIZE,
+ 					    &(ring->dmabase), GFP_KERNEL);
+ 	if (!ring->descbase) {
+ 		b43legacyerr(ring->dev->wl, "DMA ringmemory allocation"
+@@ -474,9 +474,9 @@ static int alloc_ringmemory(struct b43le
+ 
+ static void free_ringmemory(struct b43legacy_dmaring *ring)
+ {
+-	struct device *dev = ring->dev->dev->dev;
++	struct device *dma_dev = ring->dev->dev->dma_dev;
+ 
+-	dma_free_coherent(dev, B43legacy_DMA_RINGMEMSIZE,
++	dma_free_coherent(dma_dev, B43legacy_DMA_RINGMEMSIZE,
+ 			  ring->descbase, ring->dmabase);
+ }
+ 
+@@ -585,8 +585,9 @@ static int b43legacy_dmacontroller_tx_re
+ 
+ /* Check if a DMA mapping address is invalid. */
+ static bool b43legacy_dma_mapping_error(struct b43legacy_dmaring *ring,
+-					dma_addr_t addr,
+-					size_t buffersize)
++					 dma_addr_t addr,
++					 size_t buffersize,
++					 bool dma_to_device)
+ {
+ 	if (unlikely(dma_mapping_error(addr)))
+ 		return 1;
+@@ -594,11 +595,11 @@ static bool b43legacy_dma_mapping_error(
+ 	switch (ring->type) {
+ 	case B43legacy_DMA_30BIT:
+ 		if ((u64)addr + buffersize > (1ULL << 30))
+-			return 1;
++			goto address_error;
+ 		break;
+ 	case B43legacy_DMA_32BIT:
+ 		if ((u64)addr + buffersize > (1ULL << 32))
+-			return 1;
++			goto address_error;
+ 		break;
+ 	case B43legacy_DMA_64BIT:
+ 		/* Currently we can't have addresses beyond 64 bits in the kernel. */
+@@ -607,6 +608,12 @@ static bool b43legacy_dma_mapping_error(
+ 
+ 	/* The address is OK. */
+ 	return 0;
++
++address_error:
++	/* We can't support this address. Unmap it again. */
++	unmap_descbuffer(ring, addr, buffersize, dma_to_device);
++
++	return 1;
+ }
+ 
+ static int setup_rx_descbuffer(struct b43legacy_dmaring *ring,
+@@ -626,7 +633,7 @@ static int setup_rx_descbuffer(struct b4
+ 		return -ENOMEM;
+ 	dmaaddr = map_descbuffer(ring, skb->data,
+ 				 ring->rx_buffersize, 0);
+-	if (b43legacy_dma_mapping_error(ring, dmaaddr, ring->rx_buffersize)) {
++	if (b43legacy_dma_mapping_error(ring, dmaaddr, ring->rx_buffersize, 0)) {
+ 		/* ugh. try to realloc in zone_dma */
+ 		gfp_flags |= GFP_DMA;
+ 
+@@ -639,7 +646,7 @@ static int setup_rx_descbuffer(struct b4
+ 					 ring->rx_buffersize, 0);
+ 	}
+ 
+-	if (b43legacy_dma_mapping_error(ring, dmaaddr, ring->rx_buffersize)) {
++	if (b43legacy_dma_mapping_error(ring, dmaaddr, ring->rx_buffersize, 0)) {
+ 		dev_kfree_skb_any(skb);
+ 		return -EIO;
+ 	}
+@@ -886,12 +893,12 @@ struct b43legacy_dmaring *b43legacy_setu
+ 			goto err_kfree_meta;
+ 
+ 		/* test for ability to dma to txhdr_cache */
+-		dma_test = dma_map_single(dev->dev->dev, ring->txhdr_cache,
++		dma_test = dma_map_single(dev->dev->dma_dev, ring->txhdr_cache,
+ 					  sizeof(struct b43legacy_txhdr_fw3),
+ 					  DMA_TO_DEVICE);
+ 
+ 		if (b43legacy_dma_mapping_error(ring, dma_test,
+-					sizeof(struct b43legacy_txhdr_fw3))) {
++					sizeof(struct b43legacy_txhdr_fw3), 1)) {
+ 			/* ugh realloc */
+ 			kfree(ring->txhdr_cache);
+ 			ring->txhdr_cache = kcalloc(nr_slots,
+@@ -900,17 +907,17 @@ struct b43legacy_dmaring *b43legacy_setu
+ 			if (!ring->txhdr_cache)
+ 				goto err_kfree_meta;
+ 
+-			dma_test = dma_map_single(dev->dev->dev,
++			dma_test = dma_map_single(dev->dev->dma_dev,
+ 					ring->txhdr_cache,
+ 					sizeof(struct b43legacy_txhdr_fw3),
+ 					DMA_TO_DEVICE);
+ 
+ 			if (b43legacy_dma_mapping_error(ring, dma_test,
+-					sizeof(struct b43legacy_txhdr_fw3)))
++					sizeof(struct b43legacy_txhdr_fw3), 1))
+ 				goto err_kfree_txhdr_cache;
+ 		}
+ 
+-		dma_unmap_single(dev->dev->dev,
++		dma_unmap_single(dev->dev->dma_dev,
+ 				 dma_test, sizeof(struct b43legacy_txhdr_fw3),
+ 				 DMA_TO_DEVICE);
+ 	}
+@@ -1235,7 +1242,7 @@ static int dma_tx_fragment(struct b43leg
+ 	meta_hdr->dmaaddr = map_descbuffer(ring, (unsigned char *)header,
+ 					   sizeof(struct b43legacy_txhdr_fw3), 1);
+ 	if (b43legacy_dma_mapping_error(ring, meta_hdr->dmaaddr,
+-					sizeof(struct b43legacy_txhdr_fw3))) {
++					sizeof(struct b43legacy_txhdr_fw3), 1)) {
+ 		ring->current_slot = old_top_slot;
+ 		ring->used_slots = old_used_slots;
+ 		return -EIO;
+@@ -1254,7 +1261,7 @@ static int dma_tx_fragment(struct b43leg
+ 
+ 	meta->dmaaddr = map_descbuffer(ring, skb->data, skb->len, 1);
+ 	/* create a bounce buffer in zone_dma on mapping failure. */
+-	if (b43legacy_dma_mapping_error(ring, meta->dmaaddr, skb->len)) {
++	if (b43legacy_dma_mapping_error(ring, meta->dmaaddr, skb->len, 1)) {
+ 		bounce_skb = __dev_alloc_skb(skb->len, GFP_ATOMIC | GFP_DMA);
+ 		if (!bounce_skb) {
+ 			ring->current_slot = old_top_slot;
+@@ -1268,7 +1275,7 @@ static int dma_tx_fragment(struct b43leg
+ 		skb = bounce_skb;
+ 		meta->skb = skb;
+ 		meta->dmaaddr = map_descbuffer(ring, skb->data, skb->len, 1);
+-		if (b43legacy_dma_mapping_error(ring, meta->dmaaddr, skb->len)) {
++		if (b43legacy_dma_mapping_error(ring, meta->dmaaddr, skb->len, 1)) {
+ 			ring->current_slot = old_top_slot;
+ 			ring->used_slots = old_used_slots;
+ 			err = -EIO;
+diff -up linux-2.6.24.noarch/drivers/net/wireless/rtl8187_dev.c.orig linux-2.6.24.noarch/drivers/net/wireless/rtl8187_dev.c
+--- linux-2.6.24.noarch/drivers/net/wireless/rtl8187_dev.c.orig	2008-04-15 16:00:47.000000000 -0400
++++ linux-2.6.24.noarch/drivers/net/wireless/rtl8187_dev.c	2008-04-15 16:00:51.000000000 -0400
+@@ -509,6 +509,8 @@ static int rtl8187_add_interface(struct 
+ 		return -EOPNOTSUPP;
+ 	}
+ 
++	priv->vif = conf->vif;
++
+ 	rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_CONFIG);
+ 	for (i = 0; i < ETH_ALEN; i++)
+ 		rtl818x_iowrite8(priv, &priv->map->MAC[i],
+@@ -523,6 +525,7 @@ static void rtl8187_remove_interface(str
+ {
+ 	struct rtl8187_priv *priv = dev->priv;
+ 	priv->mode = IEEE80211_IF_TYPE_MNTR;
++	priv->vif = NULL;
+ }
+ 
+ static int rtl8187_config(struct ieee80211_hw *dev, struct ieee80211_conf *conf)
 diff -up linux-2.6.24.noarch/drivers/ssb/main.c.orig linux-2.6.24.noarch/drivers/ssb/main.c
---- linux-2.6.24.noarch/drivers/ssb/main.c.orig	2008-04-07 23:21:44.000000000 -0400
-+++ linux-2.6.24.noarch/drivers/ssb/main.c	2008-04-07 23:27:24.000000000 -0400
-@@ -1044,6 +1044,12 @@ int ssb_bus_may_powerdown(struct ssb_bus
- 		goto out;
- 
- 	cc = &bus->chipco;
-+
-+	if (!cc->dev)
-+		goto out;
-+	if (cc->dev->id.revision < 5)
-+		goto out;
-+
- 	ssb_chipco_set_clockmode(cc, SSB_CLKMODE_SLOW);
- 	err = ssb_pci_xtal(bus, SSB_GPIO_XTAL | SSB_GPIO_PLL, 0);
- 	if (err)
+--- linux-2.6.24.noarch/drivers/ssb/main.c.orig	2008-04-15 16:00:47.000000000 -0400
++++ linux-2.6.24.noarch/drivers/ssb/main.c	2008-04-15 16:00:51.000000000 -0400
+@@ -436,15 +436,18 @@ static int ssb_devices_register(struct s
+ #ifdef CONFIG_SSB_PCIHOST
+ 			sdev->irq = bus->host_pci->irq;
+ 			dev->parent = &bus->host_pci->dev;
++			sdev->dma_dev = &bus->host_pci->dev;
+ #endif
+ 			break;
+ 		case SSB_BUSTYPE_PCMCIA:
+ #ifdef CONFIG_SSB_PCMCIAHOST
+ 			sdev->irq = bus->host_pcmcia->irq.AssignedIRQ;
+ 			dev->parent = &bus->host_pcmcia->dev;
++			sdev->dma_dev = &bus->host_pcmcia->dev;
+ #endif
+ 			break;
+ 		case SSB_BUSTYPE_SSB:
++			sdev->dma_dev = dev;
+ 			break;
+ 		}
+ 
+@@ -1018,15 +1021,14 @@ EXPORT_SYMBOL(ssb_dma_translation);
+ 
+ int ssb_dma_set_mask(struct ssb_device *ssb_dev, u64 mask)
+ {
+-	struct device *dev = ssb_dev->dev;
++	struct device *dma_dev = ssb_dev->dma_dev;
+ 
+ #ifdef CONFIG_SSB_PCIHOST
+-	if (ssb_dev->bus->bustype == SSB_BUSTYPE_PCI &&
+-	    !dma_supported(dev, mask))
+-		return -EIO;
++	if (ssb_dev->bus->bustype == SSB_BUSTYPE_PCI)
++		return dma_set_mask(dma_dev, mask);
+ #endif
+-	dev->coherent_dma_mask = mask;
+-	dev->dma_mask = &dev->coherent_dma_mask;
++	dma_dev->coherent_dma_mask = mask;
++	dma_dev->dma_mask = &dma_dev->coherent_dma_mask;
+ 
+ 	return 0;
+ }




More information about the fedora-extras-commits mailing list