rmnet_qmap.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * Copyright (c) 2020-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_QMAP_H
  14. #define __RMNET_QMAP_H
  15. #include "qmi_rmnet_i.h"
  16. #define QMAP_CMD_DONE -1
  17. #define QMAP_CMD_ACK_INBAND -2
  18. #define QMAP_CMD_REQUEST 0
  19. #define QMAP_CMD_ACK 1
  20. #define QMAP_CMD_UNSUPPORTED 2
  21. #define QMAP_CMD_INVALID 3
  22. struct qmap_hdr {
  23. u8 cd_pad;
  24. u8 mux_id;
  25. __be16 pkt_len;
  26. } __aligned(1);
  27. #define QMAP_HDR_LEN sizeof(struct qmap_hdr)
  28. struct qmap_cmd_hdr {
  29. u8 pad_len:6;
  30. u8 reserved_bit:1;
  31. u8 cd_bit:1;
  32. u8 mux_id;
  33. __be16 pkt_len;
  34. u8 cmd_name;
  35. u8 cmd_type:2;
  36. u8 reserved:6;
  37. u16 reserved2;
  38. __be32 tx_id;
  39. } __aligned(1);
  40. int rmnet_qmap_init(void *port);
  41. void rmnet_qmap_exit(void);
  42. int rmnet_qmap_next_txid(void);
  43. int rmnet_qmap_send(struct sk_buff *skb, u8 ch, bool flush);
  44. struct net_device *rmnet_qmap_get_dev(u8 mux_id);
  45. #define QMAP_DFC_CONFIG 10
  46. #define QMAP_DFC_IND 11
  47. #define QMAP_DFC_QUERY 12
  48. #define QMAP_DFC_END_MARKER 13
  49. #define QMAP_DFC_POWERSAVE 14
  50. int dfc_qmap_cmd_handler(struct sk_buff *skb);
  51. #define QMAP_LL_SWITCH 25
  52. #define QMAP_LL_SWITCH_STATUS 26
  53. int ll_qmap_cmd_handler(struct sk_buff *skb);
  54. #endif /* __RMNET_QMAP_H */