Path: blob/main/sys/contrib/dev/athk/ath10k/testmode_i.h
106821 views
/* SPDX-License-Identifier: ISC */1/*2* Copyright (c) 2014,2017 Qualcomm Atheros, Inc.3* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.4*/56/* "API" level of the ath10k testmode interface. Bump it after every7* incompatible interface change.8*/9#define ATH10K_TESTMODE_VERSION_MAJOR 11011/* Bump this after every _compatible_ interface change, for example12* addition of a new command or an attribute.13*/14#define ATH10K_TESTMODE_VERSION_MINOR 01516#define ATH10K_TM_DATA_MAX_LEN 500017#define ATH_FTM_EVENT_MAX_BUF_LENGTH 20481819enum ath10k_tm_attr {20__ATH10K_TM_ATTR_INVALID = 0,21ATH10K_TM_ATTR_CMD = 1,22ATH10K_TM_ATTR_DATA = 2,23ATH10K_TM_ATTR_WMI_CMDID = 3,24ATH10K_TM_ATTR_VERSION_MAJOR = 4,25ATH10K_TM_ATTR_VERSION_MINOR = 5,26ATH10K_TM_ATTR_WMI_OP_VERSION = 6,2728/* keep last */29__ATH10K_TM_ATTR_AFTER_LAST,30ATH10K_TM_ATTR_MAX = __ATH10K_TM_ATTR_AFTER_LAST - 1,31};3233/* All ath10k testmode interface commands specified in34* ATH10K_TM_ATTR_CMD35*/36enum ath10k_tm_cmd {37/* Returns the supported ath10k testmode interface version in38* ATH10K_TM_ATTR_VERSION. Always guaranteed to work. User space39* uses this to verify it's using the correct version of the40* testmode interface41*/42ATH10K_TM_CMD_GET_VERSION = 0,4344/* Boots the UTF firmware, the netdev interface must be down at the45* time.46*/47ATH10K_TM_CMD_UTF_START = 1,4849/* Shuts down the UTF firmware and puts the driver back into OFF50* state.51*/52ATH10K_TM_CMD_UTF_STOP = 2,5354/* The command used to transmit a WMI command to the firmware and55* the event to receive WMI events from the firmware. Without56* struct wmi_cmd_hdr header, only the WMI payload. Command id is57* provided with ATH10K_TM_ATTR_WMI_CMDID and payload in58* ATH10K_TM_ATTR_DATA.59*/60ATH10K_TM_CMD_WMI = 3,6162/* The command used to transmit a test command to the firmware63* and the event to receive test events from the firmware. The data64* received only contain the TLV payload, need to add the tlv header65* and send the cmd to firmware with command id WMI_PDEV_UTF_CMDID.66* The data payload size could be large and the driver needs to67* send segmented data to firmware.68*69* This legacy testmode command shares the same value as the get-version70* command. To distinguish between them, we check whether the data attribute71* is present.72*/73ATH10K_TM_CMD_TLV = ATH10K_TM_CMD_GET_VERSION,74};757677