18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: ISC */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Copyright (c) 2014,2017 Qualcomm Atheros, Inc. 48c2ecf20Sopenharmony_ci */ 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ci/* "API" level of the ath10k testmode interface. Bump it after every 78c2ecf20Sopenharmony_ci * incompatible interface change. 88c2ecf20Sopenharmony_ci */ 98c2ecf20Sopenharmony_ci#define ATH10K_TESTMODE_VERSION_MAJOR 1 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci/* Bump this after every _compatible_ interface change, for example 128c2ecf20Sopenharmony_ci * addition of a new command or an attribute. 138c2ecf20Sopenharmony_ci */ 148c2ecf20Sopenharmony_ci#define ATH10K_TESTMODE_VERSION_MINOR 0 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ci#define ATH10K_TM_DATA_MAX_LEN 5000 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_cienum ath10k_tm_attr { 198c2ecf20Sopenharmony_ci __ATH10K_TM_ATTR_INVALID = 0, 208c2ecf20Sopenharmony_ci ATH10K_TM_ATTR_CMD = 1, 218c2ecf20Sopenharmony_ci ATH10K_TM_ATTR_DATA = 2, 228c2ecf20Sopenharmony_ci ATH10K_TM_ATTR_WMI_CMDID = 3, 238c2ecf20Sopenharmony_ci ATH10K_TM_ATTR_VERSION_MAJOR = 4, 248c2ecf20Sopenharmony_ci ATH10K_TM_ATTR_VERSION_MINOR = 5, 258c2ecf20Sopenharmony_ci ATH10K_TM_ATTR_WMI_OP_VERSION = 6, 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ci /* keep last */ 288c2ecf20Sopenharmony_ci __ATH10K_TM_ATTR_AFTER_LAST, 298c2ecf20Sopenharmony_ci ATH10K_TM_ATTR_MAX = __ATH10K_TM_ATTR_AFTER_LAST - 1, 308c2ecf20Sopenharmony_ci}; 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ci/* All ath10k testmode interface commands specified in 338c2ecf20Sopenharmony_ci * ATH10K_TM_ATTR_CMD 348c2ecf20Sopenharmony_ci */ 358c2ecf20Sopenharmony_cienum ath10k_tm_cmd { 368c2ecf20Sopenharmony_ci /* Returns the supported ath10k testmode interface version in 378c2ecf20Sopenharmony_ci * ATH10K_TM_ATTR_VERSION. Always guaranteed to work. User space 388c2ecf20Sopenharmony_ci * uses this to verify it's using the correct version of the 398c2ecf20Sopenharmony_ci * testmode interface 408c2ecf20Sopenharmony_ci */ 418c2ecf20Sopenharmony_ci ATH10K_TM_CMD_GET_VERSION = 0, 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_ci /* Boots the UTF firmware, the netdev interface must be down at the 448c2ecf20Sopenharmony_ci * time. 458c2ecf20Sopenharmony_ci */ 468c2ecf20Sopenharmony_ci ATH10K_TM_CMD_UTF_START = 1, 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ci /* Shuts down the UTF firmware and puts the driver back into OFF 498c2ecf20Sopenharmony_ci * state. 508c2ecf20Sopenharmony_ci */ 518c2ecf20Sopenharmony_ci ATH10K_TM_CMD_UTF_STOP = 2, 528c2ecf20Sopenharmony_ci 538c2ecf20Sopenharmony_ci /* The command used to transmit a WMI command to the firmware and 548c2ecf20Sopenharmony_ci * the event to receive WMI events from the firmware. Without 558c2ecf20Sopenharmony_ci * struct wmi_cmd_hdr header, only the WMI payload. Command id is 568c2ecf20Sopenharmony_ci * provided with ATH10K_TM_ATTR_WMI_CMDID and payload in 578c2ecf20Sopenharmony_ci * ATH10K_TM_ATTR_DATA. 588c2ecf20Sopenharmony_ci */ 598c2ecf20Sopenharmony_ci ATH10K_TM_CMD_WMI = 3, 608c2ecf20Sopenharmony_ci}; 61