1*da8fa4e3SBjoern A. Zeeb /* SPDX-License-Identifier: ISC */ 2*da8fa4e3SBjoern A. Zeeb /* 3*da8fa4e3SBjoern A. Zeeb * Copyright (c) 2014,2017 Qualcomm Atheros, Inc. 4*da8fa4e3SBjoern A. Zeeb */ 5*da8fa4e3SBjoern A. Zeeb 6*da8fa4e3SBjoern A. Zeeb /* "API" level of the ath10k testmode interface. Bump it after every 7*da8fa4e3SBjoern A. Zeeb * incompatible interface change. 8*da8fa4e3SBjoern A. Zeeb */ 9*da8fa4e3SBjoern A. Zeeb #define ATH10K_TESTMODE_VERSION_MAJOR 1 10*da8fa4e3SBjoern A. Zeeb 11*da8fa4e3SBjoern A. Zeeb /* Bump this after every _compatible_ interface change, for example 12*da8fa4e3SBjoern A. Zeeb * addition of a new command or an attribute. 13*da8fa4e3SBjoern A. Zeeb */ 14*da8fa4e3SBjoern A. Zeeb #define ATH10K_TESTMODE_VERSION_MINOR 0 15*da8fa4e3SBjoern A. Zeeb 16*da8fa4e3SBjoern A. Zeeb #define ATH10K_TM_DATA_MAX_LEN 5000 17*da8fa4e3SBjoern A. Zeeb 18*da8fa4e3SBjoern A. Zeeb enum ath10k_tm_attr { 19*da8fa4e3SBjoern A. Zeeb __ATH10K_TM_ATTR_INVALID = 0, 20*da8fa4e3SBjoern A. Zeeb ATH10K_TM_ATTR_CMD = 1, 21*da8fa4e3SBjoern A. Zeeb ATH10K_TM_ATTR_DATA = 2, 22*da8fa4e3SBjoern A. Zeeb ATH10K_TM_ATTR_WMI_CMDID = 3, 23*da8fa4e3SBjoern A. Zeeb ATH10K_TM_ATTR_VERSION_MAJOR = 4, 24*da8fa4e3SBjoern A. Zeeb ATH10K_TM_ATTR_VERSION_MINOR = 5, 25*da8fa4e3SBjoern A. Zeeb ATH10K_TM_ATTR_WMI_OP_VERSION = 6, 26*da8fa4e3SBjoern A. Zeeb 27*da8fa4e3SBjoern A. Zeeb /* keep last */ 28*da8fa4e3SBjoern A. Zeeb __ATH10K_TM_ATTR_AFTER_LAST, 29*da8fa4e3SBjoern A. Zeeb ATH10K_TM_ATTR_MAX = __ATH10K_TM_ATTR_AFTER_LAST - 1, 30*da8fa4e3SBjoern A. Zeeb }; 31*da8fa4e3SBjoern A. Zeeb 32*da8fa4e3SBjoern A. Zeeb /* All ath10k testmode interface commands specified in 33*da8fa4e3SBjoern A. Zeeb * ATH10K_TM_ATTR_CMD 34*da8fa4e3SBjoern A. Zeeb */ 35*da8fa4e3SBjoern A. Zeeb enum ath10k_tm_cmd { 36*da8fa4e3SBjoern A. Zeeb /* Returns the supported ath10k testmode interface version in 37*da8fa4e3SBjoern A. Zeeb * ATH10K_TM_ATTR_VERSION. Always guaranteed to work. User space 38*da8fa4e3SBjoern A. Zeeb * uses this to verify it's using the correct version of the 39*da8fa4e3SBjoern A. Zeeb * testmode interface 40*da8fa4e3SBjoern A. Zeeb */ 41*da8fa4e3SBjoern A. Zeeb ATH10K_TM_CMD_GET_VERSION = 0, 42*da8fa4e3SBjoern A. Zeeb 43*da8fa4e3SBjoern A. Zeeb /* Boots the UTF firmware, the netdev interface must be down at the 44*da8fa4e3SBjoern A. Zeeb * time. 45*da8fa4e3SBjoern A. Zeeb */ 46*da8fa4e3SBjoern A. Zeeb ATH10K_TM_CMD_UTF_START = 1, 47*da8fa4e3SBjoern A. Zeeb 48*da8fa4e3SBjoern A. Zeeb /* Shuts down the UTF firmware and puts the driver back into OFF 49*da8fa4e3SBjoern A. Zeeb * state. 50*da8fa4e3SBjoern A. Zeeb */ 51*da8fa4e3SBjoern A. Zeeb ATH10K_TM_CMD_UTF_STOP = 2, 52*da8fa4e3SBjoern A. Zeeb 53*da8fa4e3SBjoern A. Zeeb /* The command used to transmit a WMI command to the firmware and 54*da8fa4e3SBjoern A. Zeeb * the event to receive WMI events from the firmware. Without 55*da8fa4e3SBjoern A. Zeeb * struct wmi_cmd_hdr header, only the WMI payload. Command id is 56*da8fa4e3SBjoern A. Zeeb * provided with ATH10K_TM_ATTR_WMI_CMDID and payload in 57*da8fa4e3SBjoern A. Zeeb * ATH10K_TM_ATTR_DATA. 58*da8fa4e3SBjoern A. Zeeb */ 59*da8fa4e3SBjoern A. Zeeb ATH10K_TM_CMD_WMI = 3, 60*da8fa4e3SBjoern A. Zeeb }; 61