wlan_mlme_ucfg_api.h 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  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. #ifdef CONFIG_VDEV_SM
  63. /**
  64. * ucfg_mlme_pdev_open() - MLME component pdev Open
  65. * @pdev: pointer to pdev object
  66. *
  67. * Open the MLME component and initialize the MLME pdev strucutre
  68. *
  69. * Return: QDF Status
  70. */
  71. QDF_STATUS ucfg_mlme_pdev_open(struct wlan_objmgr_pdev *pdev);
  72. /**
  73. * ucfg_mlme_pdev_close() - MLME component pdev close
  74. * @pdev: pointer to pdev object
  75. *
  76. * close the MLME pdev information
  77. *
  78. * Return: QDF Status
  79. */
  80. QDF_STATUS ucfg_mlme_pdev_close(struct wlan_objmgr_pdev *pdev);
  81. #else
  82. /**
  83. * ucfg_mlme_pdev_open() - MLME component pdev Open
  84. * @pdev: pointer to pdev object
  85. *
  86. * Open the MLME component and initialize the MLME pdev strucutre
  87. *
  88. * Return: QDF Status
  89. */
  90. static inline QDF_STATUS ucfg_mlme_pdev_open(struct wlan_objmgr_pdev *pdev)
  91. {
  92. return QDF_STATUS_SUCCESS;
  93. }
  94. /**
  95. * ucfg_mlme_pdev_close() - MLME component pdev close
  96. * @pdev: pointer to pdev object
  97. *
  98. * close the MLME pdev information
  99. *
  100. * Return: QDF Status
  101. */
  102. static inline QDF_STATUS ucfg_mlme_pdev_close(struct wlan_objmgr_pdev *pdev)
  103. {
  104. return QDF_STATUS_SUCCESS;
  105. }
  106. #endif
  107. /**
  108. * ucfg_mlme_get_ht_cap_info() - Get the HT cap info config
  109. * @psoc: pointer to psoc object
  110. * @value: pointer to the value which will be filled for the caller
  111. *
  112. * Inline UCFG API to be used by HDD/OSIF callers
  113. *
  114. * Return: QDF Status
  115. */
  116. static inline
  117. QDF_STATUS ucfg_mlme_get_ht_cap_info(struct wlan_objmgr_psoc *psoc,
  118. struct mlme_ht_capabilities_info
  119. *ht_cap_info)
  120. {
  121. return wlan_mlme_get_ht_cap_info(psoc, ht_cap_info);
  122. }
  123. /**
  124. * ucfg_mlme_set_ht_cap_info() - Set the HT cap info config
  125. * @psoc: pointer to psoc object
  126. * @value: Value that needs to be set from the caller
  127. *
  128. * Inline UCFG API to be used by HDD/OSIF callers
  129. *
  130. * Return: QDF Status
  131. */
  132. static inline
  133. QDF_STATUS ucfg_mlme_set_ht_cap_info(struct wlan_objmgr_psoc *psoc,
  134. struct mlme_ht_capabilities_info
  135. ht_cap_info)
  136. {
  137. return wlan_mlme_set_ht_cap_info(psoc, ht_cap_info);
  138. }
  139. /**
  140. *
  141. * ucfg_mlme_get_sap_inactivity_override() - Check if sap max inactivity
  142. * override flag is set.
  143. * @psoc: pointer to psoc object
  144. * @sme_config - Sme config struct
  145. *
  146. * Inline UCFG API to be used by HDD/OSIF callers to call
  147. * the mlme function wlan_mlme_get_sap_inactivity_override
  148. *
  149. * Return: QDF Status
  150. */
  151. static inline
  152. void ucfg_mlme_get_sap_inactivity_override(struct wlan_objmgr_psoc *psoc,
  153. bool *value)
  154. {
  155. wlan_mlme_get_sap_inactivity_override(psoc, value);
  156. }
  157. /**
  158. * ucfg_mlme_get_ignore_peer_ht_mode() - Get the ignore peer ht mode flag
  159. *
  160. * @psoc: pointer to psoc object
  161. * @value: Value that needs to be set
  162. *
  163. * Inline UCFG API to be used by HDD/OSIF callers to get the
  164. * ignore_peer_ht_opmode flag value
  165. *
  166. * Return: QDF_STATUS_SUCCESS or QDF_STATUS_FAILURE
  167. */
  168. static inline
  169. QDF_STATUS ucfg_mlme_get_ignore_peer_ht_mode(struct wlan_objmgr_psoc *psoc,
  170. bool *value)
  171. {
  172. return wlan_mlme_get_ignore_peer_ht_mode(psoc, value);
  173. }
  174. /**
  175. * ucfg_mlme_get_tx_chainmask_1ss() - Get the tx_chainmask_1ss value
  176. *
  177. * @psoc: pointer to psoc object
  178. * @value: Value that needs to be set from the caller
  179. *
  180. * Return: QDF_STATUS_FAILURE or QDF_STATUS_SUCCESS
  181. */
  182. static inline
  183. QDF_STATUS ucfg_mlme_get_tx_chainmask_1ss(struct wlan_objmgr_psoc *psoc,
  184. uint8_t *value)
  185. {
  186. return wlan_mlme_get_tx_chainmask_1ss(psoc, value);
  187. }
  188. /**
  189. * ucfg_mlme_get_num_11b_tx_chains() - Get the number of 11b only tx chains
  190. *
  191. * @psoc: pointer to psoc object
  192. * @value: Value that needs to be set from the caller
  193. *
  194. * Return: QDF_STATUS_FAILURE or QDF_STATUS_SUCCESS
  195. */
  196. static inline
  197. QDF_STATUS ucfg_mlme_get_num_11b_tx_chains(struct wlan_objmgr_psoc *psoc,
  198. uint16_t *value)
  199. {
  200. return wlan_mlme_get_num_11b_tx_chains(psoc, value);
  201. }
  202. /**
  203. * ucfg_mlme_get_num_11ag_tx_chains() - get the total number of 11a/g tx chains
  204. *
  205. * @psoc: pointer to psoc object
  206. * @value: Value that needs to be set from the caller
  207. *
  208. * Return: QDF_STATUS_FAILURE or QDF_STATUS_SUCCESS
  209. */
  210. static inline
  211. QDF_STATUS ucfg_mlme_get_num_11ag_tx_chains(struct wlan_objmgr_psoc *psoc,
  212. uint16_t *value)
  213. {
  214. return wlan_mlme_get_num_11ag_tx_chains(psoc, value);
  215. }
  216. /**
  217. * ucfg_mlme_configure_chain_mask() - configure chainmask parameters
  218. *
  219. * @psoc: pointer to psoc object
  220. * @session_id: vdev_id
  221. *
  222. * Return: QDF_STATUS_FAILURE or QDF_STATUS_SUCCESS
  223. */
  224. static inline
  225. QDF_STATUS ucfg_mlme_configure_chain_mask(struct wlan_objmgr_psoc *psoc,
  226. uint8_t session_id)
  227. {
  228. return wlan_mlme_configure_chain_mask(psoc, session_id);
  229. }
  230. #endif /* _WLAN_MLME_UCFG_API_H_ */