Lines Matching refs:ret

783 	int ret;  in ath11k_core_suspend()  local
798 ret = ath11k_dp_rx_pktlog_stop(ab, true); in ath11k_core_suspend()
799 if (ret) { in ath11k_core_suspend()
801 ret); in ath11k_core_suspend()
802 return ret; in ath11k_core_suspend()
805 ret = ath11k_mac_wait_tx_complete(ar); in ath11k_core_suspend()
806 if (ret) { in ath11k_core_suspend()
807 ath11k_warn(ab, "failed to wait tx complete: %d\n", ret); in ath11k_core_suspend()
808 return ret; in ath11k_core_suspend()
811 ret = ath11k_wow_enable(ab); in ath11k_core_suspend()
812 if (ret) { in ath11k_core_suspend()
813 ath11k_warn(ab, "failed to enable wow during suspend: %d\n", ret); in ath11k_core_suspend()
814 return ret; in ath11k_core_suspend()
817 ret = ath11k_dp_rx_pktlog_stop(ab, false); in ath11k_core_suspend()
818 if (ret) { in ath11k_core_suspend()
820 ret); in ath11k_core_suspend()
821 return ret; in ath11k_core_suspend()
830 ret = ath11k_hif_suspend(ab); in ath11k_core_suspend()
831 if (ret) { in ath11k_core_suspend()
832 ath11k_warn(ab, "failed to suspend hif: %d\n", ret); in ath11k_core_suspend()
833 return ret; in ath11k_core_suspend()
842 int ret; in ath11k_core_resume() local
857 ret = ath11k_hif_resume(ab); in ath11k_core_resume()
858 if (ret) { in ath11k_core_resume()
859 ath11k_warn(ab, "failed to resume hif during resume: %d\n", ret); in ath11k_core_resume()
860 return ret; in ath11k_core_resume()
866 ret = ath11k_dp_rx_pktlog_start(ab); in ath11k_core_resume()
867 if (ret) { in ath11k_core_resume()
869 ret); in ath11k_core_resume()
870 return ret; in ath11k_core_resume()
873 ret = ath11k_wow_wakeup(ab); in ath11k_core_resume()
874 if (ret) { in ath11k_core_resume()
875 ath11k_warn(ab, "failed to wakeup wow during resume: %d\n", ret); in ath11k_core_resume()
876 return ret; in ath11k_core_resume()
1070 int ret; in ath11k_core_firmware_request() local
1077 ret = firmware_request_nowarn(&fw, path, ab->dev); in ath11k_core_firmware_request()
1078 if (ret) in ath11k_core_firmware_request()
1079 return ERR_PTR(ret); in ath11k_core_firmware_request()
1109 int ret, board_ie_id; in ath11k_core_parse_bd_ie_board() local
1133 ret = -EINVAL; in ath11k_core_parse_bd_ie_board()
1144 ret = memcmp(board_ie_data, boardname, strlen(boardname)); in ath11k_core_parse_bd_ie_board()
1145 if (ret) in ath11k_core_parse_bd_ie_board()
1166 ret = 0; in ath11k_core_parse_bd_ie_board()
1182 ret = -ENOENT; in ath11k_core_parse_bd_ie_board()
1185 return ret; in ath11k_core_parse_bd_ie_board()
1204 int ret, ie_id; in ath11k_core_fetch_board_data_api_n() local
1225 ret = -EINVAL; in ath11k_core_fetch_board_data_api_n()
1231 ret = -EINVAL; in ath11k_core_fetch_board_data_api_n()
1240 ret = -EINVAL; in ath11k_core_fetch_board_data_api_n()
1262 ret = -EINVAL; in ath11k_core_fetch_board_data_api_n()
1267 ret = ath11k_core_parse_bd_ie_board(ab, bd, data, in ath11k_core_fetch_board_data_api_n()
1273 if (ret == -ENOENT) in ath11k_core_fetch_board_data_api_n()
1276 else if (ret) in ath11k_core_fetch_board_data_api_n()
1296 ret = -ENODATA; in ath11k_core_fetch_board_data_api_n()
1304 return ret; in ath11k_core_fetch_board_data_api_n()
1327 int ret; in ath11k_core_fetch_bdf() local
1331 ret = ath11k_core_create_board_name(ab, boardname, sizeof(boardname)); in ath11k_core_fetch_bdf()
1332 if (ret) { in ath11k_core_fetch_bdf()
1333 ath11k_err(ab, "failed to create board name: %d", ret); in ath11k_core_fetch_bdf()
1334 return ret; in ath11k_core_fetch_bdf()
1338 ret = ath11k_core_fetch_board_data_api_n(ab, bd, boardname, in ath11k_core_fetch_bdf()
1342 if (!ret) in ath11k_core_fetch_bdf()
1345 ret = ath11k_core_create_fallback_board_name(ab, fallback_boardname, in ath11k_core_fetch_bdf()
1347 if (ret) { in ath11k_core_fetch_bdf()
1348 ath11k_err(ab, "failed to create fallback board name: %d", ret); in ath11k_core_fetch_bdf()
1349 return ret; in ath11k_core_fetch_bdf()
1352 ret = ath11k_core_fetch_board_data_api_n(ab, bd, fallback_boardname, in ath11k_core_fetch_bdf()
1356 if (!ret) in ath11k_core_fetch_bdf()
1360 ret = ath11k_core_fetch_board_data_api_1(ab, bd, ATH11K_DEFAULT_BOARD_FILE); in ath11k_core_fetch_bdf()
1361 if (ret) { in ath11k_core_fetch_bdf()
1372 return ret; in ath11k_core_fetch_bdf()
1383 int ret; in ath11k_core_fetch_regdb() local
1385 ret = ath11k_core_create_board_name(ab, boardname, BOARD_NAME_SIZE); in ath11k_core_fetch_regdb()
1386 if (ret) { in ath11k_core_fetch_regdb()
1388 "failed to create board name for regdb: %d", ret); in ath11k_core_fetch_regdb()
1392 ret = ath11k_core_fetch_board_data_api_n(ab, bd, boardname, in ath11k_core_fetch_regdb()
1396 if (!ret) in ath11k_core_fetch_regdb()
1399 ret = ath11k_core_create_bus_type_board_name(ab, default_boardname, in ath11k_core_fetch_regdb()
1401 if (ret) { in ath11k_core_fetch_regdb()
1403 "failed to create default board name for regdb: %d", ret); in ath11k_core_fetch_regdb()
1407 ret = ath11k_core_fetch_board_data_api_n(ab, bd, default_boardname, in ath11k_core_fetch_regdb()
1411 if (!ret) in ath11k_core_fetch_regdb()
1414 ret = ath11k_core_fetch_board_data_api_1(ab, bd, ATH11K_REGDB_FILE_NAME); in ath11k_core_fetch_regdb()
1415 if (ret) in ath11k_core_fetch_regdb()
1420 if (!ret) in ath11k_core_fetch_regdb()
1423 return ret; in ath11k_core_fetch_regdb()
1440 int ret; in ath11k_core_soc_create() local
1447 ret = ath11k_qmi_init_service(ab); in ath11k_core_soc_create()
1448 if (ret) { in ath11k_core_soc_create()
1449 ath11k_err(ab, "failed to initialize qmi :%d\n", ret); in ath11k_core_soc_create()
1450 return ret; in ath11k_core_soc_create()
1453 ret = ath11k_debugfs_soc_create(ab); in ath11k_core_soc_create()
1454 if (ret) { in ath11k_core_soc_create()
1459 ret = ath11k_hif_power_up(ab); in ath11k_core_soc_create()
1460 if (ret) { in ath11k_core_soc_create()
1461 ath11k_err(ab, "failed to power up :%d\n", ret); in ath11k_core_soc_create()
1471 return ret; in ath11k_core_soc_create()
1484 int ret; in ath11k_core_pdev_create() local
1486 ret = ath11k_debugfs_pdev_create(ab); in ath11k_core_pdev_create()
1487 if (ret) { in ath11k_core_pdev_create()
1488 ath11k_err(ab, "failed to create core pdev debugfs: %d\n", ret); in ath11k_core_pdev_create()
1489 return ret; in ath11k_core_pdev_create()
1492 ret = ath11k_dp_pdev_alloc(ab); in ath11k_core_pdev_create()
1493 if (ret) { in ath11k_core_pdev_create()
1494 ath11k_err(ab, "failed to attach DP pdev: %d\n", ret); in ath11k_core_pdev_create()
1498 ret = ath11k_mac_register(ab); in ath11k_core_pdev_create()
1499 if (ret) { in ath11k_core_pdev_create()
1500 ath11k_err(ab, "failed register the radio with mac80211: %d\n", ret); in ath11k_core_pdev_create()
1504 ret = ath11k_thermal_register(ab); in ath11k_core_pdev_create()
1505 if (ret) { in ath11k_core_pdev_create()
1507 ret); in ath11k_core_pdev_create()
1511 ret = ath11k_spectral_init(ab); in ath11k_core_pdev_create()
1512 if (ret) { in ath11k_core_pdev_create()
1513 ath11k_err(ab, "failed to init spectral %d\n", ret); in ath11k_core_pdev_create()
1528 return ret; in ath11k_core_pdev_create()
1543 int ret; in ath11k_core_start() local
1545 ret = ath11k_wmi_attach(ab); in ath11k_core_start()
1546 if (ret) { in ath11k_core_start()
1547 ath11k_err(ab, "failed to attach wmi: %d\n", ret); in ath11k_core_start()
1548 return ret; in ath11k_core_start()
1551 ret = ath11k_htc_init(ab); in ath11k_core_start()
1552 if (ret) { in ath11k_core_start()
1553 ath11k_err(ab, "failed to init htc: %d\n", ret); in ath11k_core_start()
1557 ret = ath11k_hif_start(ab); in ath11k_core_start()
1558 if (ret) { in ath11k_core_start()
1559 ath11k_err(ab, "failed to start HIF: %d\n", ret); in ath11k_core_start()
1563 ret = ath11k_htc_wait_target(&ab->htc); in ath11k_core_start()
1564 if (ret) { in ath11k_core_start()
1565 ath11k_err(ab, "failed to connect to HTC: %d\n", ret); in ath11k_core_start()
1569 ret = ath11k_dp_htt_connect(&ab->dp); in ath11k_core_start()
1570 if (ret) { in ath11k_core_start()
1571 ath11k_err(ab, "failed to connect to HTT: %d\n", ret); in ath11k_core_start()
1575 ret = ath11k_wmi_connect(ab); in ath11k_core_start()
1576 if (ret) { in ath11k_core_start()
1577 ath11k_err(ab, "failed to connect wmi: %d\n", ret); in ath11k_core_start()
1581 ret = ath11k_htc_start(&ab->htc); in ath11k_core_start()
1582 if (ret) { in ath11k_core_start()
1583 ath11k_err(ab, "failed to start HTC: %d\n", ret); in ath11k_core_start()
1587 ret = ath11k_wmi_wait_for_service_ready(ab); in ath11k_core_start()
1588 if (ret) { in ath11k_core_start()
1590 ret); in ath11k_core_start()
1594 ret = ath11k_mac_allocate(ab); in ath11k_core_start()
1595 if (ret) { in ath11k_core_start()
1597 ret); in ath11k_core_start()
1603 ret = ath11k_dp_pdev_reo_setup(ab); in ath11k_core_start()
1604 if (ret) { in ath11k_core_start()
1605 ath11k_err(ab, "failed to initialize reo destination rings: %d\n", ret); in ath11k_core_start()
1609 ret = ath11k_wmi_cmd_init(ab); in ath11k_core_start()
1610 if (ret) { in ath11k_core_start()
1611 ath11k_err(ab, "failed to send wmi init cmd: %d\n", ret); in ath11k_core_start()
1615 ret = ath11k_wmi_wait_for_unified_ready(ab); in ath11k_core_start()
1616 if (ret) { in ath11k_core_start()
1618 ret); in ath11k_core_start()
1624 ret = ath11k_wmi_set_hw_mode(ab, WMI_HOST_HW_MODE_DBS); in ath11k_core_start()
1625 if (ret) { in ath11k_core_start()
1626 ath11k_err(ab, "failed to send dbs mode: %d\n", ret); in ath11k_core_start()
1631 ret = ath11k_dp_tx_htt_h2t_ver_req_msg(ab); in ath11k_core_start()
1632 if (ret) { in ath11k_core_start()
1634 ret); in ath11k_core_start()
1649 return ret; in ath11k_core_start()
1655 int ret; in ath11k_core_start_firmware() local
1660 ret = ath11k_qmi_firmware_start(ab, mode); in ath11k_core_start_firmware()
1661 if (ret) { in ath11k_core_start_firmware()
1662 ath11k_err(ab, "failed to send firmware start: %d\n", ret); in ath11k_core_start_firmware()
1663 return ret; in ath11k_core_start_firmware()
1666 return ret; in ath11k_core_start_firmware()
1671 int ret; in ath11k_core_qmi_firmware_ready() local
1673 ret = ath11k_core_start_firmware(ab, ab->fw_mode); in ath11k_core_qmi_firmware_ready()
1674 if (ret) { in ath11k_core_qmi_firmware_ready()
1675 ath11k_err(ab, "failed to start firmware: %d\n", ret); in ath11k_core_qmi_firmware_ready()
1676 return ret; in ath11k_core_qmi_firmware_ready()
1679 ret = ath11k_ce_init_pipes(ab); in ath11k_core_qmi_firmware_ready()
1680 if (ret) { in ath11k_core_qmi_firmware_ready()
1681 ath11k_err(ab, "failed to initialize CE: %d\n", ret); in ath11k_core_qmi_firmware_ready()
1685 ret = ath11k_dp_alloc(ab); in ath11k_core_qmi_firmware_ready()
1686 if (ret) { in ath11k_core_qmi_firmware_ready()
1687 ath11k_err(ab, "failed to init DP: %d\n", ret); in ath11k_core_qmi_firmware_ready()
1709 ret = ath11k_core_start(ab); in ath11k_core_qmi_firmware_ready()
1710 if (ret) { in ath11k_core_qmi_firmware_ready()
1711 ath11k_err(ab, "failed to start core: %d\n", ret); in ath11k_core_qmi_firmware_ready()
1715 ret = ath11k_core_pdev_create(ab); in ath11k_core_qmi_firmware_ready()
1716 if (ret) { in ath11k_core_qmi_firmware_ready()
1717 ath11k_err(ab, "failed to create pdev core: %d\n", ret); in ath11k_core_qmi_firmware_ready()
1734 return ret; in ath11k_core_qmi_firmware_ready()
1739 int ret; in ath11k_core_reconfigure_on_crash() local
1756 ret = ath11k_hal_srng_init(ab); in ath11k_core_reconfigure_on_crash()
1757 if (ret) in ath11k_core_reconfigure_on_crash()
1758 return ret; in ath11k_core_reconfigure_on_crash()
1762 ret = ath11k_core_qmi_firmware_ready(ab); in ath11k_core_reconfigure_on_crash()
1763 if (ret) in ath11k_core_reconfigure_on_crash()
1772 return ret; in ath11k_core_reconfigure_on_crash()
1802 int ret, i; in ath11k_update_11d() local
1817 ret = ath11k_wmi_send_set_current_country_cmd(ar, &set_current_param); in ath11k_update_11d()
1818 if (ret) in ath11k_update_11d()
1821 i, ret); in ath11k_update_11d()
1922 int ret; in ath11k_core_restart() local
1924 ret = ath11k_core_reconfigure_on_crash(ab); in ath11k_core_restart()
1925 if (ret) { in ath11k_core_restart()
2033 int ret; in ath11k_core_pre_init() local
2035 ret = ath11k_init_hw_params(ab); in ath11k_core_pre_init()
2036 if (ret) { in ath11k_core_pre_init()
2037 ath11k_err(ab, "failed to get hw params: %d\n", ret); in ath11k_core_pre_init()
2038 return ret; in ath11k_core_pre_init()
2047 int ret; in ath11k_core_init() local
2049 ret = ath11k_core_soc_create(ab); in ath11k_core_init()
2050 if (ret) { in ath11k_core_init()
2051 ath11k_err(ab, "failed to create soc core: %d\n", ret); in ath11k_core_init()
2052 return ret; in ath11k_core_init()