wlan_mlme_api.h 15 KB

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