rpms/wpa_supplicant/devel wpa_supplicant-0.6.7-wext-scan-size.patch, NONE, 1.1 wpa_supplicant.spec, 1.52, 1.53

Daniel Williams dcbw at fedoraproject.org
Fri Feb 6 22:26:21 UTC 2009


Author: dcbw

Update of /cvs/extras/rpms/wpa_supplicant/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv6928

Modified Files:
	wpa_supplicant.spec 
Added Files:
	wpa_supplicant-0.6.7-wext-scan-size.patch 
Log Message:
* Fri Feb  6 2009 Dan Williams <dcbw at redhat.com> - 1:0.6.7-3
- Fix scan result retrieval in very dense wifi environments



wpa_supplicant-0.6.7-wext-scan-size.patch:

--- NEW FILE wpa_supplicant-0.6.7-wext-scan-size.patch ---
commit 42f1ee7d1fae8a67a2a48adfda19f9aafc3fef32
Author: Jouni Malinen <jouni.malinen at atheros.com>
Date:   Thu Feb 5 12:00:23 2009 +0200

    Fixed scan buffer increasing with WEXT
    
    We can now handle up to 65535 byte result buffer which is the maximum
    due to WEXT using 16-bit length field. Previously, this was limited to
    32768 bytes in practice even through we tried with 65536 and 131072
    buffers which we just truncated into 0 in the 16-bit variable.
    
    This more or less doubles the number of BSSes we can received from scan
    results.

diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 5e40cd2..2646270 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -1565,10 +1565,12 @@ static u8 * wpa_driver_nl80211_giwscan(struct wpa_driver_nl80211_data *drv,
 		if (ioctl(drv->ioctl_sock, SIOCGIWSCAN, &iwr) == 0)
 			break;
 
-		if (errno == E2BIG && res_buf_len < 100000) {
+		if (errno == E2BIG && res_buf_len < 65535) {
 			os_free(res_buf);
 			res_buf = NULL;
 			res_buf_len *= 2;
+			if (res_buf_len > 65535)
+				res_buf_len = 65535; /* 16-bit length field */
 			wpa_printf(MSG_DEBUG, "Scan results did not fit - "
 				   "trying larger buffer (%lu bytes)",
 				   (unsigned long) res_buf_len);
diff --git a/src/drivers/driver_wext.c b/src/drivers/driver_wext.c
index b6273e5..631c63d 100644
--- a/src/drivers/driver_wext.c
+++ b/src/drivers/driver_wext.c
@@ -1140,10 +1140,12 @@ static u8 * wpa_driver_wext_giwscan(struct wpa_driver_wext_data *drv,
 		if (ioctl(drv->ioctl_sock, SIOCGIWSCAN, &iwr) == 0)
 			break;
 
-		if (errno == E2BIG && res_buf_len < 100000) {
+		if (errno == E2BIG && res_buf_len < 65535) {
 			os_free(res_buf);
 			res_buf = NULL;
 			res_buf_len *= 2;
+			if (res_buf_len > 65535)
+				res_buf_len = 65535; /* 16-bit length field */
 			wpa_printf(MSG_DEBUG, "Scan results did not fit - "
 				   "trying larger buffer (%lu bytes)",
 				   (unsigned long) res_buf_len);



Index: wpa_supplicant.spec
===================================================================
RCS file: /cvs/extras/rpms/wpa_supplicant/devel/wpa_supplicant.spec,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -r1.52 -r1.53
--- wpa_supplicant.spec	6 Feb 2009 21:35:16 -0000	1.52
+++ wpa_supplicant.spec	6 Feb 2009 22:25:50 -0000	1.53
@@ -2,7 +2,7 @@
 Name: wpa_supplicant
 Epoch: 1
 Version: 0.6.7
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: BSD
 Group: System Environment/Base
 Source0: http://hostap.epitest.fi/releases/%{name}-%{version}.tar.gz
@@ -19,6 +19,7 @@
 Patch4: wpa_supplicant-0.5.10-dbus-service-file.patch
 Patch5: wpa_supplicant-0.6.7-quiet-scan-results-message.patch
 Patch6: wpa-supplicant-0.6.7-really-disassoc.patch
+Patch7: wpa_supplicant-0.6.7-wext-scan-size.patch
 
 URL: http://w1.fi/wpa_supplicant/
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -53,6 +54,7 @@
 %patch4 -p1 -b .dbus-service-file
 %patch5 -p1 -b .quiet-scan-results-msg
 %patch6 -p1 -b .really-disassociate
+%patch7 -p1 -b .lots-o-scan-results
 
 %build
 pushd wpa_supplicant
@@ -143,6 +145,9 @@
 %{_bindir}/wpa_gui
 
 %changelog
+* Fri Feb  6 2009 Dan Williams <dcbw at redhat.com> - 1:0.6.7-3
+- Fix scan result retrieval in very dense wifi environments
+
 * Fri Feb  6 2009 Dan Williams <dcbw at redhat.com> - 1:0.6.7-2
 - Ensure that drivers don't retry association when they aren't supposed to
 




More information about the scm-commits mailing list