]>
Commit | Line | Data |
---|---|---|
9395da4e SAK |
1 | /* 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 | ||
8 | struct rmnet_map_header { | |
16653c16 AE |
9 | u8 flags; /* MAP_CMD_FLAG, MAP_PAD_LEN_MASK */ |
10 | u8 mux_id; | |
11 | __be16 pkt_len; /* Length of packet, including pad */ | |
9395da4e SAK |
12 | } __aligned(1); |
13 | ||
16653c16 AE |
14 | /* rmnet_map_header flags field: |
15 | * PAD_LEN: number of pad bytes following packet data | |
16 | * CMD: 1 = packet contains a MAP command; 0 = packet contains data | |
17 | */ | |
18 | #define MAP_PAD_LEN_MASK GENMASK(5, 0) | |
19 | #define MAP_CMD_FLAG BIT(7) | |
20 | ||
9395da4e | 21 | struct rmnet_map_dl_csum_trailer { |
cc1b21ba AE |
22 | u8 reserved1; |
23 | u8 flags; /* MAP_CSUM_DL_VALID_FLAG */ | |
45f3a13c AE |
24 | __be16 csum_start_offset; |
25 | __be16 csum_length; | |
9395da4e SAK |
26 | __be16 csum_value; |
27 | } __aligned(1); | |
28 | ||
cc1b21ba AE |
29 | /* rmnet_map_dl_csum_trailer flags field: |
30 | * VALID: 1 = checksum and length valid; 0 = ignore them | |
31 | */ | |
32 | #define MAP_CSUM_DL_VALID_FLAG BIT(0) | |
33 | ||
9395da4e SAK |
34 | struct rmnet_map_ul_csum_header { |
35 | __be16 csum_start_offset; | |
86ca860e | 36 | __be16 csum_info; /* MAP_CSUM_UL_* */ |
9395da4e SAK |
37 | } __aligned(1); |
38 | ||
86ca860e AE |
39 | /* csum_info field: |
40 | * OFFSET: where (offset in bytes) to insert computed checksum | |
41 | * UDP: 1 = UDP checksum (zero checkum means no checksum) | |
42 | * ENABLED: 1 = checksum computation requested | |
43 | */ | |
44 | #define MAP_CSUM_UL_OFFSET_MASK GENMASK(13, 0) | |
45 | #define MAP_CSUM_UL_UDP_FLAG BIT(14) | |
46 | #define MAP_CSUM_UL_ENABLED_FLAG BIT(15) | |
47 | ||
9395da4e | 48 | #endif /* !(_LINUX_IF_RMNET_H_) */ |