wlan_mlme_ucfg_api.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. /*
  2. * Copyright (c) 2018 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. /**
  19. * DOC: declare UCFG APIs exposed by the mlme component
  20. */
  21. #ifndef _WLAN_MLME_UCFG_API_H_
  22. #define _WLAN_MLME_UCFG_API_H_
  23. #include <wlan_mlme_public_struct.h>
  24. #include <wlan_objmgr_psoc_obj.h>
  25. #include <wlan_objmgr_global_obj.h>
  26. #include <wlan_cmn.h>
  27. #include <wlan_mlme_api.h>
  28. /**
  29. * ucfg_mlme_init() - initialize mlme_ctx context.
  30. *
  31. * This function initializes the mlme context.
  32. *
  33. * Return: QDF_STATUS_SUCCESS - in case of success else return error
  34. */
  35. QDF_STATUS ucfg_mlme_init(void);
  36. /**
  37. * ucfg_mlme_deinit() - De initialize mlme_ctx context.
  38. *
  39. * This function De initializes mlme contex.
  40. *
  41. * Return: QDF_STATUS_SUCCESS - in case of success else return error
  42. */
  43. QDF_STATUS ucfg_mlme_deinit(void);
  44. /**
  45. * ucfg_mlme_psoc_open() - MLME component Open
  46. * @psoc: pointer to psoc object
  47. *
  48. * Open the MLME component and initialize the MLME strucutre
  49. *
  50. * Return: QDF Status
  51. */
  52. QDF_STATUS ucfg_mlme_psoc_open(struct wlan_objmgr_psoc *psoc);
  53. /**
  54. * ucfg_mlme_psoc_close() - MLME component close
  55. * @psoc: pointer to psoc object
  56. *
  57. * Close the MLME component and clear the MLME structures
  58. *
  59. * Return: None
  60. */
  61. void ucfg_mlme_psoc_close(struct wlan_objmgr_psoc *psoc);
  62. /**
  63. * ucfg_mlme_get_ht_cap_info() - Get the HT cap info config
  64. * @psoc: pointer to psoc object
  65. * @value: pointer to the value which will be filled for the caller
  66. *
  67. * Inline UCFG API to be used by HDD/OSIF callers
  68. *
  69. * Return: QDF Status
  70. */
  71. static inline
  72. QDF_STATUS ucfg_mlme_get_ht_cap_info(struct wlan_objmgr_psoc *psoc,
  73. struct mlme_ht_capabilities_info
  74. *ht_cap_info)
  75. {
  76. return wlan_mlme_get_ht_cap_info(psoc, ht_cap_info);
  77. }
  78. /**
  79. * ucfg_mlme_set_ht_cap_info() - Set the HT cap info config
  80. * @psoc: pointer to psoc object
  81. * @value: Value that needs to be set from the caller
  82. *
  83. * Inline UCFG API to be used by HDD/OSIF callers
  84. *
  85. * Return: QDF Status
  86. */
  87. static inline
  88. QDF_STATUS ucfg_mlme_set_ht_cap_info(struct wlan_objmgr_psoc *psoc,
  89. struct mlme_ht_capabilities_info
  90. ht_cap_info)
  91. {
  92. return wlan_mlme_set_ht_cap_info(psoc, ht_cap_info);
  93. }
  94. /**
  95. * ucfg_mlme_get_ignore_peer_ht_mode() - Get the ignore peer ht mode flag
  96. *
  97. * @psoc: pointer to psoc object
  98. * @value: Value that needs to be set
  99. *
  100. * Inline UCFG API to be used by HDD/OSIF callers to get the
  101. * ignore_peer_ht_opmode flag value
  102. *
  103. * Return: QDF_STATUS_SUCCESS or QDF_STATUS_FAILURE
  104. */
  105. static inline
  106. QDF_STATUS ucfg_mlme_get_ignore_peer_ht_mode(struct wlan_objmgr_psoc *psoc,
  107. bool *value)
  108. {
  109. return wlan_mlme_get_ignore_peer_ht_mode(psoc, value);
  110. }
  111. /**
  112. * ucfg_mlme_get_tx_chainmask_1ss() - Get the tx_chainmask_1ss value
  113. *
  114. * @psoc: pointer to psoc object
  115. * @value: Value that needs to be set from the caller
  116. *
  117. * Return: QDF_STATUS_FAILURE or QDF_STATUS_SUCCESS
  118. */
  119. static inline
  120. QDF_STATUS ucfg_mlme_get_tx_chainmask_1ss(struct wlan_objmgr_psoc *psoc,
  121. uint8_t *value)
  122. {
  123. return wlan_mlme_get_tx_chainmask_1ss(psoc, value);
  124. }
  125. /**
  126. * ucfg_mlme_get_num_11b_tx_chains() - Get the number of 11b only tx chains
  127. *
  128. * @psoc: pointer to psoc object
  129. * @value: Value that needs to be set from the caller
  130. *
  131. * Return: QDF_STATUS_FAILURE or QDF_STATUS_SUCCESS
  132. */
  133. static inline
  134. QDF_STATUS ucfg_mlme_get_num_11b_tx_chains(struct wlan_objmgr_psoc *psoc,
  135. uint16_t *value)
  136. {
  137. return wlan_mlme_get_num_11b_tx_chains(psoc, value);
  138. }
  139. /**
  140. * ucfg_mlme_get_num_11ag_tx_chains() - get the total number of 11a/g tx chains
  141. *
  142. * @psoc: pointer to psoc object
  143. * @value: Value that needs to be set from the caller
  144. *
  145. * Return: QDF_STATUS_FAILURE or QDF_STATUS_SUCCESS
  146. */
  147. static inline
  148. QDF_STATUS ucfg_mlme_get_num_11ag_tx_chains(struct wlan_objmgr_psoc *psoc,
  149. uint16_t *value)
  150. {
  151. return wlan_mlme_get_num_11ag_tx_chains(psoc, value);
  152. }
  153. /**
  154. * ucfg_mlme_configure_chain_mask() - configure chainmask parameters
  155. *
  156. * @psoc: pointer to psoc object
  157. * @session_id: vdev_id
  158. *
  159. * Return: QDF_STATUS_FAILURE or QDF_STATUS_SUCCESS
  160. */
  161. static inline
  162. QDF_STATUS ucfg_mlme_configure_chain_mask(struct wlan_objmgr_psoc *psoc,
  163. uint8_t session_id)
  164. {
  165. return wlan_mlme_configure_chain_mask(psoc, session_id);
  166. }
  167. #endif /* _WLAN_MLME_UCFG_API_H_ */