rmnet_config.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. #include <linux/skbuff.h>
  16. #ifndef _RMNET_CONFIG_H_
  17. #define _RMNET_CONFIG_H_
  18. #define RMNET_MAX_LOGICAL_EP 255
  19. /* Information about the next device to deliver the packet to.
  20. * Exact usage of this parameter depends on the rmnet_mode.
  21. */
  22. struct rmnet_endpoint {
  23. u8 rmnet_mode;
  24. u8 mux_id;
  25. struct net_device *egress_dev;
  26. };
  27. /* One instance of this structure is instantiated for each real_dev associated
  28. * with rmnet.
  29. */
  30. struct rmnet_port {
  31. struct net_device *dev;
  32. struct rmnet_endpoint local_ep;
  33. struct rmnet_endpoint muxed_ep[RMNET_MAX_LOGICAL_EP];
  34. u32 ingress_data_format;
  35. u32 egress_data_format;
  36. struct net_device *rmnet_devices[RMNET_MAX_LOGICAL_EP];
  37. u8 nr_rmnet_devs;
  38. };
  39. extern struct rtnl_link_ops rmnet_link_ops;
  40. struct rmnet_priv {
  41. struct rmnet_endpoint local_ep;
  42. u8 mux_id;
  43. struct net_device *real_dev;
  44. };
  45. struct rmnet_port *rmnet_get_port(struct net_device *real_dev);
  46. #endif /* _RMNET_CONFIG_H_ */