Lines Matching +full:out +full:- +full:of +full:- +full:band

1 // SPDX-License-Identifier: GPL-2.0-only
3 * This file is part of wl18xx
15 memcpy(cmd->passive, cmd_channels->passive, sizeof(cmd->passive)); in wl18xx_adjust_channels()
16 memcpy(cmd->active, cmd_channels->active, sizeof(cmd->active)); in wl18xx_adjust_channels()
17 cmd->dfs = cmd_channels->dfs; in wl18xx_adjust_channels()
18 cmd->passive_active = cmd_channels->passive_active; in wl18xx_adjust_channels()
20 memcpy(cmd->channels_2, cmd_channels->channels_2, in wl18xx_adjust_channels()
21 sizeof(cmd->channels_2)); in wl18xx_adjust_channels()
22 memcpy(cmd->channels_5, cmd_channels->channels_5, in wl18xx_adjust_channels()
23 sizeof(cmd->channels_5)); in wl18xx_adjust_channels()
36 ret = -ENOMEM; in wl18xx_scan_send()
37 goto out; in wl18xx_scan_send()
42 cmd->role_id = wlvif->dev_role_id; in wl18xx_scan_send()
44 cmd->role_id = wlvif->role_id; in wl18xx_scan_send()
46 if (WARN_ON(cmd->role_id == WL12XX_INVALID_ROLE_ID)) { in wl18xx_scan_send()
47 ret = -EINVAL; in wl18xx_scan_send()
48 goto out; in wl18xx_scan_send()
51 cmd->scan_type = SCAN_TYPE_SEARCH; in wl18xx_scan_send()
52 cmd->rssi_threshold = -127; in wl18xx_scan_send()
53 cmd->snr_threshold = 0; in wl18xx_scan_send()
55 cmd->bss_type = SCAN_BSS_TYPE_ANY; in wl18xx_scan_send()
57 cmd->ssid_from_list = 0; in wl18xx_scan_send()
58 cmd->filter = 0; in wl18xx_scan_send()
59 cmd->add_broadcast = 0; in wl18xx_scan_send()
61 cmd->urgency = 0; in wl18xx_scan_send()
62 cmd->protect = 0; in wl18xx_scan_send()
64 cmd->n_probe_reqs = wl->conf.scan.num_probe_reqs; in wl18xx_scan_send()
65 cmd->terminate_after = 0; in wl18xx_scan_send()
68 WARN_ON(req->n_ssids > 1); in wl18xx_scan_send()
72 ret = -ENOMEM; in wl18xx_scan_send()
73 goto out; in wl18xx_scan_send()
76 wlcore_set_scan_chan_params(wl, cmd_channels, req->channels, in wl18xx_scan_send()
77 req->n_channels, req->n_ssids, in wl18xx_scan_send()
85 cmd->total_cycles = 1; in wl18xx_scan_send()
87 if (req->no_cck) in wl18xx_scan_send()
88 cmd->rate = WL18XX_SCAN_RATE_6; in wl18xx_scan_send()
90 cmd->tag = WL1271_SCAN_DEFAULT_TAG; in wl18xx_scan_send()
92 if (req->n_ssids) { in wl18xx_scan_send()
93 cmd->ssid_len = req->ssids[0].ssid_len; in wl18xx_scan_send()
94 memcpy(cmd->ssid, req->ssids[0].ssid, cmd->ssid_len); in wl18xx_scan_send()
97 /* TODO: per-band ies? */ in wl18xx_scan_send()
98 if (cmd->active[0]) { in wl18xx_scan_send()
99 u8 band = NL80211_BAND_2GHZ; in wl18xx_scan_send() local
101 cmd->role_id, band, in wl18xx_scan_send()
102 req->ssids ? req->ssids[0].ssid : NULL, in wl18xx_scan_send()
103 req->ssids ? req->ssids[0].ssid_len : 0, in wl18xx_scan_send()
104 req->ie, in wl18xx_scan_send()
105 req->ie_len, in wl18xx_scan_send()
111 goto out; in wl18xx_scan_send()
115 if (cmd->active[1] || cmd->dfs) { in wl18xx_scan_send()
116 u8 band = NL80211_BAND_5GHZ; in wl18xx_scan_send() local
118 cmd->role_id, band, in wl18xx_scan_send()
119 req->ssids ? req->ssids[0].ssid : NULL, in wl18xx_scan_send()
120 req->ssids ? req->ssids[0].ssid_len : 0, in wl18xx_scan_send()
121 req->ie, in wl18xx_scan_send()
122 req->ie_len, in wl18xx_scan_send()
128 goto out; in wl18xx_scan_send()
137 goto out; in wl18xx_scan_send()
140 out: in wl18xx_scan_send()
148 wl->scan.failed = false; in wl18xx_scan_completed()
149 cancel_delayed_work(&wl->scan_complete_work); in wl18xx_scan_completed()
150 ieee80211_queue_delayed_work(wl->hw, &wl->scan_complete_work, in wl18xx_scan_completed()
162 struct conf_sched_scan_settings *c = &wl->conf.sched_scan; in wl18xx_scan_sched_scan_config()
174 ret = -ENOMEM; in wl18xx_scan_sched_scan_config()
175 goto out; in wl18xx_scan_sched_scan_config()
178 cmd->role_id = wlvif->role_id; in wl18xx_scan_sched_scan_config()
180 if (WARN_ON(cmd->role_id == WL12XX_INVALID_ROLE_ID)) { in wl18xx_scan_sched_scan_config()
181 ret = -EINVAL; in wl18xx_scan_sched_scan_config()
182 goto out; in wl18xx_scan_sched_scan_config()
185 cmd->scan_type = SCAN_TYPE_PERIODIC; in wl18xx_scan_sched_scan_config()
186 cmd->rssi_threshold = c->rssi_threshold; in wl18xx_scan_sched_scan_config()
187 cmd->snr_threshold = c->snr_threshold; in wl18xx_scan_sched_scan_config()
190 cmd->bss_type = SCAN_BSS_TYPE_ANY; in wl18xx_scan_sched_scan_config()
192 cmd->ssid_from_list = 1; in wl18xx_scan_sched_scan_config()
194 cmd->filter = 1; in wl18xx_scan_sched_scan_config()
195 cmd->add_broadcast = 0; in wl18xx_scan_sched_scan_config()
197 cmd->urgency = 0; in wl18xx_scan_sched_scan_config()
198 cmd->protect = 0; in wl18xx_scan_sched_scan_config()
200 cmd->n_probe_reqs = c->num_probe_reqs; in wl18xx_scan_sched_scan_config()
202 cmd->terminate_after = 0; in wl18xx_scan_sched_scan_config()
206 ret = -ENOMEM; in wl18xx_scan_sched_scan_config()
207 goto out; in wl18xx_scan_sched_scan_config()
211 wlcore_set_scan_chan_params(wl, cmd_channels, req->channels, in wl18xx_scan_sched_scan_config()
212 req->n_channels, req->n_ssids, in wl18xx_scan_sched_scan_config()
216 if (c->num_short_intervals && c->long_interval && in wl18xx_scan_sched_scan_config()
217 c->long_interval > req->scan_plans[0].interval * MSEC_PER_SEC) { in wl18xx_scan_sched_scan_config()
218 cmd->short_cycles_msec = in wl18xx_scan_sched_scan_config()
219 cpu_to_le16(req->scan_plans[0].interval * MSEC_PER_SEC); in wl18xx_scan_sched_scan_config()
220 cmd->long_cycles_msec = cpu_to_le16(c->long_interval); in wl18xx_scan_sched_scan_config()
221 cmd->short_cycles_count = c->num_short_intervals; in wl18xx_scan_sched_scan_config()
223 cmd->short_cycles_msec = 0; in wl18xx_scan_sched_scan_config()
224 cmd->long_cycles_msec = in wl18xx_scan_sched_scan_config()
225 cpu_to_le16(req->scan_plans[0].interval * MSEC_PER_SEC); in wl18xx_scan_sched_scan_config()
226 cmd->short_cycles_count = 0; in wl18xx_scan_sched_scan_config()
229 le16_to_cpu(cmd->short_cycles_msec), in wl18xx_scan_sched_scan_config()
230 le16_to_cpu(cmd->long_cycles_msec), in wl18xx_scan_sched_scan_config()
231 cmd->short_cycles_count); in wl18xx_scan_sched_scan_config()
233 cmd->total_cycles = 0; in wl18xx_scan_sched_scan_config()
235 cmd->tag = WL1271_SCAN_DEFAULT_TAG; in wl18xx_scan_sched_scan_config()
238 cmd->report_threshold = 1; in wl18xx_scan_sched_scan_config()
239 cmd->terminate_on_report = 0; in wl18xx_scan_sched_scan_config()
241 if (cmd->active[0]) { in wl18xx_scan_sched_scan_config()
242 u8 band = NL80211_BAND_2GHZ; in wl18xx_scan_sched_scan_config() local
244 cmd->role_id, band, in wl18xx_scan_sched_scan_config()
245 req->ssids ? req->ssids[0].ssid : NULL, in wl18xx_scan_sched_scan_config()
246 req->ssids ? req->ssids[0].ssid_len : 0, in wl18xx_scan_sched_scan_config()
247 ies->ies[band], in wl18xx_scan_sched_scan_config()
248 ies->len[band], in wl18xx_scan_sched_scan_config()
249 ies->common_ies, in wl18xx_scan_sched_scan_config()
250 ies->common_ie_len, in wl18xx_scan_sched_scan_config()
254 goto out; in wl18xx_scan_sched_scan_config()
258 if (cmd->active[1] || cmd->dfs) { in wl18xx_scan_sched_scan_config()
259 u8 band = NL80211_BAND_5GHZ; in wl18xx_scan_sched_scan_config() local
261 cmd->role_id, band, in wl18xx_scan_sched_scan_config()
262 req->ssids ? req->ssids[0].ssid : NULL, in wl18xx_scan_sched_scan_config()
263 req->ssids ? req->ssids[0].ssid_len : 0, in wl18xx_scan_sched_scan_config()
264 ies->ies[band], in wl18xx_scan_sched_scan_config()
265 ies->len[band], in wl18xx_scan_sched_scan_config()
266 ies->common_ies, in wl18xx_scan_sched_scan_config()
267 ies->common_ie_len, in wl18xx_scan_sched_scan_config()
271 goto out; in wl18xx_scan_sched_scan_config()
280 goto out; in wl18xx_scan_sched_scan_config()
283 out: in wl18xx_scan_sched_scan_config()
307 return -ENOMEM; in __wl18xx_scan_stop()
310 stop->role_id = wlvif->role_id; in __wl18xx_scan_stop()
311 stop->scan_type = scan_type; in __wl18xx_scan_stop()