Commit | Line | Data |
---|---|---|
97fb5e8d | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
e1d9a90a | 2 | /* Copyright (c) 2013-2018, 2021, The Linux Foundation. All rights reserved. |
ceed73a2 SAK |
3 | */ |
4 | ||
5 | #ifndef _RMNET_MAP_H_ | |
6 | #define _RMNET_MAP_H_ | |
9395da4e | 7 | #include <linux/if_rmnet.h> |
ceed73a2 SAK |
8 | |
9 | struct rmnet_map_control_command { | |
10 | u8 command_name; | |
11 | u8 cmd_type:2; | |
12 | u8 reserved:6; | |
13 | u16 reserved2; | |
14 | u32 transaction_id; | |
15 | union { | |
16 | struct { | |
17 | u16 ip_family:2; | |
18 | u16 reserved:14; | |
6e010dd9 SAK |
19 | __be16 flow_control_seq_num; |
20 | __be32 qos_id; | |
ceed73a2 SAK |
21 | } flow_control; |
22 | u8 data[0]; | |
23 | }; | |
24 | } __aligned(1); | |
25 | ||
ceed73a2 SAK |
26 | enum rmnet_map_commands { |
27 | RMNET_MAP_COMMAND_NONE, | |
28 | RMNET_MAP_COMMAND_FLOW_DISABLE, | |
29 | RMNET_MAP_COMMAND_FLOW_ENABLE, | |
30 | /* These should always be the last 2 elements */ | |
31 | RMNET_MAP_COMMAND_UNKNOWN, | |
32 | RMNET_MAP_COMMAND_ENUM_LENGTH | |
33 | }; | |
34 | ||
ceed73a2 SAK |
35 | #define RMNET_MAP_COMMAND_REQUEST 0 |
36 | #define RMNET_MAP_COMMAND_ACK 1 | |
37 | #define RMNET_MAP_COMMAND_UNSUPPORTED 2 | |
38 | #define RMNET_MAP_COMMAND_INVALID 3 | |
39 | ||
40 | #define RMNET_MAP_NO_PAD_BYTES 0 | |
41 | #define RMNET_MAP_ADD_PAD_BYTES 1 | |
42 | ||
bbd21b24 SAK |
43 | struct sk_buff *rmnet_map_deaggregate(struct sk_buff *skb, |
44 | struct rmnet_port *port); | |
ceed73a2 | 45 | struct rmnet_map_header *rmnet_map_add_map_header(struct sk_buff *skb, |
b6e5d27e SCV |
46 | int hdrlen, |
47 | struct rmnet_port *port, | |
48 | int pad); | |
2ffbbf0f | 49 | void rmnet_map_command(struct sk_buff *skb, struct rmnet_port *port); |
bbd21b24 | 50 | int rmnet_map_checksum_downlink_packet(struct sk_buff *skb, u16 len); |
5eb5f860 | 51 | void rmnet_map_checksum_uplink_packet(struct sk_buff *skb, |
b6e5d27e SCV |
52 | struct rmnet_port *port, |
53 | struct net_device *orig_dev, | |
54 | int csum_type); | |
e1d9a90a | 55 | int rmnet_map_process_next_hdr_packet(struct sk_buff *skb, u16 len); |
ceed73a2 SAK |
56 | |
57 | #endif /* _RMNET_MAP_H_ */ |