[PATCH v2] ath11k: cold boot calibration support
Kalle Valo
kvalo at codeaurora.org
Mon Sep 7 06:17:24 EDT 2020
Sowmiya Sree Elavalagan <ssreeela at codeaurora.org> writes:
> From: Govindaraj Saminathan <gsamin at codeaurora.org>
>
> cold boot calibration is the process to calibrate all the channels
> during the boot-up to avoid the calibration delay during the
> channel change.
> During the boot-up, firmware started with mode “cold_boot_calibration”
> Firmware calibrate all channels and generate CalDb(DDR).
> Subsequent WIFI ON will reuse the same CalDb.
> Firmware restarted with Mission mode to continue the normal operation.
>
> caldb memory address send to firmware through the QMI message.Firmware
> use this address to store the caldb data and use it until next reboot.
>
> This will give the improvement during the channel change. But it is
> increasing the boot-up time(up to 15sec depend on number of radios).
> So if the user want to reduce the boot-up time and accepting for channel
> change delay, user can disable this feature using the module param
> cold_boot_cal =0.
>
> Signed-off-by: Govindaraj Saminathan <gsamin at codeaurora.org>
> Co-developed-by: Sowmiya Sree Elavalagan <ssreeela at codeaurora.org>
> Signed-off-by: Sowmiya Sree Elavalagan <ssreeela at codeaurora.org>
Please add a Tested-on tag.
What hardware does support this feature? I guess QCA6390 does not? So I wonder
should we only enable this on hardware which we know supports this? For the
rest we would just give a warning and not enable the feature. And to do that we
would have a boolean for each hardware in hw_params.
> +static int ath11k_qmi_process_coldboot_calibration(struct ath11k_base *ab)
> +{
> + int timeout;
> + int ret;
> +
> + ret = ath11k_qmi_wlanfw_mode_send(ab, ATH11K_FIRMWARE_MODE_COLD_BOOT);
> + if (ret < 0) {
> + ath11k_warn(ab, "qmi failed to send wlan fw mode:%d\n", ret);
> + return ret;
> + }
> +
> + ath11k_warn(ab, "Coldboot calibration wait started\n");
This should be a debug message.
> + timeout = wait_event_timeout(ab->qmi.cold_boot_waitq,
> + (ab->qmi.cal_done == 1),
> + ATH11K_COLD_BOOT_FW_RESET_DELAY);
> + if (timeout <= 0) {
> + ath11k_warn(ab, "Coldboot Calibration timed out\n");
> + return -ETIMEDOUT;
> + }
> +
> + ath11k_warn(ab, "Coldboot calibration wait ended\n");
And this too.
--
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
More information about the ath11k
mailing list