blob: 9661416a9bb473da8bb329477b548a22fce4eaae [file] [log] [blame]
Subash Abhinov Kasiviswanathan9395da42019-05-22 14:21:07 -06001/* SPDX-License-Identifier: GPL-2.0-only
2 * Copyright (c) 2013-2019, The Linux Foundation. All rights reserved.
3 */
4
5#ifndef _LINUX_IF_RMNET_H_
6#define _LINUX_IF_RMNET_H_
7
8struct rmnet_map_header {
9#if defined(__LITTLE_ENDIAN_BITFIELD)
10 u8 pad_len:6;
11 u8 reserved_bit:1;
12 u8 cd_bit:1;
13#elif defined (__BIG_ENDIAN_BITFIELD)
14 u8 cd_bit:1;
15 u8 reserved_bit:1;
16 u8 pad_len:6;
17#else
18#error "Please fix <asm/byteorder.h>"
19#endif
20 u8 mux_id;
21 __be16 pkt_len;
22} __aligned(1);
23
24struct rmnet_map_dl_csum_trailer {
25 u8 reserved1;
26#if defined(__LITTLE_ENDIAN_BITFIELD)
27 u8 valid:1;
28 u8 reserved2:7;
29#elif defined (__BIG_ENDIAN_BITFIELD)
30 u8 reserved2:7;
31 u8 valid:1;
32#else
33#error "Please fix <asm/byteorder.h>"
34#endif
35 u16 csum_start_offset;
36 u16 csum_length;
37 __be16 csum_value;
38} __aligned(1);
39
40struct rmnet_map_ul_csum_header {
41 __be16 csum_start_offset;
42#if defined(__LITTLE_ENDIAN_BITFIELD)
43 u16 csum_insert_offset:14;
Subash Abhinov Kasiviswanathana7cf3d22019-07-25 12:07:12 -060044 u16 udp_ind:1;
Subash Abhinov Kasiviswanathan9395da42019-05-22 14:21:07 -060045 u16 csum_enabled:1;
46#elif defined (__BIG_ENDIAN_BITFIELD)
47 u16 csum_enabled:1;
Subash Abhinov Kasiviswanathana7cf3d22019-07-25 12:07:12 -060048 u16 udp_ind:1;
Subash Abhinov Kasiviswanathan9395da42019-05-22 14:21:07 -060049 u16 csum_insert_offset:14;
50#else
51#error "Please fix <asm/byteorder.h>"
52#endif
53} __aligned(1);
54
55#endif /* !(_LINUX_IF_RMNET_H_) */