wlan_mlme_api.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360
  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 public APIs exposed by the mlme component
  20. */
  21. #ifndef _WLAN_MLME_API_H_
  22. #define _WLAN_MLME_API_H_
  23. #include <wlan_mlme_public_struct.h>
  24. #include <wlan_objmgr_psoc_obj.h>
  25. #include <wlan_cmn.h>
  26. #include "sme_api.h"
  27. /**
  28. * wlan_mlme_get_cfg_str() - Copy the uint8_t array for a particular CFG
  29. * @dst: pointer to the destination buffer.
  30. * @cfg_str: pointer to the cfg string structure
  31. * @len: length to be copied
  32. *
  33. * Return: QDF_STATUS_SUCCESS or QDF_STATUS_E_FAILURE
  34. */
  35. QDF_STATUS wlan_mlme_get_cfg_str(uint8_t *dst, struct mlme_cfg_str *cfg_str,
  36. qdf_size_t *len);
  37. /**
  38. * wlan_mlme_set_cfg_str() - Set values for a particular CFG
  39. * @src: pointer to the source buffer.
  40. * @dst_cfg_str: pointer to the cfg string structure to be modified
  41. * @len: length to be written
  42. *
  43. * Return: QDF_STATUS_SUCCESS or QDF_STATUS_E_FAILURE
  44. */
  45. QDF_STATUS wlan_mlme_set_cfg_str(uint8_t *src, struct mlme_cfg_str *dst_cfg_str,
  46. qdf_size_t len);
  47. /**
  48. * wlan_mlme_get_edca_params() - get the EDCA parameters corresponding to the
  49. * edca profile access category
  50. * @edca_params: pointer to mlme edca parameters structure
  51. * @data: data to which the parameter is to be copied
  52. * @edca_ac: edca ac type enum passed to get the cfg value
  53. *
  54. * Return QDF_STATUS_SUCCESS or QDF_STATUS_E_FAILURE
  55. *
  56. */
  57. QDF_STATUS wlan_mlme_get_edca_params(struct wlan_mlme_edca_params *edca_params,
  58. uint8_t *data, enum e_edca_type edca_ac);
  59. /**
  60. * wlan_mlme_get_ht_cap_info() - Get the HT cap info config
  61. * @psoc: pointer to psoc object
  62. * @value: pointer to the value which will be filled for the caller
  63. *
  64. * Return: QDF Status
  65. */
  66. QDF_STATUS wlan_mlme_get_ht_cap_info(struct wlan_objmgr_psoc *psoc,
  67. struct mlme_ht_capabilities_info
  68. *ht_cap_info);
  69. /**
  70. * wlan_mlme_set_ht_cap_info() - Set the HT cap info config
  71. * @psoc: pointer to psoc object
  72. * @value: Value that needs to be set from the caller
  73. *
  74. * Return: QDF Status
  75. */
  76. QDF_STATUS wlan_mlme_set_ht_cap_info(struct wlan_objmgr_psoc *psoc,
  77. struct mlme_ht_capabilities_info
  78. ht_cap_info);
  79. /**
  80. *
  81. * wlan_mlme_get_sap_inactivity_override() - Check if sap max inactivity
  82. * override flag is set.
  83. * @psoc: pointer to psoc object
  84. * @sme_config - Sme config struct
  85. *
  86. * Return: QDF Status
  87. */
  88. void wlan_mlme_get_sap_inactivity_override(struct wlan_objmgr_psoc *psoc,
  89. bool *value);
  90. /**
  91. * wlan_mlme_get_ignore_peer_ht_mode() - Get the ignore peer ht opmode flag
  92. * @psoc: pointer to psoc object
  93. * @value: Value that needs to be set from the caller
  94. *
  95. * Return: QDF Status
  96. */
  97. QDF_STATUS wlan_mlme_get_ignore_peer_ht_mode(struct wlan_objmgr_psoc *psoc,
  98. bool *value);
  99. /**
  100. * wlan_mlme_get_tx_chainmask_cck() - Get the tx_chainmask_cfg value
  101. *
  102. * @psoc: pointer to psoc object
  103. * @value: Value that needs to be set from the caller
  104. *
  105. * Return: QDF_STATUS_FAILURE or QDF_STATUS_SUCCESS
  106. */
  107. QDF_STATUS wlan_mlme_get_tx_chainmask_cck(struct wlan_objmgr_psoc *psoc,
  108. bool *value);
  109. /**
  110. * wlan_mlme_get_tx_chainmask_1ss() - Get the tx_chainmask_1ss value
  111. *
  112. * @psoc: pointer to psoc object
  113. * @value: Value that needs to be set from the caller
  114. *
  115. * Return: QDF_STATUS_FAILURE or QDF_STATUS_SUCCESS
  116. */
  117. QDF_STATUS wlan_mlme_get_tx_chainmask_1ss(struct wlan_objmgr_psoc *psoc,
  118. uint8_t *value);
  119. /**
  120. * wlan_mlme_get_num_11b_tx_chains() - Get the number of 11b only tx chains
  121. *
  122. * @psoc: pointer to psoc object
  123. * @value: Value that needs to be set from the caller
  124. *
  125. * Return: QDF_STATUS_FAILURE or QDF_STATUS_SUCCESS
  126. */
  127. QDF_STATUS wlan_mlme_get_num_11b_tx_chains(struct wlan_objmgr_psoc *psoc,
  128. uint16_t *value);
  129. /**
  130. * wlan_mlme_get_num_11ag_tx_chains() - get the total number of 11a/g tx chains
  131. *
  132. * @psoc: pointer to psoc object
  133. * @value: Value that needs to be set from the caller
  134. *
  135. * Return: QDF_STATUS_FAILURE or QDF_STATUS_SUCCESS
  136. */
  137. QDF_STATUS wlan_mlme_get_num_11ag_tx_chains(struct wlan_objmgr_psoc *psoc,
  138. uint16_t *value);
  139. /**
  140. * wlan_mlme_configure_chain_mask() - configure chainmask parameters
  141. *
  142. * @psoc: pointer to psoc object
  143. * @session_id: vdev_id
  144. *
  145. * Return: QDF_STATUS_FAILURE or QDF_STATUS_SUCCESS
  146. */
  147. QDF_STATUS wlan_mlme_configure_chain_mask(struct wlan_objmgr_psoc *psoc,
  148. uint8_t session_id);
  149. /**
  150. * wlan_mlme_set_sap_listen_interval() - Set the sap listen interval
  151. * @psoc: pointer to psoc object
  152. * @value: Value that needs to be set from the caller
  153. *
  154. * Return: QDF Status
  155. */
  156. QDF_STATUS wlan_mlme_set_sap_listen_interval(struct wlan_objmgr_psoc *psoc,
  157. int value);
  158. /**
  159. * wlan_mlme_set_assoc_sta_limit() - Set the assoc sta limit
  160. * @psoc: pointer to psoc object
  161. * @value: Value that needs to be set from the caller
  162. *
  163. * Return: QDF Status
  164. */
  165. QDF_STATUS wlan_mlme_set_assoc_sta_limit(struct wlan_objmgr_psoc *psoc,
  166. int value);
  167. /**
  168. * wlan_mlme_set_rmc_action_period_freq() - Set the rmc action period frequency
  169. * @psoc: pointer to psoc object
  170. * @value: Value that needs to be set from the caller
  171. *
  172. * Return: QDF Status
  173. */
  174. QDF_STATUS wlan_mlme_set_rmc_action_period_freq(struct wlan_objmgr_psoc *psoc,
  175. int value);
  176. /**
  177. * wlan_mlme_set_sap_get_peer_info() - get the sap get peer info
  178. * @psoc: pointer to psoc object
  179. * @value: Value that needs to be set from the caller
  180. *
  181. * Return: QDF Status
  182. */
  183. QDF_STATUS wlan_mlme_get_sap_get_peer_info(struct wlan_objmgr_psoc *psoc,
  184. bool *value);
  185. /**
  186. * wlan_mlme_get_sap_allow_all_channels() - get the value of sap allow all
  187. * channels
  188. * @psoc: pointer to psoc object
  189. * @value: Value that needs to be set from the caller
  190. *
  191. * Return: QDF Status
  192. */
  193. QDF_STATUS wlan_mlme_get_sap_allow_all_channels(struct wlan_objmgr_psoc *psoc,
  194. bool *value);
  195. /**
  196. * wlan_mlme_get_sap_allow_all_channels() - get the value sap max peers
  197. * @psoc: pointer to psoc object
  198. * @value: Value that needs to be set from the caller
  199. *
  200. * Return: QDF Status
  201. */
  202. QDF_STATUS wlan_mlme_get_sap_max_peers(struct wlan_objmgr_psoc *psoc,
  203. int *value);
  204. /**
  205. * wlan_mlme_set_sap_max_peers() - set the value sap max peers
  206. * @psoc: pointer to psoc object
  207. * @value: Value that needs to be set from the caller
  208. *
  209. * Return: QDF Status
  210. */
  211. QDF_STATUS wlan_mlme_set_sap_max_peers(struct wlan_objmgr_psoc *psoc,
  212. int value);
  213. /**
  214. * wlan_mlme_get_sap_max_offload_peers() - get the value sap max offload peers
  215. * @psoc: pointer to psoc object
  216. * @value: Value that needs to be set from the caller
  217. *
  218. * Return: QDF Status
  219. */
  220. QDF_STATUS wlan_mlme_get_sap_max_offload_peers(struct wlan_objmgr_psoc *psoc,
  221. int *value);
  222. /**
  223. * wlan_mlme_get_sap_max_offload_reorder_buffs() - get the value sap max offload
  224. * reorder buffs.
  225. * @psoc: pointer to psoc object
  226. * @value: Value that needs to be set from the caller
  227. *
  228. * Return: QDF Status
  229. */
  230. QDF_STATUS wlan_mlme_get_sap_max_offload_reorder_buffs(struct wlan_objmgr_psoc
  231. *psoc, int *value);
  232. /**
  233. * wlan_mlme_get_sap_chn_switch_bcn_count() - get the value sap max channel
  234. * switch beacon count
  235. * @psoc: pointer to psoc object
  236. * @value: Value that needs to be set from the caller
  237. *
  238. * Return: QDF Status
  239. */
  240. QDF_STATUS wlan_mlme_get_sap_chn_switch_bcn_count(struct wlan_objmgr_psoc *psoc,
  241. int *value);
  242. /**
  243. * wlan_mlme_get_sap_chn_switch_mode() - get the sap channel
  244. * switch mode
  245. * @psoc: pointer to psoc object
  246. * @value: Value that needs to be set from the caller
  247. *
  248. * Return: QDF Status
  249. */
  250. QDF_STATUS wlan_mlme_get_sap_chn_switch_mode(struct wlan_objmgr_psoc *psoc,
  251. bool *value);
  252. /**
  253. * wlan_mlme_get_sap_internal_restart() - get the sap internal
  254. * restart
  255. * @psoc: pointer to psoc object
  256. * @value: Value that needs to be set from the caller
  257. *
  258. * Return: QDF Status
  259. */
  260. QDF_STATUS wlan_mlme_get_sap_internal_restart(struct wlan_objmgr_psoc *psoc,
  261. bool *value);
  262. /**
  263. * wlan_mlme_get_sap_reduced_beacon_interval() - get the sap reduced
  264. * beacon interval
  265. * @psoc: pointer to psoc object
  266. * @value: Value that needs to be set from the caller
  267. *
  268. * Return: QDF Status
  269. */
  270. QDF_STATUS wlan_mlme_get_sap_reduced_beacon_interval(struct wlan_objmgr_psoc
  271. *psoc, int *value);
  272. /**
  273. * wlan_mlme_get_sap_chan_switch_rate_enabled() - get the sap rate hostapd
  274. * enabled beacon interval
  275. * @psoc: pointer to psoc object
  276. * @value: Value that needs to be set from the caller
  277. *
  278. * Return: QDF Status
  279. */
  280. QDF_STATUS wlan_mlme_get_sap_chan_switch_rate_enabled(struct wlan_objmgr_psoc
  281. *psoc, bool *value);
  282. /**
  283. * wlan_mlme_get_oce_sta_enabled_info() - Get the OCE feature enable
  284. * info for STA
  285. * @psoc: pointer to psoc object
  286. * @value: pointer to the value which will be filled for the caller
  287. *
  288. * Return: QDF Status
  289. */
  290. QDF_STATUS wlan_mlme_get_oce_sta_enabled_info(struct wlan_objmgr_psoc *psoc,
  291. bool *value);
  292. /**
  293. * wlan_mlme_get_oce_sap_enabled_info() - Get the OCE feature enable
  294. * info for SAP
  295. * @psoc: pointer to psoc object
  296. * @value: pointer to the value which will be filled for the caller
  297. *
  298. * Return: QDF Status
  299. */
  300. QDF_STATUS wlan_mlme_get_oce_sap_enabled_info(struct wlan_objmgr_psoc *psoc,
  301. bool *value);
  302. /**
  303. * wlan_mlme_get_fils_enabled_info() - Get the fils enable info for driver
  304. * @psoc: pointer to psoc object
  305. * @value: pointer to the value which will be filled for the caller
  306. *
  307. * Return: QDF Status
  308. */
  309. QDF_STATUS wlan_mlme_get_fils_enabled_info(struct wlan_objmgr_psoc *psoc,
  310. bool *value);
  311. /**
  312. * wlan_mlme_set_fils_enabled_info() - Set the fils enable info for driver
  313. * @psoc: pointer to psoc object
  314. * @value: value that needs to be set from the caller
  315. *
  316. * Return: QDF Status
  317. */
  318. QDF_STATUS wlan_mlme_set_fils_enabled_info(struct wlan_objmgr_psoc *psoc,
  319. bool value);
  320. /**
  321. * wlan_mlme_set_enable_bcast_probe_rsp() - Set enable bcast probe resp info
  322. * @psoc: pointer to psoc object
  323. * @value: value that needs to be set from the caller
  324. *
  325. * Return: QDF Status
  326. */
  327. QDF_STATUS wlan_mlme_set_enable_bcast_probe_rsp(struct wlan_objmgr_psoc *psoc,
  328. bool value);
  329. #endif /* _WLAN_MLME_API_H_ */