wlan_ipa_public_struct.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /*
  2. * Copyright (c) 2018, 2019 The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for
  5. * any purpose with or without fee is hereby granted, provided that the
  6. * above copyright notice and this permission notice appear in all
  7. * copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  10. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  11. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  12. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  13. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  14. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  15. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  16. * PERFORMANCE OF THIS SOFTWARE.
  17. */
  18. /*
  19. * DOC: contains ipa public structure definitions
  20. */
  21. #ifndef _WLAN_IPA_PUBLIC_STRUCT_H_
  22. #define _WLAN_IPA_PUBLIC_STRUCT_H_
  23. #include <wlan_cmn.h>
  24. #include <qdf_status.h>
  25. #include <wlan_objmgr_psoc_obj.h>
  26. /**
  27. * struct wlan_ipa_config
  28. * @ipa_config: IPA config
  29. * @desc_size: IPA descriptor size
  30. * @txbuf_count: TX buffer count
  31. * @bus_bw_high: Bus bandwidth high threshold
  32. * @bus_bw_medium: Bus bandwidth medium threshold
  33. * @bus_bw_low: Bus bandwidth low threshold
  34. * @ipa_bw_high: IPA bandwidth high threshold
  35. * @ipa_bw_medium: IPA bandwidth medium threshold
  36. * @ipa_bw_low: IPA bandwidth low threshold
  37. * @ipa_force_voting: support force bw voting
  38. */
  39. struct wlan_ipa_config {
  40. uint32_t ipa_config;
  41. uint32_t desc_size;
  42. uint32_t txbuf_count;
  43. uint32_t bus_bw_high;
  44. uint32_t bus_bw_medium;
  45. uint32_t bus_bw_low;
  46. uint32_t ipa_bw_high;
  47. uint32_t ipa_bw_medium;
  48. uint32_t ipa_bw_low;
  49. bool ipa_force_voting;
  50. };
  51. /**
  52. * enum wlan_ipa_wlan_event - WLAN IPA events
  53. * @WLAN_IPA_CLIENT_CONNECT: Client Connects
  54. * @WLAN_IPA_CLIENT_DISCONNECT: Client Disconnects
  55. * @WLAN_IPA_AP_CONNECT: SoftAP is started
  56. * @WLAN_IPA_AP_DISCONNECT: SoftAP is stopped
  57. * @WLAN_IPA_STA_CONNECT: STA associates to AP
  58. * @WLAN_IPA_STA_DISCONNECT: STA dissociates from AP
  59. * @WLAN_IPA_CLIENT_CONNECT_EX: Peer associates/re-associates to softap
  60. * @WLAN_IPA_WLAN_EVENT_MAX: Max value for the enum
  61. */
  62. enum wlan_ipa_wlan_event {
  63. WLAN_IPA_CLIENT_CONNECT,
  64. WLAN_IPA_CLIENT_DISCONNECT,
  65. WLAN_IPA_AP_CONNECT,
  66. WLAN_IPA_AP_DISCONNECT,
  67. WLAN_IPA_STA_CONNECT,
  68. WLAN_IPA_STA_DISCONNECT,
  69. WLAN_IPA_CLIENT_CONNECT_EX,
  70. WLAN_IPA_WLAN_EVENT_MAX
  71. };
  72. /**
  73. * struct ipa_uc_offload_control_params - ipa offload control params
  74. * @offload_type: ipa offload type
  75. * @vdev_id: vdev id
  76. * @enable: ipa offload enable/disable
  77. */
  78. struct ipa_uc_offload_control_params {
  79. uint32_t offload_type;
  80. uint32_t vdev_id;
  81. uint32_t enable;
  82. };
  83. /* fp to send IPA UC offload cmd */
  84. typedef QDF_STATUS (*ipa_uc_offload_control_req)(struct wlan_objmgr_psoc *psoc,
  85. struct ipa_uc_offload_control_params *req);
  86. #endif /* end of _WLAN_IPA_PUBLIC_STRUCT_H_ */