Lines Matching refs:qmi
1519 req.mem_cfg_mode = ab->qmi.target_mem_mode; in ath11k_qmi_host_cap_send()
1537 req.cal_done = ab->qmi.cal_done; in ath11k_qmi_host_cap_send()
1553 ret = qmi_txn_init(&ab->qmi.handle, &txn, in ath11k_qmi_host_cap_send()
1558 ret = qmi_send_request(&ab->qmi.handle, NULL, &txn, in ath11k_qmi_host_cap_send()
1586 struct qmi_handle *handle = &ab->qmi.handle; in ath11k_qmi_fw_ind_register_send()
1621 ret = qmi_send_request(&ab->qmi.handle, NULL, &txn, in ath11k_qmi_fw_ind_register_send()
1670 if (!ab->bus_params.fixed_mem_region && ab->qmi.target_mem_delayed) { in ath11k_qmi_respond_fw_mem_request()
1673 ab->qmi.mem_seg_count); in ath11k_qmi_respond_fw_mem_request()
1677 req->mem_seg_len = ab->qmi.mem_seg_count; in ath11k_qmi_respond_fw_mem_request()
1680 req->mem_seg[i].addr = ab->qmi.target_mem[i].paddr; in ath11k_qmi_respond_fw_mem_request()
1681 req->mem_seg[i].size = ab->qmi.target_mem[i].size; in ath11k_qmi_respond_fw_mem_request()
1682 req->mem_seg[i].type = ab->qmi.target_mem[i].type; in ath11k_qmi_respond_fw_mem_request()
1686 ret = qmi_txn_init(&ab->qmi.handle, &txn, in ath11k_qmi_respond_fw_mem_request()
1691 ret = qmi_send_request(&ab->qmi.handle, NULL, &txn, in ath11k_qmi_respond_fw_mem_request()
1731 for (i = 0; i < ab->qmi.mem_seg_count; i++) { in ath11k_qmi_free_target_mem_chunk()
1732 if (!ab->qmi.target_mem[i].vaddr) in ath11k_qmi_free_target_mem_chunk()
1736 ab->qmi.target_mem[i].size, in ath11k_qmi_free_target_mem_chunk()
1737 ab->qmi.target_mem[i].vaddr, in ath11k_qmi_free_target_mem_chunk()
1738 ab->qmi.target_mem[i].paddr); in ath11k_qmi_free_target_mem_chunk()
1739 ab->qmi.target_mem[i].vaddr = NULL; in ath11k_qmi_free_target_mem_chunk()
1748 ab->qmi.target_mem_delayed = false; in ath11k_qmi_alloc_target_mem_chunk()
1750 for (i = 0; i < ab->qmi.mem_seg_count; i++) { in ath11k_qmi_alloc_target_mem_chunk()
1751 chunk = &ab->qmi.target_mem[i]; in ath11k_qmi_alloc_target_mem_chunk()
1757 if (ab->qmi.mem_seg_count <= 2) { in ath11k_qmi_alloc_target_mem_chunk()
1763 ab->qmi.target_mem_delayed = true; in ath11k_qmi_alloc_target_mem_chunk()
1780 for (i = 0, idx = 0; i < ab->qmi.mem_seg_count; i++) { in ath11k_qmi_assign_target_mem_chunk()
1781 switch (ab->qmi.target_mem[i].type) { in ath11k_qmi_assign_target_mem_chunk()
1783 ab->qmi.target_mem[idx].paddr = ab->hw_params.bdf_addr; in ath11k_qmi_assign_target_mem_chunk()
1784 ab->qmi.target_mem[idx].vaddr = NULL; in ath11k_qmi_assign_target_mem_chunk()
1785 ab->qmi.target_mem[idx].size = ab->qmi.target_mem[i].size; in ath11k_qmi_assign_target_mem_chunk()
1786 ab->qmi.target_mem[idx].type = ab->qmi.target_mem[i].type; in ath11k_qmi_assign_target_mem_chunk()
1790 if (ab->qmi.target_mem[i].size > ATH11K_QMI_CALDB_SIZE) { in ath11k_qmi_assign_target_mem_chunk()
1795 ab->qmi.target_mem[idx].paddr = 0; in ath11k_qmi_assign_target_mem_chunk()
1796 ab->qmi.target_mem[idx].vaddr = NULL; in ath11k_qmi_assign_target_mem_chunk()
1797 ab->qmi.target_mem[idx].size = ab->qmi.target_mem[i].size; in ath11k_qmi_assign_target_mem_chunk()
1798 ab->qmi.target_mem[idx].type = ab->qmi.target_mem[i].type; in ath11k_qmi_assign_target_mem_chunk()
1803 ab->qmi.target_mem[i].type); in ath11k_qmi_assign_target_mem_chunk()
1807 ab->qmi.mem_seg_count = idx; in ath11k_qmi_assign_target_mem_chunk()
1822 ret = qmi_txn_init(&ab->qmi.handle, &txn, in ath11k_qmi_request_target_cap()
1827 ret = qmi_send_request(&ab->qmi.handle, NULL, &txn, in ath11k_qmi_request_target_cap()
1851 ab->qmi.target.chip_id = resp.chip_info.chip_id; in ath11k_qmi_request_target_cap()
1852 ab->qmi.target.chip_family = resp.chip_info.chip_family; in ath11k_qmi_request_target_cap()
1856 ab->qmi.target.board_id = resp.board_info.board_id; in ath11k_qmi_request_target_cap()
1858 ab->qmi.target.board_id = 0xFF; in ath11k_qmi_request_target_cap()
1861 ab->qmi.target.soc_id = resp.soc_info.soc_id; in ath11k_qmi_request_target_cap()
1864 ab->qmi.target.fw_version = resp.fw_version_info.fw_version; in ath11k_qmi_request_target_cap()
1865 strlcpy(ab->qmi.target.fw_build_timestamp, in ath11k_qmi_request_target_cap()
1867 sizeof(ab->qmi.target.fw_build_timestamp)); in ath11k_qmi_request_target_cap()
1871 strlcpy(ab->qmi.target.fw_build_id, resp.fw_build_id, in ath11k_qmi_request_target_cap()
1872 sizeof(ab->qmi.target.fw_build_id)); in ath11k_qmi_request_target_cap()
1875 ab->qmi.target.chip_id, ab->qmi.target.chip_family, in ath11k_qmi_request_target_cap()
1876 ab->qmi.target.board_id, ab->qmi.target.soc_id); in ath11k_qmi_request_target_cap()
1879 ab->qmi.target.fw_version, in ath11k_qmi_request_target_cap()
1880 ab->qmi.target.fw_build_timestamp, in ath11k_qmi_request_target_cap()
1881 ab->qmi.target.fw_build_id); in ath11k_qmi_request_target_cap()
1959 req->file_id = ab->qmi.target.board_id; in ath11k_qmi_load_bdf_fixed_addr()
1974 ret = qmi_txn_init(&ab->qmi.handle, &txn, in ath11k_qmi_load_bdf_fixed_addr()
1980 ret = qmi_send_request(&ab->qmi.handle, NULL, &txn, in ath11k_qmi_load_bdf_fixed_addr()
2044 req->file_id = ab->qmi.target.board_id; in ath11k_qmi_load_bdf_qmi()
2064 ret = qmi_txn_init(&ab->qmi.handle, &txn, in ath11k_qmi_load_bdf_qmi()
2070 ret = qmi_send_request(&ab->qmi.handle, NULL, &txn, in ath11k_qmi_load_bdf_qmi()
2104 struct m3_mem_region *m3_mem = &ab->qmi.m3_mem; in ath11k_qmi_m3_load()
2140 struct m3_mem_region *m3_mem = &ab->qmi.m3_mem; in ath11k_qmi_m3_free()
2152 struct m3_mem_region *m3_mem = &ab->qmi.m3_mem; in ath11k_qmi_wlanfw_m3_info_send()
2175 ret = qmi_txn_init(&ab->qmi.handle, &txn, in ath11k_qmi_wlanfw_m3_info_send()
2180 ret = qmi_send_request(&ab->qmi.handle, NULL, &txn, in ath11k_qmi_wlanfw_m3_info_send()
2221 ret = qmi_txn_init(&ab->qmi.handle, &txn, in ath11k_qmi_wlanfw_mode_send()
2226 ret = qmi_send_request(&ab->qmi.handle, NULL, &txn, in ath11k_qmi_wlanfw_mode_send()
2267 ce_cfg = (struct ce_pipe_config *)ab->qmi.ce_cfg.tgt_ce; in ath11k_qmi_wlanfw_wlan_cfg_send()
2268 svc_cfg = (struct service_to_pipe *)ab->qmi.ce_cfg.svc_to_ce_map; in ath11k_qmi_wlanfw_wlan_cfg_send()
2282 req->tgt_cfg_len = ab->qmi.ce_cfg.tgt_ce_len; in ath11k_qmi_wlanfw_wlan_cfg_send()
2293 req->svc_cfg_len = ab->qmi.ce_cfg.svc_to_ce_map_len; in ath11k_qmi_wlanfw_wlan_cfg_send()
2305 ab->qmi.ce_cfg.shadow_reg_v2_len, in ath11k_qmi_wlanfw_wlan_cfg_send()
2307 memcpy(&req->shadow_reg_v2, ab->qmi.ce_cfg.shadow_reg_v2, in ath11k_qmi_wlanfw_wlan_cfg_send()
2313 ret = qmi_txn_init(&ab->qmi.handle, &txn, in ath11k_qmi_wlanfw_wlan_cfg_send()
2318 ret = qmi_send_request(&ab->qmi.handle, NULL, &txn, in ath11k_qmi_wlanfw_wlan_cfg_send()
2378 ath11k_qmi_driver_event_post(struct ath11k_qmi *qmi, in ath11k_qmi_driver_event_post() argument
2391 spin_lock(&qmi->event_lock); in ath11k_qmi_driver_event_post()
2392 list_add_tail(&event->list, &qmi->event_list); in ath11k_qmi_driver_event_post()
2393 spin_unlock(&qmi->event_lock); in ath11k_qmi_driver_event_post()
2395 queue_work(qmi->event_wq, &qmi->event_work); in ath11k_qmi_driver_event_post()
2400 static void ath11k_qmi_event_server_arrive(struct ath11k_qmi *qmi) in ath11k_qmi_event_server_arrive() argument
2402 struct ath11k_base *ab = qmi->ab; in ath11k_qmi_event_server_arrive()
2418 static void ath11k_qmi_event_mem_request(struct ath11k_qmi *qmi) in ath11k_qmi_event_mem_request() argument
2420 struct ath11k_base *ab = qmi->ab; in ath11k_qmi_event_mem_request()
2430 static void ath11k_qmi_event_load_bdf(struct ath11k_qmi *qmi) in ath11k_qmi_event_load_bdf() argument
2432 struct ath11k_base *ab = qmi->ab; in ath11k_qmi_event_load_bdf()
2462 struct ath11k_qmi *qmi = container_of(qmi_hdl, struct ath11k_qmi, handle); in ath11k_qmi_msg_mem_request_cb() local
2463 struct ath11k_base *ab = qmi->ab; in ath11k_qmi_msg_mem_request_cb()
2474 ab->qmi.mem_seg_count = msg->mem_seg_len; in ath11k_qmi_msg_mem_request_cb()
2476 for (i = 0; i < qmi->mem_seg_count ; i++) { in ath11k_qmi_msg_mem_request_cb()
2477 ab->qmi.target_mem[i].type = msg->mem_seg[i].type; in ath11k_qmi_msg_mem_request_cb()
2478 ab->qmi.target_mem[i].size = msg->mem_seg[i].size; in ath11k_qmi_msg_mem_request_cb()
2499 ath11k_qmi_driver_event_post(qmi, ATH11K_QMI_EVENT_REQUEST_MEM, NULL); in ath11k_qmi_msg_mem_request_cb()
2507 struct ath11k_qmi *qmi = container_of(qmi_hdl, struct ath11k_qmi, handle); in ath11k_qmi_msg_mem_ready_cb() local
2508 struct ath11k_base *ab = qmi->ab; in ath11k_qmi_msg_mem_ready_cb()
2511 ath11k_qmi_driver_event_post(qmi, ATH11K_QMI_EVENT_FW_MEM_READY, NULL); in ath11k_qmi_msg_mem_ready_cb()
2519 struct ath11k_qmi *qmi = container_of(qmi_hdl, struct ath11k_qmi, handle); in ath11k_qmi_msg_fw_ready_cb() local
2520 struct ath11k_base *ab = qmi->ab; in ath11k_qmi_msg_fw_ready_cb()
2523 ath11k_qmi_driver_event_post(qmi, ATH11K_QMI_EVENT_FW_READY, NULL); in ath11k_qmi_msg_fw_ready_cb()
2526 static void ath11k_qmi_msg_cold_boot_cal_done_cb(struct qmi_handle *qmi, in ath11k_qmi_msg_cold_boot_cal_done_cb() argument
2568 struct ath11k_qmi *qmi = container_of(qmi_hdl, struct ath11k_qmi, handle); in ath11k_qmi_ops_new_server() local
2569 struct ath11k_base *ab = qmi->ab; in ath11k_qmi_ops_new_server()
2570 struct sockaddr_qrtr *sq = &qmi->sq; in ath11k_qmi_ops_new_server()
2585 ath11k_qmi_driver_event_post(qmi, ATH11K_QMI_EVENT_SERVER_ARRIVE, NULL); in ath11k_qmi_ops_new_server()
2593 struct ath11k_qmi *qmi = container_of(qmi_hdl, struct ath11k_qmi, handle); in ath11k_qmi_ops_del_server() local
2594 struct ath11k_base *ab = qmi->ab; in ath11k_qmi_ops_del_server()
2597 ath11k_qmi_driver_event_post(qmi, ATH11K_QMI_EVENT_SERVER_EXIT, NULL); in ath11k_qmi_ops_del_server()
2607 struct ath11k_qmi *qmi = container_of(work, struct ath11k_qmi, in ath11k_qmi_driver_event_work() local
2610 struct ath11k_base *ab = qmi->ab; in ath11k_qmi_driver_event_work()
2612 spin_lock(&qmi->event_lock); in ath11k_qmi_driver_event_work()
2613 while (!list_empty(&qmi->event_list)) { in ath11k_qmi_driver_event_work()
2614 event = list_first_entry(&qmi->event_list, in ath11k_qmi_driver_event_work()
2617 spin_unlock(&qmi->event_lock); in ath11k_qmi_driver_event_work()
2626 ath11k_qmi_event_server_arrive(qmi); in ath11k_qmi_driver_event_work()
2633 ath11k_qmi_event_mem_request(qmi); in ath11k_qmi_driver_event_work()
2636 ath11k_qmi_event_load_bdf(qmi); in ath11k_qmi_driver_event_work()
2646 ab->qmi.cal_done = 1; in ath11k_qmi_driver_event_work()
2657 spin_lock(&qmi->event_lock); in ath11k_qmi_driver_event_work()
2659 spin_unlock(&qmi->event_lock); in ath11k_qmi_driver_event_work()
2666 memset(&ab->qmi.target, 0, sizeof(struct target_info)); in ath11k_qmi_init_service()
2667 memset(&ab->qmi.target_mem, 0, sizeof(struct target_mem_chunk)); in ath11k_qmi_init_service()
2668 ab->qmi.ab = ab; in ath11k_qmi_init_service()
2670 ab->qmi.target_mem_mode = ATH11K_QMI_TARGET_MEM_MODE_DEFAULT; in ath11k_qmi_init_service()
2671 ret = qmi_handle_init(&ab->qmi.handle, ATH11K_QMI_RESP_LEN_MAX, in ath11k_qmi_init_service()
2678 ab->qmi.event_wq = alloc_workqueue("ath11k_qmi_driver_event", in ath11k_qmi_init_service()
2680 if (!ab->qmi.event_wq) { in ath11k_qmi_init_service()
2685 INIT_LIST_HEAD(&ab->qmi.event_list); in ath11k_qmi_init_service()
2686 spin_lock_init(&ab->qmi.event_lock); in ath11k_qmi_init_service()
2687 INIT_WORK(&ab->qmi.event_work, ath11k_qmi_driver_event_work); in ath11k_qmi_init_service()
2689 ret = qmi_add_lookup(&ab->qmi.handle, ATH11K_QMI_WLFW_SERVICE_ID_V01, in ath11k_qmi_init_service()
2691 ab->qmi.service_ins_id); in ath11k_qmi_init_service()
2694 destroy_workqueue(ab->qmi.event_wq); in ath11k_qmi_init_service()
2703 qmi_handle_release(&ab->qmi.handle); in ath11k_qmi_deinit_service()
2704 cancel_work_sync(&ab->qmi.event_work); in ath11k_qmi_deinit_service()
2705 destroy_workqueue(ab->qmi.event_wq); in ath11k_qmi_deinit_service()