2019-11-23 09:58:40 +02:00
|
|
|
/* SPDX-License-Identifier: BSD-3-Clause-Clear */
|
|
|
|
/*
|
|
|
|
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
|
2025-01-19 14:06:54 +05:30
|
|
|
* Copyright (c) 2023-2025 Qualcomm Innovation Center, Inc. All rights reserved.
|
2019-11-23 09:58:40 +02:00
|
|
|
*/
|
|
|
|
|
2025-01-19 14:06:54 +05:30
|
|
|
/* "API" level of the ath testmode interface. Bump it after every
|
2019-11-23 09:58:40 +02:00
|
|
|
* incompatible interface change.
|
|
|
|
*/
|
2025-01-19 14:06:54 +05:30
|
|
|
#define ATH_TESTMODE_VERSION_MAJOR 1
|
2019-11-23 09:58:40 +02:00
|
|
|
|
|
|
|
/* Bump this after every _compatible_ interface change, for example
|
|
|
|
* addition of a new command or an attribute.
|
|
|
|
*/
|
2025-01-19 14:06:54 +05:30
|
|
|
#define ATH_TESTMODE_VERSION_MINOR 1
|
2019-11-23 09:58:40 +02:00
|
|
|
|
2025-01-19 14:06:54 +05:30
|
|
|
#define ATH_TM_DATA_MAX_LEN 5000
|
|
|
|
#define ATH_FTM_EVENT_MAX_BUF_LENGTH 2048
|
2019-11-23 09:58:40 +02:00
|
|
|
|
2025-01-19 14:06:54 +05:30
|
|
|
enum ath_tm_attr {
|
|
|
|
__ATH_TM_ATTR_INVALID = 0,
|
|
|
|
ATH_TM_ATTR_CMD = 1,
|
|
|
|
ATH_TM_ATTR_DATA = 2,
|
|
|
|
ATH_TM_ATTR_WMI_CMDID = 3,
|
|
|
|
ATH_TM_ATTR_VERSION_MAJOR = 4,
|
|
|
|
ATH_TM_ATTR_VERSION_MINOR = 5,
|
|
|
|
ATH_TM_ATTR_WMI_OP_VERSION = 6,
|
2019-11-23 09:58:40 +02:00
|
|
|
|
|
|
|
/* keep last */
|
2025-01-19 14:06:54 +05:30
|
|
|
__ATH_TM_ATTR_AFTER_LAST,
|
|
|
|
ATH_TM_ATTR_MAX = __ATH_TM_ATTR_AFTER_LAST - 1,
|
2019-11-23 09:58:40 +02:00
|
|
|
};
|
|
|
|
|
2025-01-19 14:06:54 +05:30
|
|
|
/* All ath testmode interface commands specified in
|
|
|
|
* ATH_TM_ATTR_CMD
|
2019-11-23 09:58:40 +02:00
|
|
|
*/
|
2025-01-19 14:06:54 +05:30
|
|
|
enum ath_tm_cmd {
|
|
|
|
/* Returns the supported ath testmode interface version in
|
|
|
|
* ATH_TM_ATTR_VERSION. Always guaranteed to work. User space
|
2019-11-23 09:58:40 +02:00
|
|
|
* uses this to verify it's using the correct version of the
|
|
|
|
* testmode interface
|
|
|
|
*/
|
2025-01-19 14:06:54 +05:30
|
|
|
ATH_TM_CMD_GET_VERSION = 0,
|
2019-11-23 09:58:40 +02:00
|
|
|
|
|
|
|
/* The command used to transmit a WMI command to the firmware and
|
|
|
|
* the event to receive WMI events from the firmware. Without
|
|
|
|
* struct wmi_cmd_hdr header, only the WMI payload. Command id is
|
2025-01-19 14:06:54 +05:30
|
|
|
* provided with ATH_TM_ATTR_WMI_CMDID and payload in
|
|
|
|
* ATH_TM_ATTR_DATA.
|
2019-11-23 09:58:40 +02:00
|
|
|
*/
|
2025-01-19 14:06:54 +05:30
|
|
|
ATH_TM_CMD_WMI = 1,
|
2023-05-26 12:41:07 +03:00
|
|
|
|
|
|
|
/* Boots the UTF firmware, the netdev interface must be down at the
|
|
|
|
* time.
|
|
|
|
*/
|
2025-01-19 14:06:54 +05:30
|
|
|
ATH_TM_CMD_TESTMODE_START = 2,
|
2023-05-26 12:41:07 +03:00
|
|
|
|
|
|
|
/* The command used to transmit a FTM WMI command to the firmware
|
|
|
|
* and the event to receive WMI events from the firmware. The data
|
|
|
|
* received only contain the payload, need to add the tlv header
|
|
|
|
* and send the cmd to firmware with command id WMI_PDEV_UTF_CMDID.
|
|
|
|
* The data payload size could be large and the driver needs to
|
|
|
|
* send segmented data to firmware.
|
|
|
|
*/
|
2025-01-19 14:06:54 +05:30
|
|
|
ATH_TM_CMD_WMI_FTM = 3,
|
2019-11-23 09:58:40 +02:00
|
|
|
};
|