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()
432 struct wl12xx_cmd_role_start *cmd; in wl12xx_cmd_role_start_dev() local
435 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl12xx_cmd_role_start_dev()
436 if (!cmd) { in wl12xx_cmd_role_start_dev()
443 cmd->role_id = wlvif->dev_role_id; in wl12xx_cmd_role_start_dev()
445 cmd->band = WLCORE_BAND_5GHZ; in wl12xx_cmd_role_start_dev()
446 cmd->channel = channel; in wl12xx_cmd_role_start_dev()
453 cmd->device.hlid = wlvif->dev_hlid; in wl12xx_cmd_role_start_dev()
454 cmd->device.session = wl->session_ids[wlvif->dev_hlid]; in wl12xx_cmd_role_start_dev()
457 cmd->role_id, cmd->device.hlid, cmd->device.session); in wl12xx_cmd_role_start_dev()
459 ret = wl1271_cmd_send(wl, CMD_ROLE_START, cmd, sizeof(*cmd), 0); in wl12xx_cmd_role_start_dev()
472 kfree(cmd); in wl12xx_cmd_role_start_dev()
481 struct wl12xx_cmd_role_stop *cmd; in wl12xx_cmd_role_stop_dev() local
487 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl12xx_cmd_role_stop_dev()
488 if (!cmd) { in wl12xx_cmd_role_stop_dev()
495 cmd->role_id = wlvif->dev_role_id; in wl12xx_cmd_role_stop_dev()
496 cmd->disc_type = DISCONNECT_IMMEDIATE; in wl12xx_cmd_role_stop_dev()
497 cmd->reason = cpu_to_le16(WLAN_REASON_UNSPECIFIED); in wl12xx_cmd_role_stop_dev()
499 ret = wl1271_cmd_send(wl, CMD_ROLE_STOP, cmd, sizeof(*cmd), 0); in wl12xx_cmd_role_stop_dev()
508 kfree(cmd); in wl12xx_cmd_role_stop_dev()
517 struct wl12xx_cmd_role_start *cmd; in wl12xx_cmd_role_start_sta() local
521 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl12xx_cmd_role_start_sta()
522 if (!cmd) { in wl12xx_cmd_role_start_sta()
529 cmd->role_id = wlvif->role_id; in wl12xx_cmd_role_start_sta()
531 cmd->band = WLCORE_BAND_5GHZ; in wl12xx_cmd_role_start_sta()
532 cmd->channel = wlvif->channel; in wl12xx_cmd_role_start_sta()
533 cmd->sta.basic_rate_set = cpu_to_le32(wlvif->basic_rate_set); in wl12xx_cmd_role_start_sta()
534 cmd->sta.beacon_interval = cpu_to_le16(wlvif->beacon_int); in wl12xx_cmd_role_start_sta()
535 cmd->sta.ssid_type = WL12XX_SSID_TYPE_ANY; in wl12xx_cmd_role_start_sta()
536 cmd->sta.ssid_len = wlvif->ssid_len; in wl12xx_cmd_role_start_sta()
537 memcpy(cmd->sta.ssid, wlvif->ssid, wlvif->ssid_len); in wl12xx_cmd_role_start_sta()
538 memcpy(cmd->sta.bssid, vif->bss_conf.bssid, ETH_ALEN); in wl12xx_cmd_role_start_sta()
545 cmd->sta.local_rates = cpu_to_le32(supported_rates); in wl12xx_cmd_role_start_sta()
547 cmd->channel_type = wlcore_get_native_channel_type(wlvif->channel_type); in wl12xx_cmd_role_start_sta()
554 cmd->sta.hlid = wlvif->sta.hlid; in wl12xx_cmd_role_start_sta()
555 cmd->sta.session = wl->session_ids[wlvif->sta.hlid]; in wl12xx_cmd_role_start_sta()
562 cmd->sta.remote_rates = cpu_to_le32(supported_rates); in wl12xx_cmd_role_start_sta()
566 wlvif->role_id, cmd->sta.hlid, cmd->sta.session, in wl12xx_cmd_role_start_sta()
569 ret = wl1271_cmd_send(wl, CMD_ROLE_START, cmd, sizeof(*cmd), 0); in wl12xx_cmd_role_start_sta()
583 kfree(cmd); in wl12xx_cmd_role_start_sta()
592 struct wl12xx_cmd_role_stop *cmd; in wl12xx_cmd_role_stop_sta() local
598 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl12xx_cmd_role_stop_sta()
599 if (!cmd) { in wl12xx_cmd_role_stop_sta()
606 cmd->role_id = wlvif->role_id; in wl12xx_cmd_role_stop_sta()
607 cmd->disc_type = DISCONNECT_IMMEDIATE; in wl12xx_cmd_role_stop_sta()
608 cmd->reason = cpu_to_le16(WLAN_REASON_UNSPECIFIED); in wl12xx_cmd_role_stop_sta()
610 ret = wl1271_cmd_send(wl, CMD_ROLE_STOP, cmd, sizeof(*cmd), 0); in wl12xx_cmd_role_stop_sta()
619 kfree(cmd); in wl12xx_cmd_role_stop_sta()
627 struct wl12xx_cmd_role_start *cmd; in wl12xx_cmd_role_start_ap() local
645 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl12xx_cmd_role_start_ap()
646 if (!cmd) { in wl12xx_cmd_role_start_ap()
663 cmd->role_id = wlvif->role_id; in wl12xx_cmd_role_start_ap()
664 cmd->ap.aging_period = cpu_to_le16(wl->conf.tx.ap_aging_period); in wl12xx_cmd_role_start_ap()
665 cmd->ap.bss_index = WL1271_AP_BSS_INDEX; in wl12xx_cmd_role_start_ap()
666 cmd->ap.global_hlid = wlvif->ap.global_hlid; in wl12xx_cmd_role_start_ap()
667 cmd->ap.broadcast_hlid = wlvif->ap.bcast_hlid; in wl12xx_cmd_role_start_ap()
668 cmd->ap.global_session_id = wl->session_ids[wlvif->ap.global_hlid]; in wl12xx_cmd_role_start_ap()
669 cmd->ap.bcast_session_id = wl->session_ids[wlvif->ap.bcast_hlid]; in wl12xx_cmd_role_start_ap()
670 cmd->ap.basic_rate_set = cpu_to_le32(wlvif->basic_rate_set); in wl12xx_cmd_role_start_ap()
671 cmd->ap.beacon_interval = cpu_to_le16(wlvif->beacon_int); in wl12xx_cmd_role_start_ap()
672 cmd->ap.dtim_interval = bss_conf->dtim_period; in wl12xx_cmd_role_start_ap()
673 cmd->ap.beacon_expiry = WL1271_AP_DEF_BEACON_EXP; in wl12xx_cmd_role_start_ap()
675 cmd->ap.reset_tsf = 1; /* By default reset AP TSF */ in wl12xx_cmd_role_start_ap()
676 cmd->ap.wmm = wlvif->wmm_enabled; in wl12xx_cmd_role_start_ap()
677 cmd->channel = wlvif->channel; in wl12xx_cmd_role_start_ap()
678 cmd->channel_type = wlcore_get_native_channel_type(wlvif->channel_type); in wl12xx_cmd_role_start_ap()
682 cmd->ap.ssid_type = WL12XX_SSID_TYPE_PUBLIC; in wl12xx_cmd_role_start_ap()
683 cmd->ap.ssid_len = wlvif->ssid_len; in wl12xx_cmd_role_start_ap()
684 memcpy(cmd->ap.ssid, wlvif->ssid, wlvif->ssid_len); in wl12xx_cmd_role_start_ap()
686 cmd->ap.ssid_type = WL12XX_SSID_TYPE_HIDDEN; in wl12xx_cmd_role_start_ap()
687 cmd->ap.ssid_len = vif->cfg.ssid_len; in wl12xx_cmd_role_start_ap()
688 memcpy(cmd->ap.ssid, vif->cfg.ssid, vif->cfg.ssid_len); in wl12xx_cmd_role_start_ap()
699 cmd->ap.local_rates = cpu_to_le32(supported_rates); in wl12xx_cmd_role_start_ap()
703 cmd->band = WLCORE_BAND_2_4GHZ; in wl12xx_cmd_role_start_ap()
706 cmd->band = WLCORE_BAND_5GHZ; in wl12xx_cmd_role_start_ap()
710 cmd->band = WLCORE_BAND_2_4GHZ; in wl12xx_cmd_role_start_ap()
714 ret = wl1271_cmd_send(wl, CMD_ROLE_START, cmd, sizeof(*cmd), 0); in wl12xx_cmd_role_start_ap()
729 kfree(cmd); in wl12xx_cmd_role_start_ap()
737 struct wl12xx_cmd_role_stop *cmd; in wl12xx_cmd_role_stop_ap() local
740 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl12xx_cmd_role_stop_ap()
741 if (!cmd) { in wl12xx_cmd_role_stop_ap()
748 cmd->role_id = wlvif->role_id; in wl12xx_cmd_role_stop_ap()
750 ret = wl1271_cmd_send(wl, CMD_ROLE_STOP, cmd, sizeof(*cmd), 0); in wl12xx_cmd_role_stop_ap()
760 kfree(cmd); in wl12xx_cmd_role_stop_ap()
769 struct wl12xx_cmd_role_start *cmd; in wl12xx_cmd_role_start_ibss() local
773 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl12xx_cmd_role_start_ibss()
774 if (!cmd) { in wl12xx_cmd_role_start_ibss()
781 cmd->role_id = wlvif->role_id; in wl12xx_cmd_role_start_ibss()
783 cmd->band = WLCORE_BAND_5GHZ; in wl12xx_cmd_role_start_ibss()
784 cmd->channel = wlvif->channel; in wl12xx_cmd_role_start_ibss()
785 cmd->ibss.basic_rate_set = cpu_to_le32(wlvif->basic_rate_set); in wl12xx_cmd_role_start_ibss()
786 cmd->ibss.beacon_interval = cpu_to_le16(wlvif->beacon_int); in wl12xx_cmd_role_start_ibss()
787 cmd->ibss.dtim_interval = bss_conf->dtim_period; in wl12xx_cmd_role_start_ibss()
788 cmd->ibss.ssid_type = WL12XX_SSID_TYPE_ANY; in wl12xx_cmd_role_start_ibss()
789 cmd->ibss.ssid_len = wlvif->ssid_len; in wl12xx_cmd_role_start_ibss()
790 memcpy(cmd->ibss.ssid, wlvif->ssid, wlvif->ssid_len); in wl12xx_cmd_role_start_ibss()
791 memcpy(cmd->ibss.bssid, vif->bss_conf.bssid, ETH_ALEN); in wl12xx_cmd_role_start_ibss()
792 cmd->sta.local_rates = cpu_to_le32(wlvif->rate_set); in wl12xx_cmd_role_start_ibss()
799 cmd->ibss.hlid = wlvif->sta.hlid; in wl12xx_cmd_role_start_ibss()
800 cmd->ibss.remote_rates = cpu_to_le32(wlvif->rate_set); in wl12xx_cmd_role_start_ibss()
804 wlvif->role_id, cmd->sta.hlid, cmd->sta.session, in wl12xx_cmd_role_start_ibss()
810 ret = wl1271_cmd_send(wl, CMD_ROLE_START, cmd, sizeof(*cmd), 0); in wl12xx_cmd_role_start_ibss()
823 kfree(cmd); in wl12xx_cmd_role_start_ibss()
940 struct cmd_enabledisable_path *cmd; in wl1271_cmd_data_path() local
946 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl1271_cmd_data_path()
947 if (!cmd) { in wl1271_cmd_data_path()
953 cmd->channel = 1; in wl1271_cmd_data_path()
963 ret = wl1271_cmd_send(wl, cmd_rx, cmd, sizeof(*cmd), 0); in wl1271_cmd_data_path()
966 enable ? "start" : "stop", cmd->channel); in wl1271_cmd_data_path()
971 enable ? "start" : "stop", cmd->channel); in wl1271_cmd_data_path()
973 ret = wl1271_cmd_send(wl, cmd_tx, cmd, sizeof(*cmd), 0); in wl1271_cmd_data_path()
976 enable ? "start" : "stop", cmd->channel); in wl1271_cmd_data_path()
981 enable ? "start" : "stop", cmd->channel); in wl1271_cmd_data_path()
984 kfree(cmd); in wl1271_cmd_data_path()
1023 struct wl1271_cmd_template_set *cmd; in wl1271_cmd_template_set() local
1032 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl1271_cmd_template_set()
1033 if (!cmd) { in wl1271_cmd_template_set()
1039 cmd->role_id = role_id; in wl1271_cmd_template_set()
1040 cmd->len = cpu_to_le16(buf_len); in wl1271_cmd_template_set()
1041 cmd->template_type = template_id; in wl1271_cmd_template_set()
1042 cmd->enabled_rates = cpu_to_le32(rates); in wl1271_cmd_template_set()
1043 cmd->short_retry_limit = wl->conf.tx.tmpl_short_retry_limit; in wl1271_cmd_template_set()
1044 cmd->long_retry_limit = wl->conf.tx.tmpl_long_retry_limit; in wl1271_cmd_template_set()
1045 cmd->index = index; in wl1271_cmd_template_set()
1048 memcpy(cmd->template_data, buf, buf_len); in wl1271_cmd_template_set()
1050 ret = wl1271_cmd_send(wl, CMD_SET_TEMPLATE, cmd, sizeof(*cmd), 0); in wl1271_cmd_template_set()
1057 kfree(cmd); in wl1271_cmd_template_set()
1339 struct wl1271_cmd_set_keys *cmd; in wl12xx_cmd_set_default_wep_key() local
1344 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl12xx_cmd_set_default_wep_key()
1345 if (!cmd) { in wl12xx_cmd_set_default_wep_key()
1350 cmd->hlid = hlid; in wl12xx_cmd_set_default_wep_key()
1351 cmd->key_id = id; in wl12xx_cmd_set_default_wep_key()
1352 cmd->lid_key_type = WEP_DEFAULT_LID_TYPE; in wl12xx_cmd_set_default_wep_key()
1353 cmd->key_action = cpu_to_le16(KEY_SET_ID); in wl12xx_cmd_set_default_wep_key()
1354 cmd->key_type = KEY_WEP; in wl12xx_cmd_set_default_wep_key()
1356 ret = wl1271_cmd_send(wl, CMD_SET_KEYS, cmd, sizeof(*cmd), 0); in wl12xx_cmd_set_default_wep_key()
1363 kfree(cmd); in wl12xx_cmd_set_default_wep_key()
1373 struct wl1271_cmd_set_keys *cmd; in wl1271_cmd_set_sta_key() local
1380 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl1271_cmd_set_sta_key()
1381 if (!cmd) { in wl1271_cmd_set_sta_key()
1386 cmd->hlid = wlvif->sta.hlid; in wl1271_cmd_set_sta_key()
1389 cmd->lid_key_type = WEP_DEFAULT_LID_TYPE; in wl1271_cmd_set_sta_key()
1391 cmd->lid_key_type = BROADCAST_LID_TYPE; in wl1271_cmd_set_sta_key()
1393 cmd->lid_key_type = UNICAST_LID_TYPE; in wl1271_cmd_set_sta_key()
1395 cmd->key_action = cpu_to_le16(action); in wl1271_cmd_set_sta_key()
1396 cmd->key_size = key_size; in wl1271_cmd_set_sta_key()
1397 cmd->key_type = key_type; in wl1271_cmd_set_sta_key()
1399 cmd->ac_seq_num16[0] = cpu_to_le16(tx_seq_16); in wl1271_cmd_set_sta_key()
1400 cmd->ac_seq_num32[0] = cpu_to_le32(tx_seq_32); in wl1271_cmd_set_sta_key()
1402 cmd->key_id = id; in wl1271_cmd_set_sta_key()
1411 memcpy(cmd->key, key, 16); in wl1271_cmd_set_sta_key()
1412 memcpy(cmd->key + 16, key + 24, 8); in wl1271_cmd_set_sta_key()
1413 memcpy(cmd->key + 24, key + 16, 8); in wl1271_cmd_set_sta_key()
1416 memcpy(cmd->key, key, key_size); in wl1271_cmd_set_sta_key()
1419 wl1271_dump(DEBUG_CRYPT, "TARGET KEY: ", cmd, sizeof(*cmd)); in wl1271_cmd_set_sta_key()
1421 ret = wl1271_cmd_send(wl, CMD_SET_KEYS, cmd, sizeof(*cmd), 0); in wl1271_cmd_set_sta_key()
1428 kfree(cmd); in wl1271_cmd_set_sta_key()
1442 struct wl1271_cmd_set_keys *cmd; in wl1271_cmd_set_ap_key() local
1446 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl1271_cmd_set_ap_key()
1447 if (!cmd) in wl1271_cmd_set_ap_key()
1465 cmd->lid_key_type = lid_type; in wl1271_cmd_set_ap_key()
1466 cmd->hlid = hlid; in wl1271_cmd_set_ap_key()
1467 cmd->key_action = cpu_to_le16(action); in wl1271_cmd_set_ap_key()
1468 cmd->key_size = key_size; in wl1271_cmd_set_ap_key()
1469 cmd->key_type = key_type; in wl1271_cmd_set_ap_key()
1470 cmd->key_id = id; in wl1271_cmd_set_ap_key()
1471 cmd->ac_seq_num16[0] = cpu_to_le16(tx_seq_16); in wl1271_cmd_set_ap_key()
1472 cmd->ac_seq_num32[0] = cpu_to_le32(tx_seq_32); in wl1271_cmd_set_ap_key()
1481 memcpy(cmd->key, key, 16); in wl1271_cmd_set_ap_key()
1482 memcpy(cmd->key + 16, key + 24, 8); in wl1271_cmd_set_ap_key()
1483 memcpy(cmd->key + 24, key + 16, 8); in wl1271_cmd_set_ap_key()
1485 memcpy(cmd->key, key, key_size); in wl1271_cmd_set_ap_key()
1488 wl1271_dump(DEBUG_CRYPT, "TARGET AP KEY: ", cmd, sizeof(*cmd)); in wl1271_cmd_set_ap_key()
1490 ret = wl1271_cmd_send(wl, CMD_SET_KEYS, cmd, sizeof(*cmd), 0); in wl1271_cmd_set_ap_key()
1497 kfree(cmd); in wl1271_cmd_set_ap_key()
1504 struct wl12xx_cmd_set_peer_state *cmd; in wl12xx_cmd_set_peer_state() local
1509 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl12xx_cmd_set_peer_state()
1510 if (!cmd) { in wl12xx_cmd_set_peer_state()
1515 cmd->hlid = hlid; in wl12xx_cmd_set_peer_state()
1516 cmd->state = WL1271_CMD_STA_STATE_CONNECTED; in wl12xx_cmd_set_peer_state()
1520 cmd->wmm = wlvif->wmm_enabled; in wl12xx_cmd_set_peer_state()
1522 ret = wl1271_cmd_send(wl, CMD_SET_PEER_STATE, cmd, sizeof(*cmd), 0); in wl12xx_cmd_set_peer_state()
1529 kfree(cmd); in wl12xx_cmd_set_peer_state()
1538 struct wl12xx_cmd_add_peer *cmd; in wl12xx_cmd_add_peer() local
1544 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl12xx_cmd_add_peer()
1545 if (!cmd) { in wl12xx_cmd_add_peer()
1550 memcpy(cmd->addr, sta->addr, ETH_ALEN); in wl12xx_cmd_add_peer()
1551 cmd->bss_index = WL1271_AP_BSS_INDEX; in wl12xx_cmd_add_peer()
1552 cmd->aid = sta->aid; in wl12xx_cmd_add_peer()
1553 cmd->hlid = hlid; in wl12xx_cmd_add_peer()
1554 cmd->sp_len = sta->max_sp; in wl12xx_cmd_add_peer()
1555 cmd->wmm = sta->wme ? 1 : 0; in wl12xx_cmd_add_peer()
1556 cmd->session_id = wl->session_ids[hlid]; in wl12xx_cmd_add_peer()
1557 cmd->role_id = wlvif->role_id; in wl12xx_cmd_add_peer()
1561 cmd->psd_type[NUM_ACCESS_CATEGORIES_COPY-1-i] = in wl12xx_cmd_add_peer()
1564 cmd->psd_type[NUM_ACCESS_CATEGORIES_COPY-1-i] = in wl12xx_cmd_add_peer()
1574 cmd->supported_rates = in wl12xx_cmd_add_peer()
1579 cmd->supported_rates, sta->uapsd_queues); in wl12xx_cmd_add_peer()
1581 ret = wl1271_cmd_send(wl, CMD_ADD_PEER, cmd, sizeof(*cmd), 0); in wl12xx_cmd_add_peer()
1588 kfree(cmd); in wl12xx_cmd_add_peer()
1597 struct wl12xx_cmd_remove_peer *cmd; in wl12xx_cmd_remove_peer() local
1603 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl12xx_cmd_remove_peer()
1604 if (!cmd) { in wl12xx_cmd_remove_peer()
1609 cmd->hlid = hlid; in wl12xx_cmd_remove_peer()
1611 cmd->reason_opcode = 0; in wl12xx_cmd_remove_peer()
1612 cmd->send_deauth_flag = 0; in wl12xx_cmd_remove_peer()
1613 cmd->role_id = wlvif->role_id; in wl12xx_cmd_remove_peer()
1615 ret = wl1271_cmd_send(wl, CMD_REMOVE_PEER, cmd, sizeof(*cmd), 0); in wl12xx_cmd_remove_peer()
1634 kfree(cmd); in wl12xx_cmd_remove_peer()
1697 struct wl12xx_cmd_regdomain_dfs_config *cmd = NULL; in wlcore_cmd_regdomain_config_locked() local
1737 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wlcore_cmd_regdomain_config_locked()
1738 if (!cmd) { in wlcore_cmd_regdomain_config_locked()
1743 cmd->ch_bit_map1 = tmp_ch_bitmap[0]; in wlcore_cmd_regdomain_config_locked()
1744 cmd->ch_bit_map2 = tmp_ch_bitmap[1]; in wlcore_cmd_regdomain_config_locked()
1745 cmd->dfs_region = wl->dfs_region; in wlcore_cmd_regdomain_config_locked()
1749 cmd->ch_bit_map1, cmd->ch_bit_map2); in wlcore_cmd_regdomain_config_locked()
1751 ret = wl1271_cmd_send(wl, CMD_DFS_CHANNEL_CONFIG, cmd, sizeof(*cmd), 0); in wlcore_cmd_regdomain_config_locked()
1771 kfree(cmd); in wlcore_cmd_regdomain_config_locked()
1777 struct wl12xx_cmd_config_fwlog *cmd; in wl12xx_cmd_config_fwlog() local
1782 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl12xx_cmd_config_fwlog()
1783 if (!cmd) { in wl12xx_cmd_config_fwlog()
1788 cmd->logger_mode = wl->conf.fwlog.mode; in wl12xx_cmd_config_fwlog()
1789 cmd->log_severity = wl->conf.fwlog.severity; in wl12xx_cmd_config_fwlog()
1790 cmd->timestamp = wl->conf.fwlog.timestamp; in wl12xx_cmd_config_fwlog()
1791 cmd->output = wl->conf.fwlog.output; in wl12xx_cmd_config_fwlog()
1792 cmd->threshold = wl->conf.fwlog.threshold; in wl12xx_cmd_config_fwlog()
1794 ret = wl1271_cmd_send(wl, CMD_CONFIG_FWLOGGER, cmd, sizeof(*cmd), 0); in wl12xx_cmd_config_fwlog()
1801 kfree(cmd); in wl12xx_cmd_config_fwlog()
1809 struct wl12xx_cmd_start_fwlog *cmd; in wl12xx_cmd_start_fwlog() local
1814 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl12xx_cmd_start_fwlog()
1815 if (!cmd) { in wl12xx_cmd_start_fwlog()
1820 ret = wl1271_cmd_send(wl, CMD_START_FWLOGGER, cmd, sizeof(*cmd), 0); in wl12xx_cmd_start_fwlog()
1827 kfree(cmd); in wl12xx_cmd_start_fwlog()
1835 struct wl12xx_cmd_stop_fwlog *cmd; in wl12xx_cmd_stop_fwlog() local
1840 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl12xx_cmd_stop_fwlog()
1841 if (!cmd) { in wl12xx_cmd_stop_fwlog()
1846 ret = wl1271_cmd_send(wl, CMD_STOP_FWLOGGER, cmd, sizeof(*cmd), 0); in wl12xx_cmd_stop_fwlog()
1853 kfree(cmd); in wl12xx_cmd_stop_fwlog()
1862 struct wl12xx_cmd_roc *cmd; in wl12xx_cmd_roc() local
1870 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl12xx_cmd_roc()
1871 if (!cmd) { in wl12xx_cmd_roc()
1876 cmd->role_id = role_id; in wl12xx_cmd_roc()
1877 cmd->channel = channel; in wl12xx_cmd_roc()
1880 cmd->band = WLCORE_BAND_2_4GHZ; in wl12xx_cmd_roc()
1883 cmd->band = WLCORE_BAND_5GHZ; in wl12xx_cmd_roc()
1892 ret = wl1271_cmd_send(wl, CMD_REMAIN_ON_CHANNEL, cmd, sizeof(*cmd), 0); in wl12xx_cmd_roc()
1899 kfree(cmd); in wl12xx_cmd_roc()
1907 struct wl12xx_cmd_croc *cmd; in wl12xx_cmd_croc() local
1912 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl12xx_cmd_croc()
1913 if (!cmd) { in wl12xx_cmd_croc()
1917 cmd->role_id = role_id; in wl12xx_cmd_croc()
1919 ret = wl1271_cmd_send(wl, CMD_CANCEL_REMAIN_ON_CHANNEL, cmd, in wl12xx_cmd_croc()
1920 sizeof(*cmd), 0); in wl12xx_cmd_croc()
1927 kfree(cmd); in wl12xx_cmd_croc()
1976 struct wl12xx_cmd_stop_channel_switch *cmd; in wl12xx_cmd_stop_channel_switch() local
1981 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wl12xx_cmd_stop_channel_switch()
1982 if (!cmd) { in wl12xx_cmd_stop_channel_switch()
1987 cmd->role_id = wlvif->role_id; in wl12xx_cmd_stop_channel_switch()
1989 ret = wl1271_cmd_send(wl, CMD_STOP_CHANNEL_SWICTH, cmd, sizeof(*cmd), 0); in wl12xx_cmd_stop_channel_switch()
1996 kfree(cmd); in wl12xx_cmd_stop_channel_switch()
2078 struct wlcore_cmd_generic_cfg *cmd; in wlcore_cmd_generic_cfg() local
2085 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); in wlcore_cmd_generic_cfg()
2086 if (!cmd) in wlcore_cmd_generic_cfg()
2089 cmd->role_id = wlvif->role_id; in wlcore_cmd_generic_cfg()
2090 cmd->feature = feature; in wlcore_cmd_generic_cfg()
2091 cmd->enable = enable; in wlcore_cmd_generic_cfg()
2092 cmd->value = value; in wlcore_cmd_generic_cfg()
2094 ret = wl1271_cmd_send(wl, CMD_GENERIC_CFG, cmd, sizeof(*cmd), 0); in wlcore_cmd_generic_cfg()
2100 kfree(cmd); in wlcore_cmd_generic_cfg()