son_ucfg_api.h 3.1 KB

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