From: Luciano Coelho Date: Wed, 4 Aug 2010 01:36:32 +0000 (+0300) Subject: wl1271: fix forced passive scan X-Git-Tag: firefly_0821_release~7613^2~3670^2~78^2^2~138^2~29 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4f35c0253ab7f32cf30eab5459e8256af1619ff1;p=firefly-linux-kernel-4.4.55.git 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 Reviewed-by: Juuso Oikarinen --- 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, /* We always use high priority scans */ scan_options = WL1271_SCAN_OPT_PRIORITY_HIGH; - if(passive) + + /* No SSIDs means that we have a forced passive scan */ + if (passive || wl->scan.req->n_ssids == 0) scan_options |= WL1271_SCAN_OPT_PASSIVE; + cmd->params.scan_options = cpu_to_le16(scan_options); cmd->params.n_ch = wl1271_get_scan_channels(wl, wl->scan.req,