testmode_i.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. * Copyright (c) 2014,2017 Qualcomm Atheros, Inc.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for any
  5. * purpose with or without fee is hereby granted, provided that the above
  6. * copyright notice and this permission notice appear in all copies.
  7. *
  8. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  9. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  10. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  11. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  12. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  13. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  14. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  15. */
  16. /* "API" level of the ath10k testmode interface. Bump it after every
  17. * incompatible interface change.
  18. */
  19. #define ATH10K_TESTMODE_VERSION_MAJOR 1
  20. /* Bump this after every _compatible_ interface change, for example
  21. * addition of a new command or an attribute.
  22. */
  23. #define ATH10K_TESTMODE_VERSION_MINOR 0
  24. #define ATH10K_TM_DATA_MAX_LEN 5000
  25. enum ath10k_tm_attr {
  26. __ATH10K_TM_ATTR_INVALID = 0,
  27. ATH10K_TM_ATTR_CMD = 1,
  28. ATH10K_TM_ATTR_DATA = 2,
  29. ATH10K_TM_ATTR_WMI_CMDID = 3,
  30. ATH10K_TM_ATTR_VERSION_MAJOR = 4,
  31. ATH10K_TM_ATTR_VERSION_MINOR = 5,
  32. ATH10K_TM_ATTR_WMI_OP_VERSION = 6,
  33. /* keep last */
  34. __ATH10K_TM_ATTR_AFTER_LAST,
  35. ATH10K_TM_ATTR_MAX = __ATH10K_TM_ATTR_AFTER_LAST - 1,
  36. };
  37. /* All ath10k testmode interface commands specified in
  38. * ATH10K_TM_ATTR_CMD
  39. */
  40. enum ath10k_tm_cmd {
  41. /* Returns the supported ath10k testmode interface version in
  42. * ATH10K_TM_ATTR_VERSION. Always guaranteed to work. User space
  43. * uses this to verify it's using the correct version of the
  44. * testmode interface
  45. */
  46. ATH10K_TM_CMD_GET_VERSION = 0,
  47. /* Boots the UTF firmware, the netdev interface must be down at the
  48. * time.
  49. */
  50. ATH10K_TM_CMD_UTF_START = 1,
  51. /* Shuts down the UTF firmware and puts the driver back into OFF
  52. * state.
  53. */
  54. ATH10K_TM_CMD_UTF_STOP = 2,
  55. /* The command used to transmit a WMI command to the firmware and
  56. * the event to receive WMI events from the firmware. Without
  57. * struct wmi_cmd_hdr header, only the WMI payload. Command id is
  58. * provided with ATH10K_TM_ATTR_WMI_CMDID and payload in
  59. * ATH10K_TM_ATTR_DATA.
  60. */
  61. ATH10K_TM_CMD_WMI = 3,
  62. };