rmnet_qmap.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
  3. * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License version 2 and
  7. * only version 2 as published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. */
  14. #ifndef __RMNET_QMAP_H
  15. #define __RMNET_QMAP_H
  16. #include "qmi_rmnet_i.h"
  17. #define QMAP_CMD_DONE -1
  18. #define QMAP_CMD_ACK_INBAND -2
  19. #define QMAP_CMD_REQUEST 0
  20. #define QMAP_CMD_ACK 1
  21. #define QMAP_CMD_UNSUPPORTED 2
  22. #define QMAP_CMD_INVALID 3
  23. struct qmap_hdr {
  24. u8 cd_pad;
  25. u8 mux_id;
  26. __be16 pkt_len;
  27. } __aligned(1);
  28. #define QMAP_HDR_LEN sizeof(struct qmap_hdr)
  29. struct qmap_cmd_hdr {
  30. u8 pad_len:6;
  31. u8 reserved_bit:1;
  32. u8 cd_bit:1;
  33. u8 mux_id;
  34. __be16 pkt_len;
  35. u8 cmd_name;
  36. u8 cmd_type:2;
  37. u8 reserved:6;
  38. u16 reserved2;
  39. __be32 tx_id;
  40. } __aligned(1);
  41. int rmnet_qmap_init(void *port);
  42. void rmnet_qmap_exit(void);
  43. int rmnet_qmap_next_txid(void);
  44. int rmnet_qmap_send(struct sk_buff *skb, u8 ch, bool flush);
  45. struct net_device *rmnet_qmap_get_dev(u8 mux_id);
  46. #define QMAP_DFC_CONFIG 10
  47. #define QMAP_DFC_IND 11
  48. #define QMAP_DFC_QUERY 12
  49. #define QMAP_DFC_END_MARKER 13
  50. #define QMAP_DFC_POWERSAVE 14
  51. int dfc_qmap_cmd_handler(struct sk_buff *skb);
  52. #define QMAP_LL_SWITCH 25
  53. #define QMAP_LL_SWITCH_STATUS 26
  54. int ll_qmap_cmd_handler(struct sk_buff *skb);
  55. #define QMAP_DATA_REPORT 34
  56. #endif /* __RMNET_QMAP_H */