• Home
  • Raw
  • Download

Lines Matching refs:ab

1507 static int ath11k_qmi_host_cap_send(struct ath11k_base *ab)  in ath11k_qmi_host_cap_send()  argument
1519 req.mem_cfg_mode = ab->qmi.target_mem_mode; in ath11k_qmi_host_cap_send()
1524 if (ab->bus_params.m3_fw_support) { in ath11k_qmi_host_cap_send()
1537 req.cal_done = ab->qmi.cal_done; in ath11k_qmi_host_cap_send()
1539 if (ab->hw_params.internal_sleep_clock) { 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()
1563 ath11k_warn(ab, "Failed to send host capability request,err = %d\n", ret); in ath11k_qmi_host_cap_send()
1572 ath11k_warn(ab, "Host capability request failed, result: %d, err: %d\n", in ath11k_qmi_host_cap_send()
1582 static int ath11k_qmi_fw_ind_register_send(struct ath11k_base *ab) in ath11k_qmi_fw_ind_register_send() argument
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()
1626 ath11k_warn(ab, "Failed to send indication register request, err = %d\n", in ath11k_qmi_fw_ind_register_send()
1633 ath11k_warn(ab, "failed to register fw indication %d\n", ret); in ath11k_qmi_fw_ind_register_send()
1638 ath11k_warn(ab, "FW Ind register request failed, result: %d, err: %d\n", in ath11k_qmi_fw_ind_register_send()
1651 static int ath11k_qmi_respond_fw_mem_request(struct ath11k_base *ab) in ath11k_qmi_respond_fw_mem_request() argument
1670 if (!ab->bus_params.fixed_mem_region && ab->qmi.target_mem_delayed) { in ath11k_qmi_respond_fw_mem_request()
1672 ath11k_dbg(ab, ATH11K_DBG_QMI, "qmi delays mem_request %d\n", 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()
1696 ath11k_warn(ab, "qmi failed to respond memory request, err = %d\n", in ath11k_qmi_respond_fw_mem_request()
1703 ath11k_warn(ab, "qmi failed memory request, err = %d\n", ret); in ath11k_qmi_respond_fw_mem_request()
1714 ath11k_warn(ab, "Respond mem req failed, result: %d, err: %d\n", in ath11k_qmi_respond_fw_mem_request()
1724 static void ath11k_qmi_free_target_mem_chunk(struct ath11k_base *ab) in ath11k_qmi_free_target_mem_chunk() argument
1728 if (ab->bus_params.fixed_mem_region) in ath11k_qmi_free_target_mem_chunk()
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()
1735 dma_free_coherent(ab->dev, 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()
1743 static int ath11k_qmi_alloc_target_mem_chunk(struct ath11k_base *ab) in ath11k_qmi_alloc_target_mem_chunk() argument
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()
1752 chunk->vaddr = dma_alloc_coherent(ab->dev, in ath11k_qmi_alloc_target_mem_chunk()
1757 if (ab->qmi.mem_seg_count <= 2) { in ath11k_qmi_alloc_target_mem_chunk()
1758 ath11k_dbg(ab, ATH11K_DBG_QMI, in ath11k_qmi_alloc_target_mem_chunk()
1762 ath11k_qmi_free_target_mem_chunk(ab); in ath11k_qmi_alloc_target_mem_chunk()
1763 ab->qmi.target_mem_delayed = true; in ath11k_qmi_alloc_target_mem_chunk()
1766 ath11k_err(ab, "failed to alloc memory, size: 0x%x, type: %u\n", in ath11k_qmi_alloc_target_mem_chunk()
1776 static int ath11k_qmi_assign_target_mem_chunk(struct ath11k_base *ab) in ath11k_qmi_assign_target_mem_chunk() argument
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()
1791 ath11k_warn(ab, "qmi mem size is low to load caldata\n"); 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()
1802 ath11k_warn(ab, "qmi ignore invalid mem req type %d\n", 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()
1812 static int ath11k_qmi_request_target_cap(struct ath11k_base *ab) in ath11k_qmi_request_target_cap() argument
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()
1832 ath11k_warn(ab, "qmi failed to send target cap request, err = %d\n", in ath11k_qmi_request_target_cap()
1839 ath11k_warn(ab, "qmi failed target cap request %d\n", ret); in ath11k_qmi_request_target_cap()
1844 ath11k_warn(ab, "qmi targetcap req failed, result: %d, err: %d\n", 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()
1874 ath11k_info(ab, "chip_id 0x%x chip_family 0x%x board_id 0x%x soc_id 0x%x\n", 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()
1878 ath11k_info(ab, "fw_version 0x%x fw_build_timestamp %s fw_build_id %s", 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()
1888 ath11k_qmi_prepare_bdf_download(struct ath11k_base *ab, int type, in ath11k_qmi_prepare_bdf_download() argument
1901 ret = ath11k_core_fetch_bdf(ab, &bd); in ath11k_qmi_prepare_bdf_download()
1903 ath11k_warn(ab, "qmi failed to load BDF\n"); in ath11k_qmi_prepare_bdf_download()
1907 fw_size = min_t(u32, ab->hw_params.fw.board_size, bd.len); in ath11k_qmi_prepare_bdf_download()
1909 ath11k_core_free_bdf(ab, &bd); in ath11k_qmi_prepare_bdf_download()
1912 fw_entry = ath11k_core_firmware_request(ab, ATH11K_DEFAULT_CAL_FILE); in ath11k_qmi_prepare_bdf_download()
1915 ath11k_warn(ab, "failed to load %s: %d\n", in ath11k_qmi_prepare_bdf_download()
1920 fw_size = min_t(u32, ab->hw_params.fw.board_size, in ath11k_qmi_prepare_bdf_download()
1936 static int ath11k_qmi_load_bdf_fixed_addr(struct ath11k_base *ab) in ath11k_qmi_load_bdf_fixed_addr() argument
1949 bdf_addr = ioremap(ab->hw_params.bdf_addr, ATH11K_QMI_BDF_MAX_SIZE); in ath11k_qmi_load_bdf_fixed_addr()
1951 ath11k_warn(ab, "qmi ioremap error for BDF\n"); in ath11k_qmi_load_bdf_fixed_addr()
1959 req->file_id = ab->qmi.target.board_id; in ath11k_qmi_load_bdf_fixed_addr()
1970 ret = ath11k_qmi_prepare_bdf_download(ab, type, req, bdf_addr); 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()
1994 ath11k_warn(ab, "qmi BDF download failed, result: %d, err: %d\n", in ath11k_qmi_load_bdf_fixed_addr()
2008 static int ath11k_qmi_load_bdf_qmi(struct ath11k_base *ab) in ath11k_qmi_load_bdf_qmi() argument
2025 ret = ath11k_core_fetch_bdf(ab, &bd); in ath11k_qmi_load_bdf_qmi()
2027 ath11k_warn(ab, "qmi failed to load bdf:\n"); in ath11k_qmi_load_bdf_qmi()
2039 ath11k_dbg(ab, ATH11K_DBG_QMI, "qmi bdf_type %d\n", bdf_type); in ath11k_qmi_load_bdf_qmi()
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()
2084 ath11k_warn(ab, "qmi BDF download failed, result: %d, err: %d\n", in ath11k_qmi_load_bdf_qmi()
2095 ath11k_core_free_bdf(ab, &bd); in ath11k_qmi_load_bdf_qmi()
2102 static int ath11k_qmi_m3_load(struct ath11k_base *ab) in ath11k_qmi_m3_load() argument
2104 struct m3_mem_region *m3_mem = &ab->qmi.m3_mem; in ath11k_qmi_m3_load()
2112 fw = ath11k_core_firmware_request(ab, ATH11K_M3_FILE); in ath11k_qmi_m3_load()
2115 ath11k_core_create_firmware_path(ab, ATH11K_M3_FILE, in ath11k_qmi_m3_load()
2117 ath11k_err(ab, "failed to load %s: %d\n", path, ret); in ath11k_qmi_m3_load()
2121 m3_mem->vaddr = dma_alloc_coherent(ab->dev, in ath11k_qmi_m3_load()
2125 ath11k_err(ab, "failed to allocate memory for M3 with size %zu\n", in ath11k_qmi_m3_load()
2138 static void ath11k_qmi_m3_free(struct ath11k_base *ab) in ath11k_qmi_m3_free() argument
2140 struct m3_mem_region *m3_mem = &ab->qmi.m3_mem; in ath11k_qmi_m3_free()
2142 if (!ab->bus_params.m3_fw_support || !m3_mem->vaddr) in ath11k_qmi_m3_free()
2145 dma_free_coherent(ab->dev, m3_mem->size, in ath11k_qmi_m3_free()
2150 static int ath11k_qmi_wlanfw_m3_info_send(struct ath11k_base *ab) in ath11k_qmi_wlanfw_m3_info_send() argument
2152 struct m3_mem_region *m3_mem = &ab->qmi.m3_mem; in ath11k_qmi_wlanfw_m3_info_send()
2161 if (ab->bus_params.m3_fw_support) { in ath11k_qmi_wlanfw_m3_info_send()
2162 ret = ath11k_qmi_m3_load(ab); in ath11k_qmi_wlanfw_m3_info_send()
2164 ath11k_err(ab, "failed to load m3 firmware: %d", ret); 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()
2185 ath11k_warn(ab, "qmi failed to send M3 information request, err = %d\n", in ath11k_qmi_wlanfw_m3_info_send()
2192 ath11k_warn(ab, "qmi failed M3 information request %d\n", ret); in ath11k_qmi_wlanfw_m3_info_send()
2197 ath11k_warn(ab, "qmi M3 info request failed, result: %d, err: %d\n", in ath11k_qmi_wlanfw_m3_info_send()
2206 static int ath11k_qmi_wlanfw_mode_send(struct ath11k_base *ab, in ath11k_qmi_wlanfw_mode_send() argument
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()
2231 ath11k_warn(ab, "qmi failed to send mode request, mode: %d, err = %d\n", in ath11k_qmi_wlanfw_mode_send()
2239 ath11k_warn(ab, "WLFW service is dis-connected\n"); in ath11k_qmi_wlanfw_mode_send()
2242 ath11k_warn(ab, "qmi failed set mode request, mode: %d, err = %d\n", in ath11k_qmi_wlanfw_mode_send()
2248 ath11k_warn(ab, "Mode request failed, mode: %d, result: %d err: %d\n", in ath11k_qmi_wlanfw_mode_send()
2258 static int ath11k_qmi_wlanfw_wlan_cfg_send(struct ath11k_base *ab) in ath11k_qmi_wlanfw_wlan_cfg_send() argument
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()
2302 if (ab->hw_params.supports_shadow_regs) { 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()
2323 ath11k_warn(ab, "qmi failed to send wlan config request, err = %d\n", in ath11k_qmi_wlanfw_wlan_cfg_send()
2330 ath11k_warn(ab, "qmi failed wlan config request, err = %d\n", ret); in ath11k_qmi_wlanfw_wlan_cfg_send()
2335 ath11k_warn(ab, "qmi wlan config request failed, result: %d, err: %d\n", in ath11k_qmi_wlanfw_wlan_cfg_send()
2346 void ath11k_qmi_firmware_stop(struct ath11k_base *ab) in ath11k_qmi_firmware_stop() argument
2350 ret = ath11k_qmi_wlanfw_mode_send(ab, ATH11K_FIRMWARE_MODE_OFF); in ath11k_qmi_firmware_stop()
2352 ath11k_warn(ab, "qmi failed to send wlan mode off\n"); in ath11k_qmi_firmware_stop()
2357 int ath11k_qmi_firmware_start(struct ath11k_base *ab, in ath11k_qmi_firmware_start() argument
2362 ret = ath11k_qmi_wlanfw_wlan_cfg_send(ab); in ath11k_qmi_firmware_start()
2364 ath11k_warn(ab, "qmi failed to send wlan cfg:%d\n", ret); in ath11k_qmi_firmware_start()
2368 ret = ath11k_qmi_wlanfw_mode_send(ab, mode); in ath11k_qmi_firmware_start()
2370 ath11k_warn(ab, "qmi failed to send wlan fw mode:%d\n", ret); in ath11k_qmi_firmware_start()
2402 struct ath11k_base *ab = qmi->ab; in ath11k_qmi_event_server_arrive() local
2405 ret = ath11k_qmi_fw_ind_register_send(ab); in ath11k_qmi_event_server_arrive()
2407 ath11k_warn(ab, "qmi failed to send FW indication QMI:%d\n", ret); in ath11k_qmi_event_server_arrive()
2411 ret = ath11k_qmi_host_cap_send(ab); in ath11k_qmi_event_server_arrive()
2413 ath11k_warn(ab, "qmi failed to send host cap QMI:%d\n", ret); in ath11k_qmi_event_server_arrive()
2420 struct ath11k_base *ab = qmi->ab; in ath11k_qmi_event_mem_request() local
2423 ret = ath11k_qmi_respond_fw_mem_request(ab); in ath11k_qmi_event_mem_request()
2425 ath11k_warn(ab, "qmi failed to respond fw mem req:%d\n", ret); in ath11k_qmi_event_mem_request()
2432 struct ath11k_base *ab = qmi->ab; in ath11k_qmi_event_load_bdf() local
2435 ret = ath11k_qmi_request_target_cap(ab); in ath11k_qmi_event_load_bdf()
2437 ath11k_warn(ab, "qmi failed to req target capabilities:%d\n", ret); in ath11k_qmi_event_load_bdf()
2441 if (ab->bus_params.fixed_bdf_addr) in ath11k_qmi_event_load_bdf()
2442 ret = ath11k_qmi_load_bdf_fixed_addr(ab); in ath11k_qmi_event_load_bdf()
2444 ret = ath11k_qmi_load_bdf_qmi(ab); in ath11k_qmi_event_load_bdf()
2446 ath11k_warn(ab, "qmi failed to load board data file:%d\n", ret); in ath11k_qmi_event_load_bdf()
2450 ret = ath11k_qmi_wlanfw_m3_info_send(ab); in ath11k_qmi_event_load_bdf()
2452 ath11k_warn(ab, "qmi failed to send m3 info req:%d\n", ret); in ath11k_qmi_event_load_bdf()
2463 struct ath11k_base *ab = qmi->ab; in ath11k_qmi_msg_mem_request_cb() local
2467 ath11k_dbg(ab, ATH11K_DBG_QMI, "qmi firmware request memory request\n"); in ath11k_qmi_msg_mem_request_cb()
2471 ath11k_warn(ab, "Invalid memory segment length: %u\n", in ath11k_qmi_msg_mem_request_cb()
2474 ab->qmi.mem_seg_count = msg->mem_seg_len; 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()
2479 ath11k_dbg(ab, ATH11K_DBG_QMI, "qmi mem seg type %d size %d\n", in ath11k_qmi_msg_mem_request_cb()
2483 if (ab->bus_params.fixed_mem_region) { in ath11k_qmi_msg_mem_request_cb()
2484 ret = ath11k_qmi_assign_target_mem_chunk(ab); in ath11k_qmi_msg_mem_request_cb()
2486 ath11k_warn(ab, "qmi failed to assign target memory: %d\n", in ath11k_qmi_msg_mem_request_cb()
2491 ret = ath11k_qmi_alloc_target_mem_chunk(ab); in ath11k_qmi_msg_mem_request_cb()
2493 ath11k_warn(ab, "qmi failed to alloc target memory: %d\n", in ath11k_qmi_msg_mem_request_cb()
2508 struct ath11k_base *ab = qmi->ab; in ath11k_qmi_msg_mem_ready_cb() local
2510 ath11k_dbg(ab, ATH11K_DBG_QMI, "qmi firmware memory ready indication\n"); in ath11k_qmi_msg_mem_ready_cb()
2520 struct ath11k_base *ab = qmi->ab; in ath11k_qmi_msg_fw_ready_cb() local
2522 ath11k_dbg(ab, ATH11K_DBG_QMI, "qmi firmware ready\n"); in ath11k_qmi_msg_fw_ready_cb()
2569 struct ath11k_base *ab = qmi->ab; in ath11k_qmi_ops_new_server() local
2580 ath11k_warn(ab, "qmi failed to connect to remote service %d\n", ret); in ath11k_qmi_ops_new_server()
2584 ath11k_dbg(ab, ATH11K_DBG_QMI, "qmi wifi fw qmi service connected\n"); in ath11k_qmi_ops_new_server()
2594 struct ath11k_base *ab = qmi->ab; in ath11k_qmi_ops_del_server() local
2596 ath11k_dbg(ab, ATH11K_DBG_QMI, "qmi wifi fw del server\n"); in ath11k_qmi_ops_del_server()
2610 struct ath11k_base *ab = qmi->ab; in ath11k_qmi_driver_event_work() local
2619 if (test_bit(ATH11K_FLAG_UNREGISTERING, &ab->dev_flags)) { in ath11k_qmi_driver_event_work()
2629 set_bit(ATH11K_FLAG_CRASH_FLUSH, &ab->dev_flags); in ath11k_qmi_driver_event_work()
2630 set_bit(ATH11K_FLAG_RECOVERY, &ab->dev_flags); in ath11k_qmi_driver_event_work()
2639 if (test_bit(ATH11K_FLAG_REGISTERED, &ab->dev_flags)) { in ath11k_qmi_driver_event_work()
2640 ath11k_hal_dump_srng_stats(ab); in ath11k_qmi_driver_event_work()
2641 queue_work(ab->workqueue, &ab->restart_work); in ath11k_qmi_driver_event_work()
2645 ath11k_core_qmi_firmware_ready(ab); in ath11k_qmi_driver_event_work()
2646 ab->qmi.cal_done = 1; in ath11k_qmi_driver_event_work()
2647 set_bit(ATH11K_FLAG_REGISTERED, &ab->dev_flags); in ath11k_qmi_driver_event_work()
2653 ath11k_warn(ab, "invalid event type: %d", event->type); in ath11k_qmi_driver_event_work()
2662 int ath11k_qmi_init_service(struct ath11k_base *ab) in ath11k_qmi_init_service() argument
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()
2674 ath11k_warn(ab, "failed to initialize qmi handle\n"); 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()
2681 ath11k_err(ab, "failed to allocate workqueue\n"); 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()
2693 ath11k_warn(ab, "failed to add qmi lookup\n"); in ath11k_qmi_init_service()
2694 destroy_workqueue(ab->qmi.event_wq); in ath11k_qmi_init_service()
2701 void ath11k_qmi_deinit_service(struct ath11k_base *ab) in ath11k_qmi_deinit_service() argument
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()
2706 ath11k_qmi_m3_free(ab); in ath11k_qmi_deinit_service()
2707 ath11k_qmi_free_target_mem_chunk(ab); in ath11k_qmi_deinit_service()