static int ath10k_download_cal_data(struct ath10k *ar) { int ret; ret = ath10k_download_cal_file(ar); if (ret == 0) { ar->cal_mode = ATH10K_CAL_MODE_FILE; goto done; } ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot did not find a calibration file, try DT next: %d\n", ret); ret = ath10k_download_cal_dt(ar); if (ret == 0) { ar->cal_mode = ATH10K_CAL_MODE_DT; goto done; } ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot did not find DT entry, try OTP next: %d\n", ret); ret = ath10k_download_and_run_otp(ar); if (ret) { ath10k_err(ar, "failed to run otp: %d\n", ret); return ret; } ar->cal_mode = ATH10K_CAL_MODE_OTP; done: ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot using calibration mode %s\n", ath10k_cal_mode_str(ar->cal_mode)); return 0; }
void ath10k_print_driver_info(struct ath10k *ar) { char fw_features[128] = {}; ath10k_core_get_fw_features_str(ar, fw_features, sizeof(fw_features)); device_printf(ar->sc_dev, "%s (0x%08x, 0x%08x%s%s%s) fw %s api %d htt-ver %d.%d wmi-op %d htt-op %d cal %s max-sta %d raw %d hwcrypto %d features %s\n", ar->hw_params.name, ar->target_version, ar->sc_chipid, (strlen(ar->spec_board_id) > 0 ? ", " : ""), ar->spec_board_id, (strlen(ar->spec_board_id) > 0 && !ar->spec_board_loaded ? " fallback" : ""), ar->fw_version_str, ar->fw_api, ar->htt.target_version_major, ar->htt.target_version_minor, ar->wmi.op_version, ar->htt.op_version, ath10k_cal_mode_str(ar->cal_mode), ar->max_num_stations, (int) test_bit(ATH10K_FLAG_RAW_MODE, &ar->dev_flags), (int) !test_bit(ATH10K_FLAG_HW_CRYPTO_DISABLED, &ar->dev_flags), fw_features); #if 0 device_printf(ar->sc_dev, "debug %d debugfs %d tracing %d dfs %d testmode %d\n", config_enabled(CONFIG_ATH10K_DEBUG), config_enabled(CONFIG_ATH10K_DEBUGFS), config_enabled(CONFIG_ATH10K_TRACING), config_enabled(CONFIG_ATH10K_DFS_CERTIFIED), config_enabled(CONFIG_NL80211_TESTMODE)); #endif }