2 * Copyright (c) 2004-2005 Atheros Communications Inc.
6 * $ATH_LICENSE_HOSTSDK0_C$
8 * This file contains extensions of the WMI protocol specified in the
9 * Wireless Module Interface (WMI). It includes definitions of all
10 * extended commands and events. Extensions include useful commands
11 * that are not directly related to wireless activities. They may
12 * be hardware-specific, and they might not be supported on all
15 * Extended WMIX commands are encapsulated in a WMI message with
16 * cmd=WMI_EXTENSION_CMD.
28 #include "athstartpack.h"
34 * Extended WMI commands are those that are needed during wireless
35 * operation, but which are not really wireless commands. This allows,
36 * for instance, platform-specific commands. Extended WMI commands are
37 * embedded in a WMI command message with WMI_COMMAND_ID=WMI_EXTENSION_CMDID.
38 * Extended WMI events are similarly embedded in a WMI event message with
39 * WMI_EVENT_ID=WMI_EXTENSION_EVENTID.
41 typedef PREPACK
struct {
43 } POSTPACK WMIX_CMD_HDR
;
46 WMIX_DSETOPEN_REPLY_CMDID
= 0x2001,
47 WMIX_DSETDATA_REPLY_CMDID
,
48 WMIX_GPIO_OUTPUT_SET_CMDID
,
49 WMIX_GPIO_INPUT_GET_CMDID
,
50 WMIX_GPIO_REGISTER_SET_CMDID
,
51 WMIX_GPIO_REGISTER_GET_CMDID
,
52 WMIX_GPIO_INTR_ACK_CMDID
,
53 WMIX_HB_CHALLENGE_RESP_CMDID
,
54 WMIX_DBGLOG_CFG_MODULE_CMDID
,
58 WMIX_DSETOPENREQ_EVENTID
= 0x3001,
59 WMIX_DSETCLOSE_EVENTID
,
60 WMIX_DSETDATAREQ_EVENTID
,
61 WMIX_GPIO_INTR_EVENTID
,
62 WMIX_GPIO_DATA_EVENTID
,
63 WMIX_GPIO_ACK_EVENTID
,
64 WMIX_HB_CHALLENGE_RESP_EVENTID
,
69 * =============DataSet support=================
73 * WMIX_DSETOPENREQ_EVENTID
74 * DataSet Open Request Event
76 typedef PREPACK
struct {
78 A_UINT32 targ_dset_handle
; /* echo'ed, not used by Host, */
79 A_UINT32 targ_reply_fn
; /* echo'ed, not used by Host, */
80 A_UINT32 targ_reply_arg
; /* echo'ed, not used by Host, */
81 } POSTPACK WMIX_DSETOPENREQ_EVENT
;
84 * WMIX_DSETCLOSE_EVENTID
87 typedef PREPACK
struct {
88 A_UINT32 access_cookie
;
89 } POSTPACK WMIX_DSETCLOSE_EVENT
;
92 * WMIX_DSETDATAREQ_EVENTID
93 * DataSet Data Request Event
95 typedef PREPACK
struct {
96 A_UINT32 access_cookie
;
99 A_UINT32 targ_buf
; /* echo'ed, not used by Host, */
100 A_UINT32 targ_reply_fn
; /* echo'ed, not used by Host, */
101 A_UINT32 targ_reply_arg
; /* echo'ed, not used by Host, */
102 } POSTPACK WMIX_DSETDATAREQ_EVENT
;
104 typedef PREPACK
struct {
106 A_UINT32 targ_dset_handle
;
107 A_UINT32 targ_reply_fn
;
108 A_UINT32 targ_reply_arg
;
109 A_UINT32 access_cookie
;
112 } POSTPACK WMIX_DSETOPEN_REPLY_CMD
;
114 typedef PREPACK
struct {
117 A_UINT32 targ_reply_fn
;
118 A_UINT32 targ_reply_arg
;
121 } POSTPACK WMIX_DSETDATA_REPLY_CMD
;
125 * =============GPIO support=================
126 * All masks are 18-bit masks with bit N operating on GPIO pin N.
132 * Set GPIO pin output state.
133 * In order for output to be driven, a pin must be enabled for output.
134 * This can be done during initialization through the GPIO Configuration
135 * DataSet, or during operation with the enable_mask.
137 * If a request is made to simultaneously set/clear or set/disable or
138 * clear/disable or disable/enable, results are undefined.
140 typedef PREPACK
struct {
141 A_UINT32 set_mask
; /* pins to set */
142 A_UINT32 clear_mask
; /* pins to clear */
143 A_UINT32 enable_mask
; /* pins to enable for output */
144 A_UINT32 disable_mask
; /* pins to disable/tristate */
145 } POSTPACK WMIX_GPIO_OUTPUT_SET_CMD
;
148 * Set a GPIO register. For debug/exceptional cases.
149 * Values for gpioreg_id are GPIO_REGISTER_IDs, defined in a
150 * platform-dependent header.
152 typedef PREPACK
struct {
153 A_UINT32 gpioreg_id
; /* GPIO register ID */
154 A_UINT32 value
; /* value to write */
155 } POSTPACK WMIX_GPIO_REGISTER_SET_CMD
;
157 /* Get a GPIO register. For debug/exceptional cases. */
158 typedef PREPACK
struct {
159 A_UINT32 gpioreg_id
; /* GPIO register to read */
160 } POSTPACK WMIX_GPIO_REGISTER_GET_CMD
;
163 * Host acknowledges and re-arms GPIO interrupts. A single
164 * message should be used to acknowledge all interrupts that
165 * were delivered in an earlier WMIX_GPIO_INTR_EVENT message.
167 typedef PREPACK
struct {
168 A_UINT32 ack_mask
; /* interrupts to acknowledge */
169 } POSTPACK WMIX_GPIO_INTR_ACK_CMD
;
172 * Target informs Host of GPIO interrupts that have ocurred since the
173 * last WMIX_GIPO_INTR_ACK_CMD was received. Additional information --
174 * the current GPIO input values is provided -- in order to support
175 * use of a GPIO interrupt as a Data Valid signal for other GPIO pins.
177 typedef PREPACK
struct {
178 A_UINT32 intr_mask
; /* pending GPIO interrupts */
179 A_UINT32 input_values
; /* recent GPIO input values */
180 } POSTPACK WMIX_GPIO_INTR_EVENT
;
183 * Target responds to Host's earlier WMIX_GPIO_INPUT_GET_CMDID request
184 * using a GPIO_DATA_EVENT with
185 * value set to the mask of GPIO pin inputs and
186 * reg_id set to GPIO_ID_NONE
189 * Target responds to Hosts's earlier WMIX_GPIO_REGISTER_GET_CMDID request
190 * using a GPIO_DATA_EVENT with
191 * value set to the value of the requested register and
192 * reg_id identifying the register (reflects the original request)
193 * NB: reg_id supports the future possibility of unsolicited
194 * WMIX_GPIO_DATA_EVENTs (for polling GPIO input), and it may
195 * simplify Host GPIO support.
197 typedef PREPACK
struct {
200 } POSTPACK WMIX_GPIO_DATA_EVENT
;
203 * =============Error Detection support=================
207 * WMIX_HB_CHALLENGE_RESP_CMDID
208 * Heartbeat Challenge Response command
210 typedef PREPACK
struct {
213 } POSTPACK WMIX_HB_CHALLENGE_RESP_CMD
;
216 * WMIX_HB_CHALLENGE_RESP_EVENTID
217 * Heartbeat Challenge Response Event
219 #define WMIX_HB_CHALLENGE_RESP_EVENT WMIX_HB_CHALLENGE_RESP_CMD
221 typedef PREPACK
struct {
222 struct dbglog_config_s config
;
223 } POSTPACK WMIX_DBGLOG_CFG_MODULE_CMD
;
226 #include "athendpack.h"
233 #endif /* _WMIX_H_ */