Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 265792
b: refs/heads/master
c: a4e02f3
h: refs/heads/master
v: v3
  • Loading branch information
Eliad Peller authored and Luciano Coelho committed Aug 22, 2011
1 parent a105d5a commit 08afa5c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 11 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: 04e8079c69d6fa1aa023b0b6f58f818f965c10bb
refs/heads/master: a4e02f330a69a305c4f7bc98d56e72aa0d4b6032
8 changes: 7 additions & 1 deletion trunk/drivers/net/wireless/wl12xx/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,11 @@ static int wl1271_scan_send(struct wl1271 *wl, enum ieee80211_band band,
if (passive || wl->scan.req->n_ssids == 0)
scan_options |= WL1271_SCAN_OPT_PASSIVE;

if (WARN_ON(wl->role_id == WL12XX_INVALID_ROLE_ID)) {
ret = -EINVAL;
goto out;
}
cmd->params.role_id = wl->role_id;
cmd->params.scan_options = cpu_to_le16(scan_options);

cmd->params.n_ch = wl1271_get_scan_channels(wl, wl->scan.req,
Expand All @@ -167,7 +172,6 @@ static int wl1271_scan_send(struct wl1271 *wl, enum ieee80211_band band,
}

cmd->params.tx_rate = cpu_to_le32(basic_rate);

cmd->params.n_probe_reqs = wl->conf.scan.num_probe_reqs;
cmd->params.tx_rate = cpu_to_le32(basic_rate);
cmd->params.tid_trigger = 0;
Expand All @@ -183,6 +187,8 @@ static int wl1271_scan_send(struct wl1271 *wl, enum ieee80211_band band,
memcpy(cmd->params.ssid, wl->scan.ssid, wl->scan.ssid_len);
}

memcpy(cmd->addr, wl->mac_addr, ETH_ALEN);

ret = wl1271_cmd_build_probe_req(wl, wl->scan.ssid, wl->scan.ssid_len,
wl->scan.req->ie, wl->scan.req->ie_len,
band);
Expand Down
25 changes: 16 additions & 9 deletions trunk/drivers/net/wireless/wl12xx/scan.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ void wl1271_scan_sched_scan_results(struct wl1271 *wl);
#define WL1271_SCAN_CURRENT_TX_PWR 0
#define WL1271_SCAN_OPT_ACTIVE 0
#define WL1271_SCAN_OPT_PASSIVE 1
#define WL1271_SCAN_OPT_TRIGGERED_SCAN 2
#define WL1271_SCAN_OPT_PRIORITY_HIGH 4
/* scan even if we fail to enter psm */
#define WL1271_SCAN_OPT_FORCE 8
#define WL1271_SCAN_BAND_2_4_GHZ 0
#define WL1271_SCAN_BAND_5_GHZ 1

Expand All @@ -62,27 +65,27 @@ enum {
};

struct basic_scan_params {
__le32 rx_config_options;
__le32 rx_filter_options;
/* Scan option flags (WL1271_SCAN_OPT_*) */
__le16 scan_options;
u8 role_id;
/* Number of scan channels in the list (maximum 30) */
u8 n_ch;
/* This field indicates the number of probe requests to send
per channel for an active scan */
u8 n_probe_reqs;
/* Rate bit field for sending the probes */
__le32 tx_rate;
u8 tid_trigger;
u8 ssid_len;
/* in order to align */
u8 padding1[2];
u8 use_ssid_list;

/* Rate bit field for sending the probes */
__le32 tx_rate;

u8 ssid[IEEE80211_MAX_SSID_LEN];
/* Band to scan */
u8 band;
u8 use_ssid_list;

u8 scan_tag;
u8 padding2;
u8 padding2[2];
} __packed;

struct basic_scan_channel_params {
Expand All @@ -105,6 +108,10 @@ struct wl1271_cmd_scan {

struct basic_scan_params params;
struct basic_scan_channel_params channels[WL1271_SCAN_MAX_CHANNELS];

/* src mac address */
u8 addr[ETH_ALEN];
u8 padding[2];
} __packed;

struct wl1271_cmd_trigger_scan_to {
Expand Down Expand Up @@ -184,7 +191,7 @@ struct wl1271_cmd_sched_scan_config {
} __packed;


#define SCHED_SCAN_MAX_SSIDS 8
#define SCHED_SCAN_MAX_SSIDS 16

enum {
SCAN_SSID_TYPE_PUBLIC = 0,
Expand Down

0 comments on commit 08afa5c

Please sign in to comment.