Lines Matching refs:wl
27 static int wl1271_get_scan_channels(struct wl1271 *wl, in wl1271_get_scan_channels() argument
32 struct conf_scan_settings *c = &wl->conf.scan; in wl1271_get_scan_channels()
41 if (!test_bit(i, wl->scan.scanned_ch) && in wl1271_get_scan_channels()
83 set_bit(i, wl->scan.scanned_ch); in wl1271_get_scan_channels()
94 static int wl1271_scan_send(struct wl1271 *wl, struct wl12xx_vif *wlvif, in wl1271_scan_send() argument
105 if (!passive && wl->scan.req->n_ssids == 0) in wl1271_scan_send()
115 if (wl->conf.scan.split_scan_timeout) in wl1271_scan_send()
134 cmd->params.n_ch = wl1271_get_scan_channels(wl, wl->scan.req, in wl1271_scan_send()
143 cmd->params.n_probe_reqs = wl->conf.scan.num_probe_reqs; in wl1271_scan_send()
152 if (wl->scan.ssid_len && wl->scan.ssid) { in wl1271_scan_send()
153 cmd->params.ssid_len = wl->scan.ssid_len; in wl1271_scan_send()
154 memcpy(cmd->params.ssid, wl->scan.ssid, wl->scan.ssid_len); in wl1271_scan_send()
159 ret = wl12xx_cmd_build_probe_req(wl, wlvif, in wl1271_scan_send()
161 wl->scan.ssid, wl->scan.ssid_len, in wl1271_scan_send()
162 wl->scan.req->ie, in wl1271_scan_send()
163 wl->scan.req->ie_len, NULL, 0, false); in wl1271_scan_send()
169 trigger->timeout = cpu_to_le32(wl->conf.scan.split_scan_timeout); in wl1271_scan_send()
170 ret = wl1271_cmd_send(wl, CMD_TRIGGER_SCAN_TO, trigger, in wl1271_scan_send()
179 ret = wl1271_cmd_send(wl, CMD_SCAN, cmd, sizeof(*cmd), 0); in wl1271_scan_send()
191 int wl12xx_scan_stop(struct wl1271 *wl, struct wl12xx_vif *wlvif) in wl12xx_scan_stop() argument
196 if (WARN_ON(wl->scan.state == WL1271_SCAN_STATE_IDLE)) in wl12xx_scan_stop()
207 ret = wl1271_cmd_send(wl, CMD_STOP_SCAN, cmd, in wl12xx_scan_stop()
218 void wl1271_scan_stm(struct wl1271 *wl, struct wl12xx_vif *wlvif) in wl1271_scan_stm() argument
224 switch (wl->scan.state) { in wl1271_scan_stm()
231 if (wl->scan.req->no_cck) { in wl1271_scan_stm()
236 rate = wl1271_tx_min_rate_get(wl, mask); in wl1271_scan_stm()
237 ret = wl1271_scan_send(wl, wlvif, band, false, rate); in wl1271_scan_stm()
239 wl->scan.state = WL1271_SCAN_STATE_2GHZ_PASSIVE; in wl1271_scan_stm()
240 wl1271_scan_stm(wl, wlvif); in wl1271_scan_stm()
248 if (wl->scan.req->no_cck) { in wl1271_scan_stm()
253 rate = wl1271_tx_min_rate_get(wl, mask); in wl1271_scan_stm()
254 ret = wl1271_scan_send(wl, wlvif, band, true, rate); in wl1271_scan_stm()
256 if (wl->enable_11a) in wl1271_scan_stm()
257 wl->scan.state = WL1271_SCAN_STATE_5GHZ_ACTIVE; in wl1271_scan_stm()
259 wl->scan.state = WL1271_SCAN_STATE_DONE; in wl1271_scan_stm()
260 wl1271_scan_stm(wl, wlvif); in wl1271_scan_stm()
267 rate = wl1271_tx_min_rate_get(wl, wlvif->bitrate_masks[band]); in wl1271_scan_stm()
268 ret = wl1271_scan_send(wl, wlvif, band, false, rate); in wl1271_scan_stm()
270 wl->scan.state = WL1271_SCAN_STATE_5GHZ_PASSIVE; in wl1271_scan_stm()
271 wl1271_scan_stm(wl, wlvif); in wl1271_scan_stm()
278 rate = wl1271_tx_min_rate_get(wl, wlvif->bitrate_masks[band]); in wl1271_scan_stm()
279 ret = wl1271_scan_send(wl, wlvif, band, true, rate); in wl1271_scan_stm()
281 wl->scan.state = WL1271_SCAN_STATE_DONE; in wl1271_scan_stm()
282 wl1271_scan_stm(wl, wlvif); in wl1271_scan_stm()
288 wl->scan.failed = false; in wl1271_scan_stm()
289 cancel_delayed_work(&wl->scan_complete_work); in wl1271_scan_stm()
290 ieee80211_queue_delayed_work(wl->hw, &wl->scan_complete_work, in wl1271_scan_stm()
300 cancel_delayed_work(&wl->scan_complete_work); in wl1271_scan_stm()
301 ieee80211_queue_delayed_work(wl->hw, &wl->scan_complete_work, in wl1271_scan_stm()
321 int wl1271_scan_sched_scan_config(struct wl1271 *wl, in wl1271_scan_sched_scan_config() argument
328 struct conf_sched_scan_settings *c = &wl->conf.sched_scan; in wl1271_scan_sched_scan_config()
357 ret = wlcore_scan_sched_scan_ssid_list(wl, wlvif, req); in wl1271_scan_sched_scan_config()
371 if (!wlcore_set_scan_chan_params(wl, cfg_channels, req->channels, in wl1271_scan_sched_scan_config()
382 ret = wl12xx_cmd_build_probe_req(wl, wlvif, in wl1271_scan_sched_scan_config()
399 ret = wl12xx_cmd_build_probe_req(wl, wlvif, in wl1271_scan_sched_scan_config()
416 ret = wl1271_cmd_send(wl, CMD_CONNECTION_SCAN_CFG, cfg, in wl1271_scan_sched_scan_config()
428 int wl1271_scan_sched_scan_start(struct wl1271 *wl, struct wl12xx_vif *wlvif) in wl1271_scan_sched_scan_start() argument
438 if ((wl->quirks & WLCORE_QUIRK_NO_SCHED_SCAN_WHILE_CONN) && in wl1271_scan_sched_scan_start()
449 ret = wl1271_cmd_send(wl, CMD_START_PERIODIC_SCAN, start, in wl1271_scan_sched_scan_start()
461 int wl12xx_sched_scan_start(struct wl1271 *wl, struct wl12xx_vif *wlvif, in wl12xx_sched_scan_start() argument
467 ret = wl1271_scan_sched_scan_config(wl, wlvif, req, ies); in wl12xx_sched_scan_start()
471 return wl1271_scan_sched_scan_start(wl, wlvif); in wl12xx_sched_scan_start()
474 void wl12xx_scan_sched_scan_stop(struct wl1271 *wl, struct wl12xx_vif *wlvif) in wl12xx_scan_sched_scan_stop() argument
491 ret = wl1271_cmd_send(wl, CMD_STOP_PERIODIC_SCAN, stop, in wl12xx_scan_sched_scan_stop()
502 int wl12xx_scan_start(struct wl1271 *wl, struct wl12xx_vif *wlvif, in wl12xx_scan_start() argument
505 wl1271_scan_stm(wl, wlvif); in wl12xx_scan_start()
509 void wl12xx_scan_completed(struct wl1271 *wl, struct wl12xx_vif *wlvif) in wl12xx_scan_completed() argument
511 wl1271_scan_stm(wl, wlvif); in wl12xx_scan_completed()