Re: [PATCH 1/1] wifi: ath11k: move ATH11K_FIRMWARE_MODE_OFF to ath11k_firmware_mode
From: Jeff Johnson
Date: Fri Jul 17 2026 - 12:58:12 EST
On 3/3/2025 7:31 AM, Ziyang Huang wrote:
> Put it together with other modes.
your commit text should be more descriptive:
Describe your changes ... as if you are giving orders to the codebase to
change its behaviour.
>
> Signed-off-by: Ziyang Huang <hzyitc@xxxxxxxxxxx>
> ---
> drivers/net/wireless/ath/ath11k/core.h | 3 +++
> drivers/net/wireless/ath/ath11k/qmi.h | 1 -
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/ath/ath11k/core.h b/drivers/net/wireless/ath/ath11k/core.h
> index a9dc7fe7765a..bfa2e8b21b5f 100644
> --- a/drivers/net/wireless/ath/ath11k/core.h
> +++ b/drivers/net/wireless/ath/ath11k/core.h
> @@ -158,6 +158,9 @@ enum ath11k_firmware_mode {
> /* factory tests etc */
> ATH11K_FIRMWARE_MODE_FTM,
>
> + /* power off */
> + ATH11K_FIRMWARE_MODE_OFF = 4,
> +
> /* Cold boot calibration */
> ATH11K_FIRMWARE_MODE_COLD_BOOT = 7,
> };
> diff --git a/drivers/net/wireless/ath/ath11k/qmi.h b/drivers/net/wireless/ath/ath11k/qmi.h
> index 7e06d100af57..5e8fd22bb9a0 100644
> --- a/drivers/net/wireless/ath/ath11k/qmi.h
> +++ b/drivers/net/wireless/ath/ath11k/qmi.h
> @@ -36,7 +36,6 @@
> #define QMI_WLFW_FW_INIT_DONE_IND_V01 0x0038
>
> #define QMI_WLANFW_MAX_DATA_SIZE_V01 6144
> -#define ATH11K_FIRMWARE_MODE_OFF 4
> #define ATH11K_COLD_BOOT_FW_RESET_DELAY (60 * HZ)
>
> #define ATH11K_QMI_DEVICE_BAR_SIZE 0x200000
I like what this is doing, however IMO there is room for improvement.
the firmware mode is part of the QMI ABI and hence the enum should actually be
located in qmi.h. And that means any .c files which need the relocated enum
would need to include qmi.h
And if you post a v2, use ath-next as the branch tag, [PATCH ath-next v2]
/jeff