wlan_mlme_ucfg_api.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596
  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. /*
  231. * ucfg_mlme_get_sta_keep_alive_period() - Get the sta keep alive period
  232. * @psoc: pointer to psoc object
  233. * @val: Pointer to the value which will be filled for the caller
  234. *
  235. * Return: QDF Status
  236. */
  237. QDF_STATUS
  238. ucfg_mlme_get_sta_keep_alive_period(struct wlan_objmgr_psoc *psoc,
  239. uint32_t *val);
  240. /**
  241. * ucfg_mlme_get_pmkid_modes() - Get PMKID modes
  242. * @psoc: pointer to psoc object
  243. * @val: Pointer to the value which will be filled for the caller
  244. *
  245. * Return: QDF Status
  246. */
  247. QDF_STATUS
  248. ucfg_mlme_get_pmkid_modes(struct wlan_objmgr_psoc *psoc,
  249. uint32_t *val);
  250. /**
  251. * ucfg_mlme_set_pmkid_modes() - Set PMKID modes
  252. * @psoc: pointer to psoc object
  253. * @val: Pointer to the value which will be filled for the caller
  254. *
  255. * Return: QDF Status
  256. */
  257. QDF_STATUS
  258. ucfg_mlme_set_pmkid_modes(struct wlan_objmgr_psoc *psoc,
  259. uint32_t val);
  260. /**
  261. * ucfg_mlme_get_dot11p_mode() - Get the setting about 802.11p mode
  262. * @psoc: pointer to psoc object
  263. * @val: Pointer to the value which will be filled for the caller
  264. *
  265. * Return: QDF Status
  266. */
  267. QDF_STATUS
  268. ucfg_mlme_get_dot11p_mode(struct wlan_objmgr_psoc *psoc,
  269. uint8_t *val);
  270. /**
  271. * ucfg_mlme_get_go_cts2self_for_sta() - Stop NOA and start using cts2self
  272. * @psoc: pointer to psoc object
  273. * @val: Pointer to the value which will be filled for the caller
  274. *
  275. * Return: QDF Status
  276. */
  277. QDF_STATUS
  278. ucfg_mlme_get_go_cts2self_for_sta(struct wlan_objmgr_psoc *psoc,
  279. bool *val);
  280. /**
  281. * ucfg_mlme_get_force_rsne_override() - Force rsnie override from user
  282. * @psoc: pointer to psoc object
  283. * @val: Pointer to the value which will be filled for the caller
  284. *
  285. * Return: QDF Status
  286. */
  287. QDF_STATUS
  288. ucfg_mlme_get_force_rsne_override(struct wlan_objmgr_psoc *psoc,
  289. bool *val);
  290. /**
  291. * ucfg_mlme_get_qcn_ie_support() - QCN IE support or not
  292. * @psoc: pointer to psoc object
  293. * @val: Pointer to the value which will be filled for the caller
  294. *
  295. * Return: QDF Status
  296. */
  297. QDF_STATUS
  298. ucfg_mlme_get_qcn_ie_support(struct wlan_objmgr_psoc *psoc,
  299. bool *val);
  300. /**
  301. * ucfg_mlme_get_tgt_gtx_usr_cfg() - Get the target gtx user config
  302. * @psoc: pointer to psoc object
  303. * @val: Pointer to the value which will be filled for the caller
  304. *
  305. * Return: QDF Status
  306. */
  307. QDF_STATUS
  308. ucfg_mlme_get_tgt_gtx_usr_cfg(struct wlan_objmgr_psoc *psoc,
  309. uint32_t *val);
  310. /**
  311. * ucfg_mlme_get_roaming_offload() - Get roaming offload setting
  312. * @psoc: pointer to psoc object
  313. * @val: Pointer to enable/disable roaming offload
  314. *
  315. * Return: QDF Status
  316. */
  317. QDF_STATUS
  318. ucfg_mlme_get_roaming_offload(struct wlan_objmgr_psoc *psoc,
  319. bool *val);
  320. /**
  321. * ucfg_mlme_set_roaming_offload() - Enable/disable roaming offload
  322. * @psoc: pointer to psoc object
  323. * @val: enable/disable roaming offload
  324. *
  325. * Return: QDF Status
  326. */
  327. QDF_STATUS
  328. ucfg_mlme_set_roaming_offload(struct wlan_objmgr_psoc *psoc,
  329. bool val);
  330. /**
  331. * ucfg_mlme_get_first_scan_bucket_threshold() - Get first scan bucket thre
  332. * @psoc: pointer to psoc object
  333. * @val: first scan bucket threshold
  334. *
  335. * Return: QDF Status
  336. */
  337. QDF_STATUS
  338. ucfg_mlme_get_first_scan_bucket_threshold(struct wlan_objmgr_psoc *psoc,
  339. uint8_t *val);
  340. /**
  341. * ucfg_mlme_set_sap_listen_interval() - Set the Sap listen interval
  342. * @psoc: pointer to psoc object
  343. * @value: Value that needs to be set from the caller
  344. *
  345. * Inline UCFG API to be used by HDD/OSIF callers
  346. *
  347. * Return: QDF Status
  348. */
  349. static inline
  350. QDF_STATUS ucfg_mlme_set_sap_listen_interval(struct wlan_objmgr_psoc *psoc,
  351. int value)
  352. {
  353. return wlan_mlme_set_sap_listen_interval(psoc, value);
  354. }
  355. /**
  356. * ucfg_mlme_set_assoc_sta_limit() - Set the assoc sta limit
  357. * @psoc: pointer to psoc object
  358. * @value: Value that needs to be set from the caller
  359. *
  360. * Inline UCFG API to be used by HDD/OSIF callers
  361. *
  362. * Return: QDF Status
  363. */
  364. static inline
  365. QDF_STATUS ucfg_mlme_set_assoc_sta_limit(struct wlan_objmgr_psoc *psoc,
  366. int value)
  367. {
  368. return wlan_mlme_set_assoc_sta_limit(psoc, value);
  369. }
  370. /**
  371. * ucfg_mlme_set_rmc_action_period_freq() - Set the rmc action period frequency
  372. * @psoc: pointer to psoc object
  373. * @value: Value that needs to be set from the caller
  374. *
  375. * Inline UCFG API to be used by HDD/OSIF callers
  376. *
  377. * Return: QDF Status
  378. */
  379. static inline
  380. QDF_STATUS ucfg_mlme_set_rmc_action_period_freq(struct wlan_objmgr_psoc *psoc,
  381. int value)
  382. {
  383. return wlan_mlme_set_rmc_action_period_freq(psoc, value);
  384. }
  385. /**
  386. * ucfg_mlme_get_sap_get_peer_info() - get the sap get peer info
  387. * @psoc: pointer to psoc object
  388. * @value: Value that needs to be set from the caller
  389. *
  390. * Inline UCFG API to be used by HDD/OSIF callers
  391. *
  392. * Return: QDF Status
  393. */
  394. static inline
  395. QDF_STATUS ucfg_mlme_get_sap_get_peer_info(struct wlan_objmgr_psoc *psoc,
  396. bool *value)
  397. {
  398. return wlan_mlme_get_sap_get_peer_info(psoc, value);
  399. }
  400. /**
  401. * ucfg_mlme_get_sap_allow_all_channels() - get the sap allow all channels
  402. * @psoc: pointer to psoc object
  403. * @value: Value that needs to be set from the caller
  404. *
  405. * Inline UCFG API to be used by HDD/OSIF callers
  406. *
  407. * Return: QDF Status
  408. */
  409. static inline
  410. QDF_STATUS ucfg_mlme_get_sap_allow_all_channels(struct wlan_objmgr_psoc *psoc,
  411. bool *value)
  412. {
  413. return wlan_mlme_get_sap_allow_all_channels(psoc, value);
  414. }
  415. /**
  416. * ucfg_mlme_get_sap_max_peers() - get the sap max peers
  417. * @psoc: pointer to psoc object
  418. * @value: Value that needs to be set from the caller
  419. *
  420. * Inline UCFG API to be used by HDD/OSIF callers
  421. *
  422. * Return: QDF Status
  423. */
  424. static inline
  425. QDF_STATUS ucfg_mlme_get_sap_max_peers(struct wlan_objmgr_psoc *psoc,
  426. int *value)
  427. {
  428. return wlan_mlme_get_sap_max_peers(psoc, value);
  429. }
  430. /**
  431. * ucfg_mlme_set_sap_max_peers() - Set the sap max peers
  432. * @psoc: pointer to psoc object
  433. * @value: Value that needs to be set from the caller
  434. *
  435. * Inline UCFG API to be used by HDD/OSIF callers
  436. *
  437. * Return: QDF Status
  438. */
  439. static inline
  440. QDF_STATUS ucfg_mlme_set_sap_max_peers(struct wlan_objmgr_psoc *psoc, int value)
  441. {
  442. return wlan_mlme_set_sap_max_peers(psoc, value);
  443. }
  444. /**
  445. * ucfg_mlme_get_sap_max_offload_peers() - get the sap max offload peers
  446. * @psoc: pointer to psoc object
  447. * @value: Value that needs to be set from the caller
  448. *
  449. * Inline UCFG API to be used by HDD/OSIF callers
  450. *
  451. * Return: QDF Status
  452. */
  453. static inline
  454. QDF_STATUS ucfg_mlme_get_sap_max_offload_peers(struct wlan_objmgr_psoc *psoc,
  455. int *value)
  456. {
  457. return wlan_mlme_get_sap_max_offload_peers(psoc, value);
  458. }
  459. /**
  460. * ucfg_mlme_get_sap_max_offload_reorder_buffs() - get the sap max offload
  461. * reorder buffs
  462. * @psoc: pointer to psoc object
  463. * @value: Value that needs to be set from the caller
  464. *
  465. * Inline UCFG API to be used by HDD/OSIF callers
  466. *
  467. * Return: QDF Status
  468. */
  469. static inline
  470. QDF_STATUS ucfg_mlme_get_sap_max_offload_reorder_buffs(struct wlan_objmgr_psoc
  471. *psoc, int *value)
  472. {
  473. return wlan_mlme_get_sap_max_offload_reorder_buffs(psoc, value);
  474. }
  475. /**
  476. * ucfg_mlme_get_sap_chn_switch_bcn_count() - get the sap channel
  477. * switch beacon count
  478. * @psoc: pointer to psoc object
  479. * @value: Value that needs to be set from the caller
  480. *
  481. * Inline UCFG API to be used by HDD/OSIF callers
  482. *
  483. * Return: QDF Status
  484. */
  485. static inline
  486. QDF_STATUS ucfg_mlme_get_sap_chn_switch_bcn_count(struct wlan_objmgr_psoc *psoc,
  487. int *value)
  488. {
  489. return wlan_mlme_get_sap_chn_switch_bcn_count(psoc, value);
  490. }
  491. /**
  492. * ucfg_mlme_get_sap_channel_switch_mode() - get the sap channel switch mode
  493. * @psoc: pointer to psoc object
  494. * @value: Value that needs to be set from the caller
  495. *
  496. * Inline UCFG API to be used by HDD/OSIF callers
  497. *
  498. * Return: QDF Status
  499. */
  500. static inline
  501. QDF_STATUS ucfg_mlme_get_sap_channel_switch_mode(struct wlan_objmgr_psoc *psoc,
  502. bool *value)
  503. {
  504. return wlan_mlme_get_sap_chn_switch_mode(psoc, value);
  505. }
  506. /**
  507. * ucfg_mlme_get_sap_internal_restart() - get sap internal restart value
  508. * @psoc: pointer to psoc object
  509. * @value: Value that needs to be set from the caller
  510. *
  511. * Inline UCFG API to be used by HDD/OSIF callers
  512. *
  513. * Return: QDF Status
  514. */
  515. static inline
  516. QDF_STATUS ucfg_mlme_get_sap_internal_restart(struct wlan_objmgr_psoc *psoc,
  517. bool *value)
  518. {
  519. return wlan_mlme_get_sap_internal_restart(psoc, value);
  520. }
  521. /**
  522. * ucfg_mlme_get_sap_reduces_beacon_interval() - get the sap reduces beacon
  523. * interval
  524. * @psoc: pointer to psoc object
  525. * @value: Value that needs to be set from the caller
  526. *
  527. * Inline UCFG API to be used by HDD/OSIF callers
  528. *
  529. * Return: QDF Status
  530. */
  531. static inline
  532. QDF_STATUS ucfg_mlme_get_sap_reduces_beacon_interval(struct wlan_objmgr_psoc
  533. *psoc, int *value)
  534. {
  535. return wlan_mlme_get_sap_reduced_beacon_interval(psoc, value);
  536. }
  537. /**
  538. * ucfg_mlme_get_sap_chan_switch_rate_enabled() - get the sap channel
  539. * switch rate enabled.
  540. * @psoc: pointer to psoc object
  541. * @value: Value that needs to be set from the caller
  542. *
  543. * Inline UCFG API to be used by HDD/OSIF callers
  544. *
  545. * Return: QDF Status
  546. */
  547. static inline
  548. QDF_STATUS ucfg_mlme_get_sap_chan_switch_rate_enabled(struct wlan_objmgr_psoc
  549. *psoc, bool *value)
  550. {
  551. return wlan_mlme_get_sap_chan_switch_rate_enabled(psoc, value);
  552. }
  553. #endif /* _WLAN_MLME_UCFG_API_H_ */