rmnet_qmi.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. /*
  2. * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 and
  6. * only version 2 as published by the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. */
  13. #ifndef _RMNET_QMI_H
  14. #define _RMNET_QMI_H
  15. #include <linux/netdevice.h>
  16. #include <linux/skbuff.h>
  17. #define CONFIG_QTI_QMI_RMNET 1
  18. void rmnet_map_tx_qmap_cmd(struct sk_buff *qmap_skb);
  19. #ifdef CONFIG_QTI_QMI_RMNET
  20. void *rmnet_get_qmi_pt(void *port);
  21. void *rmnet_get_qos_pt(struct net_device *dev);
  22. void *rmnet_get_rmnet_port(struct net_device *dev);
  23. struct net_device *rmnet_get_rmnet_dev(void *port, u8 mux_id);
  24. void rmnet_reset_qmi_pt(void *port);
  25. void rmnet_init_qmi_pt(void *port, void *qmi);
  26. void rmnet_enable_all_flows(void *port);
  27. bool rmnet_all_flows_enabled(void *port);
  28. void rmnet_set_powersave_format(void *port);
  29. void rmnet_clear_powersave_format(void *port);
  30. void rmnet_get_packets(void *port, u64 *rx, u64 *tx);
  31. int rmnet_get_powersave_notif(void *port);
  32. struct net_device *rmnet_get_real_dev(void *port);
  33. int rmnet_get_dlmarker_info(void *port);
  34. #else
  35. static inline void *rmnet_get_qmi_pt(void *port)
  36. {
  37. return NULL;
  38. }
  39. static inline void *rmnet_get_qos_pt(struct net_device *dev)
  40. {
  41. return NULL;
  42. }
  43. static inline void *rmnet_get_rmnet_port(struct net_device *dev)
  44. {
  45. return NULL;
  46. }
  47. static inline struct net_device *rmnet_get_rmnet_dev(void *port,
  48. u8 mux_id)
  49. {
  50. return NULL;
  51. }
  52. static inline void rmnet_reset_qmi_pt(void *port)
  53. {
  54. }
  55. static inline void rmnet_init_qmi_pt(void *port, void *qmi)
  56. {
  57. }
  58. static inline void rmnet_enable_all_flows(void *port)
  59. {
  60. }
  61. static inline bool rmnet_all_flows_enabled(void *port)
  62. {
  63. return true;
  64. }
  65. static inline void rmnet_set_port_format(void *port)
  66. {
  67. }
  68. static inline void rmnet_get_packets(void *port, u64 *rx, u64 *tx)
  69. {
  70. }
  71. static inline int rmnet_get_powersave_notif(void *port)
  72. {
  73. return 0;
  74. }
  75. static inline struct net_device *rmnet_get_real_dev(void *port)
  76. {
  77. return NULL;
  78. }
  79. static inline int rmnet_get_dlmarker_info(void *port)
  80. {
  81. return 0;
  82. }
  83. #endif /* CONFIG_QTI_QMI_RMNET */
  84. #endif /*_RMNET_QMI_H*/