1 /* SPDX-License-Identifier: GPL-2.0-only
2 * Copyright (c) 2013-2019, The Linux Foundation. All rights reserved.
5 #ifndef _LINUX_IF_RMNET_H_
6 #define _LINUX_IF_RMNET_H_
8 struct rmnet_map_header {
9 u8 flags; /* MAP_CMD_FLAG, MAP_PAD_LEN_MASK */
11 __be16 pkt_len; /* Length of packet, including pad */
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
18 #define MAP_PAD_LEN_MASK GENMASK(5, 0)
19 #define MAP_CMD_FLAG BIT(7)
21 struct rmnet_map_dl_csum_trailer {
23 u8 flags; /* MAP_CSUM_DL_VALID_FLAG */
24 __be16 csum_start_offset;
29 /* rmnet_map_dl_csum_trailer flags field:
30 * VALID: 1 = checksum and length valid; 0 = ignore them
32 #define MAP_CSUM_DL_VALID_FLAG BIT(0)
34 struct rmnet_map_ul_csum_header {
35 __be16 csum_start_offset;
36 __be16 csum_info; /* MAP_CSUM_UL_* */
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
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)
48 #endif /* !(_LINUX_IF_RMNET_H_) */