GNU Linux-libre 4.14.266-gnu1
[releases.git] / drivers / net / ethernet / qualcomm / rmnet / rmnet_config.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  * RMNET Data configuration engine
13  *
14  */
15
16 #include <linux/skbuff.h>
17
18 #ifndef _RMNET_CONFIG_H_
19 #define _RMNET_CONFIG_H_
20
21 #define RMNET_MAX_LOGICAL_EP 255
22
23 /* Information about the next device to deliver the packet to.
24  * Exact usage of this parameter depends on the rmnet_mode.
25  */
26 struct rmnet_endpoint {
27         u8 rmnet_mode;
28         u8 mux_id;
29         struct net_device *egress_dev;
30 };
31
32 /* One instance of this structure is instantiated for each real_dev associated
33  * with rmnet.
34  */
35 struct rmnet_port {
36         struct net_device *dev;
37         struct rmnet_endpoint local_ep;
38         struct rmnet_endpoint muxed_ep[RMNET_MAX_LOGICAL_EP];
39         u32 ingress_data_format;
40         u32 egress_data_format;
41         struct net_device *rmnet_devices[RMNET_MAX_LOGICAL_EP];
42         u8 nr_rmnet_devs;
43 };
44
45 extern struct rtnl_link_ops rmnet_link_ops;
46
47 struct rmnet_priv {
48         struct rmnet_endpoint local_ep;
49         u8 mux_id;
50         struct net_device *real_dev;
51 };
52
53 struct rmnet_port *rmnet_get_port(struct net_device *real_dev);
54
55 #endif /* _RMNET_CONFIG_H_ */