diff options
author | Eliad Peller <eliad@wizery.com> | 2011-08-14 06:17:10 -0400 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2011-08-22 05:35:25 -0400 |
commit | a4e02f330a69a305c4f7bc98d56e72aa0d4b6032 (patch) | |
tree | b3650bf252bb240dd7f15f83560bc41a842a4fb5 /drivers/net/wireless/wl12xx | |
parent | 04e8079c69d6fa1aa023b0b6f58f818f965c10bb (diff) |
wl12xx: update scan cmd api
Update the scan command to use the new fw api
(fw 6/7.3.0.0.75).
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx')
-rw-r--r-- | drivers/net/wireless/wl12xx/scan.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/scan.h | 25 |
2 files changed, 23 insertions, 10 deletions
diff --git a/drivers/net/wireless/wl12xx/scan.c b/drivers/net/wireless/wl12xx/scan.c index 78a9b23a41b8..54a4e75a37fe 100644 --- a/drivers/net/wireless/wl12xx/scan.c +++ b/drivers/net/wireless/wl12xx/scan.c | |||
@@ -156,6 +156,11 @@ static int wl1271_scan_send(struct wl1271 *wl, enum ieee80211_band band, | |||
156 | if (passive || wl->scan.req->n_ssids == 0) | 156 | if (passive || wl->scan.req->n_ssids == 0) |
157 | scan_options |= WL1271_SCAN_OPT_PASSIVE; | 157 | scan_options |= WL1271_SCAN_OPT_PASSIVE; |
158 | 158 | ||
159 | if (WARN_ON(wl->role_id == WL12XX_INVALID_ROLE_ID)) { | ||
160 | ret = -EINVAL; | ||
161 | goto out; | ||
162 | } | ||
163 | cmd->params.role_id = wl->role_id; | ||
159 | cmd->params.scan_options = cpu_to_le16(scan_options); | 164 | cmd->params.scan_options = cpu_to_le16(scan_options); |
160 | 165 | ||
161 | cmd->params.n_ch = wl1271_get_scan_channels(wl, wl->scan.req, | 166 | cmd->params.n_ch = wl1271_get_scan_channels(wl, wl->scan.req, |
@@ -167,7 +172,6 @@ static int wl1271_scan_send(struct wl1271 *wl, enum ieee80211_band band, | |||
167 | } | 172 | } |
168 | 173 | ||
169 | cmd->params.tx_rate = cpu_to_le32(basic_rate); | 174 | cmd->params.tx_rate = cpu_to_le32(basic_rate); |
170 | |||
171 | cmd->params.n_probe_reqs = wl->conf.scan.num_probe_reqs; | 175 | cmd->params.n_probe_reqs = wl->conf.scan.num_probe_reqs; |
172 | cmd->params.tx_rate = cpu_to_le32(basic_rate); | 176 | cmd->params.tx_rate = cpu_to_le32(basic_rate); |
173 | cmd->params.tid_trigger = 0; | 177 | cmd->params.tid_trigger = 0; |
@@ -183,6 +187,8 @@ static int wl1271_scan_send(struct wl1271 *wl, enum ieee80211_band band, | |||
183 | memcpy(cmd->params.ssid, wl->scan.ssid, wl->scan.ssid_len); | 187 | memcpy(cmd->params.ssid, wl->scan.ssid, wl->scan.ssid_len); |
184 | } | 188 | } |
185 | 189 | ||
190 | memcpy(cmd->addr, wl->mac_addr, ETH_ALEN); | ||
191 | |||
186 | ret = wl1271_cmd_build_probe_req(wl, wl->scan.ssid, wl->scan.ssid_len, | 192 | ret = wl1271_cmd_build_probe_req(wl, wl->scan.ssid, wl->scan.ssid_len, |
187 | wl->scan.req->ie, wl->scan.req->ie_len, | 193 | wl->scan.req->ie, wl->scan.req->ie_len, |
188 | band); | 194 | band); |
diff --git a/drivers/net/wireless/wl12xx/scan.h b/drivers/net/wireless/wl12xx/scan.h index 0b2a2987439d..92115156522f 100644 --- a/drivers/net/wireless/wl12xx/scan.h +++ b/drivers/net/wireless/wl12xx/scan.h | |||
@@ -46,7 +46,10 @@ void wl1271_scan_sched_scan_results(struct wl1271 *wl); | |||
46 | #define WL1271_SCAN_CURRENT_TX_PWR 0 | 46 | #define WL1271_SCAN_CURRENT_TX_PWR 0 |
47 | #define WL1271_SCAN_OPT_ACTIVE 0 | 47 | #define WL1271_SCAN_OPT_ACTIVE 0 |
48 | #define WL1271_SCAN_OPT_PASSIVE 1 | 48 | #define WL1271_SCAN_OPT_PASSIVE 1 |
49 | #define WL1271_SCAN_OPT_TRIGGERED_SCAN 2 | ||
49 | #define WL1271_SCAN_OPT_PRIORITY_HIGH 4 | 50 | #define WL1271_SCAN_OPT_PRIORITY_HIGH 4 |
51 | /* scan even if we fail to enter psm */ | ||
52 | #define WL1271_SCAN_OPT_FORCE 8 | ||
50 | #define WL1271_SCAN_BAND_2_4_GHZ 0 | 53 | #define WL1271_SCAN_BAND_2_4_GHZ 0 |
51 | #define WL1271_SCAN_BAND_5_GHZ 1 | 54 | #define WL1271_SCAN_BAND_5_GHZ 1 |
52 | 55 | ||
@@ -62,27 +65,27 @@ enum { | |||
62 | }; | 65 | }; |
63 | 66 | ||
64 | struct basic_scan_params { | 67 | struct basic_scan_params { |
65 | __le32 rx_config_options; | ||
66 | __le32 rx_filter_options; | ||
67 | /* Scan option flags (WL1271_SCAN_OPT_*) */ | 68 | /* Scan option flags (WL1271_SCAN_OPT_*) */ |
68 | __le16 scan_options; | 69 | __le16 scan_options; |
70 | u8 role_id; | ||
69 | /* Number of scan channels in the list (maximum 30) */ | 71 | /* Number of scan channels in the list (maximum 30) */ |
70 | u8 n_ch; | 72 | u8 n_ch; |
71 | /* This field indicates the number of probe requests to send | 73 | /* This field indicates the number of probe requests to send |
72 | per channel for an active scan */ | 74 | per channel for an active scan */ |
73 | u8 n_probe_reqs; | 75 | u8 n_probe_reqs; |
74 | /* Rate bit field for sending the probes */ | ||
75 | __le32 tx_rate; | ||
76 | u8 tid_trigger; | 76 | u8 tid_trigger; |
77 | u8 ssid_len; | 77 | u8 ssid_len; |
78 | /* in order to align */ | 78 | u8 use_ssid_list; |
79 | u8 padding1[2]; | 79 | |
80 | /* Rate bit field for sending the probes */ | ||
81 | __le32 tx_rate; | ||
82 | |||
80 | u8 ssid[IEEE80211_MAX_SSID_LEN]; | 83 | u8 ssid[IEEE80211_MAX_SSID_LEN]; |
81 | /* Band to scan */ | 84 | /* Band to scan */ |
82 | u8 band; | 85 | u8 band; |
83 | u8 use_ssid_list; | 86 | |
84 | u8 scan_tag; | 87 | u8 scan_tag; |
85 | u8 padding2; | 88 | u8 padding2[2]; |
86 | } __packed; | 89 | } __packed; |
87 | 90 | ||
88 | struct basic_scan_channel_params { | 91 | struct basic_scan_channel_params { |
@@ -105,6 +108,10 @@ struct wl1271_cmd_scan { | |||
105 | 108 | ||
106 | struct basic_scan_params params; | 109 | struct basic_scan_params params; |
107 | struct basic_scan_channel_params channels[WL1271_SCAN_MAX_CHANNELS]; | 110 | struct basic_scan_channel_params channels[WL1271_SCAN_MAX_CHANNELS]; |
111 | |||
112 | /* src mac address */ | ||
113 | u8 addr[ETH_ALEN]; | ||
114 | u8 padding[2]; | ||
108 | } __packed; | 115 | } __packed; |
109 | 116 | ||
110 | struct wl1271_cmd_trigger_scan_to { | 117 | struct wl1271_cmd_trigger_scan_to { |
@@ -184,7 +191,7 @@ struct wl1271_cmd_sched_scan_config { | |||
184 | } __packed; | 191 | } __packed; |
185 | 192 | ||
186 | 193 | ||
187 | #define SCHED_SCAN_MAX_SSIDS 8 | 194 | #define SCHED_SCAN_MAX_SSIDS 16 |
188 | 195 | ||
189 | enum { | 196 | enum { |
190 | SCAN_SSID_TYPE_PUBLIC = 0, | 197 | SCAN_SSID_TYPE_PUBLIC = 0, |