diff options
author | Eliad Peller <eliad@wizery.com> | 2012-05-15 18:31:58 +0300 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2012-06-06 19:33:28 +0300 |
commit | 587cc286c8a8e22bbe4521c331b88d62d0cb1076 (patch) | |
tree | 2cc4acb16f33851fda51222afc902a126848a566 | |
parent | 78f85f5066b721666f869d537eaca6a0818aa301 (diff) | |
download | op-kernel-dev-587cc286c8a8e22bbe4521c331b88d62d0cb1076.zip op-kernel-dev-587cc286c8a8e22bbe4521c331b88d62d0cb1076.tar.gz |
wlcore: compare ssid_len before comparing ssids
When comparing 2 ssids the ssid_len must be taken
into account. Otherwise, a substring will be treated
as equal.
This bug might cause ssids to get scanned as
public ssids (rather than hidden), resulting in
broadcast probe request (instead of ssid-specific
ones)
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
-rw-r--r-- | drivers/net/wireless/ti/wlcore/scan.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/ti/wlcore/scan.c b/drivers/net/wireless/ti/wlcore/scan.c index 94668d8..e1dbe81 100644 --- a/drivers/net/wireless/ti/wlcore/scan.c +++ b/drivers/net/wireless/ti/wlcore/scan.c @@ -605,7 +605,9 @@ wl12xx_scan_sched_scan_ssid_list(struct wl1271 *wl, continue; for (j = 0; j < cmd->n_ssids; j++) - if (!memcmp(req->ssids[i].ssid, + if ((req->ssids[i].ssid_len == + req->ssids[j].ssid_len) && + !memcmp(req->ssids[i].ssid, cmd->ssids[j].ssid, req->ssids[i].ssid_len)) { cmd->ssids[j].type = |