/* SPDX-License-Identifier: BSD-3-Clause-Clear */1/*2* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.3* Copyright (c) 2023-2025 Qualcomm Innovation Center, Inc. All rights reserved.4*/56/* "API" level of the ath testmode interface. Bump it after every7* incompatible interface change.8*/9#define ATH_TESTMODE_VERSION_MAJOR 11011/* Bump this after every _compatible_ interface change, for example12* addition of a new command or an attribute.13*/14#define ATH_TESTMODE_VERSION_MINOR 11516#define ATH_TM_DATA_MAX_LEN 500017#define ATH_FTM_EVENT_MAX_BUF_LENGTH 20481819enum ath_tm_attr {20__ATH_TM_ATTR_INVALID = 0,21ATH_TM_ATTR_CMD = 1,22ATH_TM_ATTR_DATA = 2,23ATH_TM_ATTR_WMI_CMDID = 3,24ATH_TM_ATTR_VERSION_MAJOR = 4,25ATH_TM_ATTR_VERSION_MINOR = 5,26ATH_TM_ATTR_WMI_OP_VERSION = 6,2728/* keep last */29__ATH_TM_ATTR_AFTER_LAST,30ATH_TM_ATTR_MAX = __ATH_TM_ATTR_AFTER_LAST - 1,31};3233/* All ath testmode interface commands specified in34* ATH_TM_ATTR_CMD35*/36enum ath_tm_cmd {37/* Returns the supported ath testmode interface version in38* ATH_TM_ATTR_VERSION. Always guaranteed to work. User space39* uses this to verify it's using the correct version of the40* testmode interface41*/42ATH_TM_CMD_GET_VERSION = 0,4344/* The command used to transmit a WMI command to the firmware and45* the event to receive WMI events from the firmware. Without46* struct wmi_cmd_hdr header, only the WMI payload. Command id is47* provided with ATH_TM_ATTR_WMI_CMDID and payload in48* ATH_TM_ATTR_DATA.49*/50ATH_TM_CMD_WMI = 1,5152/* Boots the UTF firmware, the netdev interface must be down at the53* time.54*/55ATH_TM_CMD_TESTMODE_START = 2,5657/* The command used to transmit a FTM WMI command to the firmware58* and the event to receive WMI events from the firmware. The data59* received only contain the payload, need to add the tlv header60* and send the cmd to firmware with command id WMI_PDEV_UTF_CMDID.61* The data payload size could be large and the driver needs to62* send segmented data to firmware.63*/64ATH_TM_CMD_WMI_FTM = 3,65};666768