Lines Matching refs:cmd

43 	struct wl1271_cmd_header *cmd;  in __wlcore_cmd_send()  local
54 if (WARN_ON_ONCE(len < sizeof(*cmd))) in __wlcore_cmd_send()
57 cmd = buf; in __wlcore_cmd_send()
58 cmd->id = cpu_to_le16(id); in __wlcore_cmd_send()
59 cmd->status = 0; in __wlcore_cmd_send()
103 ret = wlcore_read(wl, wl->cmd_box_addr, cmd, res_len, false); in __wlcore_cmd_send()
107 status = le16_to_cpu(cmd->status); in __wlcore_cmd_send()
227 struct wl12xx_cmd_role_enable *cmd; in wl12xx_cmd_role_enable() local
235 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl12xx_cmd_role_enable()
236 if (!cmd) { in wl12xx_cmd_role_enable()
242 cmd->role_id = find_first_zero_bit(wl->roles_map, WL12XX_MAX_ROLES); in wl12xx_cmd_role_enable()
243 if (cmd->role_id >= WL12XX_MAX_ROLES) { in wl12xx_cmd_role_enable()
248 memcpy(cmd->mac_address, addr, ETH_ALEN); in wl12xx_cmd_role_enable()
249 cmd->role_type = role_type; in wl12xx_cmd_role_enable()
251 ret = wl1271_cmd_send(wl, CMD_ROLE_ENABLE, cmd, sizeof(*cmd), 0); in wl12xx_cmd_role_enable()
257 __set_bit(cmd->role_id, wl->roles_map); in wl12xx_cmd_role_enable()
258 *role_id = cmd->role_id; in wl12xx_cmd_role_enable()
261 kfree(cmd); in wl12xx_cmd_role_enable()
269 struct wl12xx_cmd_role_disable *cmd; in wl12xx_cmd_role_disable() local
277 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl12xx_cmd_role_disable()
278 if (!cmd) { in wl12xx_cmd_role_disable()
282 cmd->role_id = *role_id; in wl12xx_cmd_role_disable()
284 ret = wl1271_cmd_send(wl, CMD_ROLE_DISABLE, cmd, sizeof(*cmd), 0); in wl12xx_cmd_role_disable()
294 kfree(cmd); in wl12xx_cmd_role_disable()
423 struct wl12xx_cmd_role_start *cmd; in wl12xx_cmd_role_start_dev() local
426 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl12xx_cmd_role_start_dev()
427 if (!cmd) { in wl12xx_cmd_role_start_dev()
434 cmd->role_id = wlvif->dev_role_id; in wl12xx_cmd_role_start_dev()
436 cmd->band = WLCORE_BAND_5GHZ; in wl12xx_cmd_role_start_dev()
437 cmd->channel = channel; in wl12xx_cmd_role_start_dev()
444 cmd->device.hlid = wlvif->dev_hlid; in wl12xx_cmd_role_start_dev()
445 cmd->device.session = wl->session_ids[wlvif->dev_hlid]; in wl12xx_cmd_role_start_dev()
448 cmd->role_id, cmd->device.hlid, cmd->device.session); in wl12xx_cmd_role_start_dev()
450 ret = wl1271_cmd_send(wl, CMD_ROLE_START, cmd, sizeof(*cmd), 0); in wl12xx_cmd_role_start_dev()
463 kfree(cmd); in wl12xx_cmd_role_start_dev()
472 struct wl12xx_cmd_role_stop *cmd; in wl12xx_cmd_role_stop_dev() local
478 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl12xx_cmd_role_stop_dev()
479 if (!cmd) { in wl12xx_cmd_role_stop_dev()
486 cmd->role_id = wlvif->dev_role_id; in wl12xx_cmd_role_stop_dev()
487 cmd->disc_type = DISCONNECT_IMMEDIATE; in wl12xx_cmd_role_stop_dev()
488 cmd->reason = cpu_to_le16(WLAN_REASON_UNSPECIFIED); in wl12xx_cmd_role_stop_dev()
490 ret = wl1271_cmd_send(wl, CMD_ROLE_STOP, cmd, sizeof(*cmd), 0); in wl12xx_cmd_role_stop_dev()
499 kfree(cmd); in wl12xx_cmd_role_stop_dev()
508 struct wl12xx_cmd_role_start *cmd; in wl12xx_cmd_role_start_sta() local
512 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl12xx_cmd_role_start_sta()
513 if (!cmd) { in wl12xx_cmd_role_start_sta()
520 cmd->role_id = wlvif->role_id; in wl12xx_cmd_role_start_sta()
522 cmd->band = WLCORE_BAND_5GHZ; in wl12xx_cmd_role_start_sta()
523 cmd->channel = wlvif->channel; in wl12xx_cmd_role_start_sta()
524 cmd->sta.basic_rate_set = cpu_to_le32(wlvif->basic_rate_set); in wl12xx_cmd_role_start_sta()
525 cmd->sta.beacon_interval = cpu_to_le16(wlvif->beacon_int); in wl12xx_cmd_role_start_sta()
526 cmd->sta.ssid_type = WL12XX_SSID_TYPE_ANY; in wl12xx_cmd_role_start_sta()
527 cmd->sta.ssid_len = wlvif->ssid_len; in wl12xx_cmd_role_start_sta()
528 memcpy(cmd->sta.ssid, wlvif->ssid, wlvif->ssid_len); in wl12xx_cmd_role_start_sta()
529 memcpy(cmd->sta.bssid, vif->bss_conf.bssid, ETH_ALEN); in wl12xx_cmd_role_start_sta()
536 cmd->sta.local_rates = cpu_to_le32(supported_rates); in wl12xx_cmd_role_start_sta()
538 cmd->channel_type = wlcore_get_native_channel_type(wlvif->channel_type); in wl12xx_cmd_role_start_sta()
545 cmd->sta.hlid = wlvif->sta.hlid; in wl12xx_cmd_role_start_sta()
546 cmd->sta.session = wl->session_ids[wlvif->sta.hlid]; in wl12xx_cmd_role_start_sta()
553 cmd->sta.remote_rates = cpu_to_le32(supported_rates); in wl12xx_cmd_role_start_sta()
557 wlvif->role_id, cmd->sta.hlid, cmd->sta.session, in wl12xx_cmd_role_start_sta()
560 ret = wl1271_cmd_send(wl, CMD_ROLE_START, cmd, sizeof(*cmd), 0); in wl12xx_cmd_role_start_sta()
574 kfree(cmd); in wl12xx_cmd_role_start_sta()
583 struct wl12xx_cmd_role_stop *cmd; in wl12xx_cmd_role_stop_sta() local
589 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl12xx_cmd_role_stop_sta()
590 if (!cmd) { in wl12xx_cmd_role_stop_sta()
597 cmd->role_id = wlvif->role_id; in wl12xx_cmd_role_stop_sta()
598 cmd->disc_type = DISCONNECT_IMMEDIATE; in wl12xx_cmd_role_stop_sta()
599 cmd->reason = cpu_to_le16(WLAN_REASON_UNSPECIFIED); in wl12xx_cmd_role_stop_sta()
601 ret = wl1271_cmd_send(wl, CMD_ROLE_STOP, cmd, sizeof(*cmd), 0); in wl12xx_cmd_role_stop_sta()
610 kfree(cmd); in wl12xx_cmd_role_stop_sta()
618 struct wl12xx_cmd_role_start *cmd; in wl12xx_cmd_role_start_ap() local
636 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl12xx_cmd_role_start_ap()
637 if (!cmd) { in wl12xx_cmd_role_start_ap()
654 cmd->role_id = wlvif->role_id; in wl12xx_cmd_role_start_ap()
655 cmd->ap.aging_period = cpu_to_le16(wl->conf.tx.ap_aging_period); in wl12xx_cmd_role_start_ap()
656 cmd->ap.bss_index = WL1271_AP_BSS_INDEX; in wl12xx_cmd_role_start_ap()
657 cmd->ap.global_hlid = wlvif->ap.global_hlid; in wl12xx_cmd_role_start_ap()
658 cmd->ap.broadcast_hlid = wlvif->ap.bcast_hlid; in wl12xx_cmd_role_start_ap()
659 cmd->ap.global_session_id = wl->session_ids[wlvif->ap.global_hlid]; in wl12xx_cmd_role_start_ap()
660 cmd->ap.bcast_session_id = wl->session_ids[wlvif->ap.bcast_hlid]; in wl12xx_cmd_role_start_ap()
661 cmd->ap.basic_rate_set = cpu_to_le32(wlvif->basic_rate_set); in wl12xx_cmd_role_start_ap()
662 cmd->ap.beacon_interval = cpu_to_le16(wlvif->beacon_int); in wl12xx_cmd_role_start_ap()
663 cmd->ap.dtim_interval = bss_conf->dtim_period; in wl12xx_cmd_role_start_ap()
664 cmd->ap.beacon_expiry = WL1271_AP_DEF_BEACON_EXP; in wl12xx_cmd_role_start_ap()
666 cmd->ap.reset_tsf = 1; /* By default reset AP TSF */ in wl12xx_cmd_role_start_ap()
667 cmd->ap.wmm = wlvif->wmm_enabled; in wl12xx_cmd_role_start_ap()
668 cmd->channel = wlvif->channel; in wl12xx_cmd_role_start_ap()
669 cmd->channel_type = wlcore_get_native_channel_type(wlvif->channel_type); in wl12xx_cmd_role_start_ap()
673 cmd->ap.ssid_type = WL12XX_SSID_TYPE_PUBLIC; in wl12xx_cmd_role_start_ap()
674 cmd->ap.ssid_len = wlvif->ssid_len; in wl12xx_cmd_role_start_ap()
675 memcpy(cmd->ap.ssid, wlvif->ssid, wlvif->ssid_len); in wl12xx_cmd_role_start_ap()
677 cmd->ap.ssid_type = WL12XX_SSID_TYPE_HIDDEN; in wl12xx_cmd_role_start_ap()
678 cmd->ap.ssid_len = vif->cfg.ssid_len; in wl12xx_cmd_role_start_ap()
679 memcpy(cmd->ap.ssid, vif->cfg.ssid, vif->cfg.ssid_len); in wl12xx_cmd_role_start_ap()
690 cmd->ap.local_rates = cpu_to_le32(supported_rates); in wl12xx_cmd_role_start_ap()
694 cmd->band = WLCORE_BAND_2_4GHZ; in wl12xx_cmd_role_start_ap()
697 cmd->band = WLCORE_BAND_5GHZ; in wl12xx_cmd_role_start_ap()
701 cmd->band = WLCORE_BAND_2_4GHZ; in wl12xx_cmd_role_start_ap()
705 ret = wl1271_cmd_send(wl, CMD_ROLE_START, cmd, sizeof(*cmd), 0); in wl12xx_cmd_role_start_ap()
720 kfree(cmd); in wl12xx_cmd_role_start_ap()
728 struct wl12xx_cmd_role_stop *cmd; in wl12xx_cmd_role_stop_ap() local
731 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl12xx_cmd_role_stop_ap()
732 if (!cmd) { in wl12xx_cmd_role_stop_ap()
739 cmd->role_id = wlvif->role_id; in wl12xx_cmd_role_stop_ap()
741 ret = wl1271_cmd_send(wl, CMD_ROLE_STOP, cmd, sizeof(*cmd), 0); in wl12xx_cmd_role_stop_ap()
751 kfree(cmd); in wl12xx_cmd_role_stop_ap()
760 struct wl12xx_cmd_role_start *cmd; in wl12xx_cmd_role_start_ibss() local
764 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl12xx_cmd_role_start_ibss()
765 if (!cmd) { in wl12xx_cmd_role_start_ibss()
772 cmd->role_id = wlvif->role_id; in wl12xx_cmd_role_start_ibss()
774 cmd->band = WLCORE_BAND_5GHZ; in wl12xx_cmd_role_start_ibss()
775 cmd->channel = wlvif->channel; in wl12xx_cmd_role_start_ibss()
776 cmd->ibss.basic_rate_set = cpu_to_le32(wlvif->basic_rate_set); in wl12xx_cmd_role_start_ibss()
777 cmd->ibss.beacon_interval = cpu_to_le16(wlvif->beacon_int); in wl12xx_cmd_role_start_ibss()
778 cmd->ibss.dtim_interval = bss_conf->dtim_period; in wl12xx_cmd_role_start_ibss()
779 cmd->ibss.ssid_type = WL12XX_SSID_TYPE_ANY; in wl12xx_cmd_role_start_ibss()
780 cmd->ibss.ssid_len = wlvif->ssid_len; in wl12xx_cmd_role_start_ibss()
781 memcpy(cmd->ibss.ssid, wlvif->ssid, wlvif->ssid_len); in wl12xx_cmd_role_start_ibss()
782 memcpy(cmd->ibss.bssid, vif->bss_conf.bssid, ETH_ALEN); in wl12xx_cmd_role_start_ibss()
783 cmd->sta.local_rates = cpu_to_le32(wlvif->rate_set); in wl12xx_cmd_role_start_ibss()
790 cmd->ibss.hlid = wlvif->sta.hlid; in wl12xx_cmd_role_start_ibss()
791 cmd->ibss.remote_rates = cpu_to_le32(wlvif->rate_set); in wl12xx_cmd_role_start_ibss()
795 wlvif->role_id, cmd->sta.hlid, cmd->sta.session, in wl12xx_cmd_role_start_ibss()
801 ret = wl1271_cmd_send(wl, CMD_ROLE_START, cmd, sizeof(*cmd), 0); in wl12xx_cmd_role_start_ibss()
814 kfree(cmd); in wl12xx_cmd_role_start_ibss()
931 struct cmd_enabledisable_path *cmd; in wl1271_cmd_data_path() local
937 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl1271_cmd_data_path()
938 if (!cmd) { in wl1271_cmd_data_path()
944 cmd->channel = 1; in wl1271_cmd_data_path()
954 ret = wl1271_cmd_send(wl, cmd_rx, cmd, sizeof(*cmd), 0); in wl1271_cmd_data_path()
957 enable ? "start" : "stop", cmd->channel); in wl1271_cmd_data_path()
962 enable ? "start" : "stop", cmd->channel); in wl1271_cmd_data_path()
964 ret = wl1271_cmd_send(wl, cmd_tx, cmd, sizeof(*cmd), 0); in wl1271_cmd_data_path()
967 enable ? "start" : "stop", cmd->channel); in wl1271_cmd_data_path()
972 enable ? "start" : "stop", cmd->channel); in wl1271_cmd_data_path()
975 kfree(cmd); in wl1271_cmd_data_path()
1014 struct wl1271_cmd_template_set *cmd; in wl1271_cmd_template_set() local
1023 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl1271_cmd_template_set()
1024 if (!cmd) { in wl1271_cmd_template_set()
1030 cmd->role_id = role_id; in wl1271_cmd_template_set()
1031 cmd->len = cpu_to_le16(buf_len); in wl1271_cmd_template_set()
1032 cmd->template_type = template_id; in wl1271_cmd_template_set()
1033 cmd->enabled_rates = cpu_to_le32(rates); in wl1271_cmd_template_set()
1034 cmd->short_retry_limit = wl->conf.tx.tmpl_short_retry_limit; in wl1271_cmd_template_set()
1035 cmd->long_retry_limit = wl->conf.tx.tmpl_long_retry_limit; in wl1271_cmd_template_set()
1036 cmd->index = index; in wl1271_cmd_template_set()
1039 memcpy(cmd->template_data, buf, buf_len); in wl1271_cmd_template_set()
1041 ret = wl1271_cmd_send(wl, CMD_SET_TEMPLATE, cmd, sizeof(*cmd), 0); in wl1271_cmd_template_set()
1048 kfree(cmd); in wl1271_cmd_template_set()
1330 struct wl1271_cmd_set_keys *cmd; in wl12xx_cmd_set_default_wep_key() local
1335 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl12xx_cmd_set_default_wep_key()
1336 if (!cmd) { in wl12xx_cmd_set_default_wep_key()
1341 cmd->hlid = hlid; in wl12xx_cmd_set_default_wep_key()
1342 cmd->key_id = id; in wl12xx_cmd_set_default_wep_key()
1343 cmd->lid_key_type = WEP_DEFAULT_LID_TYPE; in wl12xx_cmd_set_default_wep_key()
1344 cmd->key_action = cpu_to_le16(KEY_SET_ID); in wl12xx_cmd_set_default_wep_key()
1345 cmd->key_type = KEY_WEP; in wl12xx_cmd_set_default_wep_key()
1347 ret = wl1271_cmd_send(wl, CMD_SET_KEYS, cmd, sizeof(*cmd), 0); in wl12xx_cmd_set_default_wep_key()
1354 kfree(cmd); in wl12xx_cmd_set_default_wep_key()
1364 struct wl1271_cmd_set_keys *cmd; in wl1271_cmd_set_sta_key() local
1371 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl1271_cmd_set_sta_key()
1372 if (!cmd) { in wl1271_cmd_set_sta_key()
1377 cmd->hlid = wlvif->sta.hlid; in wl1271_cmd_set_sta_key()
1380 cmd->lid_key_type = WEP_DEFAULT_LID_TYPE; in wl1271_cmd_set_sta_key()
1382 cmd->lid_key_type = BROADCAST_LID_TYPE; in wl1271_cmd_set_sta_key()
1384 cmd->lid_key_type = UNICAST_LID_TYPE; in wl1271_cmd_set_sta_key()
1386 cmd->key_action = cpu_to_le16(action); in wl1271_cmd_set_sta_key()
1387 cmd->key_size = key_size; in wl1271_cmd_set_sta_key()
1388 cmd->key_type = key_type; in wl1271_cmd_set_sta_key()
1390 cmd->ac_seq_num16[0] = cpu_to_le16(tx_seq_16); in wl1271_cmd_set_sta_key()
1391 cmd->ac_seq_num32[0] = cpu_to_le32(tx_seq_32); in wl1271_cmd_set_sta_key()
1393 cmd->key_id = id; in wl1271_cmd_set_sta_key()
1402 memcpy(cmd->key, key, 16); in wl1271_cmd_set_sta_key()
1403 memcpy(cmd->key + 16, key + 24, 8); in wl1271_cmd_set_sta_key()
1404 memcpy(cmd->key + 24, key + 16, 8); in wl1271_cmd_set_sta_key()
1407 memcpy(cmd->key, key, key_size); in wl1271_cmd_set_sta_key()
1410 wl1271_dump(DEBUG_CRYPT, "TARGET KEY: ", cmd, sizeof(*cmd)); in wl1271_cmd_set_sta_key()
1412 ret = wl1271_cmd_send(wl, CMD_SET_KEYS, cmd, sizeof(*cmd), 0); in wl1271_cmd_set_sta_key()
1419 kfree(cmd); in wl1271_cmd_set_sta_key()
1433 struct wl1271_cmd_set_keys *cmd; in wl1271_cmd_set_ap_key() local
1437 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl1271_cmd_set_ap_key()
1438 if (!cmd) in wl1271_cmd_set_ap_key()
1456 cmd->lid_key_type = lid_type; in wl1271_cmd_set_ap_key()
1457 cmd->hlid = hlid; in wl1271_cmd_set_ap_key()
1458 cmd->key_action = cpu_to_le16(action); in wl1271_cmd_set_ap_key()
1459 cmd->key_size = key_size; in wl1271_cmd_set_ap_key()
1460 cmd->key_type = key_type; in wl1271_cmd_set_ap_key()
1461 cmd->key_id = id; in wl1271_cmd_set_ap_key()
1462 cmd->ac_seq_num16[0] = cpu_to_le16(tx_seq_16); in wl1271_cmd_set_ap_key()
1463 cmd->ac_seq_num32[0] = cpu_to_le32(tx_seq_32); in wl1271_cmd_set_ap_key()
1472 memcpy(cmd->key, key, 16); in wl1271_cmd_set_ap_key()
1473 memcpy(cmd->key + 16, key + 24, 8); in wl1271_cmd_set_ap_key()
1474 memcpy(cmd->key + 24, key + 16, 8); in wl1271_cmd_set_ap_key()
1476 memcpy(cmd->key, key, key_size); in wl1271_cmd_set_ap_key()
1479 wl1271_dump(DEBUG_CRYPT, "TARGET AP KEY: ", cmd, sizeof(*cmd)); in wl1271_cmd_set_ap_key()
1481 ret = wl1271_cmd_send(wl, CMD_SET_KEYS, cmd, sizeof(*cmd), 0); in wl1271_cmd_set_ap_key()
1488 kfree(cmd); in wl1271_cmd_set_ap_key()
1495 struct wl12xx_cmd_set_peer_state *cmd; in wl12xx_cmd_set_peer_state() local
1500 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl12xx_cmd_set_peer_state()
1501 if (!cmd) { in wl12xx_cmd_set_peer_state()
1506 cmd->hlid = hlid; in wl12xx_cmd_set_peer_state()
1507 cmd->state = WL1271_CMD_STA_STATE_CONNECTED; in wl12xx_cmd_set_peer_state()
1511 cmd->wmm = wlvif->wmm_enabled; in wl12xx_cmd_set_peer_state()
1513 ret = wl1271_cmd_send(wl, CMD_SET_PEER_STATE, cmd, sizeof(*cmd), 0); in wl12xx_cmd_set_peer_state()
1520 kfree(cmd); in wl12xx_cmd_set_peer_state()
1529 struct wl12xx_cmd_add_peer *cmd; in wl12xx_cmd_add_peer() local
1535 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl12xx_cmd_add_peer()
1536 if (!cmd) { in wl12xx_cmd_add_peer()
1541 memcpy(cmd->addr, sta->addr, ETH_ALEN); in wl12xx_cmd_add_peer()
1542 cmd->bss_index = WL1271_AP_BSS_INDEX; in wl12xx_cmd_add_peer()
1543 cmd->aid = sta->aid; in wl12xx_cmd_add_peer()
1544 cmd->hlid = hlid; in wl12xx_cmd_add_peer()
1545 cmd->sp_len = sta->max_sp; in wl12xx_cmd_add_peer()
1546 cmd->wmm = sta->wme ? 1 : 0; in wl12xx_cmd_add_peer()
1547 cmd->session_id = wl->session_ids[hlid]; in wl12xx_cmd_add_peer()
1548 cmd->role_id = wlvif->role_id; in wl12xx_cmd_add_peer()
1552 cmd->psd_type[NUM_ACCESS_CATEGORIES_COPY-1-i] = in wl12xx_cmd_add_peer()
1555 cmd->psd_type[NUM_ACCESS_CATEGORIES_COPY-1-i] = in wl12xx_cmd_add_peer()
1565 cmd->supported_rates = in wl12xx_cmd_add_peer()
1569 if (!cmd->supported_rates) { in wl12xx_cmd_add_peer()
1573 cmd->supported_rates = cpu_to_le32(wlvif->basic_rate_set); in wl12xx_cmd_add_peer()
1577 cmd->supported_rates, sta->uapsd_queues); in wl12xx_cmd_add_peer()
1579 ret = wl1271_cmd_send(wl, CMD_ADD_PEER, cmd, sizeof(*cmd), 0); in wl12xx_cmd_add_peer()
1586 kfree(cmd); in wl12xx_cmd_add_peer()
1595 struct wl12xx_cmd_remove_peer *cmd; in wl12xx_cmd_remove_peer() local
1601 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl12xx_cmd_remove_peer()
1602 if (!cmd) { in wl12xx_cmd_remove_peer()
1607 cmd->hlid = hlid; in wl12xx_cmd_remove_peer()
1609 cmd->reason_opcode = 0; in wl12xx_cmd_remove_peer()
1610 cmd->send_deauth_flag = 0; in wl12xx_cmd_remove_peer()
1611 cmd->role_id = wlvif->role_id; in wl12xx_cmd_remove_peer()
1613 ret = wl1271_cmd_send(wl, CMD_REMOVE_PEER, cmd, sizeof(*cmd), 0); in wl12xx_cmd_remove_peer()
1632 kfree(cmd); in wl12xx_cmd_remove_peer()
1695 struct wl12xx_cmd_regdomain_dfs_config *cmd = NULL; in wlcore_cmd_regdomain_config_locked() local
1735 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wlcore_cmd_regdomain_config_locked()
1736 if (!cmd) { in wlcore_cmd_regdomain_config_locked()
1741 cmd->ch_bit_map1 = tmp_ch_bitmap[0]; in wlcore_cmd_regdomain_config_locked()
1742 cmd->ch_bit_map2 = tmp_ch_bitmap[1]; in wlcore_cmd_regdomain_config_locked()
1743 cmd->dfs_region = wl->dfs_region; in wlcore_cmd_regdomain_config_locked()
1747 cmd->ch_bit_map1, cmd->ch_bit_map2); in wlcore_cmd_regdomain_config_locked()
1749 ret = wl1271_cmd_send(wl, CMD_DFS_CHANNEL_CONFIG, cmd, sizeof(*cmd), 0); in wlcore_cmd_regdomain_config_locked()
1769 kfree(cmd); in wlcore_cmd_regdomain_config_locked()
1775 struct wl12xx_cmd_config_fwlog *cmd; in wl12xx_cmd_config_fwlog() local
1780 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl12xx_cmd_config_fwlog()
1781 if (!cmd) { in wl12xx_cmd_config_fwlog()
1786 cmd->logger_mode = wl->conf.fwlog.mode; in wl12xx_cmd_config_fwlog()
1787 cmd->log_severity = wl->conf.fwlog.severity; in wl12xx_cmd_config_fwlog()
1788 cmd->timestamp = wl->conf.fwlog.timestamp; in wl12xx_cmd_config_fwlog()
1789 cmd->output = wl->conf.fwlog.output; in wl12xx_cmd_config_fwlog()
1790 cmd->threshold = wl->conf.fwlog.threshold; in wl12xx_cmd_config_fwlog()
1792 ret = wl1271_cmd_send(wl, CMD_CONFIG_FWLOGGER, cmd, sizeof(*cmd), 0); in wl12xx_cmd_config_fwlog()
1799 kfree(cmd); in wl12xx_cmd_config_fwlog()
1807 struct wl12xx_cmd_start_fwlog *cmd; in wl12xx_cmd_start_fwlog() local
1812 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl12xx_cmd_start_fwlog()
1813 if (!cmd) { in wl12xx_cmd_start_fwlog()
1818 ret = wl1271_cmd_send(wl, CMD_START_FWLOGGER, cmd, sizeof(*cmd), 0); in wl12xx_cmd_start_fwlog()
1825 kfree(cmd); in wl12xx_cmd_start_fwlog()
1833 struct wl12xx_cmd_stop_fwlog *cmd; in wl12xx_cmd_stop_fwlog() local
1838 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl12xx_cmd_stop_fwlog()
1839 if (!cmd) { in wl12xx_cmd_stop_fwlog()
1844 ret = wl1271_cmd_send(wl, CMD_STOP_FWLOGGER, cmd, sizeof(*cmd), 0); in wl12xx_cmd_stop_fwlog()
1851 kfree(cmd); in wl12xx_cmd_stop_fwlog()
1860 struct wl12xx_cmd_roc *cmd; in wl12xx_cmd_roc() local
1868 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl12xx_cmd_roc()
1869 if (!cmd) { in wl12xx_cmd_roc()
1874 cmd->role_id = role_id; in wl12xx_cmd_roc()
1875 cmd->channel = channel; in wl12xx_cmd_roc()
1878 cmd->band = WLCORE_BAND_2_4GHZ; in wl12xx_cmd_roc()
1881 cmd->band = WLCORE_BAND_5GHZ; in wl12xx_cmd_roc()
1890 ret = wl1271_cmd_send(wl, CMD_REMAIN_ON_CHANNEL, cmd, sizeof(*cmd), 0); in wl12xx_cmd_roc()
1897 kfree(cmd); in wl12xx_cmd_roc()
1905 struct wl12xx_cmd_croc *cmd; in wl12xx_cmd_croc() local
1910 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl12xx_cmd_croc()
1911 if (!cmd) { in wl12xx_cmd_croc()
1915 cmd->role_id = role_id; in wl12xx_cmd_croc()
1917 ret = wl1271_cmd_send(wl, CMD_CANCEL_REMAIN_ON_CHANNEL, cmd, in wl12xx_cmd_croc()
1918 sizeof(*cmd), 0); in wl12xx_cmd_croc()
1925 kfree(cmd); in wl12xx_cmd_croc()
1974 struct wl12xx_cmd_stop_channel_switch *cmd; in wl12xx_cmd_stop_channel_switch() local
1979 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl12xx_cmd_stop_channel_switch()
1980 if (!cmd) { in wl12xx_cmd_stop_channel_switch()
1985 cmd->role_id = wlvif->role_id; in wl12xx_cmd_stop_channel_switch()
1987 ret = wl1271_cmd_send(wl, CMD_STOP_CHANNEL_SWICTH, cmd, sizeof(*cmd), 0); in wl12xx_cmd_stop_channel_switch()
1994 kfree(cmd); in wl12xx_cmd_stop_channel_switch()
2076 struct wlcore_cmd_generic_cfg *cmd; in wlcore_cmd_generic_cfg() local
2083 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wlcore_cmd_generic_cfg()
2084 if (!cmd) in wlcore_cmd_generic_cfg()
2087 cmd->role_id = wlvif->role_id; in wlcore_cmd_generic_cfg()
2088 cmd->feature = feature; in wlcore_cmd_generic_cfg()
2089 cmd->enable = enable; in wlcore_cmd_generic_cfg()
2090 cmd->value = value; in wlcore_cmd_generic_cfg()
2092 ret = wl1271_cmd_send(wl, CMD_GENERIC_CFG, cmd, sizeof(*cmd), 0); in wlcore_cmd_generic_cfg()
2098 kfree(cmd); in wlcore_cmd_generic_cfg()