son_ucfg_api.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. /*
  2. * Copyright (c) 2021, 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 any
  6. * purpose with or without fee is hereby granted, provided that the above
  7. * copyright notice and this permission notice appear in all copies.
  8. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  9. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  10. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  11. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  12. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  13. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  14. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  15. */
  16. /**
  17. * DOC : contains interface prototypes for OS_IF layer
  18. */
  19. #ifndef _SON_UCFG_API_H_
  20. #define _SON_UCFG_API_H_
  21. #include <qdf_trace.h>
  22. #include <wlan_objmgr_pdev_obj.h>
  23. #include <wlan_mlme_ucfg_api.h>
  24. #include <son_api.h>
  25. /**
  26. * ucfg_son_get_operation_chan_freq_vdev_id() - get operating chan freq of
  27. * given vdev id
  28. * @pdev: Pointer to pdev
  29. * @vdev_id: vdev id
  30. *
  31. * Return: chan freq of given vdev id
  32. */
  33. qdf_freq_t
  34. ucfg_son_get_operation_chan_freq_vdev_id(struct wlan_objmgr_pdev *pdev,
  35. uint8_t vdev_id);
  36. /**
  37. * ucfg_son_get_min_and_max_power() - get min and max power
  38. * @psoc: pointer to psoc
  39. * @max_tx_power: max tx power(dBm units) to get.
  40. * @min_tx_power: min tx power(dBm units) to get.
  41. *
  42. * Return: Void
  43. */
  44. void ucfg_son_get_min_and_max_power(struct wlan_objmgr_psoc *psoc,
  45. int8_t *max_tx_power,
  46. int8_t *min_tx_power);
  47. /**
  48. * ucfg_son_is_cac_in_progress() - whether cac in progress or not
  49. * @vdev: Pointer to vdev
  50. *
  51. * Return: whether vdev in cac or not
  52. */
  53. bool ucfg_son_is_cac_in_progress(struct wlan_objmgr_vdev *vdev);
  54. /**
  55. * ucfg_son_get_sta_count() - get sta count
  56. * @vdev: Pointer to vdev
  57. *
  58. * Return: sta count
  59. */
  60. uint32_t ucfg_son_get_sta_count(struct wlan_objmgr_vdev *vdev);
  61. /**
  62. * ucfg_son_get_chan_flag() - get chan flag
  63. * @pdev: pointer to pdev
  64. * @freq: qdf_freq_t
  65. * @flag_160: whether 160 band width is enabled or not
  66. * @chan_params: chan parameters
  67. *
  68. * Return: chan flag
  69. */
  70. uint32_t ucfg_son_get_chan_flag(struct wlan_objmgr_pdev *pdev,
  71. qdf_freq_t freq, bool flag_160,
  72. struct ch_params *chan_params);
  73. /**
  74. * ucfg_son_get_he_supported() - get he supported
  75. * @psoc: pointer to psoc
  76. * @he_supported: he supported or not
  77. *
  78. * Return: void
  79. */
  80. #ifdef WLAN_FEATURE_11AX
  81. void ucfg_son_get_he_supported(struct wlan_objmgr_psoc *psoc,
  82. bool *he_supported);
  83. #else
  84. static inline void ucfg_son_get_he_supported(struct wlan_objmgr_psoc *psoc,
  85. bool *he_supported)
  86. {
  87. *he_supported = false;
  88. }
  89. #endif /*WLAN_FEATURE_11AX*/
  90. /**
  91. * ucfg_son_set_peer_kickout_allow() - set the peer is allowed to kickout
  92. * @vdev: pointer to vdev
  93. * @peer: pointer to peer
  94. * @kickout_allow: kickout_allow to set
  95. *
  96. * Return: QDF_STATUS_SUCCESS on Success else failure.
  97. */
  98. QDF_STATUS ucfg_son_set_peer_kickout_allow(struct wlan_objmgr_vdev *vdev,
  99. struct wlan_objmgr_peer *peer,
  100. bool kickout_allow);
  101. /**
  102. * ucfg_son_register_deliver_opmode_cb() - register deliver opmode cb
  103. * psoc: pointer to psoc
  104. * cb: deliver opmode callback
  105. *
  106. * Return: QDF_STATUS_SUCCESS on Success else failure.
  107. */
  108. QDF_STATUS ucfg_son_register_deliver_opmode_cb(struct wlan_objmgr_psoc *psoc,
  109. mlme_deliver_cb cb);
  110. /**
  111. * ucfg_son_register_deliver_smps_cb() - register deliver smps cb
  112. * psoc: pointer to psoc
  113. * cb: deliver smps callback
  114. *
  115. * Return: QDF_STATUS_SUCCESS on Success else failure.
  116. */
  117. QDF_STATUS ucfg_son_register_deliver_smps_cb(struct wlan_objmgr_psoc *psoc,
  118. mlme_deliver_cb cb);
  119. #endif