Lines Matching full:ab

187 void ath12k_wmi_init_qcn9274(struct ath12k_base *ab,  in ath12k_wmi_init_qcn9274()  argument
190 config->num_vdevs = ab->num_radios * TARGET_NUM_VDEVS; in ath12k_wmi_init_qcn9274()
191 config->num_peers = ab->num_radios * in ath12k_wmi_init_qcn9274()
192 ath12k_core_get_max_peers_per_radio(ab); in ath12k_wmi_init_qcn9274()
193 config->num_tids = ath12k_core_get_max_num_tids(ab); in ath12k_wmi_init_qcn9274()
198 config->tx_chain_mask = (1 << ab->target_caps.num_rf_chains) - 1; in ath12k_wmi_init_qcn9274()
199 config->rx_chain_mask = (1 << ab->target_caps.num_rf_chains) - 1; in ath12k_wmi_init_qcn9274()
205 if (test_bit(ATH12K_FLAG_RAW_MODE, &ab->dev_flags)) in ath12k_wmi_init_qcn9274()
225 config->beacon_tx_offload_max_vdev = ab->num_radios * TARGET_MAX_BCN_OFFLD; in ath12k_wmi_init_qcn9274()
229 config->twt_ap_pdev_count = ab->num_radios; in ath12k_wmi_init_qcn9274()
231 config->ema_max_vap_cnt = ab->num_radios; in ath12k_wmi_init_qcn9274()
235 if (test_bit(WMI_TLV_SERVICE_PEER_METADATA_V1A_V1B_SUPPORT, ab->wmi_ab.svc_map)) in ath12k_wmi_init_qcn9274()
239 void ath12k_wmi_init_wcn7850(struct ath12k_base *ab, in ath12k_wmi_init_wcn7850() argument
250 config->tx_chain_mask = (1 << ab->target_caps.num_rf_chains) - 1; in ath12k_wmi_init_wcn7850()
251 config->rx_chain_mask = (1 << ab->target_caps.num_rf_chains) - 1; in ath12k_wmi_init_wcn7850()
300 ath12k_wmi_tlv_iter(struct ath12k_base *ab, const void *ptr, size_t len, in ath12k_wmi_tlv_iter() argument
301 int (*iter)(struct ath12k_base *ab, u16 tag, u16 len, in ath12k_wmi_tlv_iter() argument
312 ath12k_err(ab, "wmi tlv parse failure at byte %zd (%zu bytes left, %zu expected)\n", in ath12k_wmi_tlv_iter()
324 ath12k_err(ab, "wmi tlv parse failure of tag %u at byte %zd (%zu bytes left, %u expected)\n", in ath12k_wmi_tlv_iter()
332 …ath12k_err(ab, "wmi tlv parse failure of tag %u at byte %zd (%u bytes is less than min length %zu)… in ath12k_wmi_tlv_iter()
338 ret = iter(ab, tlv_tag, tlv_len, ptr, data); in ath12k_wmi_tlv_iter()
349 static int ath12k_wmi_tlv_iter_parse(struct ath12k_base *ab, u16 tag, u16 len, in ath12k_wmi_tlv_iter_parse() argument
368 ath12k_wmi_tlv_parse_alloc(struct ath12k_base *ab, in ath12k_wmi_tlv_parse_alloc() argument
378 ret = ath12k_wmi_tlv_parse(ab, tb, skb->data, skb->len); in ath12k_wmi_tlv_parse_alloc()
391 struct ath12k_base *ab = wmi->wmi_ab->ab; in ath12k_wmi_cmd_send_nowait() local
402 ret = ath12k_htc_send(&ab->htc, wmi->eid, skb); in ath12k_wmi_cmd_send_nowait()
425 if (ret && test_bit(ATH12K_FLAG_CRASH_FLUSH, &wmi_ab->ab->dev_flags)) in ath12k_wmi_cmd_send()
432 ath12k_warn(wmi_ab->ab, "wmi command %d timeout\n", cmd_id); in ath12k_wmi_cmd_send()
474 struct ath12k_base *ab = wmi_handle->wmi_ab->ab; in ath12k_pull_mac_phy_cap_svc_ready_ext() local
507 fw_pdev = &ab->fw_pdev[ab->fw_pdev_count]; in ath12k_pull_mac_phy_cap_svc_ready_ext()
511 ab->fw_pdev_count++; in ath12k_pull_mac_phy_cap_svc_ready_ext()
637 static int ath12k_pull_service_ready_tlv(struct ath12k_base *ab, in ath12k_pull_service_ready_tlv() argument
644 ath12k_err(ab, "%s: failed by NULL param\n", in ath12k_pull_service_ready_tlv()
687 static int ath12k_wmi_svc_rdy_parse(struct ath12k_base *ab, u16 tag, u16 len, in ath12k_wmi_svc_rdy_parse() argument
691 struct ath12k_wmi_pdev *wmi_handle = &ab->wmi_ab.wmi[0]; in ath12k_wmi_svc_rdy_parse()
696 if (ath12k_pull_service_ready_tlv(ab, ptr, &ab->target_caps)) in ath12k_wmi_svc_rdy_parse()
704 ath12k_warn(ab, "invalid len %d for the tag 0x%x\n", in ath12k_wmi_svc_rdy_parse()
721 static int ath12k_service_ready_event(struct ath12k_base *ab, struct sk_buff *skb) in ath12k_service_ready_event() argument
726 ret = ath12k_wmi_tlv_iter(ab, skb->data, skb->len, in ath12k_service_ready_event()
730 ath12k_warn(ab, "failed to parse tlv %d\n", ret); in ath12k_service_ready_event()
740 struct ath12k_base *ab = ar->ab; in ath12k_wmi_mgmt_get_freq() local
743 if (ab->hw_params->single_pdev_only && in ath12k_wmi_mgmt_get_freq()
754 struct ath12k_base *ab = wmi_ab->ab; in ath12k_wmi_alloc_skb() local
757 skb = ath12k_htc_alloc_skb(ab, WMI_SKB_HEADROOM + round_len); in ath12k_wmi_alloc_skb()
763 ath12k_warn(ab, "unaligned WMI skb data\n"); in ath12k_wmi_alloc_skb()
809 ath12k_warn(ar->ab, in ath12k_wmi_mgmt_send()
900 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_vdev_create()
907 ath12k_warn(ar->ab, in ath12k_wmi_vdev_create()
931 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, "WMI vdev delete id %d\n", vdev_id); in ath12k_wmi_vdev_delete()
935 ath12k_warn(ar->ab, "failed to submit WMI_VDEV_DELETE_CMDID\n"); in ath12k_wmi_vdev_delete()
959 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, "WMI vdev stop id 0x%x\n", vdev_id); in ath12k_wmi_vdev_stop()
963 ath12k_warn(ar->ab, "failed to submit WMI_VDEV_STOP cmd\n"); in ath12k_wmi_vdev_stop()
987 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, "WMI vdev down id 0x%x\n", vdev_id); in ath12k_wmi_vdev_down()
991 ath12k_warn(ar->ab, "failed to submit WMI_VDEV_DOWN cmd\n"); in ath12k_wmi_vdev_down()
1135 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, "vdev %d start ml flags 0x%x\n", in ath12k_wmi_vdev_start()
1159 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, "partner vdev %d hw_link_id %d macaddr%pM\n", in ath12k_wmi_vdev_start()
1169 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, "vdev %s id 0x%x freq 0x%x mode 0x%x\n", in ath12k_wmi_vdev_start()
1180 ath12k_warn(ar->ab, "failed to submit vdev_%s cmd\n", in ath12k_wmi_vdev_start()
1214 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_vdev_up()
1220 ath12k_warn(ar->ab, "failed to submit WMI_VDEV_UP cmd\n"); in ath12k_wmi_vdev_up()
1266 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_send_peer_create_cmd()
1272 ath12k_warn(ar->ab, "failed to submit WMI_PEER_CREATE cmd\n"); in ath12k_wmi_send_peer_create_cmd()
1298 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_send_peer_delete_cmd()
1304 ath12k_warn(ar->ab, "failed to send WMI_PEER_DELETE cmd\n"); in ath12k_wmi_send_peer_delete_cmd()
1335 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_send_pdev_set_regdomain()
1342 ath12k_warn(ar->ab, in ath12k_wmi_send_pdev_set_regdomain()
1370 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_set_peer_param()
1376 ath12k_warn(ar->ab, "failed to send WMI_PEER_SET_PARAM cmd\n"); in ath12k_wmi_set_peer_param()
1405 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_send_peer_flush_tids_cmd()
1411 ath12k_warn(ar->ab, in ath12k_wmi_send_peer_flush_tids_cmd()
1446 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_peer_rx_reorder_queue_setup()
1453 ath12k_warn(ar->ab, in ath12k_wmi_peer_rx_reorder_queue_setup()
1482 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_rx_reord_queue_remove()
1489 ath12k_warn(ar->ab, in ath12k_wmi_rx_reord_queue_remove()
1516 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_pdev_set_param()
1522 ath12k_warn(ar->ab, "failed to send WMI_PDEV_SET_PARAM cmd\n"); in ath12k_wmi_pdev_set_param()
1546 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_pdev_set_ps_mode()
1552 ath12k_warn(ar->ab, "failed to send WMI_PDEV_SET_PARAM cmd\n"); in ath12k_wmi_pdev_set_ps_mode()
1579 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_pdev_suspend()
1584 ath12k_warn(ar->ab, "failed to send WMI_PDEV_SUSPEND cmd\n"); in ath12k_wmi_pdev_suspend()
1608 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_pdev_resume()
1613 ath12k_warn(ar->ab, "failed to send WMI_PDEV_RESUME cmd\n"); in ath12k_wmi_pdev_resume()
1643 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_pdev_bss_chan_info_request()
1649 ath12k_warn(ar->ab, in ath12k_wmi_pdev_bss_chan_info_request()
1678 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_send_set_ap_ps_param_cmd()
1684 ath12k_warn(ar->ab, in ath12k_wmi_send_set_ap_ps_param_cmd()
1712 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_set_sta_ps_param()
1718 ath12k_warn(ar->ab, "failed to send WMI_STA_POWERSAVE_PARAM_CMDID"); in ath12k_wmi_set_sta_ps_param()
1748 ath12k_warn(ar->ab, "Failed to send WMI_FORCE_FW_HANG_CMDID"); in ath12k_wmi_force_fw_hang_cmd()
1774 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_vdev_set_param_cmd()
1780 ath12k_warn(ar->ab, in ath12k_wmi_vdev_set_param_cmd()
1804 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_send_pdev_temperature_cmd()
1809 ath12k_warn(ar->ab, "failed to send WMI_PDEV_GET_TEMPERATURE cmd\n"); in ath12k_wmi_send_pdev_temperature_cmd()
1835 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_send_bcn_offload_control_cmd()
1841 ath12k_warn(ar->ab, in ath12k_wmi_send_bcn_offload_control_cmd()
1884 ath12k_warn(ar->ab, "failed to send WMI_P2P_GO_SET_BEACON_IE\n"); in ath12k_wmi_p2p_go_bcn_ie()
1948 ath12k_warn(ar->ab, "failed to send WMI_BCN_TMPL_CMDID\n"); in ath12k_wmi_bcn_tmpl()
1994 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_vdev_install_key()
2000 ath12k_warn(ar->ab, in ath12k_wmi_vdev_install_key()
2150 &ar->ab->dev_flags)); in ath12k_wmi_send_peer_assoc_cmd()
2341 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_send_peer_assoc_cmd()
2359 ath12k_warn(ar->ab, in ath12k_wmi_send_peer_assoc_cmd()
2516 ath12k_warn(ar->ab, "discard large size %d bytes extraie for scan start\n", in ath12k_wmi_send_scan_start_cmd()
2648 ath12k_warn(ar->ab, "failed to send WMI_START_SCAN_CMDID\n"); in ath12k_wmi_send_scan_start_cmd()
2687 ath12k_warn(ar->ab, "invalid scan cancel req_type %d", in ath12k_wmi_send_scan_stop_cmd()
2696 ath12k_warn(ar->ab, "failed to send WMI_STOP_SCAN_CMDID\n"); in ath12k_wmi_send_scan_stop_cmd()
2740 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_send_scan_chan_list_cmd()
2798 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_send_scan_chan_list_cmd()
2809 ath12k_warn(ar->ab, "failed to send WMI_SCAN_CHAN_LIST cmd\n"); in ath12k_wmi_send_scan_chan_list_cmd()
2869 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_send_wmm_update_cmd()
2878 ath12k_warn(ar->ab, in ath12k_wmi_send_wmm_update_cmd()
2905 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_send_dfs_phyerr_offload_enable_cmd()
2911 ath12k_warn(ar->ab, in ath12k_wmi_send_dfs_phyerr_offload_enable_cmd()
2919 int ath12k_wmi_set_bios_cmd(struct ath12k_base *ab, u32 param_id, in ath12k_wmi_set_bios_cmd() argument
2922 struct ath12k_wmi_base *wmi_ab = &ab->wmi_ab; in ath12k_wmi_set_bios_cmd()
2954 ath12k_warn(ab, in ath12k_wmi_set_bios_cmd()
2963 int ath12k_wmi_set_bios_sar_cmd(struct ath12k_base *ab, const u8 *psar_table) in ath12k_wmi_set_bios_sar_cmd() argument
2965 struct ath12k_wmi_base *wmi_ab = &ab->wmi_ab; in ath12k_wmi_set_bios_sar_cmd()
3010 ath12k_warn(ab, in ath12k_wmi_set_bios_sar_cmd()
3019 int ath12k_wmi_set_bios_geo_cmd(struct ath12k_base *ab, const u8 *pgeo_table) in ath12k_wmi_set_bios_geo_cmd() argument
3021 struct ath12k_wmi_base *wmi_ab = &ab->wmi_ab; in ath12k_wmi_set_bios_geo_cmd()
3053 ath12k_warn(ab, in ath12k_wmi_set_bios_geo_cmd()
3083 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_delba_send()
3090 ath12k_warn(ar->ab, in ath12k_wmi_delba_send()
3119 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_addba_set_resp()
3126 ath12k_warn(ar->ab, in ath12k_wmi_addba_set_resp()
3154 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_addba_send()
3161 ath12k_warn(ar->ab, in ath12k_wmi_addba_send()
3187 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_addba_clear_resp()
3194 ath12k_warn(ar->ab, in ath12k_wmi_addba_clear_resp()
3245 ath12k_warn(ar->ab, in ath12k_wmi_send_init_country_cmd()
3258 struct ath12k_base *ab = wmi->wmi_ab->ab; in ath12k_wmi_send_twt_enable_cmd() local
3301 ath12k_warn(ab, "Failed to send WMI_TWT_ENABLE_CMDID"); in ath12k_wmi_send_twt_enable_cmd()
3311 struct ath12k_base *ab = wmi->wmi_ab->ab; in ath12k_wmi_send_twt_disable_cmd() local
3330 ath12k_warn(ab, "Failed to send WMI_TWT_DISABLE_CMDID"); in ath12k_wmi_send_twt_disable_cmd()
3341 struct ath12k_base *ab = wmi->wmi_ab->ab; in ath12k_wmi_send_obss_spr_cmd() local
3363 ath12k_warn(ab, in ath12k_wmi_send_obss_spr_cmd()
3375 struct ath12k_base *ab = wmi->wmi_ab->ab; in ath12k_wmi_obss_color_cfg_cmd() local
3398 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_obss_color_cfg_cmd()
3406 ath12k_warn(ab, "Failed to send WMI_OBSS_COLOR_COLLISION_DET_CONFIG_CMDID"); in ath12k_wmi_obss_color_cfg_cmd()
3416 struct ath12k_base *ab = wmi->wmi_ab->ab; in ath12k_wmi_send_bss_color_change_enable_cmd() local
3433 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_send_bss_color_change_enable_cmd()
3440 ath12k_warn(ab, "Failed to send WMI_BSS_COLOR_CHANGE_ENABLE_CMDID"); in ath12k_wmi_send_bss_color_change_enable_cmd()
3459 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_fils_discovery_tmpl()
3479 ath12k_warn(ar->ab, in ath12k_wmi_fils_discovery_tmpl()
3498 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_probe_resp_tmpl()
3530 ath12k_warn(ar->ab, in ath12k_wmi_probe_resp_tmpl()
3545 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_fils_discovery()
3565 ath12k_warn(ar->ab, in ath12k_wmi_fils_discovery()
3681 struct ath12k_base *ab = wmi->wmi_ab->ab; in ath12k_init_cmd_send() local
3731 ath12k_dbg(ab, ATH12K_DBG_WMI, in ath12k_init_cmd_send()
3779 ath12k_warn(ab, "failed to send WMI_INIT_CMDID\n"); in ath12k_init_cmd_send()
3806 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_pdev_lro_cfg()
3811 ath12k_warn(ar->ab, in ath12k_wmi_pdev_lro_cfg()
3822 int ath12k_wmi_wait_for_service_ready(struct ath12k_base *ab) in ath12k_wmi_wait_for_service_ready() argument
3826 time_left = wait_for_completion_timeout(&ab->wmi_ab.service_ready, in ath12k_wmi_wait_for_service_ready()
3834 int ath12k_wmi_wait_for_unified_ready(struct ath12k_base *ab) in ath12k_wmi_wait_for_unified_ready() argument
3838 time_left = wait_for_completion_timeout(&ab->wmi_ab.unified_ready, in ath12k_wmi_wait_for_unified_ready()
3846 int ath12k_wmi_set_hw_mode(struct ath12k_base *ab, in ath12k_wmi_set_hw_mode() argument
3851 struct ath12k_wmi_base *wmi_ab = &ab->wmi_ab; in ath12k_wmi_set_hw_mode()
3871 ath12k_warn(ab, "failed to send WMI_PDEV_SET_HW_MODE_CMDID\n"); in ath12k_wmi_set_hw_mode()
3878 int ath12k_wmi_cmd_init(struct ath12k_base *ab) in ath12k_wmi_cmd_init() argument
3880 struct ath12k_wmi_base *wmi_ab = &ab->wmi_ab; in ath12k_wmi_cmd_init()
3884 ab->wmi_ab.svc_map)) in ath12k_wmi_cmd_init()
3887 ab->hw_params->wmi_init(ab, &arg.res_cfg); in ath12k_wmi_cmd_init()
3888 ab->wow.wmi_conf_rx_decap_mode = arg.res_cfg.rx_decap_mode; in ath12k_wmi_cmd_init()
3894 if (ab->hw_params->single_pdev_only) in ath12k_wmi_cmd_init()
3897 arg.num_band_to_mac = ab->num_radios; in ath12k_wmi_cmd_init()
3898 ath12k_fill_band_to_mac_param(ab, arg.band_to_mac); in ath12k_wmi_cmd_init()
3900 ab->dp.peer_metadata_ver = arg.res_cfg.peer_metadata_ver; in ath12k_wmi_cmd_init()
3939 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_vdev_spectral_conf()
3946 ath12k_warn(ar->ab, in ath12k_wmi_vdev_spectral_conf()
3976 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_vdev_spectral_enable()
3983 ath12k_warn(ar->ab, in ath12k_wmi_vdev_spectral_enable()
4022 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_pdev_dma_ring_cfg()
4029 ath12k_warn(ar->ab, in ath12k_wmi_pdev_dma_ring_cfg()
4073 static int ath12k_wmi_dma_buf_parse(struct ath12k_base *ab, in ath12k_wmi_dma_buf_parse() argument
4094 ret = ath12k_wmi_tlv_iter(ab, ptr, len, in ath12k_wmi_dma_buf_parse()
4098 ath12k_warn(ab, "failed to parse dma buf entry tlv %d\n", in ath12k_wmi_dma_buf_parse()
4108 ret = ath12k_wmi_tlv_iter(ab, ptr, len, in ath12k_wmi_dma_buf_parse()
4112 ath12k_warn(ab, "failed to parse dma buf meta tlv %d\n", in ath12k_wmi_dma_buf_parse()
4126 static void ath12k_wmi_pdev_dma_ring_buf_release_event(struct ath12k_base *ab, in ath12k_wmi_pdev_dma_ring_buf_release_event() argument
4133 ret = ath12k_wmi_tlv_iter(ab, skb->data, skb->len, in ath12k_wmi_pdev_dma_ring_buf_release_event()
4137 ath12k_warn(ab, "failed to parse dma buf release tlv %d\n", ret); in ath12k_wmi_pdev_dma_ring_buf_release_event()
4147 ret = ath12k_dbring_buffer_release_event(ab, &param); in ath12k_wmi_pdev_dma_ring_buf_release_event()
4149 ath12k_warn(ab, "failed to handle dma buf release event %d\n", ret); in ath12k_wmi_pdev_dma_ring_buf_release_event()
4365 static int ath12k_wmi_alloc_dbring_caps(struct ath12k_base *ab, in ath12k_wmi_alloc_dbring_caps() argument
4376 ab->db_caps = ptr; in ath12k_wmi_alloc_dbring_caps()
4377 ab->num_db_cap = num_cap; in ath12k_wmi_alloc_dbring_caps()
4382 static void ath12k_wmi_free_dbring_caps(struct ath12k_base *ab) in ath12k_wmi_free_dbring_caps() argument
4384 kfree(ab->db_caps); in ath12k_wmi_free_dbring_caps()
4385 ab->db_caps = NULL; in ath12k_wmi_free_dbring_caps()
4386 ab->num_db_cap = 0; in ath12k_wmi_free_dbring_caps()
4389 static int ath12k_wmi_dma_ring_caps(struct ath12k_base *ab, in ath12k_wmi_dma_ring_caps() argument
4400 ret = ath12k_wmi_tlv_iter(ab, ptr, len, in ath12k_wmi_dma_ring_caps()
4404 ath12k_warn(ab, "failed to parse dma ring caps tlv %d\n", ret); in ath12k_wmi_dma_ring_caps()
4411 if (ab->num_db_cap) { in ath12k_wmi_dma_ring_caps()
4412 ath12k_warn(ab, "Already processed, so ignoring dma ring caps\n"); in ath12k_wmi_dma_ring_caps()
4416 ret = ath12k_wmi_alloc_dbring_caps(ab, dma_caps_parse->n_dma_ring_caps); in ath12k_wmi_dma_ring_caps()
4420 dir_buff_caps = ab->db_caps; in ath12k_wmi_dma_ring_caps()
4423 ath12k_warn(ab, "Invalid module id %d\n", in ath12k_wmi_dma_ring_caps()
4440 ath12k_wmi_free_dbring_caps(ab); in ath12k_wmi_dma_ring_caps()
4444 static int ath12k_wmi_svc_rdy_ext_parse(struct ath12k_base *ab, in ath12k_wmi_svc_rdy_ext_parse() argument
4448 struct ath12k_wmi_pdev *wmi_handle = &ab->wmi_ab.wmi[0]; in ath12k_wmi_svc_rdy_ext_parse()
4457 ath12k_warn(ab, "unable to extract ext params\n"); in ath12k_wmi_svc_rdy_ext_parse()
4469 ret = ath12k_wmi_ext_soc_hal_reg_caps_parse(ab, len, ptr, in ath12k_wmi_svc_rdy_ext_parse()
4477 ret = ath12k_wmi_hw_mode_caps(ab, len, ptr, svc_rdy_ext); in ath12k_wmi_svc_rdy_ext_parse()
4484 ret = ath12k_wmi_tlv_iter(ab, ptr, len, in ath12k_wmi_svc_rdy_ext_parse()
4488 ath12k_warn(ab, "failed to parse tlv %d\n", ret); in ath12k_wmi_svc_rdy_ext_parse()
4494 ret = ath12k_wmi_ext_hal_reg_caps(ab, len, ptr, svc_rdy_ext); in ath12k_wmi_svc_rdy_ext_parse()
4506 ret = ath12k_wmi_dma_ring_caps(ab, len, ptr, in ath12k_wmi_svc_rdy_ext_parse()
4521 static int ath12k_service_ready_ext_event(struct ath12k_base *ab, in ath12k_service_ready_ext_event() argument
4527 ret = ath12k_wmi_tlv_iter(ab, skb->data, skb->len, in ath12k_service_ready_ext_event()
4531 ath12k_warn(ab, "failed to parse tlv %d\n", ret); in ath12k_service_ready_ext_event()
4535 if (!test_bit(WMI_TLV_SERVICE_EXT2_MSG, ab->wmi_ab.svc_map)) in ath12k_service_ready_ext_event()
4536 complete(&ab->wmi_ab.service_ready); in ath12k_service_ready_ext_event()
4542 ath12k_wmi_free_dbring_caps(ab); in ath12k_service_ready_ext_event()
4607 ath12k_wmi_tlv_mac_phy_caps_ext_parse(struct ath12k_base *ab, in ath12k_wmi_tlv_mac_phy_caps_ext_parse() argument
4615 if (ab->hw_params->single_pdev_only) { in ath12k_wmi_tlv_mac_phy_caps_ext_parse()
4624 for (i = 0; i < ab->fw_pdev_count; i++) { in ath12k_wmi_tlv_mac_phy_caps_ext_parse()
4625 struct ath12k_fw_pdev *fw_pdev = &ab->fw_pdev[i]; in ath12k_wmi_tlv_mac_phy_caps_ext_parse()
4634 if (i == ab->fw_pdev_count) in ath12k_wmi_tlv_mac_phy_caps_ext_parse()
4671 static int ath12k_wmi_tlv_mac_phy_caps_ext(struct ath12k_base *ab, u16 tag, in ath12k_wmi_tlv_mac_phy_caps_ext() argument
4681 if (ab->hw_params->single_pdev_only) { in ath12k_wmi_tlv_mac_phy_caps_ext()
4682 if (ab->wmi_ab.preferred_hw_mode != le32_to_cpu(caps->hw_mode_id) && in ath12k_wmi_tlv_mac_phy_caps_ext()
4686 for (i = 0; i < ab->num_radios; i++) { in ath12k_wmi_tlv_mac_phy_caps_ext()
4687 if (ab->pdevs[i].pdev_id == in ath12k_wmi_tlv_mac_phy_caps_ext()
4692 if (i == ab->num_radios) in ath12k_wmi_tlv_mac_phy_caps_ext()
4696 ret = ath12k_wmi_tlv_mac_phy_caps_ext_parse(ab, caps, &ab->pdevs[i]); in ath12k_wmi_tlv_mac_phy_caps_ext()
4698 ath12k_warn(ab, in ath12k_wmi_tlv_mac_phy_caps_ext()
4700 ret, ab->pdevs[i].pdev_id); in ath12k_wmi_tlv_mac_phy_caps_ext()
4707 static int ath12k_wmi_svc_rdy_ext2_parse(struct ath12k_base *ab, in ath12k_wmi_svc_rdy_ext2_parse() argument
4711 struct ath12k_wmi_pdev *wmi_handle = &ab->wmi_ab.wmi[0]; in ath12k_wmi_svc_rdy_ext2_parse()
4720 ath12k_warn(ab, in ath12k_wmi_svc_rdy_ext2_parse()
4729 ret = ath12k_wmi_dma_ring_caps(ab, len, ptr, in ath12k_wmi_svc_rdy_ext2_parse()
4742 ret = ath12k_wmi_tlv_iter(ab, ptr, len, in ath12k_wmi_svc_rdy_ext2_parse()
4746 ath12k_warn(ab, "failed to parse extended MAC PHY capabilities WMI TLV: %d\n", in ath12k_wmi_svc_rdy_ext2_parse()
4761 static int ath12k_service_ready_ext2_event(struct ath12k_base *ab, in ath12k_service_ready_ext2_event() argument
4767 ret = ath12k_wmi_tlv_iter(ab, skb->data, skb->len, in ath12k_service_ready_ext2_event()
4771 ath12k_warn(ab, "failed to parse ext2 event tlv %d\n", ret); in ath12k_service_ready_ext2_event()
4775 complete(&ab->wmi_ab.service_ready); in ath12k_service_ready_ext2_event()
4780 ath12k_wmi_free_dbring_caps(ab); in ath12k_service_ready_ext2_event()
4784 static int ath12k_pull_vdev_start_resp_tlv(struct ath12k_base *ab, struct sk_buff *skb, in ath12k_pull_vdev_start_resp_tlv() argument
4791 tb = ath12k_wmi_tlv_parse_alloc(ab, skb, GFP_ATOMIC); in ath12k_pull_vdev_start_resp_tlv()
4794 ath12k_warn(ab, "failed to parse tlv: %d\n", ret); in ath12k_pull_vdev_start_resp_tlv()
4800 ath12k_warn(ab, "failed to fetch vdev start resp ev"); in ath12k_pull_vdev_start_resp_tlv()
4870 static int ath12k_pull_reg_chan_list_ext_update_ev(struct ath12k_base *ab, in ath12k_pull_reg_chan_list_ext_update_ev() argument
4884 ath12k_dbg(ab, ATH12K_DBG_WMI, "processing regulatory ext channel list\n"); in ath12k_pull_reg_chan_list_ext_update_ev()
4886 tb = ath12k_wmi_tlv_parse_alloc(ab, skb, GFP_ATOMIC); in ath12k_pull_reg_chan_list_ext_update_ev()
4889 ath12k_warn(ab, "failed to parse tlv: %d\n", ret); in ath12k_pull_reg_chan_list_ext_update_ev()
4895 ath12k_warn(ab, "failed to fetch reg chan list ext update ev\n"); in ath12k_pull_reg_chan_list_ext_update_ev()
4924 …ath12k_warn(ab, "Num reg rules for 2G/5G exceeds max limit (num_2g_reg_rules: %d num_5g_reg_rules:… in ath12k_pull_reg_chan_list_ext_update_ev()
4934 …ath12k_warn(ab, "Num 6G reg rules for AP mode(%d) exceeds max limit (num_6g_reg_rules_ap: %d, max_… in ath12k_pull_reg_chan_list_ext_update_ev()
4959 ath12k_warn(ab, "Num 6g client reg rules exceeds max limit, for client(type: %d)\n", in ath12k_pull_reg_chan_list_ext_update_ev()
4967 ath12k_warn(ab, "No reg rules available\n"); in ath12k_pull_reg_chan_list_ext_update_ev()
5030 ath12k_dbg(ab, ATH12K_DBG_WMI, in ath12k_pull_reg_chan_list_ext_update_ev()
5037 ath12k_dbg(ab, ATH12K_DBG_WMI, in ath12k_pull_reg_chan_list_ext_update_ev()
5041 ath12k_dbg(ab, ATH12K_DBG_WMI, in ath12k_pull_reg_chan_list_ext_update_ev()
5047 ath12k_dbg(ab, ATH12K_DBG_WMI, in ath12k_pull_reg_chan_list_ext_update_ev()
5053 ath12k_dbg(ab, ATH12K_DBG_WMI, in ath12k_pull_reg_chan_list_ext_update_ev()
5071 ath12k_warn(ab, "Unable to Allocate memory for 2g rules\n"); in ath12k_pull_reg_chan_list_ext_update_ev()
5089 ath12k_dbg(ab, ATH12K_DBG_WMI, in ath12k_pull_reg_chan_list_ext_update_ev()
5105 ath12k_warn(ab, "Unable to Allocate memory for 5g rules\n"); in ath12k_pull_reg_chan_list_ext_update_ev()
5124 ath12k_warn(ab, "Unable to Allocate memory for 6g ap rules\n"); in ath12k_pull_reg_chan_list_ext_update_ev()
5139 ath12k_warn(ab, "Unable to Allocate memory for 6g client rules\n"); in ath12k_pull_reg_chan_list_ext_update_ev()
5168 ath12k_dbg(ab, ATH12K_DBG_WMI, "6g client_type: %d domain_code_6g_super_id: %d", in ath12k_pull_reg_chan_list_ext_update_ev()
5171 ath12k_dbg(ab, ATH12K_DBG_WMI, "processed regulatory ext channel list\n"); in ath12k_pull_reg_chan_list_ext_update_ev()
5177 static int ath12k_pull_peer_del_resp_ev(struct ath12k_base *ab, struct sk_buff *skb, in ath12k_pull_peer_del_resp_ev() argument
5184 tb = ath12k_wmi_tlv_parse_alloc(ab, skb, GFP_ATOMIC); in ath12k_pull_peer_del_resp_ev()
5187 ath12k_warn(ab, "failed to parse tlv: %d\n", ret); in ath12k_pull_peer_del_resp_ev()
5193 ath12k_warn(ab, "failed to fetch peer delete resp ev"); in ath12k_pull_peer_del_resp_ev()
5208 static int ath12k_pull_vdev_del_resp_ev(struct ath12k_base *ab, in ath12k_pull_vdev_del_resp_ev() argument
5216 tb = ath12k_wmi_tlv_parse_alloc(ab, skb, GFP_ATOMIC); in ath12k_pull_vdev_del_resp_ev()
5219 ath12k_warn(ab, "failed to parse tlv: %d\n", ret); in ath12k_pull_vdev_del_resp_ev()
5225 ath12k_warn(ab, "failed to fetch vdev delete resp ev"); in ath12k_pull_vdev_del_resp_ev()
5236 static int ath12k_pull_bcn_tx_status_ev(struct ath12k_base *ab, in ath12k_pull_bcn_tx_status_ev() argument
5244 tb = ath12k_wmi_tlv_parse_alloc(ab, skb, GFP_ATOMIC); in ath12k_pull_bcn_tx_status_ev()
5247 ath12k_warn(ab, "failed to parse tlv: %d\n", ret); in ath12k_pull_bcn_tx_status_ev()
5253 ath12k_warn(ab, "failed to fetch bcn tx status ev"); in ath12k_pull_bcn_tx_status_ev()
5265 static int ath12k_pull_vdev_stopped_param_tlv(struct ath12k_base *ab, struct sk_buff *skb, in ath12k_pull_vdev_stopped_param_tlv() argument
5272 tb = ath12k_wmi_tlv_parse_alloc(ab, skb, GFP_ATOMIC); in ath12k_pull_vdev_stopped_param_tlv()
5275 ath12k_warn(ab, "failed to parse tlv: %d\n", ret); in ath12k_pull_vdev_stopped_param_tlv()
5281 ath12k_warn(ab, "failed to fetch vdev stop ev"); in ath12k_pull_vdev_stopped_param_tlv()
5292 static int ath12k_wmi_tlv_mgmt_rx_parse(struct ath12k_base *ab, in ath12k_wmi_tlv_mgmt_rx_parse() argument
5312 static int ath12k_pull_mgmt_rx_params_tlv(struct ath12k_base *ab, in ath12k_pull_mgmt_rx_params_tlv() argument
5321 ret = ath12k_wmi_tlv_iter(ab, skb->data, skb->len, in ath12k_pull_mgmt_rx_params_tlv()
5325 ath12k_warn(ab, "failed to parse mgmt rx tlv %d\n", ret); in ath12k_pull_mgmt_rx_params_tlv()
5333 ath12k_warn(ab, "failed to fetch mgmt rx hdr"); in ath12k_pull_mgmt_rx_params_tlv()
5353 ath12k_warn(ab, "invalid length in mgmt rx hdr ev"); in ath12k_pull_mgmt_rx_params_tlv()
5378 ath12k_warn(ar->ab, "received mgmt tx compl for invalid msdu_id: %d\n", in wmi_process_mgmt_tx_comp()
5388 dma_unmap_single(ar->ab->dev, skb_cb->paddr, msdu->len, DMA_TO_DEVICE); in wmi_process_mgmt_tx_comp()
5411 static int ath12k_pull_mgmt_tx_compl_param_tlv(struct ath12k_base *ab, in ath12k_pull_mgmt_tx_compl_param_tlv() argument
5419 tb = ath12k_wmi_tlv_parse_alloc(ab, skb, GFP_ATOMIC); in ath12k_pull_mgmt_tx_compl_param_tlv()
5422 ath12k_warn(ab, "failed to parse tlv: %d\n", ret); in ath12k_pull_mgmt_tx_compl_param_tlv()
5428 ath12k_warn(ab, "failed to fetch mgmt tx compl ev"); in ath12k_pull_mgmt_tx_compl_param_tlv()
5449 ath12k_warn(ar->ab, "received scan started event in an invalid scan state: %s (%d)\n", in ath12k_wmi_event_scan_started()
5472 ath12k_warn(ar->ab, "received scan start failed event in an invalid scan state: %s (%d)\n", in ath12k_wmi_event_scan_start_failed()
5498 ath12k_warn(ar->ab, "received scan completed event in an invalid scan state: %s (%d)\n", in ath12k_wmi_event_scan_completed()
5516 ath12k_warn(ar->ab, "received scan bss chan event in an invalid scan state: %s (%d)\n", in ath12k_wmi_event_scan_bss_chan()
5536 ath12k_warn(ar->ab, "received scan foreign chan event in an invalid scan state: %s (%d)\n", in ath12k_wmi_event_scan_foreign_chan()
5593 static int ath12k_pull_scan_ev(struct ath12k_base *ab, struct sk_buff *skb, in ath12k_pull_scan_ev() argument
5600 tb = ath12k_wmi_tlv_parse_alloc(ab, skb, GFP_ATOMIC); in ath12k_pull_scan_ev()
5603 ath12k_warn(ab, "failed to parse tlv: %d\n", ret); in ath12k_pull_scan_ev()
5609 ath12k_warn(ab, "failed to fetch scan ev"); in ath12k_pull_scan_ev()
5626 static int ath12k_pull_peer_sta_kickout_ev(struct ath12k_base *ab, struct sk_buff *skb, in ath12k_pull_peer_sta_kickout_ev() argument
5633 tb = ath12k_wmi_tlv_parse_alloc(ab, skb, GFP_ATOMIC); in ath12k_pull_peer_sta_kickout_ev()
5636 ath12k_warn(ab, "failed to parse tlv: %d\n", ret); in ath12k_pull_peer_sta_kickout_ev()
5642 ath12k_warn(ab, "failed to fetch peer sta kickout ev"); in ath12k_pull_peer_sta_kickout_ev()
5653 static int ath12k_pull_roam_ev(struct ath12k_base *ab, struct sk_buff *skb, in ath12k_pull_roam_ev() argument
5660 tb = ath12k_wmi_tlv_parse_alloc(ab, skb, GFP_ATOMIC); in ath12k_pull_roam_ev()
5663 ath12k_warn(ab, "failed to parse tlv: %d\n", ret); in ath12k_pull_roam_ev()
5669 ath12k_warn(ab, "failed to fetch roam ev"); in ath12k_pull_roam_ev()
5705 static int ath12k_pull_chan_info_ev(struct ath12k_base *ab, struct sk_buff *skb, in ath12k_pull_chan_info_ev() argument
5712 tb = ath12k_wmi_tlv_parse_alloc(ab, skb, GFP_ATOMIC); in ath12k_pull_chan_info_ev()
5715 ath12k_warn(ab, "failed to parse tlv: %d\n", ret); in ath12k_pull_chan_info_ev()
5721 ath12k_warn(ab, "failed to fetch chan info ev"); in ath12k_pull_chan_info_ev()
5744 ath12k_pull_pdev_bss_chan_info_ev(struct ath12k_base *ab, struct sk_buff *skb, in ath12k_pull_pdev_bss_chan_info_ev() argument
5751 tb = ath12k_wmi_tlv_parse_alloc(ab, skb, GFP_ATOMIC); in ath12k_pull_pdev_bss_chan_info_ev()
5754 ath12k_warn(ab, "failed to parse tlv: %d\n", ret); in ath12k_pull_pdev_bss_chan_info_ev()
5760 ath12k_warn(ab, "failed to fetch pdev bss chan info ev"); in ath12k_pull_pdev_bss_chan_info_ev()
5784 ath12k_pull_vdev_install_key_compl_ev(struct ath12k_base *ab, struct sk_buff *skb, in ath12k_pull_vdev_install_key_compl_ev() argument
5791 tb = ath12k_wmi_tlv_parse_alloc(ab, skb, GFP_ATOMIC); in ath12k_pull_vdev_install_key_compl_ev()
5794 ath12k_warn(ab, "failed to parse tlv: %d\n", ret); in ath12k_pull_vdev_install_key_compl_ev()
5800 ath12k_warn(ab, "failed to fetch vdev install key compl ev"); in ath12k_pull_vdev_install_key_compl_ev()
5815 static int ath12k_pull_peer_assoc_conf_ev(struct ath12k_base *ab, struct sk_buff *skb, in ath12k_pull_peer_assoc_conf_ev() argument
5822 tb = ath12k_wmi_tlv_parse_alloc(ab, skb, GFP_ATOMIC); in ath12k_pull_peer_assoc_conf_ev()
5825 ath12k_warn(ab, "failed to parse tlv: %d\n", ret); in ath12k_pull_peer_assoc_conf_ev()
5831 ath12k_warn(ab, "failed to fetch peer assoc conf ev"); in ath12k_pull_peer_assoc_conf_ev()
5844 ath12k_pull_pdev_temp_ev(struct ath12k_base *ab, struct sk_buff *skb, in ath12k_pull_pdev_temp_ev() argument
5850 tb = ath12k_wmi_tlv_parse_alloc(ab, skb, GFP_ATOMIC); in ath12k_pull_pdev_temp_ev()
5853 ath12k_warn(ab, "failed to parse tlv: %d\n", ret); in ath12k_pull_pdev_temp_ev()
5859 ath12k_warn(ab, "failed to fetch pdev temp ev"); in ath12k_pull_pdev_temp_ev()
5868 static void ath12k_wmi_op_ep_tx_credits(struct ath12k_base *ab) in ath12k_wmi_op_ep_tx_credits() argument
5871 wake_up(&ab->wmi_ab.tx_credits_wq); in ath12k_wmi_op_ep_tx_credits()
5874 static void ath12k_wmi_htc_tx_complete(struct ath12k_base *ab, in ath12k_wmi_htc_tx_complete() argument
5891 static int ath12k_reg_chan_list_event(struct ath12k_base *ab, struct sk_buff *skb) in ath12k_reg_chan_list_event() argument
5905 ret = ath12k_pull_reg_chan_list_ext_update_ev(ab, skb, reg_info); in ath12k_reg_chan_list_event()
5908 ath12k_warn(ab, "failed to extract regulatory info from received event\n"); in ath12k_reg_chan_list_event()
5917 ath12k_warn(ab, "Failed to set the requested Country regulatory setting\n"); in ath12k_reg_chan_list_event()
5923 if (pdev_idx >= ab->num_radios) { in ath12k_reg_chan_list_event()
5928 if (ab->hw_params->single_pdev_only && in ath12k_reg_chan_list_event()
5929 pdev_idx < ab->hw_params->num_rxdma_per_pdev) in ath12k_reg_chan_list_event()
5938 if (ab->default_regd[pdev_idx] && !ab->new_regd[pdev_idx] && in ath12k_reg_chan_list_event()
5939 !memcmp(ab->default_regd[pdev_idx]->alpha2, in ath12k_reg_chan_list_event()
5947 if (ab->default_regd[pdev_idx] && in ath12k_reg_chan_list_event()
5949 ab->default_regd[pdev_idx]->alpha2) && in ath12k_reg_chan_list_event()
5953 regd = ath12k_reg_build_regd(ab, reg_info, intersect); in ath12k_reg_chan_list_event()
5955 ath12k_warn(ab, "failed to build regd from reg_info\n"); in ath12k_reg_chan_list_event()
5959 spin_lock(&ab->base_lock); in ath12k_reg_chan_list_event()
5960 if (test_bit(ATH12K_FLAG_REGISTERED, &ab->dev_flags)) { in ath12k_reg_chan_list_event()
5968 ar = ab->pdevs[pdev_idx].ar; in ath12k_reg_chan_list_event()
5969 kfree(ab->new_regd[pdev_idx]); in ath12k_reg_chan_list_event()
5970 ab->new_regd[pdev_idx] = regd; in ath12k_reg_chan_list_event()
5971 queue_work(ab->workqueue, &ar->regd_update_work); in ath12k_reg_chan_list_event()
5978 kfree(ab->default_regd[pdev_idx]); in ath12k_reg_chan_list_event()
5980 ab->default_regd[pdev_idx] = regd; in ath12k_reg_chan_list_event()
5982 ab->dfs_region = reg_info->dfs_region; in ath12k_reg_chan_list_event()
5983 spin_unlock(&ab->base_lock); in ath12k_reg_chan_list_event()
6014 static int ath12k_wmi_rdy_parse(struct ath12k_base *ab, u16 tag, u16 len, in ath12k_wmi_rdy_parse() argument
6029 ab->wlan_init_status = le32_to_cpu(fixed_param.ready_event_min.status); in ath12k_wmi_rdy_parse()
6033 ether_addr_copy(ab->mac_addr, in ath12k_wmi_rdy_parse()
6035 ab->pktlog_defs_checksum = le32_to_cpu(fixed_param.pktlog_defs_checksum); in ath12k_wmi_rdy_parse()
6036 ab->wmi_ready = true; in ath12k_wmi_rdy_parse()
6042 if (!(ab->num_radios > 1 && num_mac_addr >= ab->num_radios)) in ath12k_wmi_rdy_parse()
6045 for (i = 0; i < ab->num_radios; i++) { in ath12k_wmi_rdy_parse()
6046 pdev = &ab->pdevs[i]; in ath12k_wmi_rdy_parse()
6049 ab->pdevs_macaddr_valid = true; in ath12k_wmi_rdy_parse()
6058 static int ath12k_ready_event(struct ath12k_base *ab, struct sk_buff *skb) in ath12k_ready_event() argument
6063 ret = ath12k_wmi_tlv_iter(ab, skb->data, skb->len, in ath12k_ready_event()
6066 ath12k_warn(ab, "failed to parse tlv %d\n", ret); in ath12k_ready_event()
6070 complete(&ab->wmi_ab.unified_ready); in ath12k_ready_event()
6074 static void ath12k_peer_delete_resp_event(struct ath12k_base *ab, struct sk_buff *skb) in ath12k_peer_delete_resp_event() argument
6079 if (ath12k_pull_peer_del_resp_ev(ab, skb, &peer_del_resp) != 0) { in ath12k_peer_delete_resp_event()
6080 ath12k_warn(ab, "failed to extract peer delete resp"); in ath12k_peer_delete_resp_event()
6085 ar = ath12k_mac_get_ar_by_vdev_id(ab, le32_to_cpu(peer_del_resp.vdev_id)); in ath12k_peer_delete_resp_event()
6087 ath12k_warn(ab, "invalid vdev id in peer delete resp ev %d", in ath12k_peer_delete_resp_event()
6095 ath12k_dbg(ab, ATH12K_DBG_WMI, "peer delete resp for vdev id %d addr %pM\n", in ath12k_peer_delete_resp_event()
6099 static void ath12k_vdev_delete_resp_event(struct ath12k_base *ab, in ath12k_vdev_delete_resp_event() argument
6105 if (ath12k_pull_vdev_del_resp_ev(ab, skb, &vdev_id) != 0) { in ath12k_vdev_delete_resp_event()
6106 ath12k_warn(ab, "failed to extract vdev delete resp"); in ath12k_vdev_delete_resp_event()
6111 ar = ath12k_mac_get_ar_by_vdev_id(ab, vdev_id); in ath12k_vdev_delete_resp_event()
6113 ath12k_warn(ab, "invalid vdev id in vdev delete resp ev %d", in ath12k_vdev_delete_resp_event()
6123 ath12k_dbg(ab, ATH12K_DBG_WMI, "vdev delete resp for vdev id %d\n", in ath12k_vdev_delete_resp_event()
6143 static void ath12k_vdev_start_resp_event(struct ath12k_base *ab, struct sk_buff *skb) in ath12k_vdev_start_resp_event() argument
6149 if (ath12k_pull_vdev_start_resp_tlv(ab, skb, &vdev_start_resp) != 0) { in ath12k_vdev_start_resp_event()
6150 ath12k_warn(ab, "failed to extract vdev start resp"); in ath12k_vdev_start_resp_event()
6155 ar = ath12k_mac_get_ar_by_vdev_id(ab, le32_to_cpu(vdev_start_resp.vdev_id)); in ath12k_vdev_start_resp_event()
6157 ath12k_warn(ab, "invalid vdev id in vdev start resp ev %d", in ath12k_vdev_start_resp_event()
6168 ath12k_warn(ab, "vdev start resp error status %d (%s)\n", in ath12k_vdev_start_resp_event()
6177 ath12k_dbg(ab, ATH12K_DBG_WMI, "vdev start resp for vdev id %d", in ath12k_vdev_start_resp_event()
6181 static void ath12k_bcn_tx_status_event(struct ath12k_base *ab, struct sk_buff *skb) in ath12k_bcn_tx_status_event() argument
6185 if (ath12k_pull_bcn_tx_status_ev(ab, skb, &vdev_id, &tx_status) != 0) { in ath12k_bcn_tx_status_event()
6186 ath12k_warn(ab, "failed to extract bcn tx status"); in ath12k_bcn_tx_status_event()
6191 static void ath12k_vdev_stopped_event(struct ath12k_base *ab, struct sk_buff *skb) in ath12k_vdev_stopped_event() argument
6196 if (ath12k_pull_vdev_stopped_param_tlv(ab, skb, &vdev_id) != 0) { in ath12k_vdev_stopped_event()
6197 ath12k_warn(ab, "failed to extract vdev stopped event"); in ath12k_vdev_stopped_event()
6202 ar = ath12k_mac_get_ar_by_vdev_id(ab, vdev_id); in ath12k_vdev_stopped_event()
6204 ath12k_warn(ab, "invalid vdev id in vdev stopped ev %d", in ath12k_vdev_stopped_event()
6214 ath12k_dbg(ab, ATH12K_DBG_WMI, "vdev stopped for vdev id %d", vdev_id); in ath12k_vdev_stopped_event()
6217 static void ath12k_mgmt_rx_event(struct ath12k_base *ab, struct sk_buff *skb) in ath12k_mgmt_rx_event() argument
6226 if (ath12k_pull_mgmt_rx_params_tlv(ab, skb, &rx_ev) != 0) { in ath12k_mgmt_rx_event()
6227 ath12k_warn(ab, "failed to extract mgmt rx event"); in ath12k_mgmt_rx_event()
6234 ath12k_dbg(ab, ATH12K_DBG_MGMT, "mgmt rx event status %08x\n", in ath12k_mgmt_rx_event()
6238 ar = ath12k_mac_get_ar_by_pdev_id(ab, rx_ev.pdev_id); in ath12k_mgmt_rx_event()
6241 ath12k_warn(ab, "invalid pdev_id %d in mgmt_rx_event\n", in ath12k_mgmt_rx_event()
6277 ath12k_dbg(ab, ATH12K_DBG_WMI, in ath12k_mgmt_rx_event()
6315 ath12k_dbg(ab, ATH12K_DBG_MGMT, in ath12k_mgmt_rx_event()
6320 ath12k_dbg(ab, ATH12K_DBG_MGMT, in ath12k_mgmt_rx_event()
6331 static void ath12k_mgmt_tx_compl_event(struct ath12k_base *ab, struct sk_buff *skb) in ath12k_mgmt_tx_compl_event() argument
6336 if (ath12k_pull_mgmt_tx_compl_param_tlv(ab, skb, &tx_compl_param) != 0) { in ath12k_mgmt_tx_compl_event()
6337 ath12k_warn(ab, "failed to extract mgmt tx compl event"); in ath12k_mgmt_tx_compl_event()
6342 ar = ath12k_mac_get_ar_by_pdev_id(ab, le32_to_cpu(tx_compl_param.pdev_id)); in ath12k_mgmt_tx_compl_event()
6344 ath12k_warn(ab, "invalid pdev id %d in mgmt_tx_compl_event\n", in ath12k_mgmt_tx_compl_event()
6352 ath12k_dbg(ab, ATH12K_DBG_MGMT, in ath12k_mgmt_tx_compl_event()
6361 static struct ath12k *ath12k_get_ar_on_scan_state(struct ath12k_base *ab, in ath12k_get_ar_on_scan_state() argument
6369 for (i = 0; i < ab->num_radios; i++) { in ath12k_get_ar_on_scan_state()
6370 pdev = rcu_dereference(ab->pdevs_active[i]); in ath12k_get_ar_on_scan_state()
6387 static void ath12k_scan_event(struct ath12k_base *ab, struct sk_buff *skb) in ath12k_scan_event() argument
6392 if (ath12k_pull_scan_ev(ab, skb, &scan_ev) != 0) { in ath12k_scan_event()
6393 ath12k_warn(ab, "failed to extract scan event"); in ath12k_scan_event()
6407 ar = ath12k_get_ar_on_scan_state(ab, le32_to_cpu(scan_ev.vdev_id), in ath12k_scan_event()
6410 ar = ath12k_get_ar_on_scan_state(ab, le32_to_cpu(scan_ev.vdev_id), in ath12k_scan_event()
6413 ar = ath12k_mac_get_ar_by_vdev_id(ab, le32_to_cpu(scan_ev.vdev_id)); in ath12k_scan_event()
6417 ath12k_warn(ab, "Received scan event for unknown vdev"); in ath12k_scan_event()
6424 ath12k_dbg(ab, ATH12K_DBG_WMI, in ath12k_scan_event()
6450 ath12k_warn(ab, "received scan start failure event\n"); in ath12k_scan_event()
6468 static void ath12k_peer_sta_kickout_event(struct ath12k_base *ab, struct sk_buff *skb) in ath12k_peer_sta_kickout_event() argument
6475 if (ath12k_pull_peer_sta_kickout_ev(ab, skb, &arg) != 0) { in ath12k_peer_sta_kickout_event()
6476 ath12k_warn(ab, "failed to extract peer sta kickout event"); in ath12k_peer_sta_kickout_event()
6482 spin_lock_bh(&ab->base_lock); in ath12k_peer_sta_kickout_event()
6484 peer = ath12k_peer_find_by_addr(ab, arg.mac_addr); in ath12k_peer_sta_kickout_event()
6487 ath12k_warn(ab, "peer not found %pM\n", in ath12k_peer_sta_kickout_event()
6492 ar = ath12k_mac_get_ar_by_vdev_id(ab, peer->vdev_id); in ath12k_peer_sta_kickout_event()
6494 ath12k_warn(ab, "invalid vdev id in peer sta kickout ev %d", in ath12k_peer_sta_kickout_event()
6502 ath12k_warn(ab, "Spurious quick kickout for STA %pM\n", in ath12k_peer_sta_kickout_event()
6507 ath12k_dbg(ab, ATH12K_DBG_WMI, "peer sta kickout event %pM", in ath12k_peer_sta_kickout_event()
6513 spin_unlock_bh(&ab->base_lock); in ath12k_peer_sta_kickout_event()
6517 static void ath12k_roam_event(struct ath12k_base *ab, struct sk_buff *skb) in ath12k_roam_event() argument
6524 if (ath12k_pull_roam_ev(ab, skb, &roam_ev) != 0) { in ath12k_roam_event()
6525 ath12k_warn(ab, "failed to extract roam event"); in ath12k_roam_event()
6533 ath12k_dbg(ab, ATH12K_DBG_WMI, in ath12k_roam_event()
6538 ar = ath12k_mac_get_ar_by_vdev_id(ab, vdev_id); in ath12k_roam_event()
6540 ath12k_warn(ab, "invalid vdev id in roam ev %d", vdev_id); in ath12k_roam_event()
6546 ath12k_warn(ab, "ignoring unknown roam event reason %d on vdev %i\n", in ath12k_roam_event()
6557 ath12k_warn(ab, "ignoring not implemented roam event reason %d on vdev %i\n", in ath12k_roam_event()
6565 static void ath12k_chan_info_event(struct ath12k_base *ab, struct sk_buff *skb) in ath12k_chan_info_event() argument
6572 u32 cc_freq_hz = ab->cc_freq_hz; in ath12k_chan_info_event()
6574 if (ath12k_pull_chan_info_ev(ab, skb, &ch_info_ev) != 0) { in ath12k_chan_info_event()
6575 ath12k_warn(ab, "failed to extract chan info event"); in ath12k_chan_info_event()
6579 ath12k_dbg(ab, ATH12K_DBG_WMI, in ath12k_chan_info_event()
6587 ath12k_dbg(ab, ATH12K_DBG_WMI, "chan info report completed\n"); in ath12k_chan_info_event()
6592 ar = ath12k_mac_get_ar_by_vdev_id(ab, le32_to_cpu(ch_info_ev.vdev_id)); in ath12k_chan_info_event()
6594 ath12k_warn(ab, "invalid vdev id in chan info ev %d", in ath12k_chan_info_event()
6604 ath12k_warn(ab, "received chan info event without a scan request, ignoring\n"); in ath12k_chan_info_event()
6613 ath12k_warn(ab, "chan info: invalid frequency %d (idx %d out of bounds)\n", in ath12k_chan_info_event()
6640 ath12k_pdev_bss_chan_info_event(struct ath12k_base *ab, struct sk_buff *skb) in ath12k_pdev_bss_chan_info_event() argument
6645 u32 cc_freq_hz = ab->cc_freq_hz; in ath12k_pdev_bss_chan_info_event()
6649 if (ath12k_pull_pdev_bss_chan_info_ev(ab, skb, &bss_ch_info_ev) != 0) { in ath12k_pdev_bss_chan_info_event()
6650 ath12k_warn(ab, "failed to extract pdev bss chan info event"); in ath12k_pdev_bss_chan_info_event()
6669 ath12k_dbg(ab, ATH12K_DBG_WMI, in ath12k_pdev_bss_chan_info_event()
6676 ar = ath12k_mac_get_ar_by_pdev_id(ab, le32_to_cpu(bss_ch_info_ev.pdev_id)); in ath12k_pdev_bss_chan_info_event()
6679 ath12k_warn(ab, "invalid pdev id %d in bss_chan_info event\n", in ath12k_pdev_bss_chan_info_event()
6688 ath12k_warn(ab, "bss chan info: invalid frequency %d (idx %d out of bounds)\n", in ath12k_pdev_bss_chan_info_event()
6712 static void ath12k_vdev_install_key_compl_event(struct ath12k_base *ab, in ath12k_vdev_install_key_compl_event() argument
6718 if (ath12k_pull_vdev_install_key_compl_ev(ab, skb, &install_key_compl) != 0) { in ath12k_vdev_install_key_compl_event()
6719 ath12k_warn(ab, "failed to extract install key compl event"); in ath12k_vdev_install_key_compl_event()
6723 ath12k_dbg(ab, ATH12K_DBG_WMI, in ath12k_vdev_install_key_compl_event()
6729 ar = ath12k_mac_get_ar_by_vdev_id(ab, install_key_compl.vdev_id); in ath12k_vdev_install_key_compl_event()
6731 ath12k_warn(ab, "invalid vdev id in install key compl ev %d", in ath12k_vdev_install_key_compl_event()
6740 ath12k_warn(ab, "install key failed for %pM status %d\n", in ath12k_vdev_install_key_compl_event()
6749 static int ath12k_wmi_tlv_services_parser(struct ath12k_base *ab, in ath12k_wmi_tlv_services_parser() argument
6761 ath12k_warn(ab, "invalid length %d for the WMI services available tag 0x%x\n", in ath12k_wmi_tlv_services_parser()
6775 set_bit(j, ab->wmi_ab.svc_map); in ath12k_wmi_tlv_services_parser()
6779 ath12k_dbg(ab, ATH12K_DBG_WMI, in ath12k_wmi_tlv_services_parser()
6794 set_bit(j, ab->wmi_ab.svc_map); in ath12k_wmi_tlv_services_parser()
6798 ath12k_dbg(ab, ATH12K_DBG_WMI, in ath12k_wmi_tlv_services_parser()
6807 static int ath12k_service_available_event(struct ath12k_base *ab, struct sk_buff *skb) in ath12k_service_available_event() argument
6811 ret = ath12k_wmi_tlv_iter(ab, skb->data, skb->len, in ath12k_service_available_event()
6817 static void ath12k_peer_assoc_conf_event(struct ath12k_base *ab, struct sk_buff *skb) in ath12k_peer_assoc_conf_event() argument
6822 if (ath12k_pull_peer_assoc_conf_ev(ab, skb, &peer_assoc_conf) != 0) { in ath12k_peer_assoc_conf_event()
6823 ath12k_warn(ab, "failed to extract peer assoc conf event"); in ath12k_peer_assoc_conf_event()
6827 ath12k_dbg(ab, ATH12K_DBG_WMI, in ath12k_peer_assoc_conf_event()
6832 ar = ath12k_mac_get_ar_by_vdev_id(ab, peer_assoc_conf.vdev_id); in ath12k_peer_assoc_conf_event()
6835 ath12k_warn(ab, "invalid vdev id in peer assoc conf ev %d", in ath12k_peer_assoc_conf_event()
6845 static void ath12k_update_stats_event(struct ath12k_base *ab, struct sk_buff *skb) in ath12k_update_stats_event() argument
6852 static void ath12k_pdev_ctl_failsafe_check_event(struct ath12k_base *ab, in ath12k_pdev_ctl_failsafe_check_event() argument
6859 tb = ath12k_wmi_tlv_parse_alloc(ab, skb, GFP_ATOMIC); in ath12k_pdev_ctl_failsafe_check_event()
6862 ath12k_warn(ab, "failed to parse tlv: %d\n", ret); in ath12k_pdev_ctl_failsafe_check_event()
6868 ath12k_warn(ab, "failed to fetch pdev ctl failsafe check ev"); in ath12k_pdev_ctl_failsafe_check_event()
6873 ath12k_dbg(ab, ATH12K_DBG_WMI, in ath12k_pdev_ctl_failsafe_check_event()
6881 ath12k_warn(ab, "pdev ctl failsafe failure status %d", in ath12k_pdev_ctl_failsafe_check_event()
6888 ath12k_wmi_process_csa_switch_count_event(struct ath12k_base *ab, in ath12k_wmi_process_csa_switch_count_event() argument
6903 arvif = ath12k_mac_get_arvif_by_vdev_id(ab, vdev_ids[i]); in ath12k_wmi_process_csa_switch_count_event()
6906 ath12k_warn(ab, "Recvd csa status for unknown vdev %d", in ath12k_wmi_process_csa_switch_count_event()
6913 ath12k_warn(ab, "Invalid CSA switch count even link id: %d\n", in ath12k_wmi_process_csa_switch_count_event()
6920 ath12k_warn(ab, "unable to access bss link conf in process csa for vif %pM link %u\n", in ath12k_wmi_process_csa_switch_count_event()
6932 ath12k_wmi_pdev_csa_switch_count_status_event(struct ath12k_base *ab, in ath12k_wmi_pdev_csa_switch_count_status_event() argument
6940 tb = ath12k_wmi_tlv_parse_alloc(ab, skb, GFP_ATOMIC); in ath12k_wmi_pdev_csa_switch_count_status_event()
6943 ath12k_warn(ab, "failed to parse tlv: %d\n", ret); in ath12k_wmi_pdev_csa_switch_count_status_event()
6951 ath12k_warn(ab, "failed to fetch pdev csa switch count ev"); in ath12k_wmi_pdev_csa_switch_count_status_event()
6956 ath12k_dbg(ab, ATH12K_DBG_WMI, in ath12k_wmi_pdev_csa_switch_count_status_event()
6961 ath12k_wmi_process_csa_switch_count_event(ab, ev, vdev_ids); in ath12k_wmi_pdev_csa_switch_count_status_event()
6967 ath12k_wmi_pdev_dfs_radar_detected_event(struct ath12k_base *ab, struct sk_buff *skb) in ath12k_wmi_pdev_dfs_radar_detected_event() argument
6975 tb = ath12k_wmi_tlv_parse_alloc(ab, skb, GFP_ATOMIC); in ath12k_wmi_pdev_dfs_radar_detected_event()
6978 ath12k_warn(ab, "failed to parse tlv: %d\n", ret); in ath12k_wmi_pdev_dfs_radar_detected_event()
6985 ath12k_warn(ab, "failed to fetch pdev dfs radar detected ev"); in ath12k_wmi_pdev_dfs_radar_detected_event()
6990 ath12k_dbg(ab, ATH12K_DBG_WMI, in ath12k_wmi_pdev_dfs_radar_detected_event()
6998 ar = ath12k_mac_get_ar_by_pdev_id(ab, le32_to_cpu(ev->pdev_id)); in ath12k_wmi_pdev_dfs_radar_detected_event()
7001 ath12k_warn(ab, "radar detected in invalid pdev %d\n", in ath12k_wmi_pdev_dfs_radar_detected_event()
7011 ath12k_warn(ab, "failed to find valid chanctx_conf in radar detected event\n"); in ath12k_wmi_pdev_dfs_radar_detected_event()
7015 ath12k_dbg(ar->ab, ATH12K_DBG_REG, "DFS Radar Detected in pdev %d\n", in ath12k_wmi_pdev_dfs_radar_detected_event()
7019 ath12k_info(ab, "DFS Radar detected, but ignored as requested\n"); in ath12k_wmi_pdev_dfs_radar_detected_event()
7030 ath12k_wmi_pdev_temperature_event(struct ath12k_base *ab, in ath12k_wmi_pdev_temperature_event() argument
7036 if (ath12k_pull_pdev_temp_ev(ab, skb, &ev) != 0) { in ath12k_wmi_pdev_temperature_event()
7037 ath12k_warn(ab, "failed to extract pdev temperature event"); in ath12k_wmi_pdev_temperature_event()
7041 ath12k_dbg(ab, ATH12K_DBG_WMI, in ath12k_wmi_pdev_temperature_event()
7046 ar = ath12k_mac_get_ar_by_pdev_id(ab, le32_to_cpu(ev.pdev_id)); in ath12k_wmi_pdev_temperature_event()
7048 ath12k_warn(ab, "invalid pdev id in pdev temperature ev %d", ev.pdev_id); in ath12k_wmi_pdev_temperature_event()
7056 static void ath12k_fils_discovery_event(struct ath12k_base *ab, in ath12k_fils_discovery_event() argument
7063 tb = ath12k_wmi_tlv_parse_alloc(ab, skb, GFP_ATOMIC); in ath12k_fils_discovery_event()
7066 ath12k_warn(ab, in ath12k_fils_discovery_event()
7074 ath12k_warn(ab, "failed to fetch FILS discovery event\n"); in ath12k_fils_discovery_event()
7079 ath12k_warn(ab, in ath12k_fils_discovery_event()
7086 static void ath12k_probe_resp_tx_status_event(struct ath12k_base *ab, in ath12k_probe_resp_tx_status_event() argument
7093 tb = ath12k_wmi_tlv_parse_alloc(ab, skb, GFP_ATOMIC); in ath12k_probe_resp_tx_status_event()
7096 ath12k_warn(ab, in ath12k_probe_resp_tx_status_event()
7104 ath12k_warn(ab, in ath12k_probe_resp_tx_status_event()
7111 ath12k_warn(ab, in ath12k_probe_resp_tx_status_event()
7118 static int ath12k_wmi_p2p_noa_event(struct ath12k_base *ab, in ath12k_wmi_p2p_noa_event() argument
7127 tb = ath12k_wmi_tlv_parse_alloc(ab, skb, GFP_ATOMIC); in ath12k_wmi_p2p_noa_event()
7130 ath12k_warn(ab, "failed to parse P2P NoA TLV: %d\n", ret); in ath12k_wmi_p2p_noa_event()
7144 ath12k_dbg(ab, ATH12K_DBG_WMI, in ath12k_wmi_p2p_noa_event()
7149 ar = ath12k_mac_get_ar_by_vdev_id(ab, vdev_id); in ath12k_wmi_p2p_noa_event()
7151 ath12k_warn(ab, "invalid vdev id %d in P2P NoA event\n", in ath12k_wmi_p2p_noa_event()
7168 static void ath12k_rfkill_state_change_event(struct ath12k_base *ab, in ath12k_rfkill_state_change_event() argument
7175 tb = ath12k_wmi_tlv_parse_alloc(ab, skb, GFP_ATOMIC); in ath12k_rfkill_state_change_event()
7178 ath12k_warn(ab, "failed to parse tlv: %d\n", ret); in ath12k_rfkill_state_change_event()
7188 ath12k_dbg(ab, ATH12K_DBG_MAC, in ath12k_rfkill_state_change_event()
7194 spin_lock_bh(&ab->base_lock); in ath12k_rfkill_state_change_event()
7195 ab->rfkill_radio_on = (ev->radio_state == cpu_to_le32(WMI_RFKILL_RADIO_STATE_ON)); in ath12k_rfkill_state_change_event()
7196 spin_unlock_bh(&ab->base_lock); in ath12k_rfkill_state_change_event()
7198 queue_work(ab->workqueue, &ab->rfkill_work); in ath12k_rfkill_state_change_event()
7203 ath12k_wmi_diag_event(struct ath12k_base *ab, struct sk_buff *skb) in ath12k_wmi_diag_event() argument
7205 trace_ath12k_wmi_diag(ab, skb->data, skb->len); in ath12k_wmi_diag_event()
7208 static void ath12k_wmi_twt_enable_event(struct ath12k_base *ab, in ath12k_wmi_twt_enable_event() argument
7215 tb = ath12k_wmi_tlv_parse_alloc(ab, skb, GFP_ATOMIC); in ath12k_wmi_twt_enable_event()
7218 ath12k_warn(ab, "failed to parse wmi twt enable status event tlv: %d\n", in ath12k_wmi_twt_enable_event()
7225 ath12k_warn(ab, "failed to fetch twt enable wmi event\n"); in ath12k_wmi_twt_enable_event()
7229 ath12k_dbg(ab, ATH12K_DBG_MAC, "wmi twt enable event pdev id %u status %u\n", in ath12k_wmi_twt_enable_event()
7237 static void ath12k_wmi_twt_disable_event(struct ath12k_base *ab, in ath12k_wmi_twt_disable_event() argument
7244 tb = ath12k_wmi_tlv_parse_alloc(ab, skb, GFP_ATOMIC); in ath12k_wmi_twt_disable_event()
7247 ath12k_warn(ab, "failed to parse wmi twt disable status event tlv: %d\n", in ath12k_wmi_twt_disable_event()
7254 ath12k_warn(ab, "failed to fetch twt disable wmi event\n"); in ath12k_wmi_twt_disable_event()
7258 ath12k_dbg(ab, ATH12K_DBG_MAC, "wmi twt disable event pdev id %d status %u\n", in ath12k_wmi_twt_disable_event()
7266 static int ath12k_wmi_wow_wakeup_host_parse(struct ath12k_base *ab, in ath12k_wmi_wow_wakeup_host_parse() argument
7279 ath12k_dbg(ab, ATH12K_DBG_WMI, "wow wakeup host reason %d %s\n", in ath12k_wmi_wow_wakeup_host_parse()
7289 ath12k_warn(ab, "invalid wo reason page fault buffer len %d\n", in ath12k_wmi_wow_wakeup_host_parse()
7293 ath12k_dbg(ab, ATH12K_DBG_WMI, "wow_reason_page_fault len %d\n", in ath12k_wmi_wow_wakeup_host_parse()
7295 ath12k_dbg_dump(ab, ATH12K_DBG_WMI, in ath12k_wmi_wow_wakeup_host_parse()
7309 static void ath12k_wmi_event_wow_wakeup_host(struct ath12k_base *ab, struct sk_buff *skb) in ath12k_wmi_event_wow_wakeup_host() argument
7314 ret = ath12k_wmi_tlv_iter(ab, skb->data, skb->len, in ath12k_wmi_event_wow_wakeup_host()
7318 ath12k_warn(ab, "failed to parse wmi wow wakeup host event tlv: %d\n", in ath12k_wmi_event_wow_wakeup_host()
7323 complete(&ab->wow.wakeup_completed); in ath12k_wmi_event_wow_wakeup_host()
7326 static void ath12k_wmi_gtk_offload_status_event(struct ath12k_base *ab, in ath12k_wmi_gtk_offload_status_event() argument
7336 tb = ath12k_wmi_tlv_parse_alloc(ab, skb, GFP_ATOMIC); in ath12k_wmi_gtk_offload_status_event()
7339 ath12k_warn(ab, "failed to parse tlv: %d\n", ret); in ath12k_wmi_gtk_offload_status_event()
7345 ath12k_warn(ab, "failed to fetch gtk offload status ev"); in ath12k_wmi_gtk_offload_status_event()
7351 arvif = ath12k_mac_get_arvif_by_vdev_id(ab, le32_to_cpu(ev->vdev_id)); in ath12k_wmi_gtk_offload_status_event()
7354 ath12k_warn(ab, "failed to get arvif for vdev_id:%d\n", in ath12k_wmi_gtk_offload_status_event()
7362 ath12k_dbg(ab, ATH12K_DBG_WMI, "wmi gtk offload event refresh_cnt %d replay_ctr %llu\n", in ath12k_wmi_gtk_offload_status_event()
7376 static void ath12k_wmi_event_mlo_setup_complete(struct ath12k_base *ab, in ath12k_wmi_event_mlo_setup_complete() argument
7385 tb = ath12k_wmi_tlv_parse_alloc(ab, skb, GFP_ATOMIC); in ath12k_wmi_event_mlo_setup_complete()
7388 ath12k_warn(ab, "failed to parse mlo setup complete event tlv: %d\n", in ath12k_wmi_event_mlo_setup_complete()
7395 ath12k_warn(ab, "failed to fetch mlo setup complete event\n"); in ath12k_wmi_event_mlo_setup_complete()
7400 if (le32_to_cpu(ev->pdev_id) > ab->num_radios) in ath12k_wmi_event_mlo_setup_complete()
7403 for (i = 0; i < ab->num_radios; i++) { in ath12k_wmi_event_mlo_setup_complete()
7404 pdev = &ab->pdevs[i]; in ath12k_wmi_event_mlo_setup_complete()
7413 ath12k_warn(ab, "invalid pdev_id %d status %u in setup complete event\n", in ath12k_wmi_event_mlo_setup_complete()
7425 static void ath12k_wmi_event_teardown_complete(struct ath12k_base *ab, in ath12k_wmi_event_teardown_complete() argument
7432 tb = ath12k_wmi_tlv_parse_alloc(ab, skb, GFP_ATOMIC); in ath12k_wmi_event_teardown_complete()
7435 ath12k_warn(ab, "failed to parse teardown complete event tlv: %d\n", ret); in ath12k_wmi_event_teardown_complete()
7441 ath12k_warn(ab, "failed to fetch teardown complete event\n"); in ath12k_wmi_event_teardown_complete()
7449 static void ath12k_wmi_op_rx(struct ath12k_base *ab, struct sk_buff *skb) in ath12k_wmi_op_rx() argument
7463 ath12k_service_ready_event(ab, skb); in ath12k_wmi_op_rx()
7466 ath12k_service_ready_ext_event(ab, skb); in ath12k_wmi_op_rx()
7469 ath12k_service_ready_ext2_event(ab, skb); in ath12k_wmi_op_rx()
7472 ath12k_reg_chan_list_event(ab, skb); in ath12k_wmi_op_rx()
7475 ath12k_ready_event(ab, skb); in ath12k_wmi_op_rx()
7478 ath12k_peer_delete_resp_event(ab, skb); in ath12k_wmi_op_rx()
7481 ath12k_vdev_start_resp_event(ab, skb); in ath12k_wmi_op_rx()
7484 ath12k_bcn_tx_status_event(ab, skb); in ath12k_wmi_op_rx()
7487 ath12k_vdev_stopped_event(ab, skb); in ath12k_wmi_op_rx()
7490 ath12k_mgmt_rx_event(ab, skb); in ath12k_wmi_op_rx()
7494 ath12k_mgmt_tx_compl_event(ab, skb); in ath12k_wmi_op_rx()
7497 ath12k_scan_event(ab, skb); in ath12k_wmi_op_rx()
7500 ath12k_peer_sta_kickout_event(ab, skb); in ath12k_wmi_op_rx()
7503 ath12k_roam_event(ab, skb); in ath12k_wmi_op_rx()
7506 ath12k_chan_info_event(ab, skb); in ath12k_wmi_op_rx()
7509 ath12k_pdev_bss_chan_info_event(ab, skb); in ath12k_wmi_op_rx()
7512 ath12k_vdev_install_key_compl_event(ab, skb); in ath12k_wmi_op_rx()
7515 ath12k_service_available_event(ab, skb); in ath12k_wmi_op_rx()
7518 ath12k_peer_assoc_conf_event(ab, skb); in ath12k_wmi_op_rx()
7521 ath12k_update_stats_event(ab, skb); in ath12k_wmi_op_rx()
7524 ath12k_pdev_ctl_failsafe_check_event(ab, skb); in ath12k_wmi_op_rx()
7527 ath12k_wmi_pdev_csa_switch_count_status_event(ab, skb); in ath12k_wmi_op_rx()
7530 ath12k_wmi_pdev_temperature_event(ab, skb); in ath12k_wmi_op_rx()
7533 ath12k_wmi_pdev_dma_ring_buf_release_event(ab, skb); in ath12k_wmi_op_rx()
7536 ath12k_fils_discovery_event(ab, skb); in ath12k_wmi_op_rx()
7539 ath12k_probe_resp_tx_status_event(ab, skb); in ath12k_wmi_op_rx()
7542 ath12k_rfkill_state_change_event(ab, skb); in ath12k_wmi_op_rx()
7545 ath12k_wmi_twt_enable_event(ab, skb); in ath12k_wmi_op_rx()
7548 ath12k_wmi_twt_disable_event(ab, skb); in ath12k_wmi_op_rx()
7551 ath12k_wmi_p2p_noa_event(ab, skb); in ath12k_wmi_op_rx()
7554 ath12k_wmi_pdev_dfs_radar_detected_event(ab, skb); in ath12k_wmi_op_rx()
7557 ath12k_vdev_delete_resp_event(ab, skb); in ath12k_wmi_op_rx()
7560 ath12k_wmi_diag_event(ab, skb); in ath12k_wmi_op_rx()
7563 ath12k_wmi_event_wow_wakeup_host(ab, skb); in ath12k_wmi_op_rx()
7566 ath12k_wmi_gtk_offload_status_event(ab, skb); in ath12k_wmi_op_rx()
7569 ath12k_wmi_event_mlo_setup_complete(ab, skb); in ath12k_wmi_op_rx()
7572 ath12k_wmi_event_teardown_complete(ab, skb); in ath12k_wmi_op_rx()
7578 ath12k_dbg(ab, ATH12K_DBG_WMI, in ath12k_wmi_op_rx()
7589 ath12k_dbg(ab, ATH12K_DBG_WMI, "Unknown eventid: 0x%x\n", id); in ath12k_wmi_op_rx()
7597 static int ath12k_connect_pdev_htc_service(struct ath12k_base *ab, in ath12k_connect_pdev_htc_service() argument
7617 status = ath12k_htc_connect_service(&ab->htc, &conn_req, &conn_resp); in ath12k_connect_pdev_htc_service()
7619 ath12k_warn(ab, "failed to connect to WMI CONTROL service status: %d\n", in ath12k_connect_pdev_htc_service()
7624 ab->wmi_ab.wmi_endpoint_id[pdev_idx] = conn_resp.eid; in ath12k_connect_pdev_htc_service()
7625 ab->wmi_ab.wmi[pdev_idx].eid = conn_resp.eid; in ath12k_connect_pdev_htc_service()
7626 ab->wmi_ab.max_msg_len[pdev_idx] = conn_resp.max_msg_len; in ath12k_connect_pdev_htc_service()
7673 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_send_unit_test_cmd()
7681 ath12k_warn(ar->ab, "failed to send WMI_UNIT_TEST CMD :%d\n", in ath12k_wmi_send_unit_test_cmd()
7719 ath12k_dbg(ar->ab, ATH12K_DBG_REG, "Triggering Radar Simulation\n"); in ath12k_wmi_simulate_radar()
7724 int ath12k_wmi_connect(struct ath12k_base *ab) in ath12k_wmi_connect() argument
7729 wmi_ep_count = ab->htc.wmi_ep_count; in ath12k_wmi_connect()
7730 if (wmi_ep_count > ab->hw_params->max_radios) in ath12k_wmi_connect()
7734 ath12k_connect_pdev_htc_service(ab, i); in ath12k_wmi_connect()
7739 static void ath12k_wmi_pdev_detach(struct ath12k_base *ab, u8 pdev_id) in ath12k_wmi_pdev_detach() argument
7747 int ath12k_wmi_pdev_attach(struct ath12k_base *ab, in ath12k_wmi_pdev_attach() argument
7752 if (pdev_id >= ab->hw_params->max_radios) in ath12k_wmi_pdev_attach()
7755 wmi_handle = &ab->wmi_ab.wmi[pdev_id]; in ath12k_wmi_pdev_attach()
7757 wmi_handle->wmi_ab = &ab->wmi_ab; in ath12k_wmi_pdev_attach()
7759 ab->wmi_ab.ab = ab; in ath12k_wmi_pdev_attach()
7765 int ath12k_wmi_attach(struct ath12k_base *ab) in ath12k_wmi_attach() argument
7769 ret = ath12k_wmi_pdev_attach(ab, 0); in ath12k_wmi_attach()
7773 ab->wmi_ab.ab = ab; in ath12k_wmi_attach()
7774 ab->wmi_ab.preferred_hw_mode = WMI_HOST_HW_MODE_MAX; in ath12k_wmi_attach()
7777 if (ab->hw_params->single_pdev_only) in ath12k_wmi_attach()
7778 ab->wmi_ab.preferred_hw_mode = WMI_HOST_HW_MODE_SINGLE; in ath12k_wmi_attach()
7781 init_completion(&ab->wmi_ab.service_ready); in ath12k_wmi_attach()
7782 init_completion(&ab->wmi_ab.unified_ready); in ath12k_wmi_attach()
7787 void ath12k_wmi_detach(struct ath12k_base *ab) in ath12k_wmi_detach() argument
7793 for (i = 0; i < ab->htc.wmi_ep_count; i++) in ath12k_wmi_detach()
7794 ath12k_wmi_pdev_detach(ab, i); in ath12k_wmi_detach()
7796 ath12k_wmi_free_dbring_caps(ab); in ath12k_wmi_detach()
7823 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_hw_data_filter_cmd()
7845 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, "wmi tlv wow host wakeup ind\n"); in ath12k_wmi_wow_host_wakeup_ind()
7867 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, "wmi tlv wow enable\n"); in ath12k_wmi_wow_enable()
7892 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, "wmi tlv wow add wakeup event %s enable %d vdev_id %d\n", in ath12k_wmi_wow_add_wakeup_event()
7979 …ath12k_dbg(ar->ab, ATH12K_DBG_WMI, "wmi tlv wow add pattern vdev_id %d pattern_id %d pattern_offse… in ath12k_wmi_wow_add_pattern()
7982 ath12k_dbg_dump(ar->ab, ATH12K_DBG_WMI, NULL, "wow pattern: ", in ath12k_wmi_wow_add_pattern()
7984 ath12k_dbg_dump(ar->ab, ATH12K_DBG_WMI, NULL, "wow bitmask: ", in ath12k_wmi_wow_add_pattern()
8008 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, "wmi tlv wow del pattern vdev_id %d pattern_id %d\n", in ath12k_wmi_wow_del_pattern()
8114 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, "wmi tlv start pno config vdev_id %d\n", in ath12k_wmi_op_gen_config_pno_start()
8138 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_op_gen_config_pno_stop()
8210 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_fill_ns_offload()
8248 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, "wmi arp offload address %pI4", in ath12k_wmi_fill_arp_offload()
8339 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, "offload gtk rekey vdev: %d %d\n", in ath12k_wmi_gtk_rekey_offload()
8361 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, "get gtk rekey vdev_id: %d\n", in ath12k_wmi_gtk_rekey_getinfo()
8397 ath12k_dbg(ar->ab, ATH12K_DBG_WMI, in ath12k_wmi_sta_keepalive()
8439 ath12k_warn(ar->ab, "failed to submit WMI_MLO_SETUP_CMDID command: %d\n", in ath12k_wmi_mlo_setup()
8467 ath12k_warn(ar->ab, "failed to submit WMI_MLO_READY_CMDID command: %d\n", in ath12k_wmi_mlo_ready()
8496 ath12k_warn(ar->ab, "failed to submit WMI MLO teardown command: %d\n", in ath12k_wmi_mlo_teardown()