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()
186 wl1251_warning("cmd vbm len is %d B, truncating to %d", in wl1251_cmd_vbm()
209 struct cmd_enabledisable_path *cmd; in wl1251_cmd_data_path_rx() local
213 wl1251_debug(DEBUG_CMD, "cmd data path"); in wl1251_cmd_data_path_rx()
215 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl1251_cmd_data_path_rx()
216 if (!cmd) { in wl1251_cmd_data_path_rx()
221 cmd->channel = channel; in wl1251_cmd_data_path_rx()
228 ret = wl1251_cmd_send(wl, cmd_rx, cmd, sizeof(*cmd)); in wl1251_cmd_data_path_rx()
230 wl1251_error("rx %s cmd for channel %d failed", in wl1251_cmd_data_path_rx()
235 wl1251_debug(DEBUG_BOOT, "rx %s cmd channel %d", in wl1251_cmd_data_path_rx()
239 kfree(cmd); in wl1251_cmd_data_path_rx()
245 struct cmd_enabledisable_path *cmd; in wl1251_cmd_data_path_tx() local
249 wl1251_debug(DEBUG_CMD, "cmd data path"); in wl1251_cmd_data_path_tx()
251 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl1251_cmd_data_path_tx()
252 if (!cmd) in wl1251_cmd_data_path_tx()
255 cmd->channel = channel; in wl1251_cmd_data_path_tx()
262 ret = wl1251_cmd_send(wl, cmd_tx, cmd, sizeof(*cmd)); in wl1251_cmd_data_path_tx()
264 wl1251_error("tx %s cmd for channel %d failed", in wl1251_cmd_data_path_tx()
267 wl1251_debug(DEBUG_BOOT, "tx %s cmd channel %d", in wl1251_cmd_data_path_tx()
270 kfree(cmd); in wl1251_cmd_data_path_tx()
287 wl1251_debug(DEBUG_CMD, "cmd join%s ch %d %d/%d", in wl1251_cmd_join()
310 wl1251_error("failed to initiate cmd join"); in wl1251_cmd_join()
324 wl1251_debug(DEBUG_CMD, "cmd set ps mode"); in wl1251_cmd_ps_mode()
341 wl1251_error("cmd set_ps_mode failed"); in wl1251_cmd_ps_mode()
353 struct cmd_read_write_memory *cmd; in wl1251_cmd_read_memory() local
356 wl1251_debug(DEBUG_CMD, "cmd read memory"); in wl1251_cmd_read_memory()
358 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl1251_cmd_read_memory()
359 if (!cmd) { in wl1251_cmd_read_memory()
367 cmd->addr = addr; in wl1251_cmd_read_memory()
368 cmd->size = len; in wl1251_cmd_read_memory()
370 ret = wl1251_cmd_send(wl, CMD_READ_MEMORY, cmd, sizeof(*cmd)); in wl1251_cmd_read_memory()
377 wl1251_mem_read(wl, wl->cmd_box_addr, cmd, sizeof(*cmd)); in wl1251_cmd_read_memory()
379 if (cmd->header.status != CMD_STATUS_SUCCESS) in wl1251_cmd_read_memory()
381 cmd->header.status); in wl1251_cmd_read_memory()
383 memcpy(answer, cmd->value, len); in wl1251_cmd_read_memory()
386 kfree(cmd); in wl1251_cmd_read_memory()
393 struct wl1251_cmd_packet_template *cmd; in wl1251_cmd_template_set() local
397 wl1251_debug(DEBUG_CMD, "cmd template %d", cmd_id); in wl1251_cmd_template_set()
401 cmd_len = ALIGN(sizeof(*cmd) + buf_len, 4); in wl1251_cmd_template_set()
403 cmd = kzalloc(cmd_len, GFP_KERNEL); in wl1251_cmd_template_set()
404 if (!cmd) { in wl1251_cmd_template_set()
409 cmd->size = cpu_to_le16(buf_len); in wl1251_cmd_template_set()
412 memcpy(cmd->data, buf, buf_len); in wl1251_cmd_template_set()
414 ret = wl1251_cmd_send(wl, cmd_id, cmd, cmd_len); in wl1251_cmd_template_set()
416 wl1251_warning("cmd set_template failed: %d", ret); in wl1251_cmd_template_set()
421 kfree(cmd); in wl1251_cmd_template_set()
429 struct wl1251_cmd_scan *cmd; in wl1251_cmd_scan() local
432 wl1251_debug(DEBUG_CMD, "cmd scan channels %d", n_channels); in wl1251_cmd_scan()
436 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl1251_cmd_scan()
437 if (!cmd) in wl1251_cmd_scan()
440 cmd->params.rx_config_options = cpu_to_le32(CFG_RX_ALL_GOOD); in wl1251_cmd_scan()
441 cmd->params.rx_filter_options = cpu_to_le32(CFG_RX_PRSP_EN | in wl1251_cmd_scan()
444 cmd->params.scan_options = 0; in wl1251_cmd_scan()
451 cmd->params.scan_options |= cpu_to_le16(WL1251_SCAN_OPT_PRIORITY_HIGH); in wl1251_cmd_scan()
452 cmd->params.num_channels = n_channels; in wl1251_cmd_scan()
453 cmd->params.num_probe_requests = n_probes; in wl1251_cmd_scan()
454 cmd->params.tx_rate = cpu_to_le16(1 << 1); /* 2 Mbps */ in wl1251_cmd_scan()
455 cmd->params.tid_trigger = 0; in wl1251_cmd_scan()
458 cmd->channels[i].min_duration = in wl1251_cmd_scan()
460 cmd->channels[i].max_duration = in wl1251_cmd_scan()
462 memset(&cmd->channels[i].bssid_lsb, 0xff, 4); in wl1251_cmd_scan()
463 memset(&cmd->channels[i].bssid_msb, 0xff, 2); in wl1251_cmd_scan()
464 cmd->channels[i].early_termination = 0; in wl1251_cmd_scan()
465 cmd->channels[i].tx_power_att = 0; in wl1251_cmd_scan()
466 cmd->channels[i].channel = channels[i]->hw_value; in wl1251_cmd_scan()
472 cmd->params.ssid_len = len; in wl1251_cmd_scan()
473 memcpy(cmd->params.ssid, ssid, len); in wl1251_cmd_scan()
476 ret = wl1251_cmd_send(wl, CMD_SCAN, cmd, sizeof(*cmd)); in wl1251_cmd_scan()
478 wl1251_error("cmd scan failed: %d", ret); in wl1251_cmd_scan()
482 wl1251_mem_read(wl, wl->cmd_box_addr, cmd, sizeof(*cmd)); in wl1251_cmd_scan()
484 if (cmd->header.status != CMD_STATUS_SUCCESS) { in wl1251_cmd_scan()
485 wl1251_error("cmd scan status wasn't success: %d", in wl1251_cmd_scan()
486 cmd->header.status); in wl1251_cmd_scan()
492 kfree(cmd); in wl1251_cmd_scan()
498 struct wl1251_cmd_trigger_scan_to *cmd; in wl1251_cmd_trigger_scan_to() local
501 wl1251_debug(DEBUG_CMD, "cmd trigger scan to"); in wl1251_cmd_trigger_scan_to()
503 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl1251_cmd_trigger_scan_to()
504 if (!cmd) in wl1251_cmd_trigger_scan_to()
507 cmd->timeout = timeout; in wl1251_cmd_trigger_scan_to()
509 ret = wl1251_cmd_send(wl, CMD_TRIGGER_SCAN_TO, cmd, sizeof(*cmd)); in wl1251_cmd_trigger_scan_to()
511 wl1251_error("cmd trigger scan to failed: %d", ret); in wl1251_cmd_trigger_scan_to()
516 kfree(cmd); in wl1251_cmd_trigger_scan_to()