rpms/kernel/F-12 mac80211_-fix-deferred-hardware-scan-requests.patch, NONE, 1.1 kernel.spec, 1.2064, 1.2065

John W. Linville linville at fedoraproject.org
Tue Apr 20 13:53:51 UTC 2010


Author: linville

Update of /cvs/pkgs/rpms/kernel/F-12
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv26164

Modified Files:
	kernel.spec 
Added Files:
	mac80211_-fix-deferred-hardware-scan-requests.patch 
Log Message:
mac80211: fix deferred hardware scan requests

mac80211_-fix-deferred-hardware-scan-requests.patch:
 scan.c |   18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

--- NEW FILE mac80211_-fix-deferred-hardware-scan-requests.patch ---
Backport of the following upstream commit...

commit c0ce77b8323c1a0d4eeef97caf16c0ea971222a9
Author: Johannes Berg <johannes at sipsolutions.net>
Date:   Wed Feb 3 10:22:31 2010 +0100

    mac80211: fix deferred hardware scan requests
    
    Reinette found the reason for the warnings that
    happened occasionally when a hw-offloaded scan
    finished; her description of the problem:
    
      mac80211 will defer the handling of scan requests if it is
      busy with management work at the time. The scan requests
      are deferred and run after the work has completed. When
      this occurs there are currently two problems.
    
      * The scan request for hardware scan is not fully populated
        with the band and channels to scan not initialized.
    
      * When the scan is queued the state is not correctly updated
        to reflect that a scan is in progress. The problem here is
        that when the driver completes the scan and calls
        ieee80211_scan_completed() a warning will be triggered
        since mac80211 was not aware that a scan was in progress.
    
    The reason is that the queued scan work will start
    the hw scan right away when the hw_scan_req struct
    has already been allocated. However, in the first
    pass it will not have been filled, which happens
    at the same time as setting the bits. To fix this,
    simply move the allocation after the pending work
    test as well, so that the first iteration of the
    scan work will call __ieee80211_start_scan() even
    in the hardware scan case.
    
    Bug-identified-by: Reinette Chatre <reinette.chatre at intel.com>
    Signed-off-by: Johannes Berg <johannes at sipsolutions.net>
    Signed-off-by: John W. Linville <linville at tuxdriver.com>

diff -up linux-2.6.32.noarch/net/mac80211/scan.c.orig linux-2.6.32.noarch/net/mac80211/scan.c
--- linux-2.6.32.noarch/net/mac80211/scan.c.orig	2010-04-19 14:46:23.000000000 -0400
+++ linux-2.6.32.noarch/net/mac80211/scan.c	2010-04-19 14:49:13.000000000 -0400
@@ -408,6 +408,16 @@ static int __ieee80211_start_scan(struct
 	if (local->scan_req)
 		return -EBUSY;
 
+	if (req != local->int_scan_req &&
+	    sdata->vif.type == NL80211_IFTYPE_STATION &&
+	    !list_empty(&ifmgd->work_list)) {
+		/* actually wait for the work it's doing to finish/time out */
+		set_bit(IEEE80211_STA_REQ_SCAN, &ifmgd->request);
+		local->scan_req = req;
+		local->scan_sdata = sdata;
+		return 0;
+	}
+
 	if (local->ops->hw_scan) {
 		u8 *ies;
 		int ielen;
@@ -428,14 +438,6 @@ static int __ieee80211_start_scan(struct
 	local->scan_req = req;
 	local->scan_sdata = sdata;
 
-	if (req != local->int_scan_req &&
-	    sdata->vif.type == NL80211_IFTYPE_STATION &&
-	    !list_empty(&ifmgd->work_list)) {
-		/* actually wait for the work it's doing to finish/time out */
-		set_bit(IEEE80211_STA_REQ_SCAN, &ifmgd->request);
-		return 0;
-	}
-
 	if (local->ops->hw_scan)
 		__set_bit(SCAN_HW_SCANNING, &local->scanning);
 	else


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-12/kernel.spec,v
retrieving revision 1.2064
retrieving revision 1.2065
diff -u -p -r1.2064 -r1.2065
--- kernel.spec	16 Apr 2010 14:55:00 -0000	1.2064
+++ kernel.spec	20 Apr 2010 13:53:50 -0000	1.2065
@@ -811,6 +811,9 @@ Patch12421: b43_-Remove-reset-after-fata
 Patch12422: b43_-Allow-PIO-mode-to-be-selected-at-module-load.patch
 Patch12423: b43_-fall-back-gracefully-to-PIO-mode-after-fatal-DMA-errors.patch
 
+# mac80211: fix deferred hardware scan requests
+Patch12430: mac80211_-fix-deferred-hardware-scan-requests.patch
+
 # ==============================================================================
 
 %endif
@@ -1496,6 +1499,9 @@ ApplyPatch b43_-Remove-reset-after-fatal
 ApplyPatch b43_-Allow-PIO-mode-to-be-selected-at-module-load.patch
 ApplyPatch b43_-fall-back-gracefully-to-PIO-mode-after-fatal-DMA-errors.patch
 
+# mac80211: fix deferred hardware scan requests
+ApplyPatch mac80211_-fix-deferred-hardware-scan-requests.patch
+
 # END OF PATCH APPLICATIONS ====================================================
 
 %endif
@@ -2149,6 +2155,9 @@ fi
 # and build.
 
 %changelog
+* Tue Apr 20 2010 John W. Linville <linville at redhat.com> 2.6.32.11-105
+- mac80211: fix deferred hardware scan requests
+
 * Fri Apr 16 2010 John W. Linville <linville at redhat.com> 2.6.32.11-104
 - b43: Optimize PIO scratchbuffer usage
 - b43: Remove reset after fatal DMA error



More information about the scm-commits mailing list