Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /* Copyright (c) 2012 GCT Semiconductor, Inc. All rights reserved. */
0003 
0004 #ifndef _HCI_PACKET_H_
0005 #define _HCI_PACKET_H_
0006 
0007 #define HCI_HEADER_SIZE 4
0008 
0009 /*
0010  * The NIC type definition:
0011  * For backward compatibility, lower 16 bits used as they were.
0012  * Lower 16 bit: NIC_TYPE values
0013  * Uppoer 16 bit: NIC_TYPE Flags
0014  */
0015 #define NIC_TYPE_NIC0       0x00000010
0016 #define NIC_TYPE_NIC1       0x00000011
0017 #define NIC_TYPE_NIC2       0x00000012
0018 #define NIC_TYPE_NIC3       0x00000013
0019 #define NIC_TYPE_ARP        0x00000100
0020 #define NIC_TYPE_ICMPV6     0x00000200
0021 #define NIC_TYPE_MASK       0x0000FFFF
0022 #define NIC_TYPE_F_IPV4     0x00010000
0023 #define NIC_TYPE_F_IPV6     0x00020000
0024 #define NIC_TYPE_F_DHCP     0x00040000
0025 #define NIC_TYPE_F_NDP      0x00080000
0026 #define NIC_TYPE_F_VLAN     0x00100000
0027 
0028 struct hci_packet {
0029     __dev16 cmd_evt;
0030     __dev16 len;
0031     u8 data[];
0032 } __packed;
0033 
0034 struct tlv {
0035     u8 type;
0036     u8 len;
0037     u8 *data[];
0038 } __packed;
0039 
0040 struct sdu_header {
0041     __dev16 cmd_evt;
0042     __dev16 len;
0043     __dev32 dft_eps_id;
0044     __dev32 bearer_ID;
0045     __dev32 nic_type;
0046 } __packed;
0047 
0048 struct sdu {
0049     __dev16 cmd_evt;
0050     __dev16 len;
0051     __dev32 dft_eps_ID;
0052     __dev32 bearer_ID;
0053     __dev32 nic_type;
0054     u8 data[];
0055 } __packed;
0056 
0057 struct multi_sdu {
0058     __dev16 cmd_evt;
0059     __dev16 len;
0060     __dev16 num_packet;
0061     __dev16 reserved;
0062     u8 data[];
0063 } __packed;
0064 
0065 struct hci_pdn_table_ind {
0066     __dev16 cmd_evt;
0067     __dev16 len;
0068     u8 activate;
0069     __dev32 dft_eps_id;
0070     __dev32 nic_type;
0071     u8 pdn_type;
0072     u8 ipv4_addr[4];
0073     u8 ipv6_intf_id[8];
0074 } __packed;
0075 
0076 struct hci_connect_ind {
0077     __dev16 cmd_evt;
0078     __dev16 len;
0079     __dev32 connect;
0080 } __packed;
0081 
0082 #endif /* _HCI_PACKET_H_ */