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()
73 wl1251_debug(DEBUG_CMD, "cmd test"); in wl1251_cmd_test()
115 wl1251_debug(DEBUG_CMD, "cmd interrogate"); in wl1251_cmd_interrogate()
132 if (acx->cmd.status != CMD_STATUS_SUCCESS) in wl1251_cmd_interrogate()
134 acx->cmd.status); in wl1251_cmd_interrogate()
153 wl1251_debug(DEBUG_CMD, "cmd configure"); in wl1251_cmd_configure()
175 wl1251_debug(DEBUG_CMD, "cmd vbm"); in wl1251_cmd_vbm()
184 wl1251_warning("cmd vbm len is %d B, truncating to %d", in wl1251_cmd_vbm()
207 struct cmd_enabledisable_path *cmd; in wl1251_cmd_data_path_rx() local
211 wl1251_debug(DEBUG_CMD, "cmd data path"); in wl1251_cmd_data_path_rx()
213 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl1251_cmd_data_path_rx()
214 if (!cmd) in wl1251_cmd_data_path_rx()
217 cmd->channel = channel; in wl1251_cmd_data_path_rx()
224 ret = wl1251_cmd_send(wl, cmd_rx, cmd, sizeof(*cmd)); in wl1251_cmd_data_path_rx()
226 wl1251_error("rx %s cmd for channel %d failed", in wl1251_cmd_data_path_rx()
231 wl1251_debug(DEBUG_BOOT, "rx %s cmd channel %d", in wl1251_cmd_data_path_rx()
235 kfree(cmd); in wl1251_cmd_data_path_rx()
241 struct cmd_enabledisable_path *cmd; in wl1251_cmd_data_path_tx() local
245 wl1251_debug(DEBUG_CMD, "cmd data path"); in wl1251_cmd_data_path_tx()
247 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl1251_cmd_data_path_tx()
248 if (!cmd) in wl1251_cmd_data_path_tx()
251 cmd->channel = channel; in wl1251_cmd_data_path_tx()
258 ret = wl1251_cmd_send(wl, cmd_tx, cmd, sizeof(*cmd)); in wl1251_cmd_data_path_tx()
260 wl1251_error("tx %s cmd for channel %d failed", in wl1251_cmd_data_path_tx()
263 wl1251_debug(DEBUG_BOOT, "tx %s cmd channel %d", in wl1251_cmd_data_path_tx()
266 kfree(cmd); in wl1251_cmd_data_path_tx()
281 wl1251_debug(DEBUG_CMD, "cmd join%s ch %d %d/%d", in wl1251_cmd_join()
304 wl1251_error("failed to initiate cmd join"); in wl1251_cmd_join()
318 wl1251_debug(DEBUG_CMD, "cmd set ps mode"); in wl1251_cmd_ps_mode()
333 wl1251_error("cmd set_ps_mode failed"); in wl1251_cmd_ps_mode()
345 struct cmd_read_write_memory *cmd; in wl1251_cmd_read_memory() local
348 wl1251_debug(DEBUG_CMD, "cmd read memory"); in wl1251_cmd_read_memory()
350 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl1251_cmd_read_memory()
351 if (!cmd) in wl1251_cmd_read_memory()
357 cmd->addr = addr; in wl1251_cmd_read_memory()
358 cmd->size = len; in wl1251_cmd_read_memory()
360 ret = wl1251_cmd_send(wl, CMD_READ_MEMORY, cmd, sizeof(*cmd)); in wl1251_cmd_read_memory()
367 wl1251_mem_read(wl, wl->cmd_box_addr, cmd, sizeof(*cmd)); in wl1251_cmd_read_memory()
369 if (cmd->header.status != CMD_STATUS_SUCCESS) in wl1251_cmd_read_memory()
371 cmd->header.status); in wl1251_cmd_read_memory()
373 memcpy(answer, cmd->value, len); in wl1251_cmd_read_memory()
376 kfree(cmd); in wl1251_cmd_read_memory()
383 struct wl1251_cmd_packet_template *cmd; in wl1251_cmd_template_set() local
387 wl1251_debug(DEBUG_CMD, "cmd template %d", cmd_id); in wl1251_cmd_template_set()
391 cmd_len = ALIGN(sizeof(*cmd) + buf_len, 4); in wl1251_cmd_template_set()
393 cmd = kzalloc(cmd_len, GFP_KERNEL); in wl1251_cmd_template_set()
394 if (!cmd) in wl1251_cmd_template_set()
397 cmd->size = cpu_to_le16(buf_len); in wl1251_cmd_template_set()
400 memcpy(cmd->data, buf, buf_len); in wl1251_cmd_template_set()
402 ret = wl1251_cmd_send(wl, cmd_id, cmd, cmd_len); in wl1251_cmd_template_set()
404 wl1251_warning("cmd set_template failed: %d", ret); in wl1251_cmd_template_set()
409 kfree(cmd); in wl1251_cmd_template_set()
417 struct wl1251_cmd_scan *cmd; in wl1251_cmd_scan() local
420 wl1251_debug(DEBUG_CMD, "cmd scan channels %d", n_channels); in wl1251_cmd_scan()
424 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl1251_cmd_scan()
425 if (!cmd) in wl1251_cmd_scan()
428 cmd->params.rx_config_options = cpu_to_le32(CFG_RX_ALL_GOOD); in wl1251_cmd_scan()
429 cmd->params.rx_filter_options = cpu_to_le32(CFG_RX_PRSP_EN | in wl1251_cmd_scan()
432 cmd->params.scan_options = 0; in wl1251_cmd_scan()
439 cmd->params.scan_options |= cpu_to_le16(WL1251_SCAN_OPT_PRIORITY_HIGH); in wl1251_cmd_scan()
440 cmd->params.num_channels = n_channels; in wl1251_cmd_scan()
441 cmd->params.num_probe_requests = n_probes; in wl1251_cmd_scan()
442 cmd->params.tx_rate = cpu_to_le16(1 << 1); /* 2 Mbps */ in wl1251_cmd_scan()
443 cmd->params.tid_trigger = 0; in wl1251_cmd_scan()
446 cmd->channels[i].min_duration = in wl1251_cmd_scan()
448 cmd->channels[i].max_duration = in wl1251_cmd_scan()
450 memset(&cmd->channels[i].bssid_lsb, 0xff, 4); in wl1251_cmd_scan()
451 memset(&cmd->channels[i].bssid_msb, 0xff, 2); in wl1251_cmd_scan()
452 cmd->channels[i].early_termination = 0; in wl1251_cmd_scan()
453 cmd->channels[i].tx_power_att = 0; in wl1251_cmd_scan()
454 cmd->channels[i].channel = channels[i]->hw_value; in wl1251_cmd_scan()
460 cmd->params.ssid_len = len; in wl1251_cmd_scan()
461 memcpy(cmd->params.ssid, ssid, len); in wl1251_cmd_scan()
464 ret = wl1251_cmd_send(wl, CMD_SCAN, cmd, sizeof(*cmd)); in wl1251_cmd_scan()
466 wl1251_error("cmd scan failed: %d", ret); in wl1251_cmd_scan()
470 wl1251_mem_read(wl, wl->cmd_box_addr, cmd, sizeof(*cmd)); in wl1251_cmd_scan()
472 if (cmd->header.status != CMD_STATUS_SUCCESS) { in wl1251_cmd_scan()
473 wl1251_error("cmd scan status wasn't success: %d", in wl1251_cmd_scan()
474 cmd->header.status); in wl1251_cmd_scan()
480 kfree(cmd); in wl1251_cmd_scan()
486 struct wl1251_cmd_trigger_scan_to *cmd; in wl1251_cmd_trigger_scan_to() local
489 wl1251_debug(DEBUG_CMD, "cmd trigger scan to"); in wl1251_cmd_trigger_scan_to()
491 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl1251_cmd_trigger_scan_to()
492 if (!cmd) in wl1251_cmd_trigger_scan_to()
495 cmd->timeout = timeout; in wl1251_cmd_trigger_scan_to()
497 ret = wl1251_cmd_send(wl, CMD_TRIGGER_SCAN_TO, cmd, sizeof(*cmd)); in wl1251_cmd_trigger_scan_to()
499 wl1251_error("cmd trigger scan to failed: %d", ret); in wl1251_cmd_trigger_scan_to()
504 kfree(cmd); in wl1251_cmd_trigger_scan_to()