wmix.h 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. /*
  2. * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
  3. *
  4. * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  5. *
  6. *
  7. * Permission to use, copy, modify, and/or distribute this software for
  8. * any purpose with or without fee is hereby granted, provided that the
  9. * above copyright notice and this permission notice appear in all
  10. * copies.
  11. *
  12. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  13. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  14. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  15. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  16. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  17. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  18. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  19. * PERFORMANCE OF THIS SOFTWARE.
  20. */
  21. /*
  22. * This file was originally distributed by Qualcomm Atheros, Inc.
  23. * under proprietary terms before Copyright ownership was assigned
  24. * to the Linux Foundation.
  25. */
  26. /*
  27. * This file contains extensions of the WMI protocol specified in the
  28. * Wireless Module Interface (WMI). It includes definitions of all
  29. * extended commands and events. Extensions include useful commands
  30. * that are not directly related to wireless activities. They may
  31. * be hardware-specific, and they might not be supported on all
  32. * implementations.
  33. *
  34. * Extended WMIX commands are encapsulated in a WMI message with
  35. * cmd=WMI_EXTENSION_CMD.
  36. */
  37. #ifndef _WMIX_H_
  38. #define _WMIX_H_
  39. #ifdef __cplusplus
  40. extern "C" {
  41. #endif
  42. /*
  43. * Extended WMI commands are those that are needed during wireless
  44. * operation, but which are not really wireless commands. This allows,
  45. * for instance, platform-specific commands. Extended WMI commands are
  46. * embedded in a WMI command message with WMI_COMMAND_ID=WMI_EXTENSION_CMDID.
  47. * Extended WMI events are similarly embedded in a WMI event message with
  48. * WMI_EVENT_ID=WMI_EXTENSION_EVENTID.
  49. */
  50. typedef struct {
  51. A_UINT32 commandId;
  52. } POSTPACK WMIX_CMD_HDR;
  53. typedef enum {
  54. WMIX_DSETOPEN_REPLY_CMDID = 0x2001,
  55. WMIX_DSETDATA_REPLY_CMDID,
  56. WMIX_HB_CHALLENGE_RESP_CMDID,
  57. WMIX_DBGLOG_CFG_MODULE_CMDID,
  58. WMIX_PROF_CFG_CMDID, /* 0x200a */
  59. WMIX_PROF_ADDR_SET_CMDID,
  60. WMIX_PROF_START_CMDID,
  61. WMIX_PROF_STOP_CMDID,
  62. WMIX_PROF_COUNT_GET_CMDID,
  63. } WMIX_COMMAND_ID;
  64. typedef enum {
  65. WMIX_DSETOPENREQ_EVENTID = 0x3001,
  66. WMIX_DSETCLOSE_EVENTID,
  67. WMIX_DSETDATAREQ_EVENTID,
  68. WMIX_HB_CHALLENGE_RESP_EVENTID,
  69. WMIX_DBGLOG_EVENTID,
  70. WMIX_PROF_COUNT_EVENTID,
  71. WMIX_PKTLOG_EVENTID,
  72. } WMIX_EVENT_ID;
  73. /*
  74. * =============DataSet support=================
  75. */
  76. /*
  77. * WMIX_DSETOPENREQ_EVENTID
  78. * DataSet Open Request Event
  79. */
  80. typedef struct {
  81. A_UINT32 dset_id;
  82. A_UINT32 targ_dset_handle; /* echo'ed, not used by Host, */
  83. A_UINT32 targ_reply_fn; /* echo'ed, not used by Host, */
  84. A_UINT32 targ_reply_arg; /* echo'ed, not used by Host, */
  85. } POSTPACK WMIX_DSETOPENREQ_EVENT;
  86. /*
  87. * WMIX_DSETCLOSE_EVENTID
  88. * DataSet Close Event
  89. */
  90. typedef struct {
  91. A_UINT32 access_cookie;
  92. } POSTPACK WMIX_DSETCLOSE_EVENT;
  93. /*
  94. * WMIX_DSETDATAREQ_EVENTID
  95. * DataSet Data Request Event
  96. */
  97. typedef struct {
  98. A_UINT32 access_cookie;
  99. A_UINT32 offset;
  100. A_UINT32 length;
  101. A_UINT32 targ_buf; /* echo'ed, not used by Host, */
  102. A_UINT32 targ_reply_fn; /* echo'ed, not used by Host, */
  103. A_UINT32 targ_reply_arg; /* echo'ed, not used by Host, */
  104. } WMIX_DSETDATAREQ_EVENT;
  105. typedef struct {
  106. A_UINT32 status;
  107. A_UINT32 targ_dset_handle;
  108. A_UINT32 targ_reply_fn;
  109. A_UINT32 targ_reply_arg;
  110. A_UINT32 access_cookie;
  111. A_UINT32 size;
  112. A_UINT32 version;
  113. } WMIX_DSETOPEN_REPLY_CMD;
  114. typedef struct {
  115. A_UINT32 status;
  116. A_UINT32 targ_buf;
  117. A_UINT32 targ_reply_fn;
  118. A_UINT32 targ_reply_arg;
  119. A_UINT32 length;
  120. A_UINT8 buf[1];
  121. } WMIX_DSETDATA_REPLY_CMD;
  122. /*
  123. * =============Error Detection support=================
  124. */
  125. /*
  126. * WMIX_HB_CHALLENGE_RESP_CMDID
  127. * Heartbeat Challenge Response command
  128. */
  129. typedef struct {
  130. A_UINT32 cookie;
  131. A_UINT32 source;
  132. } WMIX_HB_CHALLENGE_RESP_CMD;
  133. /*
  134. * WMIX_HB_CHALLENGE_RESP_EVENTID
  135. * Heartbeat Challenge Response Event
  136. */
  137. #define WMIX_HB_CHALLENGE_RESP_EVENT WMIX_HB_CHALLENGE_RESP_CMD
  138. /*
  139. * =============Target Profiling support=================
  140. */
  141. typedef struct {
  142. A_UINT32 period; /* Time (in 30.5us ticks) between samples */
  143. A_UINT32 nbins;
  144. } WMIX_PROF_CFG_CMD;
  145. typedef struct {
  146. A_UINT32 addr;
  147. } WMIX_PROF_ADDR_SET_CMD;
  148. /*
  149. * Target responds to Hosts's earlier WMIX_PROF_COUNT_GET_CMDID request
  150. * using a WMIX_PROF_COUNT_EVENT with
  151. * addr set to the next address
  152. * count set to the corresponding count
  153. */
  154. typedef struct {
  155. A_UINT32 addr;
  156. A_UINT32 count;
  157. } WMIX_PROF_COUNT_EVENT;
  158. #ifdef __cplusplus
  159. }
  160. #endif
  161. #endif /* _WMIX_H_ */