Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 253063
b: refs/heads/master
c: 2497a24
h: refs/heads/master
i:
  253061: 2e8e05d
  253059: 2ac9a9d
  253055: 2a87299
v: v3
  • Loading branch information
Luciano Coelho authored and John W. Linville committed May 31, 2011
1 parent 1495305 commit 39da8d9
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 12 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: dd08682150e1815fe5cdd0673a2f2e9cd2d55a7a
refs/heads/master: 2497a246e880d1fb537f754f551177c01fa39242
31 changes: 20 additions & 11 deletions trunk/drivers/net/wireless/wl12xx/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,10 +337,12 @@ wl1271_scan_get_sched_scan_channels(struct wl1271 *wl,
i++) {
flags = req->channels[i]->flags;

if (!(flags & IEEE80211_CHAN_DISABLED) &&
(!!(flags & IEEE80211_CHAN_PASSIVE_SCAN) == passive) &&
if ((req->channels[i]->band == band) &&
!(flags & IEEE80211_CHAN_DISABLED) &&
(!!(flags & IEEE80211_CHAN_RADAR) == radar) &&
(req->channels[i]->band == band)) {
/* if radar is set, we ignore the passive flag */
(radar ||
!!(flags & IEEE80211_CHAN_PASSIVE_SCAN) == passive)) {
wl1271_debug(DEBUG_SCAN, "band %d, center_freq %d ",
req->channels[i]->band,
req->channels[i]->center_freq);
Expand All @@ -350,6 +352,8 @@ wl1271_scan_get_sched_scan_channels(struct wl1271 *wl,
wl1271_debug(DEBUG_SCAN, "max_power %d",
req->channels[i]->max_power);

if (flags & IEEE80211_CHAN_RADAR)
channels[j].flags |= SCAN_CHANNEL_FLAGS_DFS;
if (flags & IEEE80211_CHAN_PASSIVE_SCAN) {
channels[j].passive_duration =
cpu_to_le16(c->dwell_time_passive);
Expand All @@ -359,7 +363,7 @@ wl1271_scan_get_sched_scan_channels(struct wl1271 *wl,
channels[j].max_duration =
cpu_to_le16(c->max_dwell_time_active);
}
channels[j].tx_power_att = req->channels[j]->max_power;
channels[j].tx_power_att = req->channels[i]->max_power;
channels[j].channel = req->channels[i]->hw_value;

j++;
Expand All @@ -386,30 +390,35 @@ wl1271_scan_sched_scan_channels(struct wl1271 *wl,
wl1271_scan_get_sched_scan_channels(wl, req, cfg->channels,
IEEE80211_BAND_2GHZ,
false, false, idx);
idx += cfg->active[0];
/*
* 5GHz channels always start at position 14, not immediately
* after the last 2.4GHz channel
*/
idx = 14;

cfg->passive[1] =
wl1271_scan_get_sched_scan_channels(wl, req, cfg->channels,
IEEE80211_BAND_5GHZ,
false, true, idx);
idx += cfg->passive[1];

cfg->active[1] =
cfg->dfs =
wl1271_scan_get_sched_scan_channels(wl, req, cfg->channels,
IEEE80211_BAND_5GHZ,
false, false, 14);
idx += cfg->active[1];
true, true, idx);
idx += cfg->dfs;

cfg->dfs =
cfg->active[1] =
wl1271_scan_get_sched_scan_channels(wl, req, cfg->channels,
IEEE80211_BAND_5GHZ,
true, false, idx);
idx += cfg->dfs;
false, false, idx);
idx += cfg->active[1];

wl1271_debug(DEBUG_SCAN, " 2.4GHz: active %d passive %d",
cfg->active[0], cfg->passive[0]);
wl1271_debug(DEBUG_SCAN, " 5GHz: active %d passive %d",
cfg->active[1], cfg->passive[1]);
wl1271_debug(DEBUG_SCAN, " DFS: %d", cfg->dfs);

return idx;
}
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/net/wireless/wl12xx/scan.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ enum {
SCAN_BSS_TYPE_ANY,
};

#define SCAN_CHANNEL_FLAGS_DFS BIT(0)
#define SCAN_CHANNEL_FLAGS_DFS_ENABLED BIT(1)

struct conn_scan_ch_params {
__le16 min_duration;
__le16 max_duration;
Expand Down

0 comments on commit 39da8d9

Please sign in to comment.