[PATCH v5 3/4] wifi: ath12k: add factory test mode support
Kalle Valo
kvalo at kernel.org
Tue Jul 2 06:49:32 PDT 2024
Aaradhana Sahu <quic_aarasahu at quicinc.com> writes:
> Add support to process factory test mode commands(FTM) for calibration.
> By default firmware start with MISSION mode and to process the FTM commands
> firmware needs to be restarted in FTM mode using module parameter ftm_mode.
> The pre-request is all the radios should be down before starting the test.
>
> All ath12k test mode interface related commands specified in enum
> ath_tm_cmd.
>
> When start command ATH_TM_CMD_TESTMODE_START is received, ar state
> is set to test Mode and FTM daemon sends test mode command to wifi
> driver via cfg80211. Wifi driver sends these command to firmware as
> wmi events. If it is segmented commands it will be broken down into
> multiple segments and encoded with TLV header else it is sent to
> firmware as it is.
>
> Firmware response via UTF events, wifi driver creates skb and send
> to cfg80211, cfg80211 sends firmware response to FTM daemon via
> netlink message.
>
> Command to boot in ftm mode
> insmod ath12k ftm_mode=1
>
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00210-QCAHKSWPL_SILICONZ-1
>
> Signed-off-by: Aaradhana Sahu <quic_aarasahu at quicinc.com>
I have not reviewed this in detail yet but few first impressions:
> @@ -626,6 +634,8 @@ struct ath12k {
>
> u32 freq_low;
> u32 freq_high;
> + struct completion fw_mode_reset;
> + u8 ftm_msgref;
> };
fw_mode_reset is unused so I removed it in the pending branch.
> @@ -856,6 +867,8 @@ struct ath12k_base {
> /* protected by data_lock */
> u32 fw_crash_counter;
> } stats;
> + bool ftm_segment_handler;
> + struct ath12k_ftm_event_obj ftm_event_obj;
> u32 pktlog_defs_checksum;
ftm_segment_handler is also unused so removed that as well.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
More information about the ath12k
mailing list