rmnet_qmi.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /*
  2. * Copyright (c) 2018-2021, 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, u8 ch, bool flush);
  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. void rmnet_prepare_ps_bearers(void *port, u8 *num_bearers, u8 *bearer_id);
  35. #else
  36. static inline void *rmnet_get_qmi_pt(void *port)
  37. {
  38. return NULL;
  39. }
  40. static inline void *rmnet_get_qos_pt(struct net_device *dev)
  41. {
  42. return NULL;
  43. }
  44. static inline void *rmnet_get_rmnet_port(struct net_device *dev)
  45. {
  46. return NULL;
  47. }
  48. static inline struct net_device *rmnet_get_rmnet_dev(void *port,
  49. u8 mux_id)
  50. {
  51. return NULL;
  52. }
  53. static inline void rmnet_reset_qmi_pt(void *port)
  54. {
  55. }
  56. static inline void rmnet_init_qmi_pt(void *port, void *qmi)
  57. {
  58. }
  59. static inline void rmnet_enable_all_flows(void *port)
  60. {
  61. }
  62. static inline bool rmnet_all_flows_enabled(void *port)
  63. {
  64. return true;
  65. }
  66. static inline void rmnet_set_port_format(void *port)
  67. {
  68. }
  69. static inline void rmnet_get_packets(void *port, u64 *rx, u64 *tx)
  70. {
  71. }
  72. static inline int rmnet_get_powersave_notif(void *port)
  73. {
  74. return 0;
  75. }
  76. static inline struct net_device *rmnet_get_real_dev(void *port)
  77. {
  78. return NULL;
  79. }
  80. static inline int rmnet_get_dlmarker_info(void *port)
  81. {
  82. return 0;
  83. }
  84. #endif /* CONFIG_QTI_QMI_RMNET */
  85. #endif /*_RMNET_QMI_H*/