Lines Matching refs:cmd

26 static void wl18xx_adjust_channels(struct wl18xx_cmd_scan_params *cmd,  in wl18xx_adjust_channels()  argument
29 memcpy(cmd->passive, cmd_channels->passive, sizeof(cmd->passive)); in wl18xx_adjust_channels()
30 memcpy(cmd->active, cmd_channels->active, sizeof(cmd->active)); in wl18xx_adjust_channels()
31 cmd->dfs = cmd_channels->dfs; in wl18xx_adjust_channels()
32 cmd->passive_active = cmd_channels->passive_active; in wl18xx_adjust_channels()
34 memcpy(cmd->channels_2, cmd_channels->channels_2, in wl18xx_adjust_channels()
35 sizeof(cmd->channels_2)); in wl18xx_adjust_channels()
36 memcpy(cmd->channels_5, cmd_channels->channels_5, in wl18xx_adjust_channels()
37 sizeof(cmd->channels_5)); in wl18xx_adjust_channels()
44 struct wl18xx_cmd_scan_params *cmd; in wl18xx_scan_send() local
48 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl18xx_scan_send()
49 if (!cmd) { in wl18xx_scan_send()
56 cmd->role_id = wlvif->dev_role_id; in wl18xx_scan_send()
58 cmd->role_id = wlvif->role_id; in wl18xx_scan_send()
60 if (WARN_ON(cmd->role_id == WL12XX_INVALID_ROLE_ID)) { in wl18xx_scan_send()
65 cmd->scan_type = SCAN_TYPE_SEARCH; in wl18xx_scan_send()
66 cmd->rssi_threshold = -127; in wl18xx_scan_send()
67 cmd->snr_threshold = 0; in wl18xx_scan_send()
69 cmd->bss_type = SCAN_BSS_TYPE_ANY; in wl18xx_scan_send()
71 cmd->ssid_from_list = 0; in wl18xx_scan_send()
72 cmd->filter = 0; in wl18xx_scan_send()
73 cmd->add_broadcast = 0; in wl18xx_scan_send()
75 cmd->urgency = 0; in wl18xx_scan_send()
76 cmd->protect = 0; in wl18xx_scan_send()
78 cmd->n_probe_reqs = wl->conf.scan.num_probe_reqs; in wl18xx_scan_send()
79 cmd->terminate_after = 0; in wl18xx_scan_send()
93 wl18xx_adjust_channels(cmd, cmd_channels); in wl18xx_scan_send()
99 cmd->total_cycles = 1; in wl18xx_scan_send()
102 cmd->rate = WL18XX_SCAN_RATE_6; in wl18xx_scan_send()
104 cmd->tag = WL1271_SCAN_DEFAULT_TAG; in wl18xx_scan_send()
107 cmd->ssid_len = req->ssids[0].ssid_len; in wl18xx_scan_send()
108 memcpy(cmd->ssid, req->ssids[0].ssid, cmd->ssid_len); in wl18xx_scan_send()
112 if (cmd->active[0]) { in wl18xx_scan_send()
115 cmd->role_id, band, in wl18xx_scan_send()
129 if (cmd->active[1] || cmd->dfs) { in wl18xx_scan_send()
132 cmd->role_id, band, in wl18xx_scan_send()
146 wl1271_dump(DEBUG_SCAN, "SCAN: ", cmd, sizeof(*cmd)); in wl18xx_scan_send()
148 ret = wl1271_cmd_send(wl, CMD_SCAN, cmd, sizeof(*cmd), 0); in wl18xx_scan_send()
156 kfree(cmd); in wl18xx_scan_send()
174 struct wl18xx_cmd_scan_params *cmd; in wl18xx_scan_sched_scan_config() local
186 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl18xx_scan_sched_scan_config()
187 if (!cmd) { in wl18xx_scan_sched_scan_config()
192 cmd->role_id = wlvif->role_id; in wl18xx_scan_sched_scan_config()
194 if (WARN_ON(cmd->role_id == WL12XX_INVALID_ROLE_ID)) { in wl18xx_scan_sched_scan_config()
199 cmd->scan_type = SCAN_TYPE_PERIODIC; in wl18xx_scan_sched_scan_config()
200 cmd->rssi_threshold = c->rssi_threshold; in wl18xx_scan_sched_scan_config()
201 cmd->snr_threshold = c->snr_threshold; in wl18xx_scan_sched_scan_config()
204 cmd->bss_type = SCAN_BSS_TYPE_ANY; in wl18xx_scan_sched_scan_config()
206 cmd->ssid_from_list = 1; in wl18xx_scan_sched_scan_config()
208 cmd->filter = 1; in wl18xx_scan_sched_scan_config()
209 cmd->add_broadcast = 0; in wl18xx_scan_sched_scan_config()
211 cmd->urgency = 0; in wl18xx_scan_sched_scan_config()
212 cmd->protect = 0; in wl18xx_scan_sched_scan_config()
214 cmd->n_probe_reqs = c->num_probe_reqs; in wl18xx_scan_sched_scan_config()
216 cmd->terminate_after = 0; in wl18xx_scan_sched_scan_config()
228 wl18xx_adjust_channels(cmd, cmd_channels); in wl18xx_scan_sched_scan_config()
232 cmd->short_cycles_msec = in wl18xx_scan_sched_scan_config()
234 cmd->long_cycles_msec = cpu_to_le16(c->long_interval); in wl18xx_scan_sched_scan_config()
235 cmd->short_cycles_count = c->num_short_intervals; in wl18xx_scan_sched_scan_config()
237 cmd->short_cycles_msec = 0; in wl18xx_scan_sched_scan_config()
238 cmd->long_cycles_msec = in wl18xx_scan_sched_scan_config()
240 cmd->short_cycles_count = 0; in wl18xx_scan_sched_scan_config()
243 le16_to_cpu(cmd->short_cycles_msec), in wl18xx_scan_sched_scan_config()
244 le16_to_cpu(cmd->long_cycles_msec), in wl18xx_scan_sched_scan_config()
245 cmd->short_cycles_count); in wl18xx_scan_sched_scan_config()
247 cmd->total_cycles = 0; in wl18xx_scan_sched_scan_config()
249 cmd->tag = WL1271_SCAN_DEFAULT_TAG; in wl18xx_scan_sched_scan_config()
252 cmd->report_threshold = 1; in wl18xx_scan_sched_scan_config()
253 cmd->terminate_on_report = 0; in wl18xx_scan_sched_scan_config()
255 if (cmd->active[0]) { in wl18xx_scan_sched_scan_config()
258 cmd->role_id, band, in wl18xx_scan_sched_scan_config()
272 if (cmd->active[1] || cmd->dfs) { in wl18xx_scan_sched_scan_config()
275 cmd->role_id, band, in wl18xx_scan_sched_scan_config()
289 wl1271_dump(DEBUG_SCAN, "SCAN: ", cmd, sizeof(*cmd)); in wl18xx_scan_sched_scan_config()
291 ret = wl1271_cmd_send(wl, CMD_SCAN, cmd, sizeof(*cmd), 0); in wl18xx_scan_sched_scan_config()
299 kfree(cmd); in wl18xx_scan_sched_scan_config()