summaryrefslogtreecommitdiff
path: root/core/wireless_tools
diff options
context:
space:
mode:
authorMichał Masłowski <mtjm@mtjm.eu>2012-08-28 11:13:32 +0200
committerMichał Masłowski <mtjm@mtjm.eu>2012-08-28 11:13:32 +0200
commit0cc6a0720f9505aaacfc247fa646d3e888f8e4aa (patch)
tree65312a00db8134471b6b4d8f32c36cf479effdbe /core/wireless_tools
parent0c5c6934b681707ec1a459da4318aabd7f9b796f (diff)
parent559da5e6e5aff9ccc57e29b6a91c35a528424b6c (diff)
Merge branch 'master' of ssh://parabolagnulinux.org:1863/home/parabola/abslibre-pre-mips64el
Conflicts: community-staging/widelands/PKGBUILD community/bird/PKGBUILD community/hwinfo/PKGBUILD community/pdnsd/PKGBUILD community/spectrwm/PKGBUILD community/xmlrpc-c/PKGBUILD core/wireless_tools/PKGBUILD extra/proftpd/PKGBUILD libre/grub/PKGBUILD multilib-testing/lib32-libdrm/PKGBUILD multilib-testing/lib32-libdrm/no-pthread-stubs.patch multilib/lib32-gdk-pixbuf2/PKGBUILD testing/pkg-config/PKGBUILD testing/systemd/PKGBUILD testing/systemd/systemd.install
Diffstat (limited to 'core/wireless_tools')
-rw-r--r--core/wireless_tools/PKGBUILD17
-rw-r--r--core/wireless_tools/dense.patch49
2 files changed, 59 insertions, 7 deletions
diff --git a/core/wireless_tools/PKGBUILD b/core/wireless_tools/PKGBUILD
index 8019d8ae4..53ff7f242 100644
--- a/core/wireless_tools/PKGBUILD
+++ b/core/wireless_tools/PKGBUILD
@@ -1,21 +1,24 @@
-# $Id: PKGBUILD 147661 2012-01-26 03:32:18Z bisson $
+# $Id: PKGBUILD 165574 2012-08-25 15:33:20Z bisson $
# Maintainer: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Jason Chu <jchu@xentac.net>
pkgname=wireless_tools
pkgver=29
-pkgrel=6
-pkgdesc='Wireless Tools'
+pkgrel=7
+pkgdesc='Tools allowing to manipulate the Wireless Extensions'
url='http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html'
-arch=('i686' 'x86_64' 'mips64el')
license=('GPL')
-source=("http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/${pkgname}.${pkgver}.tar.gz")
-sha1sums=('22040ac1497f4c5f8ddeca365591b01ae3475710')
+arch=('i686' 'x86_64' 'mips64el')
+source=("http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/${pkgname}.${pkgver}.tar.gz"
+ 'dense.patch')
+sha1sums=('22040ac1497f4c5f8ddeca365591b01ae3475710'
+ '5c297c7dff1ec1d2a3d918c20622ab3c6daf5b72')
build() {
cd "${srcdir}/${pkgname}.${pkgver}"
- make CFLAGS="${CFLAGS} -Wall -Wextra -I." LDFLAGS="${LDFLAGS}"
+ patch -p1 -i ../dense.patch # FS#15363
+ make CFLAGS="${CFLAGS} -I." LDFLAGS="${LDFLAGS}"
}
package() {
diff --git a/core/wireless_tools/dense.patch b/core/wireless_tools/dense.patch
new file mode 100644
index 000000000..85182cd82
--- /dev/null
+++ b/core/wireless_tools/dense.patch
@@ -0,0 +1,49 @@
+The length field of wext data (iw_point.data) is 16 bits. The largest
+value is thus 65535. During the attempts to increase buffer size the
+buffer starts at 4096 and is doubled after each failure to fill. From the
+time this length reaches 65536 it is effectively zero. We thus loose all
+potential space from 32768 to 65535.
+
+This problem is clear when scanning in a RF dense environment.
+
+Without this patch:
+~$ iwlist wlan0 scan
+print_scanning_info: Allocation failed
+
+With this patch:
+~$ iwlist wlan0 scan | grep Cell | wc -l
+86
+
+Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
+
+---
+A similar patch was recently created to fix wpa_supplicant.
+
+I could not find a source code repo for this code and created this patch
+against version 30-pre7 downloaded from
+http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html
+
+diff -uprN wireless_tools_org/wireless_tools.30/iwlist.c wireless_tools.30/iwlist.c
+--- wireless_tools_org/wireless_tools.30/iwlist.c 2008-01-16 17:45:41.000000000 -0800
++++ wireless_tools.30/iwlist.c 2009-02-12 14:16:48.000000000 -0800
+@@ -800,7 +800,7 @@ print_scanning_info(int skfd,
+ if(iw_get_ext(skfd, ifname, SIOCGIWSCAN, &wrq) < 0)
+ {
+ /* Check if buffer was too small (WE-17 only) */
+- if((errno == E2BIG) && (range.we_version_compiled > 16))
++ if((errno == E2BIG) && (range.we_version_compiled > 16) && (buflen < 65535))
+ {
+ /* Some driver may return very large scan results, either
+ * because there are many cells, or because they have many
+@@ -816,6 +816,10 @@ print_scanning_info(int skfd,
+ else
+ buflen *= 2;
+
++ /* wrq.u.data.length is 16 bits so max size is 65535 */
++ if(buflen > 65535)
++ buflen = 65535;
++
+ /* Try again */
+ goto realloc;
+ }
+