Lines Matching full:cmd

2 #include "cmd.h"
24 struct wl1251_cmd_header *cmd; in wl1251_cmd_send() local
29 cmd = buf; in wl1251_cmd_send()
30 cmd->id = id; in wl1251_cmd_send()
31 cmd->status = 0; in wl1251_cmd_send()
74 wl1251_debug(DEBUG_CMD, "cmd interrogate"); in wl1251_cmd_interrogate()
91 if (acx->cmd.status != CMD_STATUS_SUCCESS) in wl1251_cmd_interrogate()
93 acx->cmd.status); in wl1251_cmd_interrogate()
112 wl1251_debug(DEBUG_CMD, "cmd configure"); in wl1251_cmd_configure()
134 wl1251_debug(DEBUG_CMD, "cmd vbm"); in wl1251_cmd_vbm()
143 wl1251_warning("cmd vbm len is %d B, truncating to %d", in wl1251_cmd_vbm()
166 struct cmd_enabledisable_path *cmd; in wl1251_cmd_data_path_rx() local
170 wl1251_debug(DEBUG_CMD, "cmd data path"); in wl1251_cmd_data_path_rx()
172 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl1251_cmd_data_path_rx()
173 if (!cmd) in wl1251_cmd_data_path_rx()
176 cmd->channel = channel; in wl1251_cmd_data_path_rx()
183 ret = wl1251_cmd_send(wl, cmd_rx, cmd, sizeof(*cmd)); in wl1251_cmd_data_path_rx()
185 wl1251_error("rx %s cmd for channel %d failed", in wl1251_cmd_data_path_rx()
190 wl1251_debug(DEBUG_BOOT, "rx %s cmd channel %d", in wl1251_cmd_data_path_rx()
194 kfree(cmd); in wl1251_cmd_data_path_rx()
200 struct cmd_enabledisable_path *cmd; in wl1251_cmd_data_path_tx() local
204 wl1251_debug(DEBUG_CMD, "cmd data path"); in wl1251_cmd_data_path_tx()
206 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl1251_cmd_data_path_tx()
207 if (!cmd) in wl1251_cmd_data_path_tx()
210 cmd->channel = channel; in wl1251_cmd_data_path_tx()
217 ret = wl1251_cmd_send(wl, cmd_tx, cmd, sizeof(*cmd)); in wl1251_cmd_data_path_tx()
219 wl1251_error("tx %s cmd for channel %d failed", in wl1251_cmd_data_path_tx()
222 wl1251_debug(DEBUG_BOOT, "tx %s cmd channel %d", in wl1251_cmd_data_path_tx()
225 kfree(cmd); in wl1251_cmd_data_path_tx()
240 wl1251_debug(DEBUG_CMD, "cmd join%s ch %d %d/%d", in wl1251_cmd_join()
263 wl1251_error("failed to initiate cmd join"); in wl1251_cmd_join()
277 wl1251_debug(DEBUG_CMD, "cmd set ps mode"); in wl1251_cmd_ps_mode()
292 wl1251_error("cmd set_ps_mode failed"); in wl1251_cmd_ps_mode()
304 struct wl1251_cmd_packet_template *cmd; in wl1251_cmd_template_set() local
308 wl1251_debug(DEBUG_CMD, "cmd template %d", cmd_id); in wl1251_cmd_template_set()
312 cmd_len = ALIGN(sizeof(*cmd) + buf_len, 4); in wl1251_cmd_template_set()
314 cmd = kzalloc(cmd_len, GFP_KERNEL); in wl1251_cmd_template_set()
315 if (!cmd) in wl1251_cmd_template_set()
318 cmd->size = cpu_to_le16(buf_len); in wl1251_cmd_template_set()
321 memcpy(cmd->data, buf, buf_len); in wl1251_cmd_template_set()
323 ret = wl1251_cmd_send(wl, cmd_id, cmd, cmd_len); in wl1251_cmd_template_set()
325 wl1251_warning("cmd set_template failed: %d", ret); in wl1251_cmd_template_set()
330 kfree(cmd); in wl1251_cmd_template_set()
338 struct wl1251_cmd_scan *cmd; in wl1251_cmd_scan() local
341 wl1251_debug(DEBUG_CMD, "cmd scan channels %d", n_channels); in wl1251_cmd_scan()
345 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl1251_cmd_scan()
346 if (!cmd) in wl1251_cmd_scan()
349 cmd->params.rx_config_options = cpu_to_le32(CFG_RX_ALL_GOOD); in wl1251_cmd_scan()
350 cmd->params.rx_filter_options = cpu_to_le32(CFG_RX_PRSP_EN | in wl1251_cmd_scan()
353 cmd->params.scan_options = 0; in wl1251_cmd_scan()
360 cmd->params.scan_options |= cpu_to_le16(WL1251_SCAN_OPT_PRIORITY_HIGH); in wl1251_cmd_scan()
361 cmd->params.num_channels = n_channels; in wl1251_cmd_scan()
362 cmd->params.num_probe_requests = n_probes; in wl1251_cmd_scan()
363 cmd->params.tx_rate = cpu_to_le16(1 << 1); /* 2 Mbps */ in wl1251_cmd_scan()
364 cmd->params.tid_trigger = 0; in wl1251_cmd_scan()
367 cmd->channels[i].min_duration = in wl1251_cmd_scan()
369 cmd->channels[i].max_duration = in wl1251_cmd_scan()
371 memset(&cmd->channels[i].bssid_lsb, 0xff, 4); in wl1251_cmd_scan()
372 memset(&cmd->channels[i].bssid_msb, 0xff, 2); in wl1251_cmd_scan()
373 cmd->channels[i].early_termination = 0; in wl1251_cmd_scan()
374 cmd->channels[i].tx_power_att = 0; in wl1251_cmd_scan()
375 cmd->channels[i].channel = channels[i]->hw_value; in wl1251_cmd_scan()
381 cmd->params.ssid_len = len; in wl1251_cmd_scan()
382 memcpy(cmd->params.ssid, ssid, len); in wl1251_cmd_scan()
385 ret = wl1251_cmd_send(wl, CMD_SCAN, cmd, sizeof(*cmd)); in wl1251_cmd_scan()
387 wl1251_error("cmd scan failed: %d", ret); in wl1251_cmd_scan()
391 wl1251_mem_read(wl, wl->cmd_box_addr, cmd, sizeof(*cmd)); in wl1251_cmd_scan()
393 if (cmd->header.status != CMD_STATUS_SUCCESS) { in wl1251_cmd_scan()
394 wl1251_error("cmd scan status wasn't success: %d", in wl1251_cmd_scan()
395 cmd->header.status); in wl1251_cmd_scan()
401 kfree(cmd); in wl1251_cmd_scan()
407 struct wl1251_cmd_trigger_scan_to *cmd; in wl1251_cmd_trigger_scan_to() local
410 wl1251_debug(DEBUG_CMD, "cmd trigger scan to"); in wl1251_cmd_trigger_scan_to()
412 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl1251_cmd_trigger_scan_to()
413 if (!cmd) in wl1251_cmd_trigger_scan_to()
416 cmd->timeout = timeout; in wl1251_cmd_trigger_scan_to()
418 ret = wl1251_cmd_send(wl, CMD_TRIGGER_SCAN_TO, cmd, sizeof(*cmd)); in wl1251_cmd_trigger_scan_to()
420 wl1251_error("cmd trigger scan to failed: %d", ret); in wl1251_cmd_trigger_scan_to()
425 kfree(cmd); in wl1251_cmd_trigger_scan_to()