Lines Matching refs:wl
13 static int wl1271_get_scan_channels(struct wl1271 *wl, in wl1271_get_scan_channels() argument
18 struct conf_scan_settings *c = &wl->conf.scan; in wl1271_get_scan_channels()
27 if (!test_bit(i, wl->scan.scanned_ch) && in wl1271_get_scan_channels()
69 set_bit(i, wl->scan.scanned_ch); in wl1271_get_scan_channels()
80 static int wl1271_scan_send(struct wl1271 *wl, struct wl12xx_vif *wlvif, in wl1271_scan_send() argument
91 if (!passive && wl->scan.req->n_ssids == 0) in wl1271_scan_send()
101 if (wl->conf.scan.split_scan_timeout) in wl1271_scan_send()
120 cmd->params.n_ch = wl1271_get_scan_channels(wl, wl->scan.req, in wl1271_scan_send()
129 cmd->params.n_probe_reqs = wl->conf.scan.num_probe_reqs; in wl1271_scan_send()
138 if (wl->scan.ssid_len) { in wl1271_scan_send()
139 cmd->params.ssid_len = wl->scan.ssid_len; in wl1271_scan_send()
140 memcpy(cmd->params.ssid, wl->scan.ssid, wl->scan.ssid_len); in wl1271_scan_send()
145 ret = wl12xx_cmd_build_probe_req(wl, wlvif, in wl1271_scan_send()
147 wl->scan.ssid, wl->scan.ssid_len, in wl1271_scan_send()
148 wl->scan.req->ie, in wl1271_scan_send()
149 wl->scan.req->ie_len, NULL, 0, false); in wl1271_scan_send()
155 trigger->timeout = cpu_to_le32(wl->conf.scan.split_scan_timeout); in wl1271_scan_send()
156 ret = wl1271_cmd_send(wl, CMD_TRIGGER_SCAN_TO, trigger, in wl1271_scan_send()
165 ret = wl1271_cmd_send(wl, CMD_SCAN, cmd, sizeof(*cmd), 0); in wl1271_scan_send()
177 int wl12xx_scan_stop(struct wl1271 *wl, struct wl12xx_vif *wlvif) in wl12xx_scan_stop() argument
182 if (WARN_ON(wl->scan.state == WL1271_SCAN_STATE_IDLE)) in wl12xx_scan_stop()
193 ret = wl1271_cmd_send(wl, CMD_STOP_SCAN, cmd, in wl12xx_scan_stop()
204 void wl1271_scan_stm(struct wl1271 *wl, struct wl12xx_vif *wlvif) in wl1271_scan_stm() argument
210 switch (wl->scan.state) { in wl1271_scan_stm()
217 if (wl->scan.req->no_cck) { in wl1271_scan_stm()
222 rate = wl1271_tx_min_rate_get(wl, mask); in wl1271_scan_stm()
223 ret = wl1271_scan_send(wl, wlvif, band, false, rate); in wl1271_scan_stm()
225 wl->scan.state = WL1271_SCAN_STATE_2GHZ_PASSIVE; in wl1271_scan_stm()
226 wl1271_scan_stm(wl, wlvif); in wl1271_scan_stm()
234 if (wl->scan.req->no_cck) { in wl1271_scan_stm()
239 rate = wl1271_tx_min_rate_get(wl, mask); in wl1271_scan_stm()
240 ret = wl1271_scan_send(wl, wlvif, band, true, rate); in wl1271_scan_stm()
242 if (wl->enable_11a) in wl1271_scan_stm()
243 wl->scan.state = WL1271_SCAN_STATE_5GHZ_ACTIVE; in wl1271_scan_stm()
245 wl->scan.state = WL1271_SCAN_STATE_DONE; in wl1271_scan_stm()
246 wl1271_scan_stm(wl, wlvif); in wl1271_scan_stm()
253 rate = wl1271_tx_min_rate_get(wl, wlvif->bitrate_masks[band]); in wl1271_scan_stm()
254 ret = wl1271_scan_send(wl, wlvif, band, false, rate); in wl1271_scan_stm()
256 wl->scan.state = WL1271_SCAN_STATE_5GHZ_PASSIVE; in wl1271_scan_stm()
257 wl1271_scan_stm(wl, wlvif); in wl1271_scan_stm()
264 rate = wl1271_tx_min_rate_get(wl, wlvif->bitrate_masks[band]); in wl1271_scan_stm()
265 ret = wl1271_scan_send(wl, wlvif, band, true, rate); in wl1271_scan_stm()
267 wl->scan.state = WL1271_SCAN_STATE_DONE; in wl1271_scan_stm()
268 wl1271_scan_stm(wl, wlvif); in wl1271_scan_stm()
274 wl->scan.failed = false; in wl1271_scan_stm()
275 cancel_delayed_work(&wl->scan_complete_work); in wl1271_scan_stm()
276 ieee80211_queue_delayed_work(wl->hw, &wl->scan_complete_work, in wl1271_scan_stm()
286 cancel_delayed_work(&wl->scan_complete_work); in wl1271_scan_stm()
287 ieee80211_queue_delayed_work(wl->hw, &wl->scan_complete_work, in wl1271_scan_stm()
307 int wl1271_scan_sched_scan_config(struct wl1271 *wl, in wl1271_scan_sched_scan_config() argument
314 struct conf_sched_scan_settings *c = &wl->conf.sched_scan; in wl1271_scan_sched_scan_config()
343 ret = wlcore_scan_sched_scan_ssid_list(wl, wlvif, req); in wl1271_scan_sched_scan_config()
357 if (!wlcore_set_scan_chan_params(wl, cfg_channels, req->channels, in wl1271_scan_sched_scan_config()
368 ret = wl12xx_cmd_build_probe_req(wl, wlvif, in wl1271_scan_sched_scan_config()
385 ret = wl12xx_cmd_build_probe_req(wl, wlvif, in wl1271_scan_sched_scan_config()
402 ret = wl1271_cmd_send(wl, CMD_CONNECTION_SCAN_CFG, cfg, in wl1271_scan_sched_scan_config()
414 int wl1271_scan_sched_scan_start(struct wl1271 *wl, struct wl12xx_vif *wlvif) in wl1271_scan_sched_scan_start() argument
424 if ((wl->quirks & WLCORE_QUIRK_NO_SCHED_SCAN_WHILE_CONN) && in wl1271_scan_sched_scan_start()
435 ret = wl1271_cmd_send(wl, CMD_START_PERIODIC_SCAN, start, in wl1271_scan_sched_scan_start()
447 int wl12xx_sched_scan_start(struct wl1271 *wl, struct wl12xx_vif *wlvif, in wl12xx_sched_scan_start() argument
453 ret = wl1271_scan_sched_scan_config(wl, wlvif, req, ies); in wl12xx_sched_scan_start()
457 return wl1271_scan_sched_scan_start(wl, wlvif); in wl12xx_sched_scan_start()
460 void wl12xx_scan_sched_scan_stop(struct wl1271 *wl, struct wl12xx_vif *wlvif) in wl12xx_scan_sched_scan_stop() argument
477 ret = wl1271_cmd_send(wl, CMD_STOP_PERIODIC_SCAN, stop, in wl12xx_scan_sched_scan_stop()
488 int wl12xx_scan_start(struct wl1271 *wl, struct wl12xx_vif *wlvif, in wl12xx_scan_start() argument
491 wl1271_scan_stm(wl, wlvif); in wl12xx_scan_start()
495 void wl12xx_scan_completed(struct wl1271 *wl, struct wl12xx_vif *wlvif) in wl12xx_scan_completed() argument
497 wl1271_scan_stm(wl, wlvif); in wl12xx_scan_completed()