aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/bcmdhd/include/proto/bt_amp_hci.h
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-01-22 10:38:37 -0500
committerJonathan Herman <hermanjl@cs.unc.edu>2013-01-22 10:38:37 -0500
commitfcc9d2e5a6c89d22b8b773a64fb4ad21ac318446 (patch)
treea57612d1888735a2ec7972891b68c1ac5ec8faea /drivers/net/wireless/bcmdhd/include/proto/bt_amp_hci.h
parent8dea78da5cee153b8af9c07a2745f6c55057fe12 (diff)
Added missing tegra files.HEADmaster
Diffstat (limited to 'drivers/net/wireless/bcmdhd/include/proto/bt_amp_hci.h')
-rw-r--r--drivers/net/wireless/bcmdhd/include/proto/bt_amp_hci.h442
1 files changed, 442 insertions, 0 deletions
diff --git a/drivers/net/wireless/bcmdhd/include/proto/bt_amp_hci.h b/drivers/net/wireless/bcmdhd/include/proto/bt_amp_hci.h
new file mode 100644
index 00000000000..89c11817915
--- /dev/null
+++ b/drivers/net/wireless/bcmdhd/include/proto/bt_amp_hci.h
@@ -0,0 +1,442 @@
1/*
2 * BT-AMP (BlueTooth Alternate Mac and Phy) HCI (Host/Controller Interface)
3 *
4 * Copyright (C) 1999-2011, Broadcom Corporation
5 *
6 * Unless you and Broadcom execute a separate written software license
7 * agreement governing use of this software, this software is licensed to you
8 * under the terms of the GNU General Public License version 2 (the "GPL"),
9 * available at http://www.broadcom.com/licenses/GPLv2.php, with the
10 * following added to such license:
11 *
12 * As a special exception, the copyright holders of this software give you
13 * permission to link this software with independent modules, and to copy and
14 * distribute the resulting executable under terms of your choice, provided that
15 * you also meet, for each linked independent module, the terms and conditions of
16 * the license of that module. An independent module is a module which is not
17 * derived from this software. The special exception does not apply to any
18 * modifications of the software.
19 *
20 * Notwithstanding the above, under no circumstances may you combine this
21 * software in any way with any other Broadcom software provided under a license
22 * other than the GPL, without Broadcom's express prior written consent.
23 *
24 * $Id: bt_amp_hci.h,v 9.14.8.2 2010-09-10 18:37:47 Exp $
25*/
26
27#ifndef _bt_amp_hci_h
28#define _bt_amp_hci_h
29
30/* This marks the start of a packed structure section. */
31#include <packed_section_start.h>
32
33
34/* AMP HCI CMD packet format */
35typedef BWL_PRE_PACKED_STRUCT struct amp_hci_cmd {
36 uint16 opcode;
37 uint8 plen;
38 uint8 parms[1];
39} BWL_POST_PACKED_STRUCT amp_hci_cmd_t;
40
41#define HCI_CMD_PREAMBLE_SIZE OFFSETOF(amp_hci_cmd_t, parms)
42#define HCI_CMD_DATA_SIZE 255
43
44/* AMP HCI CMD opcode layout */
45#define HCI_CMD_OPCODE(ogf, ocf) ((((ogf) & 0x3F) << 10) | ((ocf) & 0x03FF))
46#define HCI_CMD_OGF(opcode) ((uint8)(((opcode) >> 10) & 0x3F))
47#define HCI_CMD_OCF(opcode) ((opcode) & 0x03FF)
48
49/* AMP HCI command opcodes */
50#define HCI_Read_Failed_Contact_Counter HCI_CMD_OPCODE(0x05, 0x0001)
51#define HCI_Reset_Failed_Contact_Counter HCI_CMD_OPCODE(0x05, 0x0002)
52#define HCI_Read_Link_Quality HCI_CMD_OPCODE(0x05, 0x0003)
53#define HCI_Read_Local_AMP_Info HCI_CMD_OPCODE(0x05, 0x0009)
54#define HCI_Read_Local_AMP_ASSOC HCI_CMD_OPCODE(0x05, 0x000A)
55#define HCI_Write_Remote_AMP_ASSOC HCI_CMD_OPCODE(0x05, 0x000B)
56#define HCI_Create_Physical_Link HCI_CMD_OPCODE(0x01, 0x0035)
57#define HCI_Accept_Physical_Link_Request HCI_CMD_OPCODE(0x01, 0x0036)
58#define HCI_Disconnect_Physical_Link HCI_CMD_OPCODE(0x01, 0x0037)
59#define HCI_Create_Logical_Link HCI_CMD_OPCODE(0x01, 0x0038)
60#define HCI_Accept_Logical_Link HCI_CMD_OPCODE(0x01, 0x0039)
61#define HCI_Disconnect_Logical_Link HCI_CMD_OPCODE(0x01, 0x003A)
62#define HCI_Logical_Link_Cancel HCI_CMD_OPCODE(0x01, 0x003B)
63#define HCI_Flow_Spec_Modify HCI_CMD_OPCODE(0x01, 0x003C)
64#define HCI_Write_Flow_Control_Mode HCI_CMD_OPCODE(0x01, 0x0067)
65#define HCI_Read_Best_Effort_Flush_Timeout HCI_CMD_OPCODE(0x01, 0x0069)
66#define HCI_Write_Best_Effort_Flush_Timeout HCI_CMD_OPCODE(0x01, 0x006A)
67#define HCI_Short_Range_Mode HCI_CMD_OPCODE(0x01, 0x006B)
68#define HCI_Reset HCI_CMD_OPCODE(0x03, 0x0003)
69#define HCI_Read_Connection_Accept_Timeout HCI_CMD_OPCODE(0x03, 0x0015)
70#define HCI_Write_Connection_Accept_Timeout HCI_CMD_OPCODE(0x03, 0x0016)
71#define HCI_Read_Link_Supervision_Timeout HCI_CMD_OPCODE(0x03, 0x0036)
72#define HCI_Write_Link_Supervision_Timeout HCI_CMD_OPCODE(0x03, 0x0037)
73#define HCI_Enhanced_Flush HCI_CMD_OPCODE(0x03, 0x005F)
74#define HCI_Read_Logical_Link_Accept_Timeout HCI_CMD_OPCODE(0x03, 0x0061)
75#define HCI_Write_Logical_Link_Accept_Timeout HCI_CMD_OPCODE(0x03, 0x0062)
76#define HCI_Set_Event_Mask_Page_2 HCI_CMD_OPCODE(0x03, 0x0063)
77#define HCI_Read_Location_Data_Command HCI_CMD_OPCODE(0x03, 0x0064)
78#define HCI_Write_Location_Data_Command HCI_CMD_OPCODE(0x03, 0x0065)
79#define HCI_Read_Local_Version_Info HCI_CMD_OPCODE(0x04, 0x0001)
80#define HCI_Read_Local_Supported_Commands HCI_CMD_OPCODE(0x04, 0x0002)
81#define HCI_Read_Buffer_Size HCI_CMD_OPCODE(0x04, 0x0005)
82#define HCI_Read_Data_Block_Size HCI_CMD_OPCODE(0x04, 0x000A)
83
84/* AMP HCI command parameters */
85typedef BWL_PRE_PACKED_STRUCT struct read_local_cmd_parms {
86 uint8 plh;
87 uint8 offset[2]; /* length so far */
88 uint8 max_remote[2];
89} BWL_POST_PACKED_STRUCT read_local_cmd_parms_t;
90
91typedef BWL_PRE_PACKED_STRUCT struct write_remote_cmd_parms {
92 uint8 plh;
93 uint8 offset[2];
94 uint8 len[2];
95 uint8 frag[1];
96} BWL_POST_PACKED_STRUCT write_remote_cmd_parms_t;
97
98typedef BWL_PRE_PACKED_STRUCT struct phy_link_cmd_parms {
99 uint8 plh;
100 uint8 key_length;
101 uint8 key_type;
102 uint8 key[1];
103} BWL_POST_PACKED_STRUCT phy_link_cmd_parms_t;
104
105typedef BWL_PRE_PACKED_STRUCT struct dis_phy_link_cmd_parms {
106 uint8 plh;
107 uint8 reason;
108} BWL_POST_PACKED_STRUCT dis_phy_link_cmd_parms_t;
109
110typedef BWL_PRE_PACKED_STRUCT struct log_link_cmd_parms {
111 uint8 plh;
112 uint8 txflow[16];
113 uint8 rxflow[16];
114} BWL_POST_PACKED_STRUCT log_link_cmd_parms_t;
115
116typedef BWL_PRE_PACKED_STRUCT struct ext_flow_spec {
117 uint8 id;
118 uint8 service_type;
119 uint8 max_sdu[2];
120 uint8 sdu_ia_time[4];
121 uint8 access_latency[4];
122 uint8 flush_timeout[4];
123} BWL_POST_PACKED_STRUCT ext_flow_spec_t;
124
125typedef BWL_PRE_PACKED_STRUCT struct log_link_cancel_cmd_parms {
126 uint8 plh;
127 uint8 tx_fs_ID;
128} BWL_POST_PACKED_STRUCT log_link_cancel_cmd_parms_t;
129
130typedef BWL_PRE_PACKED_STRUCT struct flow_spec_mod_cmd_parms {
131 uint8 llh[2];
132 uint8 txflow[16];
133 uint8 rxflow[16];
134} BWL_POST_PACKED_STRUCT flow_spec_mod_cmd_parms_t;
135
136typedef BWL_PRE_PACKED_STRUCT struct plh_pad {
137 uint8 plh;
138 uint8 pad;
139} BWL_POST_PACKED_STRUCT plh_pad_t;
140
141typedef BWL_PRE_PACKED_STRUCT union hci_handle {
142 uint16 bredr;
143 plh_pad_t amp;
144} BWL_POST_PACKED_STRUCT hci_handle_t;
145
146typedef BWL_PRE_PACKED_STRUCT struct ls_to_cmd_parms {
147 hci_handle_t handle;
148 uint8 timeout[2];
149} BWL_POST_PACKED_STRUCT ls_to_cmd_parms_t;
150
151typedef BWL_PRE_PACKED_STRUCT struct befto_cmd_parms {
152 uint8 llh[2];
153 uint8 befto[4];
154} BWL_POST_PACKED_STRUCT befto_cmd_parms_t;
155
156typedef BWL_PRE_PACKED_STRUCT struct srm_cmd_parms {
157 uint8 plh;
158 uint8 srm;
159} BWL_POST_PACKED_STRUCT srm_cmd_parms_t;
160
161typedef BWL_PRE_PACKED_STRUCT struct ld_cmd_parms {
162 uint8 ld_aware;
163 uint8 ld[2];
164 uint8 ld_opts;
165 uint8 l_opts;
166} BWL_POST_PACKED_STRUCT ld_cmd_parms_t;
167
168typedef BWL_PRE_PACKED_STRUCT struct eflush_cmd_parms {
169 uint8 llh[2];
170 uint8 packet_type;
171} BWL_POST_PACKED_STRUCT eflush_cmd_parms_t;
172
173/* Generic AMP extended flow spec service types */
174#define EFS_SVCTYPE_NO_TRAFFIC 0
175#define EFS_SVCTYPE_BEST_EFFORT 1
176#define EFS_SVCTYPE_GUARANTEED 2
177
178/* AMP HCI event packet format */
179typedef BWL_PRE_PACKED_STRUCT struct amp_hci_event {
180 uint8 ecode;
181 uint8 plen;
182 uint8 parms[1];
183} BWL_POST_PACKED_STRUCT amp_hci_event_t;
184
185#define HCI_EVT_PREAMBLE_SIZE OFFSETOF(amp_hci_event_t, parms)
186
187/* AMP HCI event codes */
188#define HCI_Command_Complete 0x0E
189#define HCI_Command_Status 0x0F
190#define HCI_Flush_Occurred 0x11
191#define HCI_Enhanced_Flush_Complete 0x39
192#define HCI_Physical_Link_Complete 0x40
193#define HCI_Channel_Select 0x41
194#define HCI_Disconnect_Physical_Link_Complete 0x42
195#define HCI_Logical_Link_Complete 0x45
196#define HCI_Disconnect_Logical_Link_Complete 0x46
197#define HCI_Flow_Spec_Modify_Complete 0x47
198#define HCI_Number_of_Completed_Data_Blocks 0x48
199#define HCI_Short_Range_Mode_Change_Complete 0x4C
200#define HCI_Status_Change_Event 0x4D
201#define HCI_Vendor_Specific 0xFF
202
203/* AMP HCI event mask bit positions */
204#define HCI_Physical_Link_Complete_Event_Mask 0x0001
205#define HCI_Channel_Select_Event_Mask 0x0002
206#define HCI_Disconnect_Physical_Link_Complete_Event_Mask 0x0004
207#define HCI_Logical_Link_Complete_Event_Mask 0x0020
208#define HCI_Disconnect_Logical_Link_Complete_Event_Mask 0x0040
209#define HCI_Flow_Spec_Modify_Complete_Event_Mask 0x0080
210#define HCI_Number_of_Completed_Data_Blocks_Event_Mask 0x0100
211#define HCI_Short_Range_Mode_Change_Complete_Event_Mask 0x1000
212#define HCI_Status_Change_Event_Mask 0x2000
213#define HCI_All_Event_Mask 0x31e7
214
215/* AMP HCI event parameters */
216typedef BWL_PRE_PACKED_STRUCT struct cmd_status_parms {
217 uint8 status;
218 uint8 cmdpkts;
219 uint16 opcode;
220} BWL_POST_PACKED_STRUCT cmd_status_parms_t;
221
222typedef BWL_PRE_PACKED_STRUCT struct cmd_complete_parms {
223 uint8 cmdpkts;
224 uint16 opcode;
225 uint8 parms[1];
226} BWL_POST_PACKED_STRUCT cmd_complete_parms_t;
227
228typedef BWL_PRE_PACKED_STRUCT struct flush_occurred_evt_parms {
229 uint16 handle;
230} BWL_POST_PACKED_STRUCT flush_occurred_evt_parms_t;
231
232typedef BWL_PRE_PACKED_STRUCT struct write_remote_evt_parms {
233 uint8 status;
234 uint8 plh;
235} BWL_POST_PACKED_STRUCT write_remote_evt_parms_t;
236
237typedef BWL_PRE_PACKED_STRUCT struct read_local_evt_parms {
238 uint8 status;
239 uint8 plh;
240 uint16 len;
241 uint8 frag[1];
242} BWL_POST_PACKED_STRUCT read_local_evt_parms_t;
243
244typedef BWL_PRE_PACKED_STRUCT struct read_local_info_evt_parms {
245 uint8 status;
246 uint8 AMP_status;
247 uint32 bandwidth;
248 uint32 gbandwidth;
249 uint32 latency;
250 uint32 PDU_size;
251 uint8 ctrl_type;
252 uint16 PAL_cap;
253 uint16 AMP_ASSOC_len;
254 uint32 max_flush_timeout;
255 uint32 be_flush_timeout;
256} BWL_POST_PACKED_STRUCT read_local_info_evt_parms_t;
257
258typedef BWL_PRE_PACKED_STRUCT struct log_link_evt_parms {
259 uint8 status;
260 uint16 llh;
261 uint8 plh;
262 uint8 tx_fs_ID;
263} BWL_POST_PACKED_STRUCT log_link_evt_parms_t;
264
265typedef BWL_PRE_PACKED_STRUCT struct disc_log_link_evt_parms {
266 uint8 status;
267 uint16 llh;
268 uint8 reason;
269} BWL_POST_PACKED_STRUCT disc_log_link_evt_parms_t;
270
271typedef BWL_PRE_PACKED_STRUCT struct log_link_cancel_evt_parms {
272 uint8 status;
273 uint8 plh;
274 uint8 tx_fs_ID;
275} BWL_POST_PACKED_STRUCT log_link_cancel_evt_parms_t;
276
277typedef BWL_PRE_PACKED_STRUCT struct flow_spec_mod_evt_parms {
278 uint8 status;
279 uint16 llh;
280} BWL_POST_PACKED_STRUCT flow_spec_mod_evt_parms_t;
281
282typedef BWL_PRE_PACKED_STRUCT struct phy_link_evt_parms {
283 uint8 status;
284 uint8 plh;
285} BWL_POST_PACKED_STRUCT phy_link_evt_parms_t;
286
287typedef BWL_PRE_PACKED_STRUCT struct dis_phy_link_evt_parms {
288 uint8 status;
289 uint8 plh;
290 uint8 reason;
291} BWL_POST_PACKED_STRUCT dis_phy_link_evt_parms_t;
292
293typedef BWL_PRE_PACKED_STRUCT struct read_ls_to_evt_parms {
294 uint8 status;
295 hci_handle_t handle;
296 uint16 timeout;
297} BWL_POST_PACKED_STRUCT read_ls_to_evt_parms_t;
298
299typedef BWL_PRE_PACKED_STRUCT struct read_lla_ca_to_evt_parms {
300 uint8 status;
301 uint16 timeout;
302} BWL_POST_PACKED_STRUCT read_lla_ca_to_evt_parms_t;
303
304typedef BWL_PRE_PACKED_STRUCT struct read_data_block_size_evt_parms {
305 uint8 status;
306 uint16 ACL_pkt_len;
307 uint16 data_block_len;
308 uint16 data_block_num;
309} BWL_POST_PACKED_STRUCT read_data_block_size_evt_parms_t;
310
311typedef BWL_PRE_PACKED_STRUCT struct data_blocks {
312 uint16 handle;
313 uint16 pkts;
314 uint16 blocks;
315} BWL_POST_PACKED_STRUCT data_blocks_t;
316
317typedef BWL_PRE_PACKED_STRUCT struct num_completed_data_blocks_evt_parms {
318 uint16 num_blocks;
319 uint8 num_handles;
320 data_blocks_t completed[1];
321} BWL_POST_PACKED_STRUCT num_completed_data_blocks_evt_parms_t;
322
323typedef BWL_PRE_PACKED_STRUCT struct befto_evt_parms {
324 uint8 status;
325 uint32 befto;
326} BWL_POST_PACKED_STRUCT befto_evt_parms_t;
327
328typedef BWL_PRE_PACKED_STRUCT struct srm_evt_parms {
329 uint8 status;
330 uint8 plh;
331 uint8 srm;
332} BWL_POST_PACKED_STRUCT srm_evt_parms_t;
333
334typedef BWL_PRE_PACKED_STRUCT struct contact_counter_evt_parms {
335 uint8 status;
336 uint8 llh[2];
337 uint16 counter;
338} BWL_POST_PACKED_STRUCT contact_counter_evt_parms_t;
339
340typedef BWL_PRE_PACKED_STRUCT struct contact_counter_reset_evt_parms {
341 uint8 status;
342 uint8 llh[2];
343} BWL_POST_PACKED_STRUCT contact_counter_reset_evt_parms_t;
344
345typedef BWL_PRE_PACKED_STRUCT struct read_linkq_evt_parms {
346 uint8 status;
347 hci_handle_t handle;
348 uint8 link_quality;
349} BWL_POST_PACKED_STRUCT read_linkq_evt_parms_t;
350
351typedef BWL_PRE_PACKED_STRUCT struct ld_evt_parms {
352 uint8 status;
353 uint8 ld_aware;
354 uint8 ld[2];
355 uint8 ld_opts;
356 uint8 l_opts;
357} BWL_POST_PACKED_STRUCT ld_evt_parms_t;
358
359typedef BWL_PRE_PACKED_STRUCT struct eflush_complete_evt_parms {
360 uint16 handle;
361} BWL_POST_PACKED_STRUCT eflush_complete_evt_parms_t;
362
363typedef BWL_PRE_PACKED_STRUCT struct vendor_specific_evt_parms {
364 uint8 len;
365 uint8 parms[1];
366} BWL_POST_PACKED_STRUCT vendor_specific_evt_parms_t;
367
368typedef BWL_PRE_PACKED_STRUCT struct local_version_info_evt_parms {
369 uint8 status;
370 uint8 hci_version;
371 uint16 hci_revision;
372 uint8 pal_version;
373 uint16 mfg_name;
374 uint16 pal_subversion;
375} BWL_POST_PACKED_STRUCT local_version_info_evt_parms_t;
376
377#define MAX_SUPPORTED_CMD_BYTE 64
378typedef BWL_PRE_PACKED_STRUCT struct local_supported_cmd_evt_parms {
379 uint8 status;
380 uint8 cmd[MAX_SUPPORTED_CMD_BYTE];
381} BWL_POST_PACKED_STRUCT local_supported_cmd_evt_parms_t;
382
383typedef BWL_PRE_PACKED_STRUCT struct status_change_evt_parms {
384 uint8 status;
385 uint8 amp_status;
386} BWL_POST_PACKED_STRUCT status_change_evt_parms_t;
387
388/* AMP HCI error codes */
389#define HCI_SUCCESS 0x00
390#define HCI_ERR_ILLEGAL_COMMAND 0x01
391#define HCI_ERR_NO_CONNECTION 0x02
392#define HCI_ERR_MEMORY_FULL 0x07
393#define HCI_ERR_CONNECTION_TIMEOUT 0x08
394#define HCI_ERR_MAX_NUM_OF_CONNECTIONS 0x09
395#define HCI_ERR_CONNECTION_EXISTS 0x0B
396#define HCI_ERR_CONNECTION_DISALLOWED 0x0C
397#define HCI_ERR_CONNECTION_ACCEPT_TIMEOUT 0x10
398#define HCI_ERR_UNSUPPORTED_VALUE 0x11
399#define HCI_ERR_ILLEGAL_PARAMETER_FMT 0x12
400#define HCI_ERR_CONN_TERM_BY_LOCAL_HOST 0x16
401#define HCI_ERR_UNSPECIFIED 0x1F
402#define HCI_ERR_UNIT_KEY_USED 0x26
403#define HCI_ERR_QOS_REJECTED 0x2D
404#define HCI_ERR_PARAM_OUT_OF_RANGE 0x30
405#define HCI_ERR_NO_SUITABLE_CHANNEL 0x39
406#define HCI_ERR_CHANNEL_MOVE 0xFF
407
408/* AMP HCI ACL Data packet format */
409typedef BWL_PRE_PACKED_STRUCT struct amp_hci_ACL_data {
410 uint16 handle; /* 12-bit connection handle + 2-bit PB and 2-bit BC flags */
411 uint16 dlen; /* data total length */
412 uint8 data[1];
413} BWL_POST_PACKED_STRUCT amp_hci_ACL_data_t;
414
415#define HCI_ACL_DATA_PREAMBLE_SIZE OFFSETOF(amp_hci_ACL_data_t, data)
416
417#define HCI_ACL_DATA_BC_FLAGS (0x0 << 14)
418#define HCI_ACL_DATA_PB_FLAGS (0x3 << 12)
419
420#define HCI_ACL_DATA_HANDLE(handle) ((handle) & 0x0fff)
421#define HCI_ACL_DATA_FLAGS(handle) ((handle) >> 12)
422
423/* AMP Activity Report packet formats */
424typedef BWL_PRE_PACKED_STRUCT struct amp_hci_activity_report {
425 uint8 ScheduleKnown;
426 uint8 NumReports;
427 uint8 data[1];
428} BWL_POST_PACKED_STRUCT amp_hci_activity_report_t;
429
430typedef BWL_PRE_PACKED_STRUCT struct amp_hci_activity_report_triple {
431 uint32 StartTime;
432 uint32 Duration;
433 uint32 Periodicity;
434} BWL_POST_PACKED_STRUCT amp_hci_activity_report_triple_t;
435
436#define HCI_AR_SCHEDULE_KNOWN 0x01
437
438
439/* This marks the end of a packed structure section. */
440#include <packed_section_end.h>
441
442#endif /* _bt_amp_hci_h_ */