Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 253065
b: refs/heads/master
c: 66870b1
h: refs/heads/master
i:
  253063: 39da8d9
v: v3
  • Loading branch information
Luciano Coelho authored and John W. Linville committed May 31, 2011
1 parent 5274ed5 commit 5eff6db
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 50a66d7f04adbfab9db55144c58dc693358cb635
refs/heads/master: 66870b1ccd5c1460e437c18b0026e2dcaab1ece9
11 changes: 8 additions & 3 deletions trunk/drivers/net/wireless/wl12xx/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,12 +331,16 @@ wl1271_scan_get_sched_scan_channels(struct wl1271 *wl,
struct conf_sched_scan_settings *c = &wl->conf.sched_scan;
int i, j;
u32 flags;
bool force_passive = !req->n_ssids;

for (i = 0, j = start;
i < req->n_channels && j < MAX_CHANNELS_ALL_BANDS;
i++) {
flags = req->channels[i]->flags;

if (force_passive)
flags |= IEEE80211_CHAN_PASSIVE_SCAN;

if ((req->channels[i]->band == band) &&
!(flags & IEEE80211_CHAN_DISABLED) &&
(!!(flags & IEEE80211_CHAN_RADAR) == radar) &&
Expand Down Expand Up @@ -433,6 +437,7 @@ int wl1271_scan_sched_scan_config(struct wl1271 *wl,
struct wl1271_cmd_sched_scan_config *cfg = NULL;
struct conf_sched_scan_settings *c = &wl->conf.sched_scan;
int i, total_channels, ret;
bool force_passive = !req->n_ssids;

wl1271_debug(DEBUG_CMD, "cmd sched_scan scan config");

Expand All @@ -456,7 +461,7 @@ int wl1271_scan_sched_scan_config(struct wl1271 *wl,
for (i = 0; i < SCAN_MAX_CYCLE_INTERVALS; i++)
cfg->intervals[i] = cpu_to_le32(req->interval);

if (req->ssids[0].ssid_len && req->ssids[0].ssid) {
if (!force_passive && req->ssids[0].ssid_len && req->ssids[0].ssid) {
cfg->filter_type = SCAN_SSID_FILTER_SPECIFIC;
cfg->ssid_len = req->ssids[0].ssid_len;
memcpy(cfg->ssid, req->ssids[0].ssid,
Expand All @@ -473,7 +478,7 @@ int wl1271_scan_sched_scan_config(struct wl1271 *wl,
goto out;
}

if (cfg->active[0]) {
if (!force_passive && cfg->active[0]) {
ret = wl1271_cmd_build_probe_req(wl, req->ssids[0].ssid,
req->ssids[0].ssid_len,
ies->ie[IEEE80211_BAND_2GHZ],
Expand All @@ -485,7 +490,7 @@ int wl1271_scan_sched_scan_config(struct wl1271 *wl,
}
}

if (cfg->active[1]) {
if (!force_passive && cfg->active[1]) {
ret = wl1271_cmd_build_probe_req(wl, req->ssids[0].ssid,
req->ssids[0].ssid_len,
ies->ie[IEEE80211_BAND_5GHZ],
Expand Down

0 comments on commit 5eff6db

Please sign in to comment.