aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuciano Coelho <luciano.coelho@nokia.com>2010-08-03 21:36:32 -0400
committerLuciano Coelho <luciano.coelho@nokia.com>2010-09-28 05:15:06 -0400
commit4f35c0253ab7f32cf30eab5459e8256af1619ff1 (patch)
treead2bb5f0c5a81e798e05866895d94090a040446f
parent5924f89d6597cd7ba014128ded64b2c7450c369c (diff)
wl1271: fix forced passive scan
When we get no SSIDs in the scan request, we should force a passive scan in all channels. This patch adds code to force the passive scan flag to be set in that case. Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_scan.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_scan.c b/drivers/net/wireless/wl12xx/wl1271_scan.c
index 8ceaabe26e64..7f42ca9abab8 100644
--- a/drivers/net/wireless/wl12xx/wl1271_scan.c
+++ b/drivers/net/wireless/wl12xx/wl1271_scan.c
@@ -100,8 +100,11 @@ static int wl1271_scan_send(struct wl1271 *wl, enum ieee80211_band band,
100 100
101 /* We always use high priority scans */ 101 /* We always use high priority scans */
102 scan_options = WL1271_SCAN_OPT_PRIORITY_HIGH; 102 scan_options = WL1271_SCAN_OPT_PRIORITY_HIGH;
103 if(passive) 103
104 /* No SSIDs means that we have a forced passive scan */
105 if (passive || wl->scan.req->n_ssids == 0)
104 scan_options |= WL1271_SCAN_OPT_PASSIVE; 106 scan_options |= WL1271_SCAN_OPT_PASSIVE;
107
105 cmd->params.scan_options = cpu_to_le16(scan_options); 108 cmd->params.scan_options = cpu_to_le16(scan_options);
106 109
107 cmd->params.n_ch = wl1271_get_scan_channels(wl, wl->scan.req, 110 cmd->params.n_ch = wl1271_get_scan_channels(wl, wl->scan.req,