mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00

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.3.1-00173-QCAHKSWPL_SILICONZ-1 Signed-off-by: Aaradhana Sahu <quic_aarasahu@quicinc.com> Reviewed-by: Aditya Kumar Singh <quic_adisi@quicinc.com> Link: https://patch.msgid.link/20250119083657.1937557-4-quic_aarasahu@quicinc.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
40 lines
1 KiB
C
40 lines
1 KiB
C
/* SPDX-License-Identifier: BSD-3-Clause-Clear */
|
|
/*
|
|
* Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
|
|
* Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved.
|
|
*/
|
|
|
|
#include "core.h"
|
|
#include "hif.h"
|
|
|
|
#ifdef CONFIG_NL80211_TESTMODE
|
|
|
|
void ath12k_tm_wmi_event_unsegmented(struct ath12k_base *ab, u32 cmd_id,
|
|
struct sk_buff *skb);
|
|
void ath12k_tm_process_event(struct ath12k_base *ab, u32 cmd_id,
|
|
const struct ath12k_wmi_ftm_event *ftm_msg,
|
|
u16 length);
|
|
int ath12k_tm_cmd(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
|
void *data, int len);
|
|
|
|
#else
|
|
|
|
static inline void ath12k_tm_wmi_event_unsegmented(struct ath12k_base *ab, u32 cmd_id,
|
|
struct sk_buff *skb)
|
|
{
|
|
}
|
|
|
|
static inline void ath12k_tm_process_event(struct ath12k_base *ab, u32 cmd_id,
|
|
const struct ath12k_wmi_ftm_event *msg,
|
|
u16 length)
|
|
{
|
|
}
|
|
|
|
static inline int ath12k_tm_cmd(struct ieee80211_hw *hw,
|
|
struct ieee80211_vif *vif,
|
|
void *data, int len)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
#endif
|