Skip to content

Commit

Permalink
wl1271: fix forced passive scan
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Luciano Coelho committed Sep 28, 2010
1 parent 5924f89 commit 4f35c02
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/net/wireless/wl12xx/wl1271_scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 4f35c02

Please sign in to comment.