Lines Matching refs:wl

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