wlan_mlme_cmn.h 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740
  1. /*
  2. * Copyright (c) 2019-2021 The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for any
  5. * purpose with or without fee is hereby granted, provided that the above
  6. * copyright notice and this permission notice appear in all copies.
  7. *
  8. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  9. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  10. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  11. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  12. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  13. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  14. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  15. */
  16. /**
  17. * DOC: Define Common MLME structure and APIs
  18. */
  19. #ifndef _WLAN_MLME_CMN_H_
  20. #define _WLAN_MLME_CMN_H_
  21. #include <include/wlan_psoc_mlme.h>
  22. #include <include/wlan_pdev_mlme.h>
  23. #include <include/wlan_vdev_mlme.h>
  24. #include "wlan_cm_public_struct.h"
  25. /**
  26. * mlme_cm_ops: connection manager osif callbacks
  27. * @mlme_cm_connect_complete_cb: Connect done callback
  28. * @vdev: vdev pointer
  29. * @rsp: connect response
  30. *
  31. * @mlme_cm_failed_candidate_cb: Callback to indicate failed candidate
  32. * @vdev: vdev pointer
  33. * @rsp: connect response
  34. *
  35. * @mlme_cm_update_id_and_src_cb: Callback to update connect id and
  36. * source of the connect request
  37. * @vdev: vdev pointer
  38. * @Source: Source of the connect req
  39. * @cm_id: connection manager id
  40. *
  41. * @mlme_cm_disconnect_complete_cb: Disconnect done callback
  42. * @vdev: vdev pointer
  43. * @rsp: Disconnect response
  44. *
  45. * @mlme_cm_disconnect_start_cb: Disconnect start callback
  46. * @vdev: vdev pointer
  47. *
  48. * @mlme_cm_roam_sync_cb: Roam sync callback
  49. * @vdev: vdev pointer
  50. *
  51. * @mlme_cm_pmksa_candidate_notify_cb: Roam pmksa candidate notify callback
  52. * @vdev: vdev pointer
  53. * @bssid: bssid
  54. * @index: index
  55. * @preauth: preauth flag
  56. *
  57. * @mlme_cm_roam_start_cb: Roam start callback
  58. * @vdev: vdev pointer
  59. *
  60. * @mlme_cm_roam_abort_cb: Roam abort callback
  61. * @vdev: vdev pointer
  62. *
  63. * @mlme_cm_roam_cmpl_cb: Roam sync complete cb
  64. * @vdev: vdev pointer
  65. *
  66. * @mlme_cm_ft_preauth_cmpl_cb: Roam ft preauth complete cb
  67. * @vdev: vdev pointer
  68. * @rsp: preauth response pointer
  69. *
  70. * @mlme_cm_cckm_preauth_cmpl_cb: Roam cckm preauth complete cb
  71. * @vdev: vdev pointer
  72. * @rsp: preauth response pointer
  73. */
  74. struct mlme_cm_ops {
  75. QDF_STATUS (*mlme_cm_connect_complete_cb)(
  76. struct wlan_objmgr_vdev *vdev,
  77. struct wlan_cm_connect_resp *rsp);
  78. QDF_STATUS (*mlme_cm_failed_candidate_cb)(
  79. struct wlan_objmgr_vdev *vdev,
  80. struct wlan_cm_connect_resp *rsp);
  81. QDF_STATUS (*mlme_cm_update_id_and_src_cb)(
  82. struct wlan_objmgr_vdev *vdev,
  83. enum wlan_cm_source source,
  84. wlan_cm_id cm_id);
  85. QDF_STATUS (*mlme_cm_disconnect_complete_cb)(
  86. struct wlan_objmgr_vdev *vdev,
  87. struct wlan_cm_discon_rsp *rsp);
  88. QDF_STATUS (*mlme_cm_disconnect_start_cb)(
  89. struct wlan_objmgr_vdev *vdev);
  90. #ifdef CONN_MGR_ADV_FEATURE
  91. QDF_STATUS (*mlme_cm_roam_sync_cb)(struct wlan_objmgr_vdev *vdev);
  92. QDF_STATUS (*mlme_cm_pmksa_candidate_notify_cb)(
  93. struct wlan_objmgr_vdev *vdev,
  94. struct qdf_mac_addr *bssid,
  95. int index, bool preauth);
  96. #endif
  97. #ifdef WLAN_FEATURE_ROAM_OFFLOAD
  98. QDF_STATUS (*mlme_cm_roam_start_cb)(struct wlan_objmgr_vdev *vdev);
  99. QDF_STATUS (*mlme_cm_roam_abort_cb)(struct wlan_objmgr_vdev *vdev);
  100. QDF_STATUS (*mlme_cm_roam_cmpl_cb)(struct wlan_objmgr_vdev *vdev);
  101. #endif
  102. #ifdef WLAN_FEATURE_PREAUTH_ENABLE
  103. QDF_STATUS (*mlme_cm_ft_preauth_cmpl_cb)(
  104. struct wlan_objmgr_vdev *vdev,
  105. struct wlan_preauth_rsp *rsp);
  106. #ifdef FEATURE_WLAN_ESE
  107. QDF_STATUS (*mlme_cm_cckm_preauth_cmpl_cb)(
  108. struct wlan_objmgr_vdev *vdev,
  109. struct wlan_preauth_rsp *rsp);
  110. #endif
  111. #endif
  112. };
  113. /**
  114. * struct vdev_mlme_ext_ops - VDEV MLME legacy callbacks structure
  115. * @mlme_psoc_ext_hdl_create: callback to invoke creation of
  116. * legacy psoc object
  117. * @mlme_psoc_ext_hdl_destroy: callback to invoke destroy of legacy
  118. * psoc object
  119. * @mlme_pdev_ext_hdl_create: callback to invoke creation of
  120. * legacy pdev object
  121. * @mlme_pdev_ext_hdl_destroy: callback to invoke destroy of legacy
  122. * pdev object
  123. * @mlme_vdev_ext_hdl_create: callback to invoke creation of
  124. * legacy vdev object
  125. * @mlme_vdev_ext_hdl_post_create: callback to invoke post creation
  126. * actions of legacy vdev object
  127. * @mlme_vdev_ext_hdl_destroy: callback to invoke destroy of legacy
  128. * vdev object
  129. * @mlme_vdev_start_fw_send: callback to invoke vdev start
  130. * command
  131. * @mlme_vdev_stop_fw_send: callback to invoke vdev stop command
  132. * @mlme_vdev_down_fw_send: callback to invoke vdev down command
  133. * @mlme_multivdev_restart_fw_send: callback to invoke multivdev restart
  134. * command
  135. * @mlme_vdev_enqueue_exp_cmd: callback to enqueue exception
  136. * command
  137. * required by serialization
  138. * @mlme_multi_vdev_restart_resp: callback to process multivdev
  139. * restart response
  140. * @mlme_cm_ext_hdl_create_cb: callback to create ext cm context
  141. * @mlme_cm_ext_hdl_destroy_cb: callback to destroy ext cm context
  142. * @mlme_cm_ext_connect_start_ind_cb: callback to indicate connect start
  143. * @mlme_cm_ext_bss_select_ind_cb: callback to indicate candidate
  144. * select for connect
  145. * @mlme_cm_ext_bss_peer_create_req_cb: callback to bss peer create request
  146. * @mlme_cm_ext_connect_req_cb: callback for connect request to
  147. * VDEV/PEER SM
  148. * @mlme_cm_ext_connect_complete_ind_cb: callback to indicate connect
  149. * complete
  150. * @mlme_cm_ext_disconnect_start_ind_cb : callback to indicate disconnect
  151. * start
  152. * @mlme_cm_ext_disconnect_req_cb: callback to disconnect req to
  153. * VDEV/PEER SM
  154. * @mlme_cm_ext_bss_peer_delete_req_cb: callback to bss peer delete request
  155. * @mlme_cm_ext_disconnect_complete_ind_cb: callback to indicate disconnect
  156. * complete
  157. * @mlme_cm_ext_vdev_down_req_cb: callback to send vdev down to FW
  158. * @mlme_cm_ext_roam_start_ind_cb: callback to indicate roam start
  159. * @mlme_cm_ext_reassoc_req_cb: callback for reassoc request to
  160. * VDEV/PEER SM
  161. */
  162. struct mlme_ext_ops {
  163. QDF_STATUS (*mlme_psoc_ext_hdl_create)(
  164. struct psoc_mlme_obj *psoc_mlme);
  165. QDF_STATUS (*mlme_psoc_ext_hdl_destroy)(
  166. struct psoc_mlme_obj *pdev_mlme);
  167. QDF_STATUS (*mlme_pdev_ext_hdl_create)(
  168. struct pdev_mlme_obj *pdev_mlme);
  169. QDF_STATUS (*mlme_pdev_ext_hdl_destroy)(
  170. struct pdev_mlme_obj *pdev_mlme);
  171. QDF_STATUS (*mlme_vdev_ext_hdl_create)(
  172. struct vdev_mlme_obj *vdev_mlme);
  173. QDF_STATUS (*mlme_vdev_ext_hdl_post_create)(
  174. struct vdev_mlme_obj *vdev_mlme);
  175. QDF_STATUS (*mlme_vdev_ext_hdl_destroy)(
  176. struct vdev_mlme_obj *vdev_mlme);
  177. QDF_STATUS (*mlme_vdev_start_fw_send)(
  178. struct wlan_objmgr_vdev *vdev, uint8_t restart);
  179. QDF_STATUS (*mlme_vdev_stop_fw_send)(struct wlan_objmgr_vdev *vdev);
  180. QDF_STATUS (*mlme_vdev_down_fw_send)(struct wlan_objmgr_vdev *vdev);
  181. QDF_STATUS (*mlme_multivdev_restart_fw_send)(
  182. struct wlan_objmgr_pdev *pdev);
  183. QDF_STATUS (*mlme_vdev_enqueue_exp_cmd)(
  184. struct vdev_mlme_obj *vdev_mlme,
  185. uint8_t cmd_type);
  186. QDF_STATUS (*mlme_vdev_ext_delete_rsp)(
  187. struct wlan_objmgr_psoc *psoc,
  188. struct vdev_delete_response *rsp);
  189. QDF_STATUS (*mlme_multi_vdev_restart_resp)(
  190. struct wlan_objmgr_psoc *psoc,
  191. struct multi_vdev_restart_resp *resp);
  192. QDF_STATUS (*mlme_cm_ext_hdl_create_cb)(struct wlan_objmgr_vdev *vdev,
  193. cm_ext_t **ext_cm_ptr);
  194. QDF_STATUS (*mlme_cm_ext_hdl_destroy_cb)(struct wlan_objmgr_vdev *vdev,
  195. cm_ext_t *ext_cm_ptr);
  196. QDF_STATUS (*mlme_cm_ext_connect_start_ind_cb)(
  197. struct wlan_objmgr_vdev *vdev,
  198. struct wlan_cm_connect_req *req);
  199. QDF_STATUS (*mlme_cm_ext_bss_select_ind_cb)(
  200. struct wlan_objmgr_vdev *vdev,
  201. struct wlan_cm_vdev_connect_req *req);
  202. QDF_STATUS (*mlme_cm_ext_bss_peer_create_req_cb)(
  203. struct wlan_objmgr_vdev *vdev,
  204. struct qdf_mac_addr *peer_mac);
  205. QDF_STATUS (*mlme_cm_ext_connect_req_cb)(struct wlan_objmgr_vdev *vdev,
  206. struct wlan_cm_vdev_connect_req *req);
  207. QDF_STATUS (*mlme_cm_ext_connect_complete_ind_cb)(
  208. struct wlan_objmgr_vdev *vdev,
  209. struct wlan_cm_connect_resp *rsp);
  210. QDF_STATUS (*mlme_cm_ext_disconnect_start_ind_cb)(
  211. struct wlan_objmgr_vdev *vdev,
  212. struct wlan_cm_disconnect_req *req);
  213. QDF_STATUS (*mlme_cm_ext_disconnect_req_cb)
  214. (struct wlan_objmgr_vdev *vdev,
  215. struct wlan_cm_vdev_discon_req *req);
  216. QDF_STATUS (*mlme_cm_ext_bss_peer_delete_req_cb)(
  217. struct wlan_objmgr_vdev *vdev);
  218. QDF_STATUS (*mlme_cm_ext_disconnect_complete_ind_cb)(
  219. struct wlan_objmgr_vdev *vdev,
  220. struct wlan_cm_discon_rsp *rsp);
  221. QDF_STATUS (*mlme_cm_ext_vdev_down_req_cb)(
  222. struct wlan_objmgr_vdev *vdev);
  223. QDF_STATUS (*mlme_cm_ext_roam_start_ind_cb)(
  224. struct wlan_objmgr_vdev *vdev,
  225. struct wlan_cm_roam_req *req);
  226. QDF_STATUS (*mlme_cm_ext_reassoc_req_cb)(
  227. struct wlan_objmgr_vdev *vdev,
  228. struct wlan_cm_vdev_reassoc_req *req);
  229. };
  230. /**
  231. * mlme_psoc_ops_ext_hdl_create() - Alloc PSOC mlme ext handle
  232. * @psoc_mlme: PSOC MLME comp object
  233. *
  234. * API to allocate PSOC MLME ext handle
  235. *
  236. * Return: SUCCESS on successful allocation
  237. * Else FAILURE
  238. */
  239. QDF_STATUS mlme_psoc_ops_ext_hdl_create(struct psoc_mlme_obj *psoc_mlme);
  240. /**
  241. * mlme_psoc_ops_ext_hdl_destroy() - Destroy PSOC mlme ext handle
  242. * @psoc_mlme: PSOC MLME comp object
  243. *
  244. * API to free psoc MLME ext handle
  245. *
  246. * Return: SUCCESS on successful free
  247. * Else FAILURE
  248. */
  249. QDF_STATUS mlme_psoc_ops_ext_hdl_destroy(struct psoc_mlme_obj *psoc_mlme);
  250. /**
  251. * mlme_pdev_ops_ext_hdl_create - Alloc PDEV mlme ext handle
  252. * @pdev_mlme_obj: PDEV MLME comp object
  253. *
  254. * API to allocate PDEV MLME ext handle
  255. *
  256. * Return: SUCCESS on successful allocation
  257. * Else FAILURE
  258. */
  259. QDF_STATUS mlme_pdev_ops_ext_hdl_create(struct pdev_mlme_obj *pdev_mlme);
  260. /**
  261. * mlme_pdev_ops_ext_hdl_destroy - Destroy PDEV mlme ext handle
  262. * @pdev_mlme_obj: PDEV MLME comp object
  263. *
  264. * API to free pdev MLME ext handle
  265. *
  266. * Return: SUCCESS on successful free
  267. * Else FAILURE
  268. */
  269. QDF_STATUS mlme_pdev_ops_ext_hdl_destroy(struct pdev_mlme_obj *pdev_mlme);
  270. /**
  271. * mlme_vdev_ops_ext_hdl_create - Alloc VDEV mlme ext handle
  272. * @vdev_mlme_obj: VDEV MLME comp object
  273. *
  274. * API to allocate VDEV MLME ext handle
  275. *
  276. * Return: SUCCESS on successful allocation
  277. * Else FAILURE
  278. */
  279. QDF_STATUS mlme_vdev_ops_ext_hdl_create(struct vdev_mlme_obj *vdev_mlme);
  280. /**
  281. * mlme_vdev_ops_ext_hdl_post_create - Perform post VDEV mlme ext handle alloc
  282. * operations
  283. * @vdev_mlme_obj: VDEV MLME comp object
  284. *
  285. * API to perform post vdev MLME ext handle allocation operations
  286. *
  287. * Return: SUCCESS on initialization successful
  288. * Else FAILURE
  289. */
  290. QDF_STATUS mlme_vdev_ops_ext_hdl_post_create(struct vdev_mlme_obj *vdev_mlme);
  291. /**
  292. * mlme_vdev_ops_ext_hdl_destroy - Destroy VDEV mlme ext handle
  293. * @vdev_mlme_obj: VDEV MLME comp object
  294. *
  295. * API to free vdev MLME ext handle
  296. *
  297. * Return: SUCCESS on successful free
  298. * Else FAILURE
  299. */
  300. QDF_STATUS mlme_vdev_ops_ext_hdl_destroy(struct vdev_mlme_obj *vdev_mlme);
  301. /**
  302. * mlme_vdev_enqueue_exp_ser_cmd - Enqueue exception serialization cmd
  303. * @vdev_mlme_obj: VDEV MLME comp object
  304. * @cmd_type: Serialization command type
  305. *
  306. * API to enqueue the exception serialization command, used by
  307. * mlme-serialization wrapper layer
  308. *
  309. * Return: SUCCESS on successful enqueuing the command
  310. * Else FAILURE
  311. */
  312. QDF_STATUS mlme_vdev_enqueue_exp_ser_cmd(struct vdev_mlme_obj *vdev_mlme,
  313. uint8_t cmd_type);
  314. /**
  315. * mlme_vdev_ops_start_fw_send - Send WMI START/RESTART commmand to FW
  316. * @vdev: VDEV object
  317. *
  318. * API to send WMI start/restart command to FW
  319. *
  320. * Return: SUCCESS on successful sending the command
  321. * Else FAILURE
  322. */
  323. QDF_STATUS mlme_vdev_ops_start_fw_send(struct wlan_objmgr_vdev *vdev,
  324. uint8_t restart);
  325. /**
  326. * mlme_vdev_ops_multivdev_restart_fw_cmd_send - Send WMI Multivdev restart
  327. * commmand to FW
  328. * @pdev: PDEV object
  329. *
  330. * API to send WMI multivdev restart command to FW
  331. *
  332. * Return: SUCCESS on successful sending the command
  333. * Else FAILURE
  334. */
  335. QDF_STATUS mlme_vdev_ops_multivdev_restart_fw_cmd_send(
  336. struct wlan_objmgr_pdev *pdev);
  337. /**
  338. * mlme_vdev_ops_stop_fw_send - Send WMI STOP commmand to FW
  339. * @vdev: VDEV object
  340. *
  341. * API to send WMI stop command to FW
  342. *
  343. * Return: SUCCESS on successful sending the command
  344. * Else FAILURE
  345. */
  346. QDF_STATUS mlme_vdev_ops_stop_fw_send(struct wlan_objmgr_vdev *vdev);
  347. /**
  348. * mlme_vdev_ops_down_fw_send - Send WMI Down commmand to FW
  349. * @vdev: VDEV object
  350. *
  351. * API to send WMI down command to FW
  352. *
  353. * Return: SUCCESS on successful sending the command
  354. * Else FAILURE
  355. */
  356. QDF_STATUS mlme_vdev_ops_down_fw_send(struct wlan_objmgr_vdev *vdev);
  357. /*
  358. * mlme_vdev_ops_ext_hdl_multivdev_restart_resp() - Handler multivdev restart
  359. * response event
  360. * @psoc: PSOC object manager handle
  361. * @resp: Restart response event
  362. *
  363. * Return: Success on successful handling of the response event,
  364. * Else failure
  365. */
  366. QDF_STATUS mlme_vdev_ops_ext_hdl_multivdev_restart_resp(
  367. struct wlan_objmgr_psoc *psoc,
  368. struct multi_vdev_restart_resp *resp);
  369. /**
  370. * mlme_set_ops_register_cb - Sets ops registration callback
  371. * @ops_cb: Function pointer
  372. *
  373. * API to set ops registration call back
  374. *
  375. * Return: void
  376. */
  377. typedef struct mlme_ext_ops *(*mlme_get_global_ops_cb)(void);
  378. void mlme_set_ops_register_cb(mlme_get_global_ops_cb ops_cb);
  379. /**
  380. * wlan_cmn_mlme_init - Initializes MLME component
  381. *
  382. * Registers callbacks with object manager for create/destroy
  383. *
  384. * Return: SUCCESS on successful registration
  385. * FAILURE, if registration fails
  386. */
  387. QDF_STATUS wlan_cmn_mlme_init(void);
  388. /**
  389. * wlan_cmn_mlme_deinit - Uninitializes MLME component
  390. *
  391. * Unregisters callbacks with object manager for create/destroy
  392. *
  393. * Return: SUCCESS on successful registration
  394. * FAILURE, if registration fails
  395. */
  396. QDF_STATUS wlan_cmn_mlme_deinit(void);
  397. /**
  398. * mlme_vdev_ops_ext_hdl_delete_rsp - Vdev Delete response ext handler
  399. * @psoc: PSOC object
  400. * @rsp: Vdev delete response received from the firmware
  401. *
  402. * API to invoke the legacy delete response handler for legacy cleanup
  403. *
  404. * Return: SUCCESS on successful deletion
  405. * FAILURE, if deletion fails
  406. */
  407. QDF_STATUS mlme_vdev_ops_ext_hdl_delete_rsp(struct wlan_objmgr_psoc *psoc,
  408. struct vdev_delete_response *rsp);
  409. /**
  410. * mlme_cm_ext_hdl_create() - Connection manager callback to create ext
  411. * context
  412. * @vdev: VDEV object
  413. * @ext_cm_ptr: pointer to connection manager ext pointer
  414. *
  415. * Return: QDF_STATUS
  416. */
  417. QDF_STATUS mlme_cm_ext_hdl_create(struct wlan_objmgr_vdev *vdev,
  418. cm_ext_t **ext_cm_ptr);
  419. /**
  420. * mlme_cm_ext_hdl_destroy() - Connection manager callback to destroy ext
  421. * context
  422. * @vdev: VDEV object
  423. * @ext_cm_ptr: connection manager ext pointer
  424. *
  425. * Return: QDF_STATUS
  426. */
  427. QDF_STATUS mlme_cm_ext_hdl_destroy(struct wlan_objmgr_vdev *vdev,
  428. cm_ext_t *ext_cm_ptr);
  429. /**
  430. * mlme_cm_connect_start_ind() - Connection manager ext Connect start indication
  431. * @vdev: VDEV object
  432. * @req: Connection manager connect request
  433. *
  434. * Return: QDF_STATUS
  435. */
  436. QDF_STATUS mlme_cm_connect_start_ind(struct wlan_objmgr_vdev *vdev,
  437. struct wlan_cm_connect_req *req);
  438. /**
  439. * mlme_cm_bss_select_ind() - Connection manager ext Connect candidate
  440. * select indication, to do operations for the candidate
  441. * @vdev: VDEV object
  442. * @req: Vdev connect request
  443. *
  444. * Return: QDF_STATUS
  445. */
  446. QDF_STATUS mlme_cm_bss_select_ind(struct wlan_objmgr_vdev *vdev,
  447. struct wlan_cm_vdev_connect_req *req);
  448. /**
  449. * mlme_cm_bss_peer_create_req() - Connection manager ext bss peer create
  450. * request
  451. * @vdev: VDEV object
  452. * @peer_mac: Peer mac address
  453. *
  454. * Return: QDF_STATUS
  455. */
  456. QDF_STATUS mlme_cm_bss_peer_create_req(struct wlan_objmgr_vdev *vdev,
  457. struct qdf_mac_addr *peer_mac);
  458. /**
  459. * mlme_cm_connect_req() - Connection manager ext connect request to start vdev
  460. * and peer assoc state machine
  461. * @vdev: VDEV object
  462. * @req: Vdev connect request
  463. *
  464. * Context: The req is on stack, so the API need to make a copy, if it want to
  465. * use the req after return.
  466. *
  467. * Return: QDF_STATUS
  468. */
  469. QDF_STATUS mlme_cm_connect_req(struct wlan_objmgr_vdev *vdev,
  470. struct wlan_cm_vdev_connect_req *req);
  471. /**
  472. * mlme_cm_connect_complete_ind() - Connection manager ext connect complete
  473. * indication
  474. * @vdev: VDEV object
  475. * @rsp: Connection manager connect response
  476. *
  477. * Return: QDF_STATUS
  478. */
  479. QDF_STATUS mlme_cm_connect_complete_ind(struct wlan_objmgr_vdev *vdev,
  480. struct wlan_cm_connect_resp *rsp);
  481. /**
  482. * mlme_cm_roam_start_ind() - Connection manager ext Connect start indication
  483. * @vdev: VDEV object
  484. * @req: Connection manager roam request
  485. *
  486. * Return: QDF_STATUS
  487. */
  488. QDF_STATUS mlme_cm_roam_start_ind(struct wlan_objmgr_vdev *vdev,
  489. struct wlan_cm_roam_req *req);
  490. /**
  491. * mlme_cm_reassoc_req() - Connection manager ext reassoc request
  492. * @vdev: VDEV object
  493. * @req: Vdev reassoc request
  494. *
  495. * Context: The req is on stack, so the API need to make a copy, if it want to
  496. * use the req after return.
  497. *
  498. * Return: QDF_STATUS
  499. */
  500. QDF_STATUS mlme_cm_reassoc_req(struct wlan_objmgr_vdev *vdev,
  501. struct wlan_cm_vdev_reassoc_req *req);
  502. /**
  503. * mlme_cm_disconnect_start_ind() - Connection manager ext disconnect start
  504. * indication
  505. * @vdev: VDEV object
  506. * @req: Connection manager disconnect request
  507. *
  508. * Return: QDF_STATUS
  509. */
  510. QDF_STATUS mlme_cm_disconnect_start_ind(struct wlan_objmgr_vdev *vdev,
  511. struct wlan_cm_disconnect_req *req);
  512. /**
  513. * mlme_cm_disconnect_req() - Connection manager ext disconnect
  514. * req to vdev and peer sm
  515. * @vdev: VDEV object
  516. * @req: vdev disconnect request
  517. *
  518. * Return: QDF_STATUS
  519. */
  520. QDF_STATUS mlme_cm_disconnect_req(struct wlan_objmgr_vdev *vdev,
  521. struct wlan_cm_vdev_discon_req *req);
  522. /**
  523. * mlme_cm_bss_peer_delete_req() - Connection manager ext bss peer delete
  524. * request
  525. * @vdev: VDEV object
  526. *
  527. * Return: QDF_STATUS
  528. */
  529. QDF_STATUS
  530. mlme_cm_bss_peer_delete_req(struct wlan_objmgr_vdev *vdev);
  531. /**
  532. * mlme_cm_disconnect_complete_ind() - Connection manager ext disconnect
  533. * complete indication
  534. * @vdev: VDEV object
  535. * @rsp: Connection manager disconnect response
  536. *
  537. * Return: QDF_STATUS
  538. */
  539. QDF_STATUS mlme_cm_disconnect_complete_ind(struct wlan_objmgr_vdev *vdev,
  540. struct wlan_cm_discon_rsp *rsp);
  541. /**
  542. * mlme_cm_vdev_down() - Connection manager ext req to send vdev down to FW
  543. * @vdev: VDEV object
  544. *
  545. * Return: QDF_STATUS
  546. */
  547. QDF_STATUS mlme_cm_vdev_down_req(struct wlan_objmgr_vdev *vdev);
  548. /**
  549. * mlme_cm_osif_connect_complete() - Connect complete resp to osif
  550. * @vdev: vdev pointer
  551. * @rsp: Connect response
  552. *
  553. * Return: QDF_STATUS
  554. */
  555. QDF_STATUS mlme_cm_osif_connect_complete(struct wlan_objmgr_vdev *vdev,
  556. struct wlan_cm_connect_resp *rsp);
  557. /**
  558. * mlme_cm_osif_failed_candidate_ind() - Failed Candidate indication to osif
  559. * @vdev: vdev pointer
  560. * @rsp: Connect response
  561. *
  562. * Return: QDF_STATUS
  563. */
  564. QDF_STATUS
  565. mlme_cm_osif_failed_candidate_ind(struct wlan_objmgr_vdev *vdev,
  566. struct wlan_cm_connect_resp *rsp);
  567. /**
  568. * mlme_cm_osif_update_id_and_src() - Update connection id and source to osif
  569. * @vdev: vdev pointer
  570. * @source: source of request
  571. * @cm_id: connection manager id
  572. *
  573. * Return: QDF_STATUS
  574. */
  575. QDF_STATUS mlme_cm_osif_update_id_and_src(struct wlan_objmgr_vdev *vdev,
  576. enum wlan_cm_source source,
  577. wlan_cm_id cm_id);
  578. /**
  579. * mlme_cm_osif_disconnect_complete() - Disconnect complete osif response
  580. * @vdev: vdev pointer
  581. * @cm_conn_rsp: Connect response
  582. *
  583. * Return: QDF_STATUS
  584. */
  585. QDF_STATUS
  586. mlme_cm_osif_disconnect_complete(struct wlan_objmgr_vdev *vdev,
  587. struct wlan_cm_discon_rsp *rsp);
  588. /**
  589. * mlme_cm_osif_disconnect_start_ind() - osif Disconnect start indication
  590. * @vdev: vdev pointer
  591. * @cm_conn_rsp: Connect response
  592. *
  593. * Return: QDF_STATUS
  594. */
  595. QDF_STATUS mlme_cm_osif_disconnect_start_ind(struct wlan_objmgr_vdev *vdev);
  596. #ifdef CONN_MGR_ADV_FEATURE
  597. /**
  598. * mlme_cm_osif_roam_sync_ind() - osif Roam sync indication
  599. * @vdev: vdev pointer
  600. *
  601. * Return: QDF_STATUS
  602. */
  603. QDF_STATUS mlme_cm_osif_roam_sync_ind(struct wlan_objmgr_vdev *vdev);
  604. /**
  605. * mlme_cm_osif_pmksa_candidate_notify() - osif roam pmksa candidate notify
  606. * @vdev: vdev pointer
  607. * @bssid: bssid
  608. * @index: index
  609. * @preauth: preauth flag
  610. *
  611. * Return: QDF_STATUS
  612. */
  613. QDF_STATUS mlme_cm_osif_pmksa_candidate_notify(struct wlan_objmgr_vdev *vdev,
  614. struct qdf_mac_addr *bssid,
  615. int index, bool preauth);
  616. #else
  617. static inline
  618. QDF_STATUS mlme_cm_osif_roam_sync_ind(struct wlan_objmgr_vdev *vdev)
  619. {
  620. return QDF_STATUS_SUCCESS;
  621. }
  622. #endif
  623. #ifdef WLAN_FEATURE_ROAM_OFFLOAD
  624. /**
  625. * mlme_cm_osif_roam_start_ind() - osif Roam start indication
  626. * @vdev: vdev pointer
  627. *
  628. * Return: QDF_STATUS
  629. */
  630. QDF_STATUS mlme_cm_osif_roam_start_ind(struct wlan_objmgr_vdev *vdev);
  631. /**
  632. * mlme_cm_osif_roam_abort_ind() - osif Roam abort indication
  633. * @vdev: vdev pointer
  634. *
  635. * Return: QDF_STATUS
  636. */
  637. QDF_STATUS mlme_cm_osif_roam_abort_ind(struct wlan_objmgr_vdev *vdev);
  638. /**
  639. * mlme_cm_osif_roam_complete() - osif Roam sync complete callback
  640. * @vdev: vdev pointer
  641. *
  642. * Return: QDF_STATUS
  643. */
  644. QDF_STATUS mlme_cm_osif_roam_complete(struct wlan_objmgr_vdev *vdev);
  645. #endif
  646. #ifdef WLAN_FEATURE_PREAUTH_ENABLE
  647. /**
  648. * mlme_cm_osif_ft_preauth_complete() - osif roam ft preauth complete callback
  649. * @vdev: vdev pointer
  650. * @rsp: preauth response pointer
  651. *
  652. * Return: QDF_STATUS
  653. */
  654. QDF_STATUS
  655. mlme_cm_osif_ft_preauth_complete(struct wlan_objmgr_vdev *vdev,
  656. struct wlan_preauth_rsp *rsp);
  657. #ifdef FEATURE_WLAN_ESE
  658. /**
  659. * mlme_cm_osif_cckm_preauth_complete() - osif cckm preauth complete callback
  660. * @vdev: vdev pointer
  661. * @rsp: preauth response pointer
  662. *
  663. * Return: QDF_STATUS
  664. */
  665. QDF_STATUS
  666. mlme_cm_osif_cckm_preauth_complete(struct wlan_objmgr_vdev *vdev,
  667. struct wlan_preauth_rsp *rsp);
  668. #else
  669. static inline QDF_STATUS
  670. mlme_cm_osif_cckm_preauth_complete(struct wlan_objmgr_vdev *vdev,
  671. struct wlan_preauth_rsp *rsp)
  672. {
  673. return QDF_STATUS_SUCCESS;
  674. }
  675. #endif /* FEATURE_WLAN_ESE */
  676. #endif /* WLAN_FEATURE_PREAUTH_ENABLE */
  677. /**
  678. * typedef osif_cm_get_global_ops_cb() - Callback to get connection manager
  679. * global ops
  680. */
  681. typedef struct mlme_cm_ops *(*osif_cm_get_global_ops_cb)(void);
  682. /**
  683. * mlme_set_osif_cm_cb() - Sets ops registration callback
  684. * @cm_osif_ops: Function pointer
  685. *
  686. * API to set ops registration call back
  687. *
  688. * Return: void
  689. */
  690. void mlme_set_osif_cm_cb(osif_cm_get_global_ops_cb cm_osif_ops);
  691. #endif