cfg_hif.h 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /**
  2. * Copyright (c) 2020 The Linux Foundation. All rights reserved.
  3. * Copyright (c) 2021 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. #ifndef _CFG_HIF_H_
  20. #define _CFG_HIF_H_
  21. /* Min/Max/default CE status srng timer threshold */
  22. #define WLAN_CFG_CE_STATUS_RING_TIMER_THRESH_MIN 0
  23. #define WLAN_CFG_CE_STATUS_RING_TIMER_THRESH_MAX 4096
  24. #ifdef WLAN_WAR_CE_DISABLE_SRNG_TIMER_IRQ
  25. #define WLAN_CFG_CE_STATUS_RING_TIMER_THRESH_DEFAULT 0
  26. #else
  27. #define WLAN_CFG_CE_STATUS_RING_TIMER_THRESH_DEFAULT 4096
  28. #endif
  29. /* Min/Max/default CE status srng batch count threshold */
  30. #define WLAN_CFG_CE_STATUS_RING_BATCH_COUNT_THRESH_MIN 0
  31. #define WLAN_CFG_CE_STATUS_RING_BATCH_COUNT_THRESH_MAX 512
  32. #define WLAN_CFG_CE_STATUS_RING_BATCH_COUNT_THRESH_DEFAULT 1
  33. #ifdef WLAN_CE_INTERRUPT_THRESHOLD_CONFIG
  34. /**
  35. * <ini>
  36. * ce_status_ring_timer_thresh - ce status srng timer threshold
  37. * @Min: 0
  38. * @Max: 4096
  39. * @Default: 0
  40. *
  41. * This ini specifies the timer threshold for CE status srng to
  42. * indicate the interrupt to be fired whenever the timer threshold
  43. * runs out.
  44. *
  45. * Supported Feature: interrupt threshold for CE status srng
  46. *
  47. * Usage: Internal
  48. *
  49. * </ini>
  50. */
  51. #define CFG_CE_STATUS_RING_TIMER_THRESHOLD \
  52. CFG_INI_UINT("ce_status_ring_timer_threshold", \
  53. WLAN_CFG_CE_STATUS_RING_TIMER_THRESH_MIN, \
  54. WLAN_CFG_CE_STATUS_RING_TIMER_THRESH_MAX, \
  55. WLAN_CFG_CE_STATUS_RING_TIMER_THRESH_DEFAULT, \
  56. CFG_VALUE_OR_DEFAULT, \
  57. "CE Status ring timer threshold")
  58. /**
  59. * <ini>
  60. * ce_status_ring_batch_count_thresh - ce status srng batch count threshold
  61. * @Min: 0
  62. * @Max: 512
  63. * @Default: 1
  64. *
  65. * This ini specifies the batch count threshold for CE status srng to
  66. * indicate the interrupt to be fired for a given number of packets in
  67. * the ring.
  68. *
  69. * Supported Feature: interrupt threshold for CE status srng
  70. *
  71. * Usage: Internal
  72. *
  73. * </ini>
  74. */
  75. #define CFG_CE_STATUS_RING_BATCH_COUNT_THRESHOLD \
  76. CFG_INI_UINT("ce_status_ring_batch_count_threshold", \
  77. WLAN_CFG_CE_STATUS_RING_BATCH_COUNT_THRESH_MIN, \
  78. WLAN_CFG_CE_STATUS_RING_BATCH_COUNT_THRESH_MAX, \
  79. WLAN_CFG_CE_STATUS_RING_BATCH_COUNT_THRESH_DEFAULT, \
  80. CFG_VALUE_OR_DEFAULT, \
  81. "CE Status ring batch count threshold")
  82. #define CFG_HIF \
  83. CFG(CFG_CE_STATUS_RING_TIMER_THRESHOLD) \
  84. CFG(CFG_CE_STATUS_RING_BATCH_COUNT_THRESHOLD)
  85. #else
  86. #define CFG_HIF
  87. #endif /* WLAN_CE_INTERRUPT_THRESHOLD_CONFIG */
  88. #endif /* _CFG_HIF_H_ */