wlan_mlme_api.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472
  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_get_manufacturer_name() - get manufacturer name
  71. * @psoc: pointer to psoc object
  72. * @pbuf: pointer of the buff which will be filled for the caller
  73. * @plen: pointer of max buffer length
  74. * actual length will be returned at this address
  75. * This function gets manufacturer name
  76. *
  77. * Return: QDF_STATUS_SUCCESS - in case of success
  78. */
  79. QDF_STATUS
  80. wlan_mlme_get_manufacturer_name(struct wlan_objmgr_psoc *psoc,
  81. uint8_t *pbuf, uint32_t *plen);
  82. /**
  83. * wlan_mlme_get_model_number() - get model number
  84. * @psoc: pointer to psoc object
  85. * @pbuf: pointer of the buff which will be filled for the caller
  86. * @plen: pointer of max buffer length
  87. * actual length will be returned at this address
  88. * This function gets model number
  89. *
  90. * Return: QDF_STATUS_SUCCESS - in case of success
  91. */
  92. QDF_STATUS
  93. wlan_mlme_get_model_number(struct wlan_objmgr_psoc *psoc,
  94. uint8_t *pbuf, uint32_t *plen);
  95. /**
  96. * wlan_mlme_get_model_name() - get model name
  97. * @psoc: pointer to psoc object
  98. * @pbuf: pointer of the buff which will be filled for the caller
  99. * @plen: pointer of max buffer length
  100. * actual length will be returned at this address
  101. * This function gets model name
  102. *
  103. * Return: QDF_STATUS_SUCCESS - in case of success
  104. */
  105. QDF_STATUS
  106. wlan_mlme_get_model_name(struct wlan_objmgr_psoc *psoc,
  107. uint8_t *pbuf, uint32_t *plen);
  108. /**
  109. * wlan_mlme_get_manufacture_product_name() - get manufacture product name
  110. * @psoc: pointer to psoc object
  111. * @pbuf: pointer of the buff which will be filled for the caller
  112. * @plen: pointer of max buffer length
  113. * actual length will be returned at this address
  114. * This function gets manufacture product name
  115. *
  116. * Return: QDF_STATUS_SUCCESS - in case of success
  117. */
  118. QDF_STATUS
  119. wlan_mlme_get_manufacture_product_name(struct wlan_objmgr_psoc *psoc,
  120. uint8_t *pbuf, uint32_t *plen);
  121. /**
  122. * wlan_mlme_get_manufacture_product_version() - get manufacture product version
  123. * @psoc: pointer to psoc object
  124. * @pbuf: pointer of the buff which will be filled for the caller
  125. * @plen: pointer of max buffer length
  126. * actual length will be returned at this address
  127. * This function gets manufacture product version
  128. *
  129. * Return: QDF_STATUS_SUCCESS - in case of success
  130. */
  131. QDF_STATUS
  132. wlan_mlme_get_manufacture_product_version(struct wlan_objmgr_psoc *psoc,
  133. uint8_t *pbuf, uint32_t *plen);
  134. /**
  135. * wlan_mlme_set_ht_cap_info() - Set the HT cap info config
  136. * @psoc: pointer to psoc object
  137. * @value: Value that needs to be set from the caller
  138. *
  139. * Return: QDF Status
  140. */
  141. QDF_STATUS wlan_mlme_set_ht_cap_info(struct wlan_objmgr_psoc *psoc,
  142. struct mlme_ht_capabilities_info
  143. ht_cap_info);
  144. /**
  145. *
  146. * wlan_mlme_get_sap_inactivity_override() - Check if sap max inactivity
  147. * override flag is set.
  148. * @psoc: pointer to psoc object
  149. * @sme_config - Sme config struct
  150. *
  151. * Return: QDF Status
  152. */
  153. void wlan_mlme_get_sap_inactivity_override(struct wlan_objmgr_psoc *psoc,
  154. bool *value);
  155. /**
  156. * wlan_mlme_get_ignore_peer_ht_mode() - Get the ignore peer ht opmode flag
  157. * @psoc: pointer to psoc object
  158. * @value: Value that needs to be set from the caller
  159. *
  160. * Return: QDF Status
  161. */
  162. QDF_STATUS wlan_mlme_get_ignore_peer_ht_mode(struct wlan_objmgr_psoc *psoc,
  163. bool *value);
  164. /**
  165. * wlan_mlme_get_tx_chainmask_cck() - Get the tx_chainmask_cfg value
  166. *
  167. * @psoc: pointer to psoc object
  168. * @value: Value that needs to be set from the caller
  169. *
  170. * Return: QDF_STATUS_FAILURE or QDF_STATUS_SUCCESS
  171. */
  172. QDF_STATUS wlan_mlme_get_tx_chainmask_cck(struct wlan_objmgr_psoc *psoc,
  173. bool *value);
  174. /**
  175. * wlan_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. QDF_STATUS wlan_mlme_get_tx_chainmask_1ss(struct wlan_objmgr_psoc *psoc,
  183. uint8_t *value);
  184. /**
  185. * wlan_mlme_get_num_11b_tx_chains() - Get the number of 11b only tx chains
  186. *
  187. * @psoc: pointer to psoc object
  188. * @value: Value that needs to be set from the caller
  189. *
  190. * Return: QDF_STATUS_FAILURE or QDF_STATUS_SUCCESS
  191. */
  192. QDF_STATUS wlan_mlme_get_num_11b_tx_chains(struct wlan_objmgr_psoc *psoc,
  193. uint16_t *value);
  194. /**
  195. * wlan_mlme_get_num_11ag_tx_chains() - get the total number of 11a/g tx chains
  196. *
  197. * @psoc: pointer to psoc object
  198. * @value: Value that needs to be set from the caller
  199. *
  200. * Return: QDF_STATUS_FAILURE or QDF_STATUS_SUCCESS
  201. */
  202. QDF_STATUS wlan_mlme_get_num_11ag_tx_chains(struct wlan_objmgr_psoc *psoc,
  203. uint16_t *value);
  204. /**
  205. * wlan_mlme_configure_chain_mask() - configure chainmask parameters
  206. *
  207. * @psoc: pointer to psoc object
  208. * @session_id: vdev_id
  209. *
  210. * Return: QDF_STATUS_FAILURE or QDF_STATUS_SUCCESS
  211. */
  212. QDF_STATUS wlan_mlme_configure_chain_mask(struct wlan_objmgr_psoc *psoc,
  213. uint8_t session_id);
  214. /**
  215. * wlan_mlme_set_sap_listen_interval() - Set the sap listen interval
  216. * @psoc: pointer to psoc object
  217. * @value: Value that needs to be set from the caller
  218. *
  219. * Return: QDF Status
  220. */
  221. QDF_STATUS wlan_mlme_set_sap_listen_interval(struct wlan_objmgr_psoc *psoc,
  222. int value);
  223. /**
  224. * wlan_mlme_set_assoc_sta_limit() - Set the assoc sta limit
  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_set_assoc_sta_limit(struct wlan_objmgr_psoc *psoc,
  231. int value);
  232. /**
  233. * wlan_mlme_set_rmc_action_period_freq() - Set the rmc action period frequency
  234. * @psoc: pointer to psoc object
  235. * @value: Value that needs to be set from the caller
  236. *
  237. * Return: QDF Status
  238. */
  239. QDF_STATUS wlan_mlme_set_rmc_action_period_freq(struct wlan_objmgr_psoc *psoc,
  240. int value);
  241. /**
  242. * wlan_mlme_set_sap_get_peer_info() - get the sap get peer info
  243. * @psoc: pointer to psoc object
  244. * @value: Value that needs to be set from the caller
  245. *
  246. * Return: QDF Status
  247. */
  248. QDF_STATUS wlan_mlme_get_sap_get_peer_info(struct wlan_objmgr_psoc *psoc,
  249. bool *value);
  250. /**
  251. * wlan_mlme_get_sap_allow_all_channels() - get the value of sap allow all
  252. * channels
  253. * @psoc: pointer to psoc object
  254. * @value: Value that needs to be set from the caller
  255. *
  256. * Return: QDF Status
  257. */
  258. QDF_STATUS wlan_mlme_get_sap_allow_all_channels(struct wlan_objmgr_psoc *psoc,
  259. bool *value);
  260. /**
  261. * wlan_mlme_get_sap_allow_all_channels() - get the value sap max peers
  262. * @psoc: pointer to psoc object
  263. * @value: Value that needs to be set from the caller
  264. *
  265. * Return: QDF Status
  266. */
  267. QDF_STATUS wlan_mlme_get_sap_max_peers(struct wlan_objmgr_psoc *psoc,
  268. int *value);
  269. /**
  270. * wlan_mlme_set_sap_max_peers() - set the value sap max peers
  271. * @psoc: pointer to psoc object
  272. * @value: Value that needs to be set from the caller
  273. *
  274. * Return: QDF Status
  275. */
  276. QDF_STATUS wlan_mlme_set_sap_max_peers(struct wlan_objmgr_psoc *psoc,
  277. int value);
  278. /**
  279. * wlan_mlme_get_sap_max_offload_peers() - get the value sap max offload peers
  280. * @psoc: pointer to psoc object
  281. * @value: Value that needs to be set from the caller
  282. *
  283. * Return: QDF Status
  284. */
  285. QDF_STATUS wlan_mlme_get_sap_max_offload_peers(struct wlan_objmgr_psoc *psoc,
  286. int *value);
  287. /**
  288. * wlan_mlme_get_sap_max_offload_reorder_buffs() - get the value sap max offload
  289. * reorder buffs.
  290. * @psoc: pointer to psoc object
  291. * @value: Value that needs to be set from the caller
  292. *
  293. * Return: QDF Status
  294. */
  295. QDF_STATUS wlan_mlme_get_sap_max_offload_reorder_buffs(struct wlan_objmgr_psoc
  296. *psoc, int *value);
  297. /**
  298. * wlan_mlme_get_sap_chn_switch_bcn_count() - get the value sap max channel
  299. * switch beacon count
  300. * @psoc: pointer to psoc object
  301. * @value: Value that needs to be set from the caller
  302. *
  303. * Return: QDF Status
  304. */
  305. QDF_STATUS wlan_mlme_get_sap_chn_switch_bcn_count(struct wlan_objmgr_psoc *psoc,
  306. int *value);
  307. /**
  308. * wlan_mlme_get_sap_chn_switch_mode() - get the sap channel
  309. * switch mode
  310. * @psoc: pointer to psoc object
  311. * @value: Value that needs to be set from the caller
  312. *
  313. * Return: QDF Status
  314. */
  315. QDF_STATUS wlan_mlme_get_sap_chn_switch_mode(struct wlan_objmgr_psoc *psoc,
  316. bool *value);
  317. /**
  318. * wlan_mlme_get_sap_internal_restart() - get the sap internal
  319. * restart
  320. * @psoc: pointer to psoc object
  321. * @value: Value that needs to be set from the caller
  322. *
  323. * Return: QDF Status
  324. */
  325. QDF_STATUS wlan_mlme_get_sap_internal_restart(struct wlan_objmgr_psoc *psoc,
  326. bool *value);
  327. /**
  328. * wlan_mlme_get_sap_reduced_beacon_interval() - get the sap reduced
  329. * beacon interval
  330. * @psoc: pointer to psoc object
  331. * @value: Value that needs to be set from the caller
  332. *
  333. * Return: QDF Status
  334. */
  335. QDF_STATUS wlan_mlme_get_sap_reduced_beacon_interval(struct wlan_objmgr_psoc
  336. *psoc, int *value);
  337. /**
  338. * wlan_mlme_get_sap_chan_switch_rate_enabled() - get the sap rate hostapd
  339. * enabled beacon interval
  340. * @psoc: pointer to psoc object
  341. * @value: Value that needs to be set from the caller
  342. *
  343. * Return: QDF Status
  344. */
  345. QDF_STATUS wlan_mlme_get_sap_chan_switch_rate_enabled(struct wlan_objmgr_psoc
  346. *psoc, bool *value);
  347. /**
  348. * wlan_mlme_get_oce_sta_enabled_info() - Get the OCE feature enable
  349. * info for STA
  350. * @psoc: pointer to psoc object
  351. * @value: pointer to the value which will be filled for the caller
  352. *
  353. * Return: QDF Status
  354. */
  355. QDF_STATUS wlan_mlme_get_oce_sta_enabled_info(struct wlan_objmgr_psoc *psoc,
  356. bool *value);
  357. /**
  358. * wlan_mlme_get_oce_sap_enabled_info() - Get the OCE feature enable
  359. * info for SAP
  360. * @psoc: pointer to psoc object
  361. * @value: pointer to the value which will be filled for the caller
  362. *
  363. * Return: QDF Status
  364. */
  365. QDF_STATUS wlan_mlme_get_oce_sap_enabled_info(struct wlan_objmgr_psoc *psoc,
  366. bool *value);
  367. /**
  368. * wlan_mlme_get_rts_threshold() - Get the RTS threshold config
  369. * @psoc: pointer to psoc object
  370. * @value: pointer to the value which will be filled for the caller
  371. *
  372. * Return: QDF Status
  373. */
  374. QDF_STATUS wlan_mlme_get_rts_threshold(struct wlan_objmgr_psoc *psoc,
  375. uint32_t *value);
  376. /**
  377. * wlan_mlme_set_rts_threshold() - Set the RTS threshold config
  378. * @psoc: pointer to psoc object
  379. * @value: Value that needs to be set from the caller
  380. *
  381. * Return: QDF Status
  382. */
  383. QDF_STATUS wlan_mlme_set_rts_threshold(struct wlan_objmgr_psoc *psoc,
  384. uint32_t value);
  385. /**
  386. * wlan_mlme_get_frag_threshold() - Get the Fragmentation threshold
  387. * config
  388. * @psoc: pointer to psoc object
  389. * @value: pointer to the value which will be filled for the caller
  390. *
  391. * Return: QDF Status
  392. */
  393. QDF_STATUS wlan_mlme_get_frag_threshold(struct wlan_objmgr_psoc *psoc,
  394. uint32_t *value);
  395. /**
  396. * wlan_mlme_set_frag_threshold() - Set the Fragmentation threshold
  397. * config
  398. * @psoc: pointer to psoc object
  399. * @value: Value that needs to be set from the caller
  400. *
  401. * Return: QDF Status
  402. */
  403. QDF_STATUS wlan_mlme_set_frag_threshold(struct wlan_objmgr_psoc *psoc,
  404. uint32_t value);
  405. /**
  406. * wlan_mlme_get_fils_enabled_info() - Get the fils enable info for driver
  407. * @psoc: pointer to psoc object
  408. * @value: pointer to the value which will be filled for the caller
  409. *
  410. * Return: QDF Status
  411. */
  412. QDF_STATUS wlan_mlme_get_fils_enabled_info(struct wlan_objmgr_psoc *psoc,
  413. bool *value);
  414. /**
  415. * wlan_mlme_set_fils_enabled_info() - Set the fils enable info for driver
  416. * @psoc: pointer to psoc object
  417. * @value: value that needs to be set from the caller
  418. *
  419. * Return: QDF Status
  420. */
  421. QDF_STATUS wlan_mlme_set_fils_enabled_info(struct wlan_objmgr_psoc *psoc,
  422. bool value);
  423. /**
  424. * wlan_mlme_set_enable_bcast_probe_rsp() - Set enable bcast probe resp info
  425. * @psoc: pointer to psoc object
  426. * @value: value that needs to be set from the caller
  427. *
  428. * Return: QDF Status
  429. */
  430. QDF_STATUS wlan_mlme_set_enable_bcast_probe_rsp(struct wlan_objmgr_psoc *psoc,
  431. bool value);
  432. #endif /* _WLAN_MLME_API_H_ */