From bfe3850b0cfca6ba64395e2705d9a51cd044f374 Mon Sep 17 00:00:00 2001 From: Jussi Kivilinna Date: Tue, 21 Dec 2010 22:44:05 +0200 Subject: [PATCH] rndis_wlan: scanning, workaround device returning incorrect bssid-list item count. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Sometimes device returns wrong number of items in bssid-list. Appears that some specific beacons trigger this problem and leads to very poor scanning results. Workaround by ignoring num_items received from device and walkthrough full bssid-list buffer. v2: Fix buffer range checks and reading next item length. Old code read behind buffer on last item but didn't use those values as 'count' would also reach zero. Also fix resizing of buffer if device has larger buffer, old code assumed that BSSID-list OID would return same buffer size when it really can return yet another new larger length. Tested-by: Luís Picciochi Signed-off-by: Jussi Kivilinna Signed-off-by: John W. Linville --- Reading git-format-patch failed