dfs_postnol_ucfg.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. /*
  2. * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved.
  3. *
  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: This file has the DFS dispatcher API which is exposed to outside of DFS
  21. * component.
  22. */
  23. #ifdef QCA_SUPPORT_DFS_CHAN_POSTNOL
  24. /**
  25. * ucfg_dfs_set_postnol_freq() - Set PostNOL freq.
  26. * @pdev: Pointer to DFS pdev object.
  27. * @postnol_freq: User configured freq to switch to, post NOL, in MHZ.
  28. *
  29. */
  30. QDF_STATUS ucfg_dfs_set_postnol_freq(struct wlan_objmgr_pdev *pdev,
  31. qdf_freq_t postnol_freq);
  32. /**
  33. * ucfg_dfs_set_postnol_mode() - Set PostNOL mode.
  34. * @pdev: Pointer to DFS pdev object.
  35. * @postnol_mode: User configured mode to switch to, post NOL, in MHZ.
  36. *
  37. */
  38. QDF_STATUS ucfg_dfs_set_postnol_mode(struct wlan_objmgr_pdev *pdev,
  39. uint8_t postnol_mode);
  40. /**
  41. * ucfg_dfs_set_postnol_cfreq2() - Set PostNOL secondary center frequency.
  42. * @pdev: Pointer to DFS pdev object.
  43. * @postnol_freq: User configured secondary center frequency to switch to,
  44. * post NOL, in MHZ.
  45. *
  46. */
  47. QDF_STATUS ucfg_dfs_set_postnol_cfreq2(struct wlan_objmgr_pdev *pdev,
  48. qdf_freq_t postnol_cfreq2);
  49. /**
  50. * ucfg_dfs_get_postnol_freq() - Get PostNOL freq.
  51. * @pdev: Pointer to DFS pdev object.
  52. * @postnol_freq: Pointer to user configured freq to switch to, post NOL.
  53. *
  54. */
  55. QDF_STATUS ucfg_dfs_get_postnol_freq(struct wlan_objmgr_pdev *pdev,
  56. qdf_freq_t *postnol_freq);
  57. /**
  58. * ucfg_dfs_get_postnol_mode() - Set PostNOL mode.
  59. * @pdev: Pointer to DFS pdev object.
  60. * @postnol_mode: Pointer to user configured mode to switch to, post NOL.
  61. *
  62. */
  63. QDF_STATUS ucfg_dfs_get_postnol_mode(struct wlan_objmgr_pdev *pdev,
  64. uint8_t *postnol_mode);
  65. /**
  66. * ucfg_dfs_get_postnol_cfreq2() - Set PostNOL secondary center frequency.
  67. * @pdev: Pointer to DFS pdev object.
  68. * @postnol_freq: Pointer to user configured secondary center frequency to
  69. * switch to post NOL.
  70. *
  71. */
  72. QDF_STATUS ucfg_dfs_get_postnol_cfreq2(struct wlan_objmgr_pdev *pdev,
  73. qdf_freq_t *postnol_cfreq2);
  74. #else
  75. static inline QDF_STATUS
  76. ucfg_dfs_set_postnol_freq(struct wlan_objmgr_pdev *pdev,
  77. qdf_freq_t postnol_freq)
  78. {
  79. return QDF_STATUS_SUCCESS;
  80. }
  81. static inline QDF_STATUS
  82. ucfg_dfs_set_postnol_mode(struct wlan_objmgr_pdev *pdev,
  83. uint8_t postnol_mode)
  84. {
  85. return QDF_STATUS_SUCCESS;
  86. }
  87. static inline QDF_STATUS
  88. ucfg_dfs_set_postnol_cfreq2(struct wlan_objmgr_pdev *pdev,
  89. qdf_freq_t postnol_cfreq2)
  90. {
  91. return QDF_STATUS_SUCCESS;
  92. }
  93. static inline QDF_STATUS
  94. ucfg_dfs_get_postnol_freq(struct wlan_objmgr_pdev *pdev,
  95. qdf_freq_t *postnol_freq)
  96. {
  97. *postnol_freq = 0;
  98. return QDF_STATUS_SUCCESS;
  99. }
  100. static inline QDF_STATUS
  101. ucfg_dfs_get_postnol_mode(struct wlan_objmgr_pdev *pdev,
  102. uint8_t *postnol_mode)
  103. {
  104. *postnol_mode = CH_WIDTH_INVALID;
  105. return QDF_STATUS_SUCCESS;
  106. }
  107. static inline QDF_STATUS
  108. ucfg_dfs_get_postnol_cfreq2(struct wlan_objmgr_pdev *pdev,
  109. qdf_freq_t *postnol_cfreq2)
  110. {
  111. *postnol_cfreq2 = 0;
  112. return QDF_STATUS_SUCCESS;
  113. }
  114. #endif