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()
130 cmd->params.n_ch = wl1271_get_scan_channels(wl, wl->scan.req, in wl1271_scan_send()
139 cmd->params.n_probe_reqs = wl->conf.scan.num_probe_reqs; in wl1271_scan_send()
148 if (wl->scan.ssid_len && wl->scan.ssid) { in wl1271_scan_send()
149 cmd->params.ssid_len = wl->scan.ssid_len; in wl1271_scan_send()
150 memcpy(cmd->params.ssid, wl->scan.ssid, wl->scan.ssid_len); in wl1271_scan_send()
155 ret = wl12xx_cmd_build_probe_req(wl, wlvif, in wl1271_scan_send()
157 wl->scan.ssid, wl->scan.ssid_len, in wl1271_scan_send()
158 wl->scan.req->ie, in wl1271_scan_send()
159 wl->scan.req->ie_len, NULL, 0, false); in wl1271_scan_send()
165 trigger->timeout = cpu_to_le32(wl->conf.scan.split_scan_timeout); in wl1271_scan_send()
166 ret = wl1271_cmd_send(wl, CMD_TRIGGER_SCAN_TO, trigger, in wl1271_scan_send()
175 ret = wl1271_cmd_send(wl, CMD_SCAN, cmd, sizeof(*cmd), 0); in wl1271_scan_send()
187 int wl12xx_scan_stop(struct wl1271 *wl, struct wl12xx_vif *wlvif) in wl12xx_scan_stop() argument
192 if (WARN_ON(wl->scan.state == WL1271_SCAN_STATE_IDLE)) in wl12xx_scan_stop()
203 ret = wl1271_cmd_send(wl, CMD_STOP_SCAN, cmd, in wl12xx_scan_stop()
214 void wl1271_scan_stm(struct wl1271 *wl, struct wl12xx_vif *wlvif) in wl1271_scan_stm() argument
220 switch (wl->scan.state) { in wl1271_scan_stm()
227 if (wl->scan.req->no_cck) { in wl1271_scan_stm()
232 rate = wl1271_tx_min_rate_get(wl, mask); in wl1271_scan_stm()
233 ret = wl1271_scan_send(wl, wlvif, band, false, rate); in wl1271_scan_stm()
235 wl->scan.state = WL1271_SCAN_STATE_2GHZ_PASSIVE; in wl1271_scan_stm()
236 wl1271_scan_stm(wl, wlvif); in wl1271_scan_stm()
244 if (wl->scan.req->no_cck) { in wl1271_scan_stm()
249 rate = wl1271_tx_min_rate_get(wl, mask); in wl1271_scan_stm()
250 ret = wl1271_scan_send(wl, wlvif, band, true, rate); in wl1271_scan_stm()
252 if (wl->enable_11a) in wl1271_scan_stm()
253 wl->scan.state = WL1271_SCAN_STATE_5GHZ_ACTIVE; in wl1271_scan_stm()
255 wl->scan.state = WL1271_SCAN_STATE_DONE; in wl1271_scan_stm()
256 wl1271_scan_stm(wl, wlvif); in wl1271_scan_stm()
263 rate = wl1271_tx_min_rate_get(wl, wlvif->bitrate_masks[band]); in wl1271_scan_stm()
264 ret = wl1271_scan_send(wl, wlvif, band, false, rate); in wl1271_scan_stm()
266 wl->scan.state = WL1271_SCAN_STATE_5GHZ_PASSIVE; in wl1271_scan_stm()
267 wl1271_scan_stm(wl, wlvif); in wl1271_scan_stm()
274 rate = wl1271_tx_min_rate_get(wl, wlvif->bitrate_masks[band]); in wl1271_scan_stm()
275 ret = wl1271_scan_send(wl, wlvif, band, true, rate); in wl1271_scan_stm()
277 wl->scan.state = WL1271_SCAN_STATE_DONE; in wl1271_scan_stm()
278 wl1271_scan_stm(wl, wlvif); in wl1271_scan_stm()
284 wl->scan.failed = false; in wl1271_scan_stm()
285 cancel_delayed_work(&wl->scan_complete_work); in wl1271_scan_stm()
286 ieee80211_queue_delayed_work(wl->hw, &wl->scan_complete_work, in wl1271_scan_stm()
296 cancel_delayed_work(&wl->scan_complete_work); in wl1271_scan_stm()
297 ieee80211_queue_delayed_work(wl->hw, &wl->scan_complete_work, in wl1271_scan_stm()
317 int wl1271_scan_sched_scan_config(struct wl1271 *wl, in wl1271_scan_sched_scan_config() argument
324 struct conf_sched_scan_settings *c = &wl->conf.sched_scan; in wl1271_scan_sched_scan_config()
352 ret = wlcore_scan_sched_scan_ssid_list(wl, wlvif, req); in wl1271_scan_sched_scan_config()
366 if (!wlcore_set_scan_chan_params(wl, cfg_channels, req->channels, in wl1271_scan_sched_scan_config()
377 ret = wl12xx_cmd_build_probe_req(wl, wlvif, in wl1271_scan_sched_scan_config()
394 ret = wl12xx_cmd_build_probe_req(wl, wlvif, in wl1271_scan_sched_scan_config()
411 ret = wl1271_cmd_send(wl, CMD_CONNECTION_SCAN_CFG, cfg, in wl1271_scan_sched_scan_config()
423 int wl1271_scan_sched_scan_start(struct wl1271 *wl, struct wl12xx_vif *wlvif) in wl1271_scan_sched_scan_start() argument
433 if ((wl->quirks & WLCORE_QUIRK_NO_SCHED_SCAN_WHILE_CONN) && in wl1271_scan_sched_scan_start()
444 ret = wl1271_cmd_send(wl, CMD_START_PERIODIC_SCAN, start, in wl1271_scan_sched_scan_start()
456 int wl12xx_sched_scan_start(struct wl1271 *wl, struct wl12xx_vif *wlvif, in wl12xx_sched_scan_start() argument
462 ret = wl1271_scan_sched_scan_config(wl, wlvif, req, ies); in wl12xx_sched_scan_start()
466 return wl1271_scan_sched_scan_start(wl, wlvif); in wl12xx_sched_scan_start()
469 void wl12xx_scan_sched_scan_stop(struct wl1271 *wl, struct wl12xx_vif *wlvif) in wl12xx_scan_sched_scan_stop() argument
486 ret = wl1271_cmd_send(wl, CMD_STOP_PERIODIC_SCAN, stop, in wl12xx_scan_sched_scan_stop()
497 int wl12xx_scan_start(struct wl1271 *wl, struct wl12xx_vif *wlvif, in wl12xx_scan_start() argument
500 wl1271_scan_stm(wl, wlvif); in wl12xx_scan_start()
504 void wl12xx_scan_completed(struct wl1271 *wl, struct wl12xx_vif *wlvif) in wl12xx_scan_completed() argument
506 wl1271_scan_stm(wl, wlvif); in wl12xx_scan_completed()