Commit | Line | Data |
---|---|---|
61e12104 WK |
1 | /* |
2 | * Copyright (c) 2012 GCT Semiconductor, Inc. All rights reserved. | |
3 | * | |
4 | * This software is licensed under the terms of the GNU General Public | |
5 | * License version 2, as published by the Free Software Foundation, and | |
6 | * may be copied, distributed, and modified under those terms. | |
7 | * | |
8 | * This program is distributed in the hope that it will be useful, | |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | * GNU General Public License for more details. | |
12 | */ | |
13 | ||
14 | #ifndef _HCI_PACKET_H_ | |
15 | #define _HCI_PACKET_H_ | |
16 | ||
17 | #define HCI_HEADER_SIZE 4 | |
18 | ||
19 | /* | |
20 | * The NIC type definition: | |
21 | * For backward compatibility, lower 16 bits used as they were. | |
22 | * Lower 16 bit: NIC_TYPE values | |
23 | * Uppoer 16 bit: NIC_TYPE Flags | |
24 | */ | |
25 | #define NIC_TYPE_NIC0 0x00000010 | |
26 | #define NIC_TYPE_NIC1 0x00000011 | |
27 | #define NIC_TYPE_NIC2 0x00000012 | |
28 | #define NIC_TYPE_NIC3 0x00000013 | |
29 | #define NIC_TYPE_ARP 0x00000100 | |
30 | #define NIC_TYPE_ICMPV6 0x00000200 | |
31 | #define NIC_TYPE_MASK 0x0000FFFF | |
32 | #define NIC_TYPE_F_IPV4 0x00010000 | |
33 | #define NIC_TYPE_F_IPV6 0x00020000 | |
34 | #define NIC_TYPE_F_DHCP 0x00040000 | |
35 | #define NIC_TYPE_F_NDP 0x00080000 | |
36 | #define NIC_TYPE_F_VLAN 0x00100000 | |
37 | ||
38 | struct hci_packet { | |
39 | u16 cmd_evt; | |
40 | u16 len; | |
41 | u8 data[0]; | |
42 | } __packed; | |
43 | ||
44 | struct tlv { | |
45 | u8 type; | |
46 | u8 len; | |
47 | u8 *data[1]; | |
48 | } __packed; | |
49 | ||
50 | struct sdu_header { | |
51 | u16 cmd_evt; | |
52 | u16 len; | |
53 | u32 dftEpsId; | |
54 | u32 bearer_ID; | |
55 | u32 nic_type; | |
56 | } __packed; | |
57 | ||
58 | struct sdu { | |
59 | u16 cmd_evt; | |
60 | u16 len; | |
61 | u32 dftEpsId; | |
62 | u32 bearer_ID; | |
63 | u32 nic_type; | |
64 | u8 data[0]; | |
65 | } __packed; | |
66 | ||
67 | struct multi_sdu { | |
68 | u16 cmd_evt; | |
69 | u16 len; | |
70 | u16 num_packet; | |
71 | u16 reserved; | |
72 | u8 data[0]; | |
73 | } __packed; | |
74 | ||
75 | struct hci_pdn_table_ind { | |
76 | u16 cmd_evt; | |
77 | u16 len; | |
78 | u8 activate; | |
79 | u32 dft_eps_id; | |
80 | u32 nic_type; | |
81 | u8 pdn_type; | |
82 | u8 ipv4_addr[4]; | |
83 | u8 ipv6_intf_id[8]; | |
84 | } __packed; | |
85 | ||
86 | struct hci_connect_ind { | |
87 | u16 cmd_evt; | |
88 | u16 len; | |
89 | u32 connect; | |
90 | } __packed; | |
91 | ||
92 | ||
93 | #endif /* _HCI_PACKET_H_ */ |