Lines Matching full:cmd

165 static __le32 ath12k_wmi_tlv_hdr(u32 cmd, u32 len)  in ath12k_wmi_tlv_hdr()  argument
167 return le32_encode_bits(cmd, WMI_TLV_TAG) | in ath12k_wmi_tlv_hdr()
171 static __le32 ath12k_wmi_tlv_cmd_hdr(u32 cmd, u32 len) in ath12k_wmi_tlv_cmd_hdr() argument
173 return ath12k_wmi_tlv_hdr(cmd, len - TLV_HDR_SIZE); in ath12k_wmi_tlv_cmd_hdr()
764 struct wmi_mgmt_send_cmd *cmd; in ath12k_wmi_mgmt_send() local
772 len = sizeof(*cmd) + sizeof(*frame_tlv) + roundup(buf_len, 4); in ath12k_wmi_mgmt_send()
778 cmd = (struct wmi_mgmt_send_cmd *)skb->data; in ath12k_wmi_mgmt_send()
779 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_MGMT_TX_SEND_CMD, in ath12k_wmi_mgmt_send()
780 sizeof(*cmd)); in ath12k_wmi_mgmt_send()
781 cmd->vdev_id = cpu_to_le32(vdev_id); in ath12k_wmi_mgmt_send()
782 cmd->desc_id = cpu_to_le32(buf_id); in ath12k_wmi_mgmt_send()
783 cmd->chanfreq = 0; in ath12k_wmi_mgmt_send()
784 cmd->paddr_lo = cpu_to_le32(lower_32_bits(ATH12K_SKB_CB(frame)->paddr)); in ath12k_wmi_mgmt_send()
785 cmd->paddr_hi = cpu_to_le32(upper_32_bits(ATH12K_SKB_CB(frame)->paddr)); in ath12k_wmi_mgmt_send()
786 cmd->frame_len = cpu_to_le32(frame->len); in ath12k_wmi_mgmt_send()
787 cmd->buf_len = cpu_to_le32(buf_len); in ath12k_wmi_mgmt_send()
788 cmd->tx_params_valid = 0; in ath12k_wmi_mgmt_send()
790 frame_tlv = (struct wmi_tlv *)(skb->data + sizeof(*cmd)); in ath12k_wmi_mgmt_send()
798 "failed to submit WMI_MGMT_TX_SEND_CMDID cmd\n"); in ath12k_wmi_mgmt_send()
809 struct wmi_vdev_create_cmd *cmd; in ath12k_wmi_vdev_create() local
824 len = sizeof(*cmd) + TLV_HDR_SIZE + in ath12k_wmi_vdev_create()
831 cmd = (struct wmi_vdev_create_cmd *)skb->data; in ath12k_wmi_vdev_create()
832 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_VDEV_CREATE_CMD, in ath12k_wmi_vdev_create()
833 sizeof(*cmd)); in ath12k_wmi_vdev_create()
835 cmd->vdev_id = cpu_to_le32(args->if_id); in ath12k_wmi_vdev_create()
836 cmd->vdev_type = cpu_to_le32(args->type); in ath12k_wmi_vdev_create()
837 cmd->vdev_subtype = cpu_to_le32(args->subtype); in ath12k_wmi_vdev_create()
838 cmd->num_cfg_txrx_streams = cpu_to_le32(WMI_NUM_SUPPORTED_BAND_MAX); in ath12k_wmi_vdev_create()
839 cmd->pdev_id = cpu_to_le32(args->pdev_id); in ath12k_wmi_vdev_create()
840 cmd->vdev_stats_id = cpu_to_le32(args->if_stats_id); in ath12k_wmi_vdev_create()
841 ether_addr_copy(cmd->vdev_macaddr.addr, macaddr); in ath12k_wmi_vdev_create()
843 ptr = skb->data + sizeof(*cmd); in ath12k_wmi_vdev_create()
895 struct wmi_vdev_delete_cmd *cmd; in ath12k_wmi_vdev_delete() local
899 skb = ath12k_wmi_alloc_skb(wmi->wmi_ab, sizeof(*cmd)); in ath12k_wmi_vdev_delete()
903 cmd = (struct wmi_vdev_delete_cmd *)skb->data; in ath12k_wmi_vdev_delete()
904 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_VDEV_DELETE_CMD, in ath12k_wmi_vdev_delete()
905 sizeof(*cmd)); in ath12k_wmi_vdev_delete()
906 cmd->vdev_id = cpu_to_le32(vdev_id); in ath12k_wmi_vdev_delete()
922 struct wmi_vdev_stop_cmd *cmd; in ath12k_wmi_vdev_stop() local
926 skb = ath12k_wmi_alloc_skb(wmi->wmi_ab, sizeof(*cmd)); in ath12k_wmi_vdev_stop()
930 cmd = (struct wmi_vdev_stop_cmd *)skb->data; in ath12k_wmi_vdev_stop()
932 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_VDEV_STOP_CMD, in ath12k_wmi_vdev_stop()
933 sizeof(*cmd)); in ath12k_wmi_vdev_stop()
934 cmd->vdev_id = cpu_to_le32(vdev_id); in ath12k_wmi_vdev_stop()
940 ath12k_warn(ar->ab, "failed to submit WMI_VDEV_STOP cmd\n"); in ath12k_wmi_vdev_stop()
950 struct wmi_vdev_down_cmd *cmd; in ath12k_wmi_vdev_down() local
954 skb = ath12k_wmi_alloc_skb(wmi->wmi_ab, sizeof(*cmd)); in ath12k_wmi_vdev_down()
958 cmd = (struct wmi_vdev_down_cmd *)skb->data; in ath12k_wmi_vdev_down()
960 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_VDEV_DOWN_CMD, in ath12k_wmi_vdev_down()
961 sizeof(*cmd)); in ath12k_wmi_vdev_down()
962 cmd->vdev_id = cpu_to_le32(vdev_id); in ath12k_wmi_vdev_down()
968 ath12k_warn(ar->ab, "failed to submit WMI_VDEV_DOWN cmd\n"); in ath12k_wmi_vdev_down()
1019 struct wmi_vdev_start_request_cmd *cmd; in ath12k_wmi_vdev_start() local
1030 if (WARN_ON(arg->ssid_len > sizeof(cmd->ssid.ssid))) in ath12k_wmi_vdev_start()
1033 len = sizeof(*cmd) + sizeof(*chan) + TLV_HDR_SIZE; in ath12k_wmi_vdev_start()
1039 cmd = (struct wmi_vdev_start_request_cmd *)skb->data; in ath12k_wmi_vdev_start()
1040 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_VDEV_START_REQUEST_CMD, in ath12k_wmi_vdev_start()
1041 sizeof(*cmd)); in ath12k_wmi_vdev_start()
1042 cmd->vdev_id = cpu_to_le32(arg->vdev_id); in ath12k_wmi_vdev_start()
1043 cmd->beacon_interval = cpu_to_le32(arg->bcn_intval); in ath12k_wmi_vdev_start()
1044 cmd->bcn_tx_rate = cpu_to_le32(arg->bcn_tx_rate); in ath12k_wmi_vdev_start()
1045 cmd->dtim_period = cpu_to_le32(arg->dtim_period); in ath12k_wmi_vdev_start()
1046 cmd->num_noa_descriptors = cpu_to_le32(arg->num_noa_descriptors); in ath12k_wmi_vdev_start()
1047 cmd->preferred_rx_streams = cpu_to_le32(arg->pref_rx_streams); in ath12k_wmi_vdev_start()
1048 cmd->preferred_tx_streams = cpu_to_le32(arg->pref_tx_streams); in ath12k_wmi_vdev_start()
1049 cmd->cac_duration_ms = cpu_to_le32(arg->cac_duration_ms); in ath12k_wmi_vdev_start()
1050 cmd->regdomain = cpu_to_le32(arg->regdomain); in ath12k_wmi_vdev_start()
1051 cmd->he_ops = cpu_to_le32(arg->he_ops); in ath12k_wmi_vdev_start()
1052 cmd->punct_bitmap = cpu_to_le32(arg->punct_bitmap); in ath12k_wmi_vdev_start()
1056 cmd->ssid.ssid_len = cpu_to_le32(arg->ssid_len); in ath12k_wmi_vdev_start()
1057 memcpy(cmd->ssid.ssid, arg->ssid, arg->ssid_len); in ath12k_wmi_vdev_start()
1060 cmd->flags |= cpu_to_le32(WMI_VDEV_START_HIDDEN_SSID); in ath12k_wmi_vdev_start()
1062 cmd->flags |= cpu_to_le32(WMI_VDEV_START_PMF_ENABLED); in ath12k_wmi_vdev_start()
1065 cmd->flags |= cpu_to_le32(WMI_VDEV_START_LDPC_RX_ENABLED); in ath12k_wmi_vdev_start()
1067 ptr = skb->data + sizeof(*cmd); in ath12k_wmi_vdev_start()
1104 ath12k_warn(ar->ab, "failed to submit vdev_%s cmd\n", in ath12k_wmi_vdev_start()
1115 struct wmi_vdev_up_cmd *cmd; in ath12k_wmi_vdev_up() local
1119 skb = ath12k_wmi_alloc_skb(wmi->wmi_ab, sizeof(*cmd)); in ath12k_wmi_vdev_up()
1123 cmd = (struct wmi_vdev_up_cmd *)skb->data; in ath12k_wmi_vdev_up()
1125 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_VDEV_UP_CMD, in ath12k_wmi_vdev_up()
1126 sizeof(*cmd)); in ath12k_wmi_vdev_up()
1127 cmd->vdev_id = cpu_to_le32(vdev_id); in ath12k_wmi_vdev_up()
1128 cmd->vdev_assoc_id = cpu_to_le32(aid); in ath12k_wmi_vdev_up()
1130 ether_addr_copy(cmd->vdev_bssid.addr, bssid); in ath12k_wmi_vdev_up()
1138 ath12k_warn(ar->ab, "failed to submit WMI_VDEV_UP cmd\n"); in ath12k_wmi_vdev_up()
1149 struct wmi_peer_create_cmd *cmd; in ath12k_wmi_send_peer_create_cmd() local
1153 skb = ath12k_wmi_alloc_skb(wmi->wmi_ab, sizeof(*cmd)); in ath12k_wmi_send_peer_create_cmd()
1157 cmd = (struct wmi_peer_create_cmd *)skb->data; in ath12k_wmi_send_peer_create_cmd()
1158 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_PEER_CREATE_CMD, in ath12k_wmi_send_peer_create_cmd()
1159 sizeof(*cmd)); in ath12k_wmi_send_peer_create_cmd()
1161 ether_addr_copy(cmd->peer_macaddr.addr, arg->peer_addr); in ath12k_wmi_send_peer_create_cmd()
1162 cmd->peer_type = cpu_to_le32(arg->peer_type); in ath12k_wmi_send_peer_create_cmd()
1163 cmd->vdev_id = cpu_to_le32(arg->vdev_id); in ath12k_wmi_send_peer_create_cmd()
1171 ath12k_warn(ar->ab, "failed to submit WMI_PEER_CREATE cmd\n"); in ath12k_wmi_send_peer_create_cmd()
1182 struct wmi_peer_delete_cmd *cmd; in ath12k_wmi_send_peer_delete_cmd() local
1186 skb = ath12k_wmi_alloc_skb(wmi->wmi_ab, sizeof(*cmd)); in ath12k_wmi_send_peer_delete_cmd()
1190 cmd = (struct wmi_peer_delete_cmd *)skb->data; in ath12k_wmi_send_peer_delete_cmd()
1191 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_PEER_DELETE_CMD, in ath12k_wmi_send_peer_delete_cmd()
1192 sizeof(*cmd)); in ath12k_wmi_send_peer_delete_cmd()
1194 ether_addr_copy(cmd->peer_macaddr.addr, peer_addr); in ath12k_wmi_send_peer_delete_cmd()
1195 cmd->vdev_id = cpu_to_le32(vdev_id); in ath12k_wmi_send_peer_delete_cmd()
1203 ath12k_warn(ar->ab, "failed to send WMI_PEER_DELETE cmd\n"); in ath12k_wmi_send_peer_delete_cmd()
1214 struct wmi_pdev_set_regdomain_cmd *cmd; in ath12k_wmi_send_pdev_set_regdomain() local
1218 skb = ath12k_wmi_alloc_skb(wmi->wmi_ab, sizeof(*cmd)); in ath12k_wmi_send_pdev_set_regdomain()
1222 cmd = (struct wmi_pdev_set_regdomain_cmd *)skb->data; in ath12k_wmi_send_pdev_set_regdomain()
1223 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_PDEV_SET_REGDOMAIN_CMD, in ath12k_wmi_send_pdev_set_regdomain()
1224 sizeof(*cmd)); in ath12k_wmi_send_pdev_set_regdomain()
1226 cmd->reg_domain = cpu_to_le32(arg->current_rd_in_use); in ath12k_wmi_send_pdev_set_regdomain()
1227 cmd->reg_domain_2g = cpu_to_le32(arg->current_rd_2g); in ath12k_wmi_send_pdev_set_regdomain()
1228 cmd->reg_domain_5g = cpu_to_le32(arg->current_rd_5g); in ath12k_wmi_send_pdev_set_regdomain()
1229 cmd->conformance_test_limit_2g = cpu_to_le32(arg->ctl_2g); in ath12k_wmi_send_pdev_set_regdomain()
1230 cmd->conformance_test_limit_5g = cpu_to_le32(arg->ctl_5g); in ath12k_wmi_send_pdev_set_regdomain()
1231 cmd->dfs_domain = cpu_to_le32(arg->dfs_domain); in ath12k_wmi_send_pdev_set_regdomain()
1232 cmd->pdev_id = cpu_to_le32(arg->pdev_id); in ath12k_wmi_send_pdev_set_regdomain()
1242 "failed to send WMI_PDEV_SET_REGDOMAIN cmd\n"); in ath12k_wmi_send_pdev_set_regdomain()
1253 struct wmi_peer_set_param_cmd *cmd; in ath12k_wmi_set_peer_param() local
1257 skb = ath12k_wmi_alloc_skb(wmi->wmi_ab, sizeof(*cmd)); in ath12k_wmi_set_peer_param()
1261 cmd = (struct wmi_peer_set_param_cmd *)skb->data; in ath12k_wmi_set_peer_param()
1262 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_PEER_SET_PARAM_CMD, in ath12k_wmi_set_peer_param()
1263 sizeof(*cmd)); in ath12k_wmi_set_peer_param()
1264 ether_addr_copy(cmd->peer_macaddr.addr, peer_addr); in ath12k_wmi_set_peer_param()
1265 cmd->vdev_id = cpu_to_le32(vdev_id); in ath12k_wmi_set_peer_param()
1266 cmd->param_id = cpu_to_le32(param_id); in ath12k_wmi_set_peer_param()
1267 cmd->param_value = cpu_to_le32(param_val); in ath12k_wmi_set_peer_param()
1275 ath12k_warn(ar->ab, "failed to send WMI_PEER_SET_PARAM cmd\n"); in ath12k_wmi_set_peer_param()
1288 struct wmi_peer_flush_tids_cmd *cmd; in ath12k_wmi_send_peer_flush_tids_cmd() local
1292 skb = ath12k_wmi_alloc_skb(wmi->wmi_ab, sizeof(*cmd)); in ath12k_wmi_send_peer_flush_tids_cmd()
1296 cmd = (struct wmi_peer_flush_tids_cmd *)skb->data; in ath12k_wmi_send_peer_flush_tids_cmd()
1297 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_PEER_FLUSH_TIDS_CMD, in ath12k_wmi_send_peer_flush_tids_cmd()
1298 sizeof(*cmd)); in ath12k_wmi_send_peer_flush_tids_cmd()
1300 ether_addr_copy(cmd->peer_macaddr.addr, peer_addr); in ath12k_wmi_send_peer_flush_tids_cmd()
1301 cmd->peer_tid_bitmap = cpu_to_le32(peer_tid_bitmap); in ath12k_wmi_send_peer_flush_tids_cmd()
1302 cmd->vdev_id = cpu_to_le32(vdev_id); in ath12k_wmi_send_peer_flush_tids_cmd()
1311 "failed to send WMI_PEER_FLUSH_TIDS cmd\n"); in ath12k_wmi_send_peer_flush_tids_cmd()
1324 struct wmi_peer_reorder_queue_setup_cmd *cmd; in ath12k_wmi_peer_rx_reorder_queue_setup() local
1328 skb = ath12k_wmi_alloc_skb(ar->wmi->wmi_ab, sizeof(*cmd)); in ath12k_wmi_peer_rx_reorder_queue_setup()
1332 cmd = (struct wmi_peer_reorder_queue_setup_cmd *)skb->data; in ath12k_wmi_peer_rx_reorder_queue_setup()
1333 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_REORDER_QUEUE_SETUP_CMD, in ath12k_wmi_peer_rx_reorder_queue_setup()
1334 sizeof(*cmd)); in ath12k_wmi_peer_rx_reorder_queue_setup()
1336 ether_addr_copy(cmd->peer_macaddr.addr, addr); in ath12k_wmi_peer_rx_reorder_queue_setup()
1337 cmd->vdev_id = cpu_to_le32(vdev_id); in ath12k_wmi_peer_rx_reorder_queue_setup()
1338 cmd->tid = cpu_to_le32(tid); in ath12k_wmi_peer_rx_reorder_queue_setup()
1339 cmd->queue_ptr_lo = cpu_to_le32(lower_32_bits(paddr)); in ath12k_wmi_peer_rx_reorder_queue_setup()
1340 cmd->queue_ptr_hi = cpu_to_le32(upper_32_bits(paddr)); in ath12k_wmi_peer_rx_reorder_queue_setup()
1341 cmd->queue_no = cpu_to_le32(tid); in ath12k_wmi_peer_rx_reorder_queue_setup()
1342 cmd->ba_window_size_valid = cpu_to_le32(ba_window_size_valid); in ath12k_wmi_peer_rx_reorder_queue_setup()
1343 cmd->ba_window_size = cpu_to_le32(ba_window_size); in ath12k_wmi_peer_rx_reorder_queue_setup()
1365 struct wmi_peer_reorder_queue_remove_cmd *cmd; in ath12k_wmi_rx_reord_queue_remove() local
1369 skb = ath12k_wmi_alloc_skb(wmi->wmi_ab, sizeof(*cmd)); in ath12k_wmi_rx_reord_queue_remove()
1373 cmd = (struct wmi_peer_reorder_queue_remove_cmd *)skb->data; in ath12k_wmi_rx_reord_queue_remove()
1374 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_REORDER_QUEUE_REMOVE_CMD, in ath12k_wmi_rx_reord_queue_remove()
1375 sizeof(*cmd)); in ath12k_wmi_rx_reord_queue_remove()
1377 ether_addr_copy(cmd->peer_macaddr.addr, arg->peer_macaddr); in ath12k_wmi_rx_reord_queue_remove()
1378 cmd->vdev_id = cpu_to_le32(arg->vdev_id); in ath12k_wmi_rx_reord_queue_remove()
1379 cmd->tid_mask = cpu_to_le32(arg->peer_tid_bitmap); in ath12k_wmi_rx_reord_queue_remove()
1400 struct wmi_pdev_set_param_cmd *cmd; in ath12k_wmi_pdev_set_param() local
1404 skb = ath12k_wmi_alloc_skb(wmi->wmi_ab, sizeof(*cmd)); in ath12k_wmi_pdev_set_param()
1408 cmd = (struct wmi_pdev_set_param_cmd *)skb->data; in ath12k_wmi_pdev_set_param()
1409 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_PDEV_SET_PARAM_CMD, in ath12k_wmi_pdev_set_param()
1410 sizeof(*cmd)); in ath12k_wmi_pdev_set_param()
1411 cmd->pdev_id = cpu_to_le32(pdev_id); in ath12k_wmi_pdev_set_param()
1412 cmd->param_id = cpu_to_le32(param_id); in ath12k_wmi_pdev_set_param()
1413 cmd->param_value = cpu_to_le32(param_value); in ath12k_wmi_pdev_set_param()
1421 ath12k_warn(ar->ab, "failed to send WMI_PDEV_SET_PARAM cmd\n"); in ath12k_wmi_pdev_set_param()
1431 struct wmi_pdev_set_ps_mode_cmd *cmd; in ath12k_wmi_pdev_set_ps_mode() local
1435 skb = ath12k_wmi_alloc_skb(wmi->wmi_ab, sizeof(*cmd)); in ath12k_wmi_pdev_set_ps_mode()
1439 cmd = (struct wmi_pdev_set_ps_mode_cmd *)skb->data; in ath12k_wmi_pdev_set_ps_mode()
1440 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_STA_POWERSAVE_MODE_CMD, in ath12k_wmi_pdev_set_ps_mode()
1441 sizeof(*cmd)); in ath12k_wmi_pdev_set_ps_mode()
1442 cmd->vdev_id = cpu_to_le32(vdev_id); in ath12k_wmi_pdev_set_ps_mode()
1443 cmd->sta_ps_mode = cpu_to_le32(enable); in ath12k_wmi_pdev_set_ps_mode()
1451 ath12k_warn(ar->ab, "failed to send WMI_PDEV_SET_PARAM cmd\n"); in ath12k_wmi_pdev_set_ps_mode()
1462 struct wmi_pdev_suspend_cmd *cmd; in ath12k_wmi_pdev_suspend() local
1466 skb = ath12k_wmi_alloc_skb(wmi->wmi_ab, sizeof(*cmd)); in ath12k_wmi_pdev_suspend()
1470 cmd = (struct wmi_pdev_suspend_cmd *)skb->data; in ath12k_wmi_pdev_suspend()
1472 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_PDEV_SUSPEND_CMD, in ath12k_wmi_pdev_suspend()
1473 sizeof(*cmd)); in ath12k_wmi_pdev_suspend()
1475 cmd->suspend_opt = cpu_to_le32(suspend_opt); in ath12k_wmi_pdev_suspend()
1476 cmd->pdev_id = cpu_to_le32(pdev_id); in ath12k_wmi_pdev_suspend()
1483 ath12k_warn(ar->ab, "failed to send WMI_PDEV_SUSPEND cmd\n"); in ath12k_wmi_pdev_suspend()
1493 struct wmi_pdev_resume_cmd *cmd; in ath12k_wmi_pdev_resume() local
1497 skb = ath12k_wmi_alloc_skb(wmi->wmi_ab, sizeof(*cmd)); in ath12k_wmi_pdev_resume()
1501 cmd = (struct wmi_pdev_resume_cmd *)skb->data; in ath12k_wmi_pdev_resume()
1503 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_PDEV_RESUME_CMD, in ath12k_wmi_pdev_resume()
1504 sizeof(*cmd)); in ath12k_wmi_pdev_resume()
1505 cmd->pdev_id = cpu_to_le32(pdev_id); in ath12k_wmi_pdev_resume()
1512 ath12k_warn(ar->ab, "failed to send WMI_PDEV_RESUME cmd\n"); in ath12k_wmi_pdev_resume()
1519 /* TODO FW Support for the cmd is not available yet.
1527 struct wmi_pdev_bss_chan_info_req_cmd *cmd; in ath12k_wmi_pdev_bss_chan_info_request() local
1531 skb = ath12k_wmi_alloc_skb(wmi->wmi_ab, sizeof(*cmd)); in ath12k_wmi_pdev_bss_chan_info_request()
1535 cmd = (struct wmi_pdev_bss_chan_info_req_cmd *)skb->data; in ath12k_wmi_pdev_bss_chan_info_request()
1537 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_PDEV_BSS_CHAN_INFO_REQUEST, in ath12k_wmi_pdev_bss_chan_info_request()
1538 sizeof(*cmd)); in ath12k_wmi_pdev_bss_chan_info_request()
1539 cmd->req_type = cpu_to_le32(type); in ath12k_wmi_pdev_bss_chan_info_request()
1548 "failed to send WMI_PDEV_BSS_CHAN_INFO_REQUEST cmd\n"); in ath12k_wmi_pdev_bss_chan_info_request()
1559 struct wmi_ap_ps_peer_cmd *cmd; in ath12k_wmi_send_set_ap_ps_param_cmd() local
1563 skb = ath12k_wmi_alloc_skb(wmi->wmi_ab, sizeof(*cmd)); in ath12k_wmi_send_set_ap_ps_param_cmd()
1567 cmd = (struct wmi_ap_ps_peer_cmd *)skb->data; in ath12k_wmi_send_set_ap_ps_param_cmd()
1568 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_AP_PS_PEER_CMD, in ath12k_wmi_send_set_ap_ps_param_cmd()
1569 sizeof(*cmd)); in ath12k_wmi_send_set_ap_ps_param_cmd()
1571 cmd->vdev_id = cpu_to_le32(arg->vdev_id); in ath12k_wmi_send_set_ap_ps_param_cmd()
1572 ether_addr_copy(cmd->peer_macaddr.addr, peer_addr); in ath12k_wmi_send_set_ap_ps_param_cmd()
1573 cmd->param = cpu_to_le32(arg->param); in ath12k_wmi_send_set_ap_ps_param_cmd()
1574 cmd->value = cpu_to_le32(arg->value); in ath12k_wmi_send_set_ap_ps_param_cmd()
1594 struct wmi_sta_powersave_param_cmd *cmd; in ath12k_wmi_set_sta_ps_param() local
1598 skb = ath12k_wmi_alloc_skb(wmi->wmi_ab, sizeof(*cmd)); in ath12k_wmi_set_sta_ps_param()
1602 cmd = (struct wmi_sta_powersave_param_cmd *)skb->data; in ath12k_wmi_set_sta_ps_param()
1603 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_STA_POWERSAVE_PARAM_CMD, in ath12k_wmi_set_sta_ps_param()
1604 sizeof(*cmd)); in ath12k_wmi_set_sta_ps_param()
1606 cmd->vdev_id = cpu_to_le32(vdev_id); in ath12k_wmi_set_sta_ps_param()
1607 cmd->param = cpu_to_le32(param); in ath12k_wmi_set_sta_ps_param()
1608 cmd->value = cpu_to_le32(param_value); in ath12k_wmi_set_sta_ps_param()
1626 struct wmi_force_fw_hang_cmd *cmd; in ath12k_wmi_force_fw_hang_cmd() local
1630 len = sizeof(*cmd); in ath12k_wmi_force_fw_hang_cmd()
1636 cmd = (struct wmi_force_fw_hang_cmd *)skb->data; in ath12k_wmi_force_fw_hang_cmd()
1637 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_FORCE_FW_HANG_CMD, in ath12k_wmi_force_fw_hang_cmd()
1640 cmd->type = cpu_to_le32(type); in ath12k_wmi_force_fw_hang_cmd()
1641 cmd->delay_time_ms = cpu_to_le32(delay_time_ms); in ath12k_wmi_force_fw_hang_cmd()
1656 struct wmi_vdev_set_param_cmd *cmd; in ath12k_wmi_vdev_set_param_cmd() local
1660 skb = ath12k_wmi_alloc_skb(wmi->wmi_ab, sizeof(*cmd)); in ath12k_wmi_vdev_set_param_cmd()
1664 cmd = (struct wmi_vdev_set_param_cmd *)skb->data; in ath12k_wmi_vdev_set_param_cmd()
1665 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_VDEV_SET_PARAM_CMD, in ath12k_wmi_vdev_set_param_cmd()
1666 sizeof(*cmd)); in ath12k_wmi_vdev_set_param_cmd()
1668 cmd->vdev_id = cpu_to_le32(vdev_id); in ath12k_wmi_vdev_set_param_cmd()
1669 cmd->param_id = cpu_to_le32(param_id); in ath12k_wmi_vdev_set_param_cmd()
1670 cmd->param_value = cpu_to_le32(param_value); in ath12k_wmi_vdev_set_param_cmd()
1689 struct wmi_get_pdev_temperature_cmd *cmd; in ath12k_wmi_send_pdev_temperature_cmd() local
1693 skb = ath12k_wmi_alloc_skb(wmi->wmi_ab, sizeof(*cmd)); in ath12k_wmi_send_pdev_temperature_cmd()
1697 cmd = (struct wmi_get_pdev_temperature_cmd *)skb->data; in ath12k_wmi_send_pdev_temperature_cmd()
1698 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_PDEV_GET_TEMPERATURE_CMD, in ath12k_wmi_send_pdev_temperature_cmd()
1699 sizeof(*cmd)); in ath12k_wmi_send_pdev_temperature_cmd()
1700 cmd->pdev_id = cpu_to_le32(ar->pdev->pdev_id); in ath12k_wmi_send_pdev_temperature_cmd()
1707 ath12k_warn(ar->ab, "failed to send WMI_PDEV_GET_TEMPERATURE cmd\n"); in ath12k_wmi_send_pdev_temperature_cmd()
1718 struct wmi_bcn_offload_ctrl_cmd *cmd; in ath12k_wmi_send_bcn_offload_control_cmd() local
1722 skb = ath12k_wmi_alloc_skb(wmi->wmi_ab, sizeof(*cmd)); in ath12k_wmi_send_bcn_offload_control_cmd()
1726 cmd = (struct wmi_bcn_offload_ctrl_cmd *)skb->data; in ath12k_wmi_send_bcn_offload_control_cmd()
1727 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_BCN_OFFLOAD_CTRL_CMD, in ath12k_wmi_send_bcn_offload_control_cmd()
1728 sizeof(*cmd)); in ath12k_wmi_send_bcn_offload_control_cmd()
1730 cmd->vdev_id = cpu_to_le32(vdev_id); in ath12k_wmi_send_bcn_offload_control_cmd()
1731 cmd->bcn_ctrl_op = cpu_to_le32(bcn_ctrl_op); in ath12k_wmi_send_bcn_offload_control_cmd()
1752 struct wmi_bcn_tmpl_cmd *cmd; in ath12k_wmi_bcn_tmpl() local
1764 len = sizeof(*cmd) + sizeof(*bcn_prb_info) + TLV_HDR_SIZE + aligned_len; in ath12k_wmi_bcn_tmpl()
1770 cmd = (struct wmi_bcn_tmpl_cmd *)skb->data; in ath12k_wmi_bcn_tmpl()
1771 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_BCN_TMPL_CMD, in ath12k_wmi_bcn_tmpl()
1772 sizeof(*cmd)); in ath12k_wmi_bcn_tmpl()
1773 cmd->vdev_id = cpu_to_le32(vdev_id); in ath12k_wmi_bcn_tmpl()
1774 cmd->tim_ie_offset = cpu_to_le32(offs->tim_offset); in ath12k_wmi_bcn_tmpl()
1775 cmd->csa_switch_count_offset = cpu_to_le32(offs->cntdwn_counter_offs[0]); in ath12k_wmi_bcn_tmpl()
1776 cmd->ext_csa_switch_count_offset = cpu_to_le32(offs->cntdwn_counter_offs[1]); in ath12k_wmi_bcn_tmpl()
1777 cmd->buf_len = cpu_to_le32(bcn->len); in ath12k_wmi_bcn_tmpl()
1779 ptr = skb->data + sizeof(*cmd); in ath12k_wmi_bcn_tmpl()
1815 struct wmi_vdev_install_key_cmd *cmd; in ath12k_wmi_vdev_install_key() local
1821 * length is specified in cmd->key_len. in ath12k_wmi_vdev_install_key()
1825 len = sizeof(*cmd) + TLV_HDR_SIZE + key_len_aligned; in ath12k_wmi_vdev_install_key()
1831 cmd = (struct wmi_vdev_install_key_cmd *)skb->data; in ath12k_wmi_vdev_install_key()
1832 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_VDEV_INSTALL_KEY_CMD, in ath12k_wmi_vdev_install_key()
1833 sizeof(*cmd)); in ath12k_wmi_vdev_install_key()
1834 cmd->vdev_id = cpu_to_le32(arg->vdev_id); in ath12k_wmi_vdev_install_key()
1835 ether_addr_copy(cmd->peer_macaddr.addr, arg->macaddr); in ath12k_wmi_vdev_install_key()
1836 cmd->key_idx = cpu_to_le32(arg->key_idx); in ath12k_wmi_vdev_install_key()
1837 cmd->key_flags = cpu_to_le32(arg->key_flags); in ath12k_wmi_vdev_install_key()
1838 cmd->key_cipher = cpu_to_le32(arg->key_cipher); in ath12k_wmi_vdev_install_key()
1839 cmd->key_len = cpu_to_le32(arg->key_len); in ath12k_wmi_vdev_install_key()
1840 cmd->key_txmic_len = cpu_to_le32(arg->key_txmic_len); in ath12k_wmi_vdev_install_key()
1841 cmd->key_rxmic_len = cpu_to_le32(arg->key_rxmic_len); in ath12k_wmi_vdev_install_key()
1844 cmd->key_rsc_counter = cpu_to_le64(arg->key_rsc_counter); in ath12k_wmi_vdev_install_key()
1846 tlv = (struct wmi_tlv *)(skb->data + sizeof(*cmd)); in ath12k_wmi_vdev_install_key()
1857 "failed to send WMI_VDEV_INSTALL_KEY cmd\n"); in ath12k_wmi_vdev_install_key()
1864 static void ath12k_wmi_copy_peer_flags(struct wmi_peer_assoc_complete_cmd *cmd, in ath12k_wmi_copy_peer_flags() argument
1868 cmd->peer_flags = 0; in ath12k_wmi_copy_peer_flags()
1869 cmd->peer_flags_ext = 0; in ath12k_wmi_copy_peer_flags()
1873 cmd->peer_flags |= cpu_to_le32(WMI_PEER_QOS); in ath12k_wmi_copy_peer_flags()
1875 cmd->peer_flags |= cpu_to_le32(WMI_PEER_APSD); in ath12k_wmi_copy_peer_flags()
1877 cmd->peer_flags |= cpu_to_le32(WMI_PEER_HT); in ath12k_wmi_copy_peer_flags()
1879 cmd->peer_flags |= cpu_to_le32(WMI_PEER_40MHZ); in ath12k_wmi_copy_peer_flags()
1881 cmd->peer_flags |= cpu_to_le32(WMI_PEER_80MHZ); in ath12k_wmi_copy_peer_flags()
1883 cmd->peer_flags |= cpu_to_le32(WMI_PEER_160MHZ); in ath12k_wmi_copy_peer_flags()
1885 cmd->peer_flags |= cpu_to_le32(WMI_PEER_EXT_320MHZ); in ath12k_wmi_copy_peer_flags()
1891 cmd->peer_flags |= cpu_to_le32(WMI_PEER_STBC); in ath12k_wmi_copy_peer_flags()
1897 cmd->peer_flags |= cpu_to_le32(WMI_PEER_LDPC); in ath12k_wmi_copy_peer_flags()
1900 cmd->peer_flags |= cpu_to_le32(WMI_PEER_STATIC_MIMOPS); in ath12k_wmi_copy_peer_flags()
1902 cmd->peer_flags |= cpu_to_le32(WMI_PEER_DYN_MIMOPS); in ath12k_wmi_copy_peer_flags()
1904 cmd->peer_flags |= cpu_to_le32(WMI_PEER_SPATIAL_MUX); in ath12k_wmi_copy_peer_flags()
1906 cmd->peer_flags |= cpu_to_le32(WMI_PEER_VHT); in ath12k_wmi_copy_peer_flags()
1908 cmd->peer_flags |= cpu_to_le32(WMI_PEER_HE); in ath12k_wmi_copy_peer_flags()
1910 cmd->peer_flags |= cpu_to_le32(WMI_PEER_TWT_REQ); in ath12k_wmi_copy_peer_flags()
1912 cmd->peer_flags |= cpu_to_le32(WMI_PEER_TWT_RESP); in ath12k_wmi_copy_peer_flags()
1914 cmd->peer_flags_ext |= cpu_to_le32(WMI_PEER_EXT_EHT); in ath12k_wmi_copy_peer_flags()
1922 cmd->peer_flags |= cpu_to_le32(WMI_PEER_AUTH); in ath12k_wmi_copy_peer_flags()
1924 cmd->peer_flags |= cpu_to_le32(WMI_PEER_NEED_PTK_4_WAY); in ath12k_wmi_copy_peer_flags()
1926 cmd->peer_flags &= cpu_to_le32(~WMI_PEER_AUTH); in ath12k_wmi_copy_peer_flags()
1929 cmd->peer_flags |= cpu_to_le32(WMI_PEER_NEED_GTK_2_WAY); in ath12k_wmi_copy_peer_flags()
1932 cmd->peer_flags &= cpu_to_le32(~(WMI_PEER_NEED_PTK_4_WAY | in ath12k_wmi_copy_peer_flags()
1936 cmd->peer_flags |= cpu_to_le32(WMI_PEER_PMF); in ath12k_wmi_copy_peer_flags()
1949 cmd->peer_flags &= cpu_to_le32(~WMI_PEER_HT); in ath12k_wmi_copy_peer_flags()
1956 struct wmi_peer_assoc_complete_cmd *cmd; in ath12k_wmi_send_peer_assoc_cmd() local
1976 len = sizeof(*cmd) + in ath12k_wmi_send_peer_assoc_cmd()
1991 cmd = ptr; in ath12k_wmi_send_peer_assoc_cmd()
1993 cmd = (void *)ptr; in ath12k_wmi_send_peer_assoc_cmd()
1995 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_PEER_ASSOC_COMPLETE_CMD, in ath12k_wmi_send_peer_assoc_cmd()
1996 sizeof(*cmd)); in ath12k_wmi_send_peer_assoc_cmd()
1998 cmd->vdev_id = cpu_to_le32(arg->vdev_id); in ath12k_wmi_send_peer_assoc_cmd()
2000 cmd->peer_new_assoc = cpu_to_le32(arg->peer_new_assoc); in ath12k_wmi_send_peer_assoc_cmd()
2001 cmd->peer_associd = cpu_to_le32(arg->peer_associd); in ath12k_wmi_send_peer_assoc_cmd()
2002 cmd->punct_bitmap = cpu_to_le32(arg->punct_bitmap); in ath12k_wmi_send_peer_assoc_cmd()
2004 ath12k_wmi_copy_peer_flags(cmd, arg, in ath12k_wmi_send_peer_assoc_cmd()
2008 ether_addr_copy(cmd->peer_macaddr.addr, arg->peer_mac); in ath12k_wmi_send_peer_assoc_cmd()
2010 cmd->peer_rate_caps = cpu_to_le32(arg->peer_rate_caps); in ath12k_wmi_send_peer_assoc_cmd()
2011 cmd->peer_caps = cpu_to_le32(arg->peer_caps); in ath12k_wmi_send_peer_assoc_cmd()
2012 cmd->peer_listen_intval = cpu_to_le32(arg->peer_listen_intval); in ath12k_wmi_send_peer_assoc_cmd()
2013 cmd->peer_ht_caps = cpu_to_le32(arg->peer_ht_caps); in ath12k_wmi_send_peer_assoc_cmd()
2014 cmd->peer_max_mpdu = cpu_to_le32(arg->peer_max_mpdu); in ath12k_wmi_send_peer_assoc_cmd()
2015 cmd->peer_mpdu_density = cpu_to_le32(arg->peer_mpdu_density); in ath12k_wmi_send_peer_assoc_cmd()
2016 cmd->peer_vht_caps = cpu_to_le32(arg->peer_vht_caps); in ath12k_wmi_send_peer_assoc_cmd()
2017 cmd->peer_phymode = cpu_to_le32(arg->peer_phymode); in ath12k_wmi_send_peer_assoc_cmd()
2020 cmd->peer_he_cap_info = cpu_to_le32(arg->peer_he_cap_macinfo[0]); in ath12k_wmi_send_peer_assoc_cmd()
2021 cmd->peer_he_cap_info_ext = cpu_to_le32(arg->peer_he_cap_macinfo[1]); in ath12k_wmi_send_peer_assoc_cmd()
2022 cmd->peer_he_cap_info_internal = cpu_to_le32(arg->peer_he_cap_macinfo_internal); in ath12k_wmi_send_peer_assoc_cmd()
2023 cmd->peer_he_caps_6ghz = cpu_to_le32(arg->peer_he_caps_6ghz); in ath12k_wmi_send_peer_assoc_cmd()
2024 cmd->peer_he_ops = cpu_to_le32(arg->peer_he_ops); in ath12k_wmi_send_peer_assoc_cmd()
2026 cmd->peer_he_cap_phy[i] = in ath12k_wmi_send_peer_assoc_cmd()
2028 cmd->peer_ppet.numss_m1 = cpu_to_le32(arg->peer_ppet.numss_m1); in ath12k_wmi_send_peer_assoc_cmd()
2029 cmd->peer_ppet.ru_info = cpu_to_le32(arg->peer_ppet.ru_bit_mask); in ath12k_wmi_send_peer_assoc_cmd()
2031 cmd->peer_ppet.ppet16_ppet8_ru3_ru0[i] = in ath12k_wmi_send_peer_assoc_cmd()
2035 memcpy_and_pad(cmd->peer_eht_cap_mac, sizeof(cmd->peer_eht_cap_mac), in ath12k_wmi_send_peer_assoc_cmd()
2038 memcpy_and_pad(cmd->peer_eht_cap_phy, sizeof(cmd->peer_eht_cap_phy), in ath12k_wmi_send_peer_assoc_cmd()
2041 memcpy_and_pad(&cmd->peer_eht_ppet, sizeof(cmd->peer_eht_ppet), in ath12k_wmi_send_peer_assoc_cmd()
2045 ptr += sizeof(*cmd); in ath12k_wmi_send_peer_assoc_cmd()
2056 cmd->num_peer_legacy_rates = cpu_to_le32(arg->peer_legacy_rates.num_rates); in ath12k_wmi_send_peer_assoc_cmd()
2070 cmd->num_peer_ht_rates = cpu_to_le32(arg->peer_ht_rates.num_rates); in ath12k_wmi_send_peer_assoc_cmd()
2086 cmd->peer_nss = cpu_to_le32(arg->peer_nss); in ath12k_wmi_send_peer_assoc_cmd()
2089 cmd->peer_bw_rxnss_override = 0; in ath12k_wmi_send_peer_assoc_cmd()
2090 cmd->peer_bw_rxnss_override |= cpu_to_le32(arg->peer_bw_rxnss_override); in ath12k_wmi_send_peer_assoc_cmd()
2100 cmd->peer_he_mcs = cpu_to_le32(arg->peer_he_mcs_count); in ath12k_wmi_send_peer_assoc_cmd()
2101 cmd->min_data_rate = cpu_to_le32(arg->min_data_rate); in ath12k_wmi_send_peer_assoc_cmd()
2176 cmd->vdev_id, cmd->peer_associd, arg->peer_mac, in ath12k_wmi_send_peer_assoc_cmd()
2177 cmd->peer_flags, cmd->peer_rate_caps, cmd->peer_caps, in ath12k_wmi_send_peer_assoc_cmd()
2178 cmd->peer_listen_intval, cmd->peer_ht_caps, in ath12k_wmi_send_peer_assoc_cmd()
2179 cmd->peer_max_mpdu, cmd->peer_nss, cmd->peer_phymode, in ath12k_wmi_send_peer_assoc_cmd()
2180 cmd->peer_mpdu_density, in ath12k_wmi_send_peer_assoc_cmd()
2181 cmd->peer_vht_caps, cmd->peer_he_cap_info, in ath12k_wmi_send_peer_assoc_cmd()
2182 cmd->peer_he_ops, cmd->peer_he_cap_info_ext, in ath12k_wmi_send_peer_assoc_cmd()
2183 cmd->peer_he_cap_phy[0], cmd->peer_he_cap_phy[1], in ath12k_wmi_send_peer_assoc_cmd()
2184 cmd->peer_he_cap_phy[2], in ath12k_wmi_send_peer_assoc_cmd()
2185 cmd->peer_bw_rxnss_override, cmd->peer_flags_ext, in ath12k_wmi_send_peer_assoc_cmd()
2186 cmd->peer_eht_cap_mac[0], cmd->peer_eht_cap_mac[1], in ath12k_wmi_send_peer_assoc_cmd()
2187 cmd->peer_eht_cap_phy[0], cmd->peer_eht_cap_phy[1], in ath12k_wmi_send_peer_assoc_cmd()
2188 cmd->peer_eht_cap_phy[2]); in ath12k_wmi_send_peer_assoc_cmd()
2232 static void ath12k_wmi_copy_scan_event_cntrl_flags(struct wmi_start_scan_cmd *cmd, in ath12k_wmi_copy_scan_event_cntrl_flags() argument
2237 cmd->notify_scan_events |= cpu_to_le32(WMI_SCAN_EVENT_STARTED); in ath12k_wmi_copy_scan_event_cntrl_flags()
2239 cmd->notify_scan_events |= cpu_to_le32(WMI_SCAN_EVENT_COMPLETED); in ath12k_wmi_copy_scan_event_cntrl_flags()
2241 cmd->notify_scan_events |= cpu_to_le32(WMI_SCAN_EVENT_BSS_CHANNEL); in ath12k_wmi_copy_scan_event_cntrl_flags()
2243 cmd->notify_scan_events |= cpu_to_le32(WMI_SCAN_EVENT_FOREIGN_CHAN); in ath12k_wmi_copy_scan_event_cntrl_flags()
2245 cmd->notify_scan_events |= cpu_to_le32(WMI_SCAN_EVENT_DEQUEUED); in ath12k_wmi_copy_scan_event_cntrl_flags()
2247 cmd->notify_scan_events |= cpu_to_le32(WMI_SCAN_EVENT_PREEMPTED); in ath12k_wmi_copy_scan_event_cntrl_flags()
2249 cmd->notify_scan_events |= cpu_to_le32(WMI_SCAN_EVENT_START_FAILED); in ath12k_wmi_copy_scan_event_cntrl_flags()
2251 cmd->notify_scan_events |= cpu_to_le32(WMI_SCAN_EVENT_RESTARTED); in ath12k_wmi_copy_scan_event_cntrl_flags()
2253 cmd->notify_scan_events |= cpu_to_le32(WMI_SCAN_EVENT_FOREIGN_CHAN_EXIT); in ath12k_wmi_copy_scan_event_cntrl_flags()
2255 cmd->notify_scan_events |= cpu_to_le32(WMI_SCAN_EVENT_SUSPENDED); in ath12k_wmi_copy_scan_event_cntrl_flags()
2257 cmd->notify_scan_events |= cpu_to_le32(WMI_SCAN_EVENT_RESUMED); in ath12k_wmi_copy_scan_event_cntrl_flags()
2260 cmd->scan_ctrl_flags = 0; in ath12k_wmi_copy_scan_event_cntrl_flags()
2262 cmd->scan_ctrl_flags |= cpu_to_le32(WMI_SCAN_FLAG_PASSIVE); in ath12k_wmi_copy_scan_event_cntrl_flags()
2264 cmd->scan_ctrl_flags |= cpu_to_le32(WMI_SCAN_FLAG_STRICT_PASSIVE_ON_PCHN); in ath12k_wmi_copy_scan_event_cntrl_flags()
2266 cmd->scan_ctrl_flags |= cpu_to_le32(WMI_SCAN_FILTER_PROMISCUOS); in ath12k_wmi_copy_scan_event_cntrl_flags()
2268 cmd->scan_ctrl_flags |= cpu_to_le32(WMI_SCAN_CAPTURE_PHY_ERROR); in ath12k_wmi_copy_scan_event_cntrl_flags()
2270 cmd->scan_ctrl_flags |= cpu_to_le32(WMI_SCAN_FLAG_HALF_RATE_SUPPORT); in ath12k_wmi_copy_scan_event_cntrl_flags()
2272 cmd->scan_ctrl_flags |= cpu_to_le32(WMI_SCAN_FLAG_QUARTER_RATE_SUPPORT); in ath12k_wmi_copy_scan_event_cntrl_flags()
2274 cmd->scan_ctrl_flags |= cpu_to_le32(WMI_SCAN_ADD_CCK_RATES); in ath12k_wmi_copy_scan_event_cntrl_flags()
2276 cmd->scan_ctrl_flags |= cpu_to_le32(WMI_SCAN_ADD_OFDM_RATES); in ath12k_wmi_copy_scan_event_cntrl_flags()
2278 cmd->scan_ctrl_flags |= cpu_to_le32(WMI_SCAN_CHAN_STAT_EVENT); in ath12k_wmi_copy_scan_event_cntrl_flags()
2280 cmd->scan_ctrl_flags |= cpu_to_le32(WMI_SCAN_FILTER_PROBE_REQ); in ath12k_wmi_copy_scan_event_cntrl_flags()
2282 cmd->scan_ctrl_flags |= cpu_to_le32(WMI_SCAN_ADD_BCAST_PROBE_REQ); in ath12k_wmi_copy_scan_event_cntrl_flags()
2284 cmd->scan_ctrl_flags |= cpu_to_le32(WMI_SCAN_OFFCHAN_MGMT_TX); in ath12k_wmi_copy_scan_event_cntrl_flags()
2286 cmd->scan_ctrl_flags |= cpu_to_le32(WMI_SCAN_OFFCHAN_DATA_TX); in ath12k_wmi_copy_scan_event_cntrl_flags()
2288 cmd->scan_ctrl_flags |= cpu_to_le32(WMI_SCAN_FLAG_FORCE_ACTIVE_ON_DFS); in ath12k_wmi_copy_scan_event_cntrl_flags()
2290 cmd->scan_ctrl_flags |= cpu_to_le32(WMI_SCAN_ADD_TPC_IE_IN_PROBE_REQ); in ath12k_wmi_copy_scan_event_cntrl_flags()
2292 cmd->scan_ctrl_flags |= cpu_to_le32(WMI_SCAN_ADD_DS_IE_IN_PROBE_REQ); in ath12k_wmi_copy_scan_event_cntrl_flags()
2294 cmd->scan_ctrl_flags |= cpu_to_le32(WMI_SCAN_ADD_SPOOF_MAC_IN_PROBE_REQ); in ath12k_wmi_copy_scan_event_cntrl_flags()
2296 cmd->scan_ctrl_flags |= cpu_to_le32(WMI_SCAN_RANDOM_SEQ_NO_IN_PROBE_REQ); in ath12k_wmi_copy_scan_event_cntrl_flags()
2298 cmd->scan_ctrl_flags |= in ath12k_wmi_copy_scan_event_cntrl_flags()
2301 cmd->scan_ctrl_flags |= le32_encode_bits(arg->adaptive_dwell_time_mode, in ath12k_wmi_copy_scan_event_cntrl_flags()
2309 struct wmi_start_scan_cmd *cmd; in ath12k_wmi_send_scan_start_cmd() local
2324 len = sizeof(*cmd); in ath12k_wmi_send_scan_start_cmd()
2359 cmd = ptr; in ath12k_wmi_send_scan_start_cmd()
2361 cmd = (void *)ptr; in ath12k_wmi_send_scan_start_cmd()
2363 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_START_SCAN_CMD, in ath12k_wmi_send_scan_start_cmd()
2364 sizeof(*cmd)); in ath12k_wmi_send_scan_start_cmd()
2366 cmd->scan_id = cpu_to_le32(arg->scan_id); in ath12k_wmi_send_scan_start_cmd()
2367 cmd->scan_req_id = cpu_to_le32(arg->scan_req_id); in ath12k_wmi_send_scan_start_cmd()
2368 cmd->vdev_id = cpu_to_le32(arg->vdev_id); in ath12k_wmi_send_scan_start_cmd()
2369 cmd->scan_priority = cpu_to_le32(arg->scan_priority); in ath12k_wmi_send_scan_start_cmd()
2370 cmd->notify_scan_events = cpu_to_le32(arg->notify_scan_events); in ath12k_wmi_send_scan_start_cmd()
2372 ath12k_wmi_copy_scan_event_cntrl_flags(cmd, arg); in ath12k_wmi_send_scan_start_cmd()
2374 cmd->dwell_time_active = cpu_to_le32(arg->dwell_time_active); in ath12k_wmi_send_scan_start_cmd()
2375 cmd->dwell_time_active_2g = cpu_to_le32(arg->dwell_time_active_2g); in ath12k_wmi_send_scan_start_cmd()
2376 cmd->dwell_time_passive = cpu_to_le32(arg->dwell_time_passive); in ath12k_wmi_send_scan_start_cmd()
2377 cmd->dwell_time_active_6g = cpu_to_le32(arg->dwell_time_active_6g); in ath12k_wmi_send_scan_start_cmd()
2378 cmd->dwell_time_passive_6g = cpu_to_le32(arg->dwell_time_passive_6g); in ath12k_wmi_send_scan_start_cmd()
2379 cmd->min_rest_time = cpu_to_le32(arg->min_rest_time); in ath12k_wmi_send_scan_start_cmd()
2380 cmd->max_rest_time = cpu_to_le32(arg->max_rest_time); in ath12k_wmi_send_scan_start_cmd()
2381 cmd->repeat_probe_time = cpu_to_le32(arg->repeat_probe_time); in ath12k_wmi_send_scan_start_cmd()
2382 cmd->probe_spacing_time = cpu_to_le32(arg->probe_spacing_time); in ath12k_wmi_send_scan_start_cmd()
2383 cmd->idle_time = cpu_to_le32(arg->idle_time); in ath12k_wmi_send_scan_start_cmd()
2384 cmd->max_scan_time = cpu_to_le32(arg->max_scan_time); in ath12k_wmi_send_scan_start_cmd()
2385 cmd->probe_delay = cpu_to_le32(arg->probe_delay); in ath12k_wmi_send_scan_start_cmd()
2386 cmd->burst_duration = cpu_to_le32(arg->burst_duration); in ath12k_wmi_send_scan_start_cmd()
2387 cmd->num_chan = cpu_to_le32(arg->num_chan); in ath12k_wmi_send_scan_start_cmd()
2388 cmd->num_bssid = cpu_to_le32(arg->num_bssid); in ath12k_wmi_send_scan_start_cmd()
2389 cmd->num_ssids = cpu_to_le32(arg->num_ssids); in ath12k_wmi_send_scan_start_cmd()
2390 cmd->ie_len = cpu_to_le32(arg->extraie.len); in ath12k_wmi_send_scan_start_cmd()
2391 cmd->n_probes = cpu_to_le32(arg->n_probes); in ath12k_wmi_send_scan_start_cmd()
2393 ptr += sizeof(*cmd); in ath12k_wmi_send_scan_start_cmd()
2534 struct wmi_stop_scan_cmd *cmd; in ath12k_wmi_send_scan_stop_cmd() local
2538 skb = ath12k_wmi_alloc_skb(wmi->wmi_ab, sizeof(*cmd)); in ath12k_wmi_send_scan_stop_cmd()
2542 cmd = (struct wmi_stop_scan_cmd *)skb->data; in ath12k_wmi_send_scan_stop_cmd()
2544 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_STOP_SCAN_CMD, in ath12k_wmi_send_scan_stop_cmd()
2545 sizeof(*cmd)); in ath12k_wmi_send_scan_stop_cmd()
2547 cmd->vdev_id = cpu_to_le32(arg->vdev_id); in ath12k_wmi_send_scan_stop_cmd()
2548 cmd->requestor = cpu_to_le32(arg->requester); in ath12k_wmi_send_scan_stop_cmd()
2549 cmd->scan_id = cpu_to_le32(arg->scan_id); in ath12k_wmi_send_scan_stop_cmd()
2550 cmd->pdev_id = cpu_to_le32(arg->pdev_id); in ath12k_wmi_send_scan_stop_cmd()
2554 cmd->req_type = cpu_to_le32(WMI_SCAN_STOP_ALL); in ath12k_wmi_send_scan_stop_cmd()
2557 cmd->req_type = cpu_to_le32(WMI_SCAN_STOP_VAP_ALL); in ath12k_wmi_send_scan_stop_cmd()
2560 cmd->req_type = WMI_SCAN_STOP_ONE; in ath12k_wmi_send_scan_stop_cmd()
2582 struct wmi_scan_chan_list_cmd *cmd; in ath12k_wmi_send_scan_chan_list_cmd() local
2598 len = sizeof(*cmd) + TLV_HDR_SIZE; in ath12k_wmi_send_scan_chan_list_cmd()
2611 cmd = (struct wmi_scan_chan_list_cmd *)skb->data; in ath12k_wmi_send_scan_chan_list_cmd()
2612 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_SCAN_CHAN_LIST_CMD, in ath12k_wmi_send_scan_chan_list_cmd()
2613 sizeof(*cmd)); in ath12k_wmi_send_scan_chan_list_cmd()
2614 cmd->pdev_id = cpu_to_le32(arg->pdev_id); in ath12k_wmi_send_scan_chan_list_cmd()
2615 cmd->num_scan_chans = cpu_to_le32(num_send_chans); in ath12k_wmi_send_scan_chan_list_cmd()
2617 cmd->flags |= cpu_to_le32(WMI_APPEND_TO_EXISTING_CHAN_LIST_FLAG); in ath12k_wmi_send_scan_chan_list_cmd()
2621 num_send_chans, len, cmd->pdev_id, num_sends); in ath12k_wmi_send_scan_chan_list_cmd()
2623 ptr = skb->data + sizeof(*cmd); in ath12k_wmi_send_scan_chan_list_cmd()
2696 ath12k_warn(ar->ab, "failed to send WMI_SCAN_CHAN_LIST cmd\n"); in ath12k_wmi_send_scan_chan_list_cmd()
2711 struct wmi_vdev_set_wmm_params_cmd *cmd; in ath12k_wmi_send_wmm_update_cmd() local
2717 skb = ath12k_wmi_alloc_skb(wmi->wmi_ab, sizeof(*cmd)); in ath12k_wmi_send_wmm_update_cmd()
2721 cmd = (struct wmi_vdev_set_wmm_params_cmd *)skb->data; in ath12k_wmi_send_wmm_update_cmd()
2722 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_VDEV_SET_WMM_PARAMS_CMD, in ath12k_wmi_send_wmm_update_cmd()
2723 sizeof(*cmd)); in ath12k_wmi_send_wmm_update_cmd()
2725 cmd->vdev_id = cpu_to_le32(vdev_id); in ath12k_wmi_send_wmm_update_cmd()
2726 cmd->wmm_param_type = 0; in ath12k_wmi_send_wmm_update_cmd()
2744 wmm_param = (struct wmi_wmm_params *)&cmd->wmm_params[ac]; in ath12k_wmi_send_wmm_update_cmd()
2777 struct wmi_dfs_phyerr_offload_cmd *cmd; in ath12k_wmi_send_dfs_phyerr_offload_enable_cmd() local
2781 skb = ath12k_wmi_alloc_skb(wmi->wmi_ab, sizeof(*cmd)); in ath12k_wmi_send_dfs_phyerr_offload_enable_cmd()
2785 cmd = (struct wmi_dfs_phyerr_offload_cmd *)skb->data; in ath12k_wmi_send_dfs_phyerr_offload_enable_cmd()
2786 cmd->tlv_header = in ath12k_wmi_send_dfs_phyerr_offload_enable_cmd()
2788 sizeof(*cmd)); in ath12k_wmi_send_dfs_phyerr_offload_enable_cmd()
2790 cmd->pdev_id = cpu_to_le32(pdev_id); in ath12k_wmi_send_dfs_phyerr_offload_enable_cmd()
2799 "failed to send WMI_PDEV_DFS_PHYERR_OFFLOAD_ENABLE cmd\n"); in ath12k_wmi_send_dfs_phyerr_offload_enable_cmd()
2810 struct wmi_delba_send_cmd *cmd; in ath12k_wmi_delba_send() local
2814 skb = ath12k_wmi_alloc_skb(wmi->wmi_ab, sizeof(*cmd)); in ath12k_wmi_delba_send()
2818 cmd = (struct wmi_delba_send_cmd *)skb->data; in ath12k_wmi_delba_send()
2819 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_DELBA_SEND_CMD, in ath12k_wmi_delba_send()
2820 sizeof(*cmd)); in ath12k_wmi_delba_send()
2821 cmd->vdev_id = cpu_to_le32(vdev_id); in ath12k_wmi_delba_send()
2822 ether_addr_copy(cmd->peer_macaddr.addr, mac); in ath12k_wmi_delba_send()
2823 cmd->tid = cpu_to_le32(tid); in ath12k_wmi_delba_send()
2824 cmd->initiator = cpu_to_le32(initiator); in ath12k_wmi_delba_send()
2825 cmd->reasoncode = cpu_to_le32(reason); in ath12k_wmi_delba_send()
2835 "failed to send WMI_DELBA_SEND_CMDID cmd\n"); in ath12k_wmi_delba_send()
2846 struct wmi_addba_setresponse_cmd *cmd; in ath12k_wmi_addba_set_resp() local
2850 skb = ath12k_wmi_alloc_skb(wmi->wmi_ab, sizeof(*cmd)); in ath12k_wmi_addba_set_resp()
2854 cmd = (struct wmi_addba_setresponse_cmd *)skb->data; in ath12k_wmi_addba_set_resp()
2855 cmd->tlv_header = in ath12k_wmi_addba_set_resp()
2857 sizeof(*cmd)); in ath12k_wmi_addba_set_resp()
2858 cmd->vdev_id = cpu_to_le32(vdev_id); in ath12k_wmi_addba_set_resp()
2859 ether_addr_copy(cmd->peer_macaddr.addr, mac); in ath12k_wmi_addba_set_resp()
2860 cmd->tid = cpu_to_le32(tid); in ath12k_wmi_addba_set_resp()
2861 cmd->statuscode = cpu_to_le32(status); in ath12k_wmi_addba_set_resp()
2871 "failed to send WMI_ADDBA_SET_RESP_CMDID cmd\n"); in ath12k_wmi_addba_set_resp()
2882 struct wmi_addba_send_cmd *cmd; in ath12k_wmi_addba_send() local
2886 skb = ath12k_wmi_alloc_skb(wmi->wmi_ab, sizeof(*cmd)); in ath12k_wmi_addba_send()
2890 cmd = (struct wmi_addba_send_cmd *)skb->data; in ath12k_wmi_addba_send()
2891 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_ADDBA_SEND_CMD, in ath12k_wmi_addba_send()
2892 sizeof(*cmd)); in ath12k_wmi_addba_send()
2893 cmd->vdev_id = cpu_to_le32(vdev_id); in ath12k_wmi_addba_send()
2894 ether_addr_copy(cmd->peer_macaddr.addr, mac); in ath12k_wmi_addba_send()
2895 cmd->tid = cpu_to_le32(tid); in ath12k_wmi_addba_send()
2896 cmd->buffersize = cpu_to_le32(buf_size); in ath12k_wmi_addba_send()
2906 "failed to send WMI_ADDBA_SEND_CMDID cmd\n"); in ath12k_wmi_addba_send()
2916 struct wmi_addba_clear_resp_cmd *cmd; in ath12k_wmi_addba_clear_resp() local
2920 skb = ath12k_wmi_alloc_skb(wmi->wmi_ab, sizeof(*cmd)); in ath12k_wmi_addba_clear_resp()
2924 cmd = (struct wmi_addba_clear_resp_cmd *)skb->data; in ath12k_wmi_addba_clear_resp()
2925 cmd->tlv_header = in ath12k_wmi_addba_clear_resp()
2927 sizeof(*cmd)); in ath12k_wmi_addba_clear_resp()
2928 cmd->vdev_id = cpu_to_le32(vdev_id); in ath12k_wmi_addba_clear_resp()
2929 ether_addr_copy(cmd->peer_macaddr.addr, mac); in ath12k_wmi_addba_clear_resp()
2939 "failed to send WMI_ADDBA_CLEAR_RESP_CMDID cmd\n"); in ath12k_wmi_addba_clear_resp()
2950 struct wmi_init_country_cmd *cmd; in ath12k_wmi_send_init_country_cmd() local
2954 skb = ath12k_wmi_alloc_skb(wmi->wmi_ab, sizeof(*cmd)); in ath12k_wmi_send_init_country_cmd()
2958 cmd = (struct wmi_init_country_cmd *)skb->data; in ath12k_wmi_send_init_country_cmd()
2959 cmd->tlv_header = in ath12k_wmi_send_init_country_cmd()
2961 sizeof(*cmd)); in ath12k_wmi_send_init_country_cmd()
2963 cmd->pdev_id = cpu_to_le32(ar->pdev->pdev_id); in ath12k_wmi_send_init_country_cmd()
2967 cmd->init_cc_type = WMI_COUNTRY_INFO_TYPE_ALPHA; in ath12k_wmi_send_init_country_cmd()
2968 memcpy(&cmd->cc_info.alpha2, arg->cc_info.alpha2, 3); in ath12k_wmi_send_init_country_cmd()
2971 cmd->init_cc_type = cpu_to_le32(WMI_COUNTRY_INFO_TYPE_COUNTRY_CODE); in ath12k_wmi_send_init_country_cmd()
2972 cmd->cc_info.country_code = in ath12k_wmi_send_init_country_cmd()
2976 cmd->init_cc_type = cpu_to_le32(WMI_COUNTRY_INFO_TYPE_REGDOMAIN); in ath12k_wmi_send_init_country_cmd()
2977 cmd->cc_info.regdom_id = cpu_to_le32(arg->cc_info.regdom_id); in ath12k_wmi_send_init_country_cmd()
2990 "failed to send WMI_SET_INIT_COUNTRY CMD :%d\n", in ath12k_wmi_send_init_country_cmd()
3003 struct wmi_twt_enable_params_cmd *cmd; in ath12k_wmi_send_twt_enable_cmd() local
3007 len = sizeof(*cmd); in ath12k_wmi_send_twt_enable_cmd()
3013 cmd = (struct wmi_twt_enable_params_cmd *)skb->data; in ath12k_wmi_send_twt_enable_cmd()
3014 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_TWT_ENABLE_CMD, in ath12k_wmi_send_twt_enable_cmd()
3016 cmd->pdev_id = cpu_to_le32(pdev_id); in ath12k_wmi_send_twt_enable_cmd()
3017 cmd->sta_cong_timer_ms = cpu_to_le32(ATH12K_TWT_DEF_STA_CONG_TIMER_MS); in ath12k_wmi_send_twt_enable_cmd()
3018 cmd->default_slot_size = cpu_to_le32(ATH12K_TWT_DEF_DEFAULT_SLOT_SIZE); in ath12k_wmi_send_twt_enable_cmd()
3019 cmd->congestion_thresh_setup = in ath12k_wmi_send_twt_enable_cmd()
3021 cmd->congestion_thresh_teardown = in ath12k_wmi_send_twt_enable_cmd()
3023 cmd->congestion_thresh_critical = in ath12k_wmi_send_twt_enable_cmd()
3025 cmd->interference_thresh_teardown = in ath12k_wmi_send_twt_enable_cmd()
3027 cmd->interference_thresh_setup = in ath12k_wmi_send_twt_enable_cmd()
3029 cmd->min_no_sta_setup = cpu_to_le32(ATH12K_TWT_DEF_MIN_NO_STA_SETUP); in ath12k_wmi_send_twt_enable_cmd()
3030 cmd->min_no_sta_teardown = cpu_to_le32(ATH12K_TWT_DEF_MIN_NO_STA_TEARDOWN); in ath12k_wmi_send_twt_enable_cmd()
3031 cmd->no_of_bcast_mcast_slots = in ath12k_wmi_send_twt_enable_cmd()
3033 cmd->min_no_twt_slots = cpu_to_le32(ATH12K_TWT_DEF_MIN_NO_TWT_SLOTS); in ath12k_wmi_send_twt_enable_cmd()
3034 cmd->max_no_sta_twt = cpu_to_le32(ATH12K_TWT_DEF_MAX_NO_STA_TWT); in ath12k_wmi_send_twt_enable_cmd()
3035 cmd->mode_check_interval = cpu_to_le32(ATH12K_TWT_DEF_MODE_CHECK_INTERVAL); in ath12k_wmi_send_twt_enable_cmd()
3036 cmd->add_sta_slot_interval = cpu_to_le32(ATH12K_TWT_DEF_ADD_STA_SLOT_INTERVAL); in ath12k_wmi_send_twt_enable_cmd()
3037 cmd->remove_sta_slot_interval = in ath12k_wmi_send_twt_enable_cmd()
3040 cmd->mbss_support = 0; in ath12k_wmi_send_twt_enable_cmd()
3056 struct wmi_twt_disable_params_cmd *cmd; in ath12k_wmi_send_twt_disable_cmd() local
3060 len = sizeof(*cmd); in ath12k_wmi_send_twt_disable_cmd()
3066 cmd = (struct wmi_twt_disable_params_cmd *)skb->data; in ath12k_wmi_send_twt_disable_cmd()
3067 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_TWT_DISABLE_CMD, in ath12k_wmi_send_twt_disable_cmd()
3069 cmd->pdev_id = cpu_to_le32(pdev_id); in ath12k_wmi_send_twt_disable_cmd()
3086 struct wmi_obss_spatial_reuse_params_cmd *cmd; in ath12k_wmi_send_obss_spr_cmd() local
3090 len = sizeof(*cmd); in ath12k_wmi_send_obss_spr_cmd()
3096 cmd = (struct wmi_obss_spatial_reuse_params_cmd *)skb->data; in ath12k_wmi_send_obss_spr_cmd()
3097 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_OBSS_SPATIAL_REUSE_SET_CMD, in ath12k_wmi_send_obss_spr_cmd()
3099 cmd->vdev_id = cpu_to_le32(vdev_id); in ath12k_wmi_send_obss_spr_cmd()
3100 cmd->enable = cpu_to_le32(he_obss_pd->enable); in ath12k_wmi_send_obss_spr_cmd()
3101 cmd->obss_min = a_cpu_to_sle32(he_obss_pd->min_offset); in ath12k_wmi_send_obss_spr_cmd()
3102 cmd->obss_max = a_cpu_to_sle32(he_obss_pd->max_offset); in ath12k_wmi_send_obss_spr_cmd()
3120 struct wmi_obss_color_collision_cfg_params_cmd *cmd; in ath12k_wmi_obss_color_cfg_cmd() local
3124 len = sizeof(*cmd); in ath12k_wmi_obss_color_cfg_cmd()
3130 cmd = (struct wmi_obss_color_collision_cfg_params_cmd *)skb->data; in ath12k_wmi_obss_color_cfg_cmd()
3131 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_OBSS_COLOR_COLLISION_DET_CONFIG, in ath12k_wmi_obss_color_cfg_cmd()
3133 cmd->vdev_id = cpu_to_le32(vdev_id); in ath12k_wmi_obss_color_cfg_cmd()
3134 cmd->evt_type = enable ? cpu_to_le32(ATH12K_OBSS_COLOR_COLLISION_DETECTION) : in ath12k_wmi_obss_color_cfg_cmd()
3136 cmd->current_bss_color = cpu_to_le32(bss_color); in ath12k_wmi_obss_color_cfg_cmd()
3137 cmd->detection_period_ms = cpu_to_le32(period); in ath12k_wmi_obss_color_cfg_cmd()
3138 cmd->scan_period_ms = cpu_to_le32(ATH12K_BSS_COLOR_COLLISION_SCAN_PERIOD_MS); in ath12k_wmi_obss_color_cfg_cmd()
3139 cmd->free_slot_expiry_time_ms = 0; in ath12k_wmi_obss_color_cfg_cmd()
3140 cmd->flags = 0; in ath12k_wmi_obss_color_cfg_cmd()
3144 cmd->vdev_id, cmd->evt_type, cmd->current_bss_color, in ath12k_wmi_obss_color_cfg_cmd()
3145 cmd->detection_period_ms, cmd->scan_period_ms); in ath12k_wmi_obss_color_cfg_cmd()
3161 struct wmi_bss_color_change_enable_params_cmd *cmd; in ath12k_wmi_send_bss_color_change_enable_cmd() local
3165 len = sizeof(*cmd); in ath12k_wmi_send_bss_color_change_enable_cmd()
3171 cmd = (struct wmi_bss_color_change_enable_params_cmd *)skb->data; in ath12k_wmi_send_bss_color_change_enable_cmd()
3172 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_BSS_COLOR_CHANGE_ENABLE, in ath12k_wmi_send_bss_color_change_enable_cmd()
3174 cmd->vdev_id = cpu_to_le32(vdev_id); in ath12k_wmi_send_bss_color_change_enable_cmd()
3175 cmd->enable = enable ? cpu_to_le32(1) : 0; in ath12k_wmi_send_bss_color_change_enable_cmd()
3179 cmd->vdev_id, cmd->enable); in ath12k_wmi_send_bss_color_change_enable_cmd()
3198 struct wmi_fils_discovery_tmpl_cmd *cmd; in ath12k_wmi_fils_discovery_tmpl() local
3201 len = sizeof(*cmd) + TLV_HDR_SIZE + aligned_len; in ath12k_wmi_fils_discovery_tmpl()
3210 cmd = (struct wmi_fils_discovery_tmpl_cmd *)skb->data; in ath12k_wmi_fils_discovery_tmpl()
3211 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_FILS_DISCOVERY_TMPL_CMD, in ath12k_wmi_fils_discovery_tmpl()
3212 sizeof(*cmd)); in ath12k_wmi_fils_discovery_tmpl()
3213 cmd->vdev_id = cpu_to_le32(vdev_id); in ath12k_wmi_fils_discovery_tmpl()
3214 cmd->buf_len = cpu_to_le32(tmpl->len); in ath12k_wmi_fils_discovery_tmpl()
3215 ptr = skb->data + sizeof(*cmd); in ath12k_wmi_fils_discovery_tmpl()
3234 struct wmi_probe_tmpl_cmd *cmd; in ath12k_wmi_probe_resp_tmpl() local
3249 len = sizeof(*cmd) + sizeof(*probe_info) + TLV_HDR_SIZE + aligned_len; in ath12k_wmi_probe_resp_tmpl()
3255 cmd = (struct wmi_probe_tmpl_cmd *)skb->data; in ath12k_wmi_probe_resp_tmpl()
3256 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_PRB_TMPL_CMD, in ath12k_wmi_probe_resp_tmpl()
3257 sizeof(*cmd)); in ath12k_wmi_probe_resp_tmpl()
3258 cmd->vdev_id = cpu_to_le32(vdev_id); in ath12k_wmi_probe_resp_tmpl()
3259 cmd->buf_len = cpu_to_le32(tmpl->len); in ath12k_wmi_probe_resp_tmpl()
3261 ptr = skb->data + sizeof(*cmd); in ath12k_wmi_probe_resp_tmpl()
3299 struct wmi_fils_discovery_cmd *cmd; in ath12k_wmi_fils_discovery() local
3307 len = sizeof(*cmd); in ath12k_wmi_fils_discovery()
3312 cmd = (struct wmi_fils_discovery_cmd *)skb->data; in ath12k_wmi_fils_discovery()
3313 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_ENABLE_FILS_CMD, in ath12k_wmi_fils_discovery()
3315 cmd->vdev_id = cpu_to_le32(vdev_id); in ath12k_wmi_fils_discovery()
3316 cmd->interval = cpu_to_le32(interval); in ath12k_wmi_fils_discovery()
3317 cmd->config = cpu_to_le32(unsol_bcast_probe_resp_enabled); in ath12k_wmi_fils_discovery()
3433 struct wmi_init_cmd *cmd; in ath12k_init_cmd_send() local
3452 len = sizeof(*cmd) + TLV_HDR_SIZE + sizeof(*cfg) + hw_mode_len + in ath12k_init_cmd_send()
3459 cmd = (struct wmi_init_cmd *)skb->data; in ath12k_init_cmd_send()
3461 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_INIT_CMD, in ath12k_init_cmd_send()
3462 sizeof(*cmd)); in ath12k_init_cmd_send()
3464 ptr = skb->data + sizeof(*cmd); in ath12k_init_cmd_send()
3507 cmd->num_host_mem_chunks = cpu_to_le32(arg->num_mem_chunks); in ath12k_init_cmd_send()
3567 struct ath12k_wmi_pdev_lro_config_cmd *cmd; in ath12k_wmi_pdev_lro_cfg() local
3571 skb = ath12k_wmi_alloc_skb(ar->wmi->wmi_ab, sizeof(*cmd)); in ath12k_wmi_pdev_lro_cfg()
3575 cmd = (struct ath12k_wmi_pdev_lro_config_cmd *)skb->data; in ath12k_wmi_pdev_lro_cfg()
3576 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_LRO_INFO_CMD, in ath12k_wmi_pdev_lro_cfg()
3577 sizeof(*cmd)); in ath12k_wmi_pdev_lro_cfg()
3579 get_random_bytes(cmd->th_4, sizeof(cmd->th_4)); in ath12k_wmi_pdev_lro_cfg()
3580 get_random_bytes(cmd->th_6, sizeof(cmd->th_6)); in ath12k_wmi_pdev_lro_cfg()
3582 cmd->pdev_id = cpu_to_le32(pdev_id); in ath12k_wmi_pdev_lro_cfg()
3585 "WMI lro cfg cmd pdev_id 0x%x\n", pdev_id); in ath12k_wmi_pdev_lro_cfg()
3590 "failed to send lro cfg req wmi cmd\n"); in ath12k_wmi_pdev_lro_cfg()
3627 struct ath12k_wmi_pdev_set_hw_mode_cmd *cmd; in ath12k_wmi_set_hw_mode() local
3633 len = sizeof(*cmd); in ath12k_wmi_set_hw_mode()
3639 cmd = (struct ath12k_wmi_pdev_set_hw_mode_cmd *)skb->data; in ath12k_wmi_set_hw_mode()
3641 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_PDEV_SET_HW_MODE_CMD, in ath12k_wmi_set_hw_mode()
3642 sizeof(*cmd)); in ath12k_wmi_set_hw_mode()
3644 cmd->pdev_id = WMI_PDEV_ID_SOC; in ath12k_wmi_set_hw_mode()
3645 cmd->hw_mode_index = cpu_to_le32(mode); in ath12k_wmi_set_hw_mode()
3683 struct ath12k_wmi_vdev_spectral_conf_cmd *cmd; in ath12k_wmi_vdev_spectral_conf() local
3687 skb = ath12k_wmi_alloc_skb(ar->wmi->wmi_ab, sizeof(*cmd)); in ath12k_wmi_vdev_spectral_conf()
3691 cmd = (struct ath12k_wmi_vdev_spectral_conf_cmd *)skb->data; in ath12k_wmi_vdev_spectral_conf()
3692 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_VDEV_SPECTRAL_CONFIGURE_CMD, in ath12k_wmi_vdev_spectral_conf()
3693 sizeof(*cmd)); in ath12k_wmi_vdev_spectral_conf()
3694 cmd->vdev_id = cpu_to_le32(arg->vdev_id); in ath12k_wmi_vdev_spectral_conf()
3695 cmd->scan_count = cpu_to_le32(arg->scan_count); in ath12k_wmi_vdev_spectral_conf()
3696 cmd->scan_period = cpu_to_le32(arg->scan_period); in ath12k_wmi_vdev_spectral_conf()
3697 cmd->scan_priority = cpu_to_le32(arg->scan_priority); in ath12k_wmi_vdev_spectral_conf()
3698 cmd->scan_fft_size = cpu_to_le32(arg->scan_fft_size); in ath12k_wmi_vdev_spectral_conf()
3699 cmd->scan_gc_ena = cpu_to_le32(arg->scan_gc_ena); in ath12k_wmi_vdev_spectral_conf()
3700 cmd->scan_restart_ena = cpu_to_le32(arg->scan_restart_ena); in ath12k_wmi_vdev_spectral_conf()
3701 cmd->scan_noise_floor_ref = cpu_to_le32(arg->scan_noise_floor_ref); in ath12k_wmi_vdev_spectral_conf()
3702 cmd->scan_init_delay = cpu_to_le32(arg->scan_init_delay); in ath12k_wmi_vdev_spectral_conf()
3703 cmd->scan_nb_tone_thr = cpu_to_le32(arg->scan_nb_tone_thr); in ath12k_wmi_vdev_spectral_conf()
3704 cmd->scan_str_bin_thr = cpu_to_le32(arg->scan_str_bin_thr); in ath12k_wmi_vdev_spectral_conf()
3705 cmd->scan_wb_rpt_mode = cpu_to_le32(arg->scan_wb_rpt_mode); in ath12k_wmi_vdev_spectral_conf()
3706 cmd->scan_rssi_rpt_mode = cpu_to_le32(arg->scan_rssi_rpt_mode); in ath12k_wmi_vdev_spectral_conf()
3707 cmd->scan_rssi_thr = cpu_to_le32(arg->scan_rssi_thr); in ath12k_wmi_vdev_spectral_conf()
3708 cmd->scan_pwr_format = cpu_to_le32(arg->scan_pwr_format); in ath12k_wmi_vdev_spectral_conf()
3709 cmd->scan_rpt_mode = cpu_to_le32(arg->scan_rpt_mode); in ath12k_wmi_vdev_spectral_conf()
3710 cmd->scan_bin_scale = cpu_to_le32(arg->scan_bin_scale); in ath12k_wmi_vdev_spectral_conf()
3711 cmd->scan_dbm_adj = cpu_to_le32(arg->scan_dbm_adj); in ath12k_wmi_vdev_spectral_conf()
3712 cmd->scan_chn_mask = cpu_to_le32(arg->scan_chn_mask); in ath12k_wmi_vdev_spectral_conf()
3715 "WMI spectral scan config cmd vdev_id 0x%x\n", in ath12k_wmi_vdev_spectral_conf()
3722 "failed to send spectral scan config wmi cmd\n"); in ath12k_wmi_vdev_spectral_conf()
3735 struct ath12k_wmi_vdev_spectral_enable_cmd *cmd; in ath12k_wmi_vdev_spectral_enable() local
3739 skb = ath12k_wmi_alloc_skb(ar->wmi->wmi_ab, sizeof(*cmd)); in ath12k_wmi_vdev_spectral_enable()
3743 cmd = (struct ath12k_wmi_vdev_spectral_enable_cmd *)skb->data; in ath12k_wmi_vdev_spectral_enable()
3744 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_VDEV_SPECTRAL_ENABLE_CMD, in ath12k_wmi_vdev_spectral_enable()
3745 sizeof(*cmd)); in ath12k_wmi_vdev_spectral_enable()
3747 cmd->vdev_id = cpu_to_le32(vdev_id); in ath12k_wmi_vdev_spectral_enable()
3748 cmd->trigger_cmd = cpu_to_le32(trigger); in ath12k_wmi_vdev_spectral_enable()
3749 cmd->enable_cmd = cpu_to_le32(enable); in ath12k_wmi_vdev_spectral_enable()
3752 "WMI spectral enable cmd vdev id 0x%x\n", in ath12k_wmi_vdev_spectral_enable()
3759 "failed to send spectral enable wmi cmd\n"); in ath12k_wmi_vdev_spectral_enable()
3772 struct ath12k_wmi_pdev_dma_ring_cfg_req_cmd *cmd; in ath12k_wmi_pdev_dma_ring_cfg() local
3776 skb = ath12k_wmi_alloc_skb(ar->wmi->wmi_ab, sizeof(*cmd)); in ath12k_wmi_pdev_dma_ring_cfg()
3780 cmd = (struct ath12k_wmi_pdev_dma_ring_cfg_req_cmd *)skb->data; in ath12k_wmi_pdev_dma_ring_cfg()
3781 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_DMA_RING_CFG_REQ, in ath12k_wmi_pdev_dma_ring_cfg()
3782 sizeof(*cmd)); in ath12k_wmi_pdev_dma_ring_cfg()
3784 cmd->pdev_id = cpu_to_le32(DP_SW2HW_MACID(arg->pdev_id)); in ath12k_wmi_pdev_dma_ring_cfg()
3785 cmd->module_id = cpu_to_le32(arg->module_id); in ath12k_wmi_pdev_dma_ring_cfg()
3786 cmd->base_paddr_lo = cpu_to_le32(arg->base_paddr_lo); in ath12k_wmi_pdev_dma_ring_cfg()
3787 cmd->base_paddr_hi = cpu_to_le32(arg->base_paddr_hi); in ath12k_wmi_pdev_dma_ring_cfg()
3788 cmd->head_idx_paddr_lo = cpu_to_le32(arg->head_idx_paddr_lo); in ath12k_wmi_pdev_dma_ring_cfg()
3789 cmd->head_idx_paddr_hi = cpu_to_le32(arg->head_idx_paddr_hi); in ath12k_wmi_pdev_dma_ring_cfg()
3790 cmd->tail_idx_paddr_lo = cpu_to_le32(arg->tail_idx_paddr_lo); in ath12k_wmi_pdev_dma_ring_cfg()
3791 cmd->tail_idx_paddr_hi = cpu_to_le32(arg->tail_idx_paddr_hi); in ath12k_wmi_pdev_dma_ring_cfg()
3792 cmd->num_elems = cpu_to_le32(arg->num_elems); in ath12k_wmi_pdev_dma_ring_cfg()
3793 cmd->buf_size = cpu_to_le32(arg->buf_size); in ath12k_wmi_pdev_dma_ring_cfg()
3794 cmd->num_resp_per_event = cpu_to_le32(arg->num_resp_per_event); in ath12k_wmi_pdev_dma_ring_cfg()
3795 cmd->event_timeout_ms = cpu_to_le32(arg->event_timeout_ms); in ath12k_wmi_pdev_dma_ring_cfg()
3798 "WMI DMA ring cfg req cmd pdev_id 0x%x\n", in ath12k_wmi_pdev_dma_ring_cfg()
3805 "failed to send dma ring cfg req wmi cmd\n"); in ath12k_wmi_pdev_dma_ring_cfg()
4723 * multiple times in iw cmd. So added hack below to avoid in ath12k_pull_reg_chan_list_ext_update_ev()
5709 * reverted at the fw and the old SCAN_CHAN_LIST cmd needs to be sent. in ath12k_reg_chan_list_event()
6975 struct wmi_unit_test_cmd *cmd; in ath12k_wmi_send_unit_test_cmd() local
6995 cmd = (struct wmi_unit_test_cmd *)skb->data; in ath12k_wmi_send_unit_test_cmd()
6996 cmd->tlv_header = ath12k_wmi_tlv_cmd_hdr(WMI_TAG_UNIT_TEST_CMD, in ath12k_wmi_send_unit_test_cmd()
6999 cmd->vdev_id = ut_cmd.vdev_id; in ath12k_wmi_send_unit_test_cmd()
7000 cmd->module_id = ut_cmd.module_id; in ath12k_wmi_send_unit_test_cmd()
7001 cmd->num_args = ut_cmd.num_args; in ath12k_wmi_send_unit_test_cmd()
7002 cmd->diag_token = ut_cmd.diag_token; in ath12k_wmi_send_unit_test_cmd()
7025 cmd->module_id, cmd->vdev_id, cmd->num_args, in ath12k_wmi_send_unit_test_cmd()
7026 cmd->diag_token); in ath12k_wmi_send_unit_test_cmd()
7031 ath12k_warn(ar->ab, "failed to send WMI_UNIT_TEST CMD :%d\n", in ath12k_wmi_send_unit_test_cmd()