summaryrefslogtreecommitdiff
path: root/include/linux/if_rmnet.h
blob: b4f5403383fc9be106fad4cde572909df920c00c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/* SPDX-License-Identifier: GPL-2.0-only
 * Copyright (c) 2013-2019, The Linux Foundation. All rights reserved.
 */

#ifndef _LINUX_IF_RMNET_H_
#define _LINUX_IF_RMNET_H_

struct rmnet_map_header {
#if defined(__LITTLE_ENDIAN_BITFIELD)
	u8  pad_len:6;
	u8  reserved_bit:1;
	u8  cd_bit:1;
#elif defined (__BIG_ENDIAN_BITFIELD)
	u8  cd_bit:1;
	u8  reserved_bit:1;
	u8  pad_len:6;
#else
#error	"Please fix <asm/byteorder.h>"
#endif
	u8  mux_id;
	__be16 pkt_len;
}  __aligned(1);

struct rmnet_map_dl_csum_trailer {
	u8  reserved1;
#if defined(__LITTLE_ENDIAN_BITFIELD)
	u8  valid:1;
	u8  reserved2:7;
#elif defined (__BIG_ENDIAN_BITFIELD)
	u8  reserved2:7;
	u8  valid:1;
#else
#error	"Please fix <asm/byteorder.h>"
#endif
	u16 csum_start_offset;
	u16 csum_length;
	__be16 csum_value;
} __aligned(1);

struct rmnet_map_ul_csum_header {
	__be16 csum_start_offset;
#if defined(__LITTLE_ENDIAN_BITFIELD)
	u16 csum_insert_offset:14;
	u16 udp_ip4_ind:1;
	u16 csum_enabled:1;
#elif defined (__BIG_ENDIAN_BITFIELD)
	u16 csum_enabled:1;
	u16 udp_ip4_ind:1;
	u16 csum_insert_offset:14;
#else
#error	"Please fix <asm/byteorder.h>"
#endif
} __aligned(1);

#endif /* !(_LINUX_IF_RMNET_H_) */