wlan_ipa_public_struct.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. /*
  2. * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved.
  3. * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  4. *
  5. * Permission to use, copy, modify, and/or distribute this software for
  6. * any purpose with or without fee is hereby granted, provided that the
  7. * above copyright notice and this permission notice appear in all
  8. * copies.
  9. *
  10. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  11. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  12. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  13. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  14. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  15. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  16. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  17. * PERFORMANCE OF THIS SOFTWARE.
  18. */
  19. /*
  20. * DOC: contains ipa public structure definitions
  21. */
  22. #ifndef _WLAN_IPA_PUBLIC_STRUCT_H_
  23. #define _WLAN_IPA_PUBLIC_STRUCT_H_
  24. #include <wlan_cmn.h>
  25. #include <qdf_status.h>
  26. #include <wlan_objmgr_psoc_obj.h>
  27. /**
  28. * struct wlan_ipa_config
  29. * @ipa_config: IPA config
  30. * @desc_size: IPA descriptor size
  31. * @txbuf_count: TX buffer count
  32. * @bus_bw_high: Bus bandwidth high threshold
  33. * @bus_bw_medium: Bus bandwidth medium threshold
  34. * @bus_bw_low: Bus bandwidth low threshold
  35. * @ipa_bw_high: IPA bandwidth high threshold
  36. * @ipa_bw_medium: IPA bandwidth medium threshold
  37. * @ipa_bw_low: IPA bandwidth low threshold
  38. * @ipa_force_voting: support force bw voting
  39. * @ipa_wds: WDS support for IPA
  40. * @ipa_vlan_support: support got vlan with IPA
  41. */
  42. struct wlan_ipa_config {
  43. uint32_t ipa_config;
  44. uint32_t desc_size;
  45. uint32_t txbuf_count;
  46. uint32_t bus_bw_high;
  47. uint32_t bus_bw_medium;
  48. uint32_t bus_bw_low;
  49. uint32_t ipa_bw_high;
  50. uint32_t ipa_bw_medium;
  51. uint32_t ipa_bw_low;
  52. bool ipa_force_voting;
  53. bool ipa_wds;
  54. bool ipa_vlan_support;
  55. };
  56. /**
  57. * enum wlan_ipa_wlan_event - WLAN IPA events
  58. * @WLAN_IPA_CLIENT_CONNECT: Client Connects
  59. * @WLAN_IPA_CLIENT_DISCONNECT: Client Disconnects
  60. * @WLAN_IPA_AP_CONNECT: SoftAP is started
  61. * @WLAN_IPA_AP_DISCONNECT: SoftAP is stopped
  62. * @WLAN_IPA_STA_CONNECT: STA associates to AP
  63. * @WLAN_IPA_STA_DISCONNECT: STA dissociates from AP
  64. * @WLAN_IPA_CLIENT_CONNECT_EX: Peer associates/re-associates to softap
  65. * @WLAN_IPA_WLAN_EVENT_MAX: Max value for the enum
  66. */
  67. enum wlan_ipa_wlan_event {
  68. WLAN_IPA_CLIENT_CONNECT,
  69. WLAN_IPA_CLIENT_DISCONNECT,
  70. WLAN_IPA_AP_CONNECT,
  71. WLAN_IPA_AP_DISCONNECT,
  72. WLAN_IPA_STA_CONNECT,
  73. WLAN_IPA_STA_DISCONNECT,
  74. WLAN_IPA_CLIENT_CONNECT_EX,
  75. WLAN_IPA_WLAN_EVENT_MAX
  76. };
  77. /**
  78. * enum wlan_ipa_bw_level -ipa bandwidth level
  79. * @WLAN_IPA_BW_LEVEL_LOW: vote for low bandwidth
  80. * @WLAN_IPA_BW_LEVEL_MEDIUM: vote for medium bandwidth
  81. * @WLAN_IPA_BW_LEVEL_HIGH: vote for high bandwidth
  82. */
  83. enum wlan_ipa_bw_level {
  84. WLAN_IPA_BW_LEVEL_LOW,
  85. WLAN_IPA_BW_LEVEL_MEDIUM,
  86. WLAN_IPA_BW_LEVEL_HIGH,
  87. };
  88. #ifdef IPA_OPT_WIFI_DP
  89. /**
  90. * enum wlan_ipa_cce_super_rule_flt_hdl - Filter hdl values for cce super rules
  91. * @WLAN_HDL_FILTER1 : Handle for filter1
  92. * @WLAN_HDL_FILTER2 : Handle for filter 2
  93. * @WLAN_HDL_MAX_FILTER : Max value for filter handle
  94. */
  95. enum wlan_ipa_cce_super_rule_flt_hdl {
  96. WLAN_HDL_FILTER1 = 0xC,
  97. WLAN_HDL_FILTER2 = 0xD,
  98. WLAN_HDL_MAX_FILTER
  99. };
  100. #endif
  101. /**
  102. * struct ipa_uc_offload_control_params - ipa offload control params
  103. * @offload_type: ipa offload type
  104. * @vdev_id: vdev id
  105. * @enable: ipa offload enable/disable
  106. */
  107. struct ipa_uc_offload_control_params {
  108. uint32_t offload_type;
  109. uint32_t vdev_id;
  110. uint32_t enable;
  111. };
  112. /**
  113. * struct ipa_intrabss_control_params - ipa intrabss control params
  114. * @vdev_id: vdev id
  115. * @enable: ipa intrabss enable/disable
  116. */
  117. struct ipa_intrabss_control_params {
  118. uint32_t vdev_id;
  119. uint32_t enable;
  120. };
  121. #endif /* end of _WLAN_IPA_PUBLIC_STRUCT_H_ */