GNU Linux-libre 4.14.251-gnu1
[releases.git] / drivers / net / ethernet / qualcomm / rmnet / rmnet_private.h
1 /* Copyright (c) 2013-2014, 2016-2017 The Linux Foundation. All rights reserved.
2  *
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License version 2 and
5  * only version 2 as published by the Free Software Foundation.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10  * GNU General Public License for more details.
11  */
12
13 #ifndef _RMNET_PRIVATE_H_
14 #define _RMNET_PRIVATE_H_
15
16 #define RMNET_MAX_PACKET_SIZE      16384
17 #define RMNET_DFLT_PACKET_SIZE     1500
18 #define RMNET_NEEDED_HEADROOM      16
19 #define RMNET_TX_QUEUE_LEN         1000
20
21 /* Constants */
22 #define RMNET_EGRESS_FORMAT__RESERVED__         BIT(0)
23 #define RMNET_EGRESS_FORMAT_MAP                 BIT(1)
24 #define RMNET_EGRESS_FORMAT_AGGREGATION         BIT(2)
25 #define RMNET_EGRESS_FORMAT_MUXING              BIT(3)
26 #define RMNET_EGRESS_FORMAT_MAP_CKSUMV3         BIT(4)
27 #define RMNET_EGRESS_FORMAT_MAP_CKSUMV4         BIT(5)
28
29 #define RMNET_INGRESS_FIX_ETHERNET              BIT(0)
30 #define RMNET_INGRESS_FORMAT_MAP                BIT(1)
31 #define RMNET_INGRESS_FORMAT_DEAGGREGATION      BIT(2)
32 #define RMNET_INGRESS_FORMAT_DEMUXING           BIT(3)
33 #define RMNET_INGRESS_FORMAT_MAP_COMMANDS       BIT(4)
34 #define RMNET_INGRESS_FORMAT_MAP_CKSUMV3        BIT(5)
35 #define RMNET_INGRESS_FORMAT_MAP_CKSUMV4        BIT(6)
36
37 /* Pass the frame up the stack with no modifications to skb->dev */
38 #define RMNET_EPMODE_NONE (0)
39 /* Replace skb->dev to a virtual rmnet device and pass up the stack */
40 #define RMNET_EPMODE_VND (1)
41 /* Pass the frame directly to another device with dev_queue_xmit() */
42 #define RMNET_EPMODE_BRIDGE (2)
43
44 #endif /* _RMNET_PRIVATE_H_ */