2011-12-07 10:37:15

by Eyal Shapira

[permalink] [raw]
Subject: [PATCH] wl12xx: minor fix in sched_scan_ssid_list

The user can pass broadcast SSID (ssid="") in the list of SSIDs for active scan.
In this case the loop was attempting to match SSIDs in the filter
list to this empty entry and marking them as HIDDEN (sending probe
request) by mistake

Signed-off-by: Eyal Shapira <[email protected]>
---
drivers/net/wireless/wl12xx/scan.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/wl12xx/scan.c b/drivers/net/wireless/wl12xx/scan.c
index 330d678..8599dab 100644
--- a/drivers/net/wireless/wl12xx/scan.c
+++ b/drivers/net/wireless/wl12xx/scan.c
@@ -572,6 +572,9 @@ wl12xx_scan_sched_scan_ssid_list(struct wl1271 *wl,
* so they're used in probe requests.
*/
for (i = 0; i < req->n_ssids; i++) {
+ if (!req->ssids[i].ssid_len)
+ continue;
+
for (j = 0; j < cmd->n_ssids; j++)
if (!memcmp(req->ssids[i].ssid,
cmd->ssids[j].ssid,
--
1.7.4.1



2011-12-13 09:28:48

by Luciano Coelho

[permalink] [raw]
Subject: Re: [PATCH] wl12xx: minor fix in sched_scan_ssid_list

On Wed, 2011-12-07 at 12:37 +0200, Eyal Shapira wrote:
> The user can pass broadcast SSID (ssid="") in the list of SSIDs for active scan.
> In this case the loop was attempting to match SSIDs in the filter
> list to this empty entry and marking them as HIDDEN (sending probe
> request) by mistake
>
> Signed-off-by: Eyal Shapira <[email protected]>
> ---

This has also been applied and pushed last week.

--
Cheers,
Luca.