cfg_hif.h 2.9 KB

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