wlan_mlme_cmn.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661
  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. #ifdef FEATURE_CM_ENABLE
  25. #include "wlan_cm_public_struct.h"
  26. #endif
  27. #ifdef FEATURE_CM_ENABLE
  28. /**
  29. * mlme_cm_ops: connection manager osif callbacks
  30. * @mlme_cm_connect_complete_cb: Connect done callback
  31. * @vdev: vdev pointer
  32. * @rsp: connect response
  33. *
  34. * @mlme_cm_failed_candidate_cb: Callback to indicate failed candidate
  35. * @vdev: vdev pointer
  36. * @rsp: connect response
  37. *
  38. * @mlme_cm_update_id_and_src_cb: Callback to update connect id and
  39. * source of the connect request
  40. * @vdev: vdev pointer
  41. * @Source: Source of the connect req
  42. * @cm_id: connection manager id
  43. *
  44. * @mlme_cm_disconnect_complete_cb: Disconnect done callback
  45. * @vdev: vdev pointer
  46. * @rsp: Disconnect response
  47. *
  48. * @mlme_cm_disconnect_start_cb: Disconnect start callback
  49. * @vdev: vdev pointer
  50. *
  51. * @mlme_cm_roam_start_cb: Roam start callback
  52. * @vdev: vdev pointer
  53. *
  54. * @mlme_cm_roam_abort_cb: Roam abort callback
  55. * @vdev: vdev pointer
  56. *
  57. * @mlme_cm_roam_sync_cb: Roam sync callback
  58. * @vdev: vdev pointer
  59. *
  60. * @mlme_cm_roam_cmpl_cb: Roam sync complete cb
  61. * @vdev: vdev pointer
  62. */
  63. struct mlme_cm_ops {
  64. QDF_STATUS (*mlme_cm_connect_complete_cb)(
  65. struct wlan_objmgr_vdev *vdev,
  66. struct wlan_cm_connect_resp *rsp);
  67. QDF_STATUS (*mlme_cm_failed_candidate_cb)(
  68. struct wlan_objmgr_vdev *vdev,
  69. struct wlan_cm_connect_resp *rsp);
  70. QDF_STATUS (*mlme_cm_update_id_and_src_cb)(
  71. struct wlan_objmgr_vdev *vdev,
  72. enum wlan_cm_source source,
  73. wlan_cm_id cm_id);
  74. QDF_STATUS (*mlme_cm_disconnect_complete_cb)(
  75. struct wlan_objmgr_vdev *vdev,
  76. struct wlan_cm_discon_rsp *rsp);
  77. QDF_STATUS (*mlme_cm_disconnect_start_cb)(
  78. struct wlan_objmgr_vdev *vdev);
  79. #ifdef WLAN_FEATURE_ROAM_OFFLOAD
  80. QDF_STATUS (*mlme_cm_roam_start_cb)(struct wlan_objmgr_vdev *vdev);
  81. QDF_STATUS (*mlme_cm_roam_abort_cb)(struct wlan_objmgr_vdev *vdev);
  82. QDF_STATUS (*mlme_cm_roam_sync_cb)(struct wlan_objmgr_vdev *vdev);
  83. QDF_STATUS (*mlme_cm_roam_cmpl_cb)(struct wlan_objmgr_vdev *vdev);
  84. #endif
  85. };
  86. #endif
  87. /**
  88. * struct vdev_mlme_ext_ops - VDEV MLME legacy callbacks structure
  89. * @mlme_psoc_ext_hdl_create: callback to invoke creation of
  90. * legacy psoc object
  91. * @mlme_psoc_ext_hdl_destroy: callback to invoke destroy of legacy
  92. * psoc object
  93. * @mlme_pdev_ext_hdl_create: callback to invoke creation of
  94. * legacy pdev object
  95. * @mlme_pdev_ext_hdl_destroy: callback to invoke destroy of legacy
  96. * pdev object
  97. * @mlme_vdev_ext_hdl_create: callback to invoke creation of
  98. * legacy vdev object
  99. * @mlme_vdev_ext_hdl_post_create: callback to invoke post creation
  100. * actions of legacy vdev object
  101. * @mlme_vdev_ext_hdl_destroy: callback to invoke destroy of legacy
  102. * vdev object
  103. * @mlme_vdev_start_fw_send: callback to invoke vdev start
  104. * command
  105. * @mlme_vdev_stop_fw_send: callback to invoke vdev stop command
  106. * @mlme_vdev_down_fw_send: callback to invoke vdev down command
  107. * @mlme_multivdev_restart_fw_send: callback to invoke multivdev restart
  108. * command
  109. * @mlme_vdev_enqueue_exp_cmd: callback to enqueue exception
  110. * command
  111. * required by serialization
  112. * @mlme_multi_vdev_restart_resp: callback to process multivdev
  113. * restart response
  114. * @mlme_cm_ext_hdl_create_cb: callback to create ext cm context
  115. * @mlme_cm_ext_hdl_destroy_cb: callback to destroy ext cm context
  116. * @mlme_cm_ext_connect_start_ind_cb: callback to indicate connect start
  117. * @mlme_cm_ext_bss_select_ind_cb: callback to indicate candidate
  118. * select for connect
  119. * @mlme_cm_ext_bss_peer_create_req_cb: callback to bss peer create request
  120. * @mlme_cm_ext_connect_req_cb: callback for connect request to
  121. * VDEV/PEER SM
  122. * @mlme_cm_ext_connect_complete_ind_cb: callback to indicate connect
  123. * complete
  124. * @mlme_cm_ext_disconnect_start_ind_cb : callback to indicate disconnect
  125. * start
  126. * @mlme_cm_ext_disconnect_req_cb: callback to disconnect req to
  127. * VDEV/PEER SM
  128. * @mlme_cm_ext_bss_peer_delete_req_cb: callback to bss peer delete request
  129. * @mlme_cm_ext_disconnect_complete_ind_cb: callback to indicate disconnect
  130. * complete
  131. * @mlme_cm_ext_vdev_down_req_cb: callback to send vdev down to FW
  132. * @mlme_cm_ext_roam_start_ind_cb: callback to indicate roam start
  133. * @mlme_cm_ext_reassoc_req_cb: callback for reassoc request to
  134. * VDEV/PEER SM
  135. */
  136. struct mlme_ext_ops {
  137. QDF_STATUS (*mlme_psoc_ext_hdl_create)(
  138. struct psoc_mlme_obj *psoc_mlme);
  139. QDF_STATUS (*mlme_psoc_ext_hdl_destroy)(
  140. struct psoc_mlme_obj *pdev_mlme);
  141. QDF_STATUS (*mlme_pdev_ext_hdl_create)(
  142. struct pdev_mlme_obj *pdev_mlme);
  143. QDF_STATUS (*mlme_pdev_ext_hdl_destroy)(
  144. struct pdev_mlme_obj *pdev_mlme);
  145. QDF_STATUS (*mlme_vdev_ext_hdl_create)(
  146. struct vdev_mlme_obj *vdev_mlme);
  147. QDF_STATUS (*mlme_vdev_ext_hdl_post_create)(
  148. struct vdev_mlme_obj *vdev_mlme);
  149. QDF_STATUS (*mlme_vdev_ext_hdl_destroy)(
  150. struct vdev_mlme_obj *vdev_mlme);
  151. QDF_STATUS (*mlme_vdev_start_fw_send)(
  152. struct wlan_objmgr_vdev *vdev, uint8_t restart);
  153. QDF_STATUS (*mlme_vdev_stop_fw_send)(struct wlan_objmgr_vdev *vdev);
  154. QDF_STATUS (*mlme_vdev_down_fw_send)(struct wlan_objmgr_vdev *vdev);
  155. QDF_STATUS (*mlme_multivdev_restart_fw_send)(
  156. struct wlan_objmgr_pdev *pdev);
  157. QDF_STATUS (*mlme_vdev_enqueue_exp_cmd)(
  158. struct vdev_mlme_obj *vdev_mlme,
  159. uint8_t cmd_type);
  160. QDF_STATUS (*mlme_vdev_ext_delete_rsp)(
  161. struct wlan_objmgr_psoc *psoc,
  162. struct vdev_delete_response *rsp);
  163. QDF_STATUS (*mlme_multi_vdev_restart_resp)(
  164. struct wlan_objmgr_psoc *psoc,
  165. struct multi_vdev_restart_resp *resp);
  166. #ifdef FEATURE_CM_ENABLE
  167. QDF_STATUS (*mlme_cm_ext_hdl_create_cb)(struct cnx_mgr *cm_ctx);
  168. QDF_STATUS (*mlme_cm_ext_hdl_destroy_cb)(struct cnx_mgr *cm_ctx);
  169. QDF_STATUS (*mlme_cm_ext_connect_start_ind_cb)(
  170. struct wlan_objmgr_vdev *vdev,
  171. struct wlan_cm_connect_req *req);
  172. QDF_STATUS (*mlme_cm_ext_bss_select_ind_cb)(
  173. struct wlan_objmgr_vdev *vdev,
  174. struct wlan_cm_vdev_connect_req *req);
  175. QDF_STATUS (*mlme_cm_ext_bss_peer_create_req_cb)(
  176. struct wlan_objmgr_vdev *vdev,
  177. struct qdf_mac_addr *peer_mac);
  178. QDF_STATUS (*mlme_cm_ext_connect_req_cb)(struct wlan_objmgr_vdev *vdev,
  179. struct wlan_cm_vdev_connect_req *req);
  180. QDF_STATUS (*mlme_cm_ext_connect_complete_ind_cb)(
  181. struct wlan_objmgr_vdev *vdev,
  182. struct wlan_cm_connect_resp *rsp);
  183. QDF_STATUS (*mlme_cm_ext_disconnect_start_ind_cb)(
  184. struct wlan_objmgr_vdev *vdev,
  185. struct wlan_cm_disconnect_req *req);
  186. QDF_STATUS (*mlme_cm_ext_disconnect_req_cb)
  187. (struct wlan_objmgr_vdev *vdev,
  188. struct wlan_cm_vdev_discon_req *req);
  189. QDF_STATUS (*mlme_cm_ext_bss_peer_delete_req_cb)(
  190. struct wlan_objmgr_vdev *vdev);
  191. QDF_STATUS (*mlme_cm_ext_disconnect_complete_ind_cb)(
  192. struct wlan_objmgr_vdev *vdev,
  193. struct wlan_cm_discon_rsp *rsp);
  194. QDF_STATUS (*mlme_cm_ext_vdev_down_req_cb)(
  195. struct wlan_objmgr_vdev *vdev);
  196. QDF_STATUS (*mlme_cm_ext_roam_start_ind_cb)(
  197. struct wlan_objmgr_vdev *vdev,
  198. struct wlan_cm_roam_req *req);
  199. QDF_STATUS (*mlme_cm_ext_reassoc_req_cb)(
  200. struct wlan_objmgr_vdev *vdev,
  201. struct wlan_cm_vdev_reassoc_req *req);
  202. #endif
  203. };
  204. /**
  205. * mlme_psoc_ops_ext_hdl_create() - Alloc PSOC mlme ext handle
  206. * @psoc_mlme: PSOC MLME comp object
  207. *
  208. * API to allocate PSOC MLME ext handle
  209. *
  210. * Return: SUCCESS on successful allocation
  211. * Else FAILURE
  212. */
  213. QDF_STATUS mlme_psoc_ops_ext_hdl_create(struct psoc_mlme_obj *psoc_mlme);
  214. /**
  215. * mlme_psoc_ops_ext_hdl_destroy() - Destroy PSOC mlme ext handle
  216. * @psoc_mlme: PSOC MLME comp object
  217. *
  218. * API to free psoc MLME ext handle
  219. *
  220. * Return: SUCCESS on successful free
  221. * Else FAILURE
  222. */
  223. QDF_STATUS mlme_psoc_ops_ext_hdl_destroy(struct psoc_mlme_obj *psoc_mlme);
  224. /**
  225. * mlme_pdev_ops_ext_hdl_create - Alloc PDEV mlme ext handle
  226. * @pdev_mlme_obj: PDEV MLME comp object
  227. *
  228. * API to allocate PDEV MLME ext handle
  229. *
  230. * Return: SUCCESS on successful allocation
  231. * Else FAILURE
  232. */
  233. QDF_STATUS mlme_pdev_ops_ext_hdl_create(struct pdev_mlme_obj *pdev_mlme);
  234. /**
  235. * mlme_pdev_ops_ext_hdl_destroy - Destroy PDEV mlme ext handle
  236. * @pdev_mlme_obj: PDEV MLME comp object
  237. *
  238. * API to free pdev MLME ext handle
  239. *
  240. * Return: SUCCESS on successful free
  241. * Else FAILURE
  242. */
  243. QDF_STATUS mlme_pdev_ops_ext_hdl_destroy(struct pdev_mlme_obj *pdev_mlme);
  244. /**
  245. * mlme_vdev_ops_ext_hdl_create - Alloc VDEV mlme ext handle
  246. * @vdev_mlme_obj: VDEV MLME comp object
  247. *
  248. * API to allocate VDEV MLME ext handle
  249. *
  250. * Return: SUCCESS on successful allocation
  251. * Else FAILURE
  252. */
  253. QDF_STATUS mlme_vdev_ops_ext_hdl_create(struct vdev_mlme_obj *vdev_mlme);
  254. /**
  255. * mlme_vdev_ops_ext_hdl_post_create - Perform post VDEV mlme ext handle alloc
  256. * operations
  257. * @vdev_mlme_obj: VDEV MLME comp object
  258. *
  259. * API to perform post vdev MLME ext handle allocation operations
  260. *
  261. * Return: SUCCESS on initialization successful
  262. * Else FAILURE
  263. */
  264. QDF_STATUS mlme_vdev_ops_ext_hdl_post_create(struct vdev_mlme_obj *vdev_mlme);
  265. /**
  266. * mlme_vdev_ops_ext_hdl_destroy - Destroy VDEV mlme ext handle
  267. * @vdev_mlme_obj: VDEV MLME comp object
  268. *
  269. * API to free vdev MLME ext handle
  270. *
  271. * Return: SUCCESS on successful free
  272. * Else FAILURE
  273. */
  274. QDF_STATUS mlme_vdev_ops_ext_hdl_destroy(struct vdev_mlme_obj *vdev_mlme);
  275. /**
  276. * mlme_vdev_enqueue_exp_ser_cmd - Enqueue exception serialization cmd
  277. * @vdev_mlme_obj: VDEV MLME comp object
  278. * @cmd_type: Serialization command type
  279. *
  280. * API to enqueue the exception serialization command, used by
  281. * mlme-serialization wrapper layer
  282. *
  283. * Return: SUCCESS on successful enqueuing the command
  284. * Else FAILURE
  285. */
  286. QDF_STATUS mlme_vdev_enqueue_exp_ser_cmd(struct vdev_mlme_obj *vdev_mlme,
  287. uint8_t cmd_type);
  288. /**
  289. * mlme_vdev_ops_start_fw_send - Send WMI START/RESTART commmand to FW
  290. * @vdev: VDEV object
  291. *
  292. * API to send WMI start/restart command to FW
  293. *
  294. * Return: SUCCESS on successful sending the command
  295. * Else FAILURE
  296. */
  297. QDF_STATUS mlme_vdev_ops_start_fw_send(struct wlan_objmgr_vdev *vdev,
  298. uint8_t restart);
  299. /**
  300. * mlme_vdev_ops_multivdev_restart_fw_cmd_send - Send WMI Multivdev restart
  301. * commmand to FW
  302. * @pdev: PDEV object
  303. *
  304. * API to send WMI multivdev restart command to FW
  305. *
  306. * Return: SUCCESS on successful sending the command
  307. * Else FAILURE
  308. */
  309. QDF_STATUS mlme_vdev_ops_multivdev_restart_fw_cmd_send(
  310. struct wlan_objmgr_pdev *pdev);
  311. /**
  312. * mlme_vdev_ops_stop_fw_send - Send WMI STOP commmand to FW
  313. * @vdev: VDEV object
  314. *
  315. * API to send WMI stop command to FW
  316. *
  317. * Return: SUCCESS on successful sending the command
  318. * Else FAILURE
  319. */
  320. QDF_STATUS mlme_vdev_ops_stop_fw_send(struct wlan_objmgr_vdev *vdev);
  321. /**
  322. * mlme_vdev_ops_down_fw_send - Send WMI Down commmand to FW
  323. * @vdev: VDEV object
  324. *
  325. * API to send WMI down command to FW
  326. *
  327. * Return: SUCCESS on successful sending the command
  328. * Else FAILURE
  329. */
  330. QDF_STATUS mlme_vdev_ops_down_fw_send(struct wlan_objmgr_vdev *vdev);
  331. /*
  332. * mlme_vdev_ops_ext_hdl_multivdev_restart_resp() - Handler multivdev restart
  333. * response event
  334. * @psoc: PSOC object manager handle
  335. * @resp: Restart response event
  336. *
  337. * Return: Success on successful handling of the response event,
  338. * Else failure
  339. */
  340. QDF_STATUS mlme_vdev_ops_ext_hdl_multivdev_restart_resp(
  341. struct wlan_objmgr_psoc *psoc,
  342. struct multi_vdev_restart_resp *resp);
  343. /**
  344. * mlme_set_ops_register_cb - Sets ops registration callback
  345. * @ops_cb: Function pointer
  346. *
  347. * API to set ops registration call back
  348. *
  349. * Return: void
  350. */
  351. typedef struct mlme_ext_ops *(*mlme_get_global_ops_cb)(void);
  352. void mlme_set_ops_register_cb(mlme_get_global_ops_cb ops_cb);
  353. /**
  354. * wlan_cmn_mlme_init - Initializes MLME component
  355. *
  356. * Registers callbacks with object manager for create/destroy
  357. *
  358. * Return: SUCCESS on successful registration
  359. * FAILURE, if registration fails
  360. */
  361. QDF_STATUS wlan_cmn_mlme_init(void);
  362. /**
  363. * wlan_cmn_mlme_deinit - Uninitializes MLME component
  364. *
  365. * Unregisters callbacks with object manager for create/destroy
  366. *
  367. * Return: SUCCESS on successful registration
  368. * FAILURE, if registration fails
  369. */
  370. QDF_STATUS wlan_cmn_mlme_deinit(void);
  371. /**
  372. * mlme_vdev_ops_ext_hdl_delete_rsp - Vdev Delete response ext handler
  373. * @psoc: PSOC object
  374. * @rsp: Vdev delete response received from the firmware
  375. *
  376. * API to invoke the legacy delete response handler for legacy cleanup
  377. *
  378. * Return: SUCCESS on successful deletion
  379. * FAILURE, if deletion fails
  380. */
  381. QDF_STATUS mlme_vdev_ops_ext_hdl_delete_rsp(struct wlan_objmgr_psoc *psoc,
  382. struct vdev_delete_response *rsp);
  383. #ifdef FEATURE_CM_ENABLE
  384. /**
  385. * mlme_cm_ext_hdl_create() - Connection manager callback to create ext
  386. * context
  387. * @cm_ctx: common cm context object
  388. *
  389. * Return: QDF_STATUS
  390. */
  391. QDF_STATUS mlme_cm_ext_hdl_create(struct cnx_mgr *cm_ctx);
  392. /**
  393. * mlme_cm_ext_hdl_destroy() - Connection manager callback to destroy ext
  394. * context
  395. * @cm_ctx: common cm context object
  396. *
  397. * Return: QDF_STATUS
  398. */
  399. QDF_STATUS mlme_cm_ext_hdl_destroy(struct cnx_mgr *cm_ctx);
  400. /**
  401. * mlme_cm_connect_start_ind() - Connection manager ext Connect start indication
  402. * @vdev: VDEV object
  403. * @req: Connection manager connect request
  404. *
  405. * Return: QDF_STATUS
  406. */
  407. QDF_STATUS mlme_cm_connect_start_ind(struct wlan_objmgr_vdev *vdev,
  408. struct wlan_cm_connect_req *req);
  409. /**
  410. * mlme_cm_bss_select_ind() - Connection manager ext Connect candidate
  411. * select indication, to do operations for the candidate
  412. * @vdev: VDEV object
  413. * @req: Vdev connect request
  414. *
  415. * Return: QDF_STATUS
  416. */
  417. QDF_STATUS mlme_cm_bss_select_ind(struct wlan_objmgr_vdev *vdev,
  418. struct wlan_cm_vdev_connect_req *req);
  419. /**
  420. * mlme_cm_bss_peer_create_req() - Connection manager ext bss peer create
  421. * request
  422. * @vdev: VDEV object
  423. * @peer_mac: Peer mac address
  424. *
  425. * Return: QDF_STATUS
  426. */
  427. QDF_STATUS mlme_cm_bss_peer_create_req(struct wlan_objmgr_vdev *vdev,
  428. struct qdf_mac_addr *peer_mac);
  429. /**
  430. * mlme_cm_connect_req() - Connection manager ext connect request to start vdev
  431. * and peer assoc state machine
  432. * @vdev: VDEV object
  433. * @req: Vdev connect request
  434. *
  435. * Context: The req is on stack, so the API need to make a copy, if it want to
  436. * use the req after return.
  437. *
  438. * Return: QDF_STATUS
  439. */
  440. QDF_STATUS mlme_cm_connect_req(struct wlan_objmgr_vdev *vdev,
  441. struct wlan_cm_vdev_connect_req *req);
  442. /**
  443. * mlme_cm_connect_complete_ind() - Connection manager ext connect complete
  444. * indication
  445. * @vdev: VDEV object
  446. * @rsp: Connection manager connect response
  447. *
  448. * Return: QDF_STATUS
  449. */
  450. QDF_STATUS mlme_cm_connect_complete_ind(struct wlan_objmgr_vdev *vdev,
  451. struct wlan_cm_connect_resp *rsp);
  452. /**
  453. * mlme_cm_roam_start_ind() - Connection manager ext Connect start indication
  454. * @vdev: VDEV object
  455. * @req: Connection manager roam request
  456. *
  457. * Return: QDF_STATUS
  458. */
  459. QDF_STATUS mlme_cm_roam_start_ind(struct wlan_objmgr_vdev *vdev,
  460. struct wlan_cm_roam_req *req);
  461. /**
  462. * mlme_cm_reassoc_req() - Connection manager ext reassoc request
  463. * @vdev: VDEV object
  464. * @req: Vdev reassoc request
  465. *
  466. * Context: The req is on stack, so the API need to make a copy, if it want to
  467. * use the req after return.
  468. *
  469. * Return: QDF_STATUS
  470. */
  471. QDF_STATUS mlme_cm_reassoc_req(struct wlan_objmgr_vdev *vdev,
  472. struct wlan_cm_vdev_reassoc_req *req);
  473. /**
  474. * mlme_cm_disconnect_start_ind() - Connection manager ext disconnect start
  475. * indication
  476. * @vdev: VDEV object
  477. * @req: Connection manager disconnect request
  478. *
  479. * Return: QDF_STATUS
  480. */
  481. QDF_STATUS mlme_cm_disconnect_start_ind(struct wlan_objmgr_vdev *vdev,
  482. struct wlan_cm_disconnect_req *req);
  483. /**
  484. * mlme_cm_disconnect_req() - Connection manager ext disconnect
  485. * req to vdev and peer sm
  486. * @vdev: VDEV object
  487. * @req: vdev disconnect request
  488. *
  489. * Return: QDF_STATUS
  490. */
  491. QDF_STATUS mlme_cm_disconnect_req(struct wlan_objmgr_vdev *vdev,
  492. struct wlan_cm_vdev_discon_req *req);
  493. /**
  494. * mlme_cm_bss_peer_delete_req() - Connection manager ext bss peer delete
  495. * request
  496. * @vdev: VDEV object
  497. *
  498. * Return: QDF_STATUS
  499. */
  500. QDF_STATUS
  501. mlme_cm_bss_peer_delete_req(struct wlan_objmgr_vdev *vdev);
  502. /**
  503. * mlme_cm_disconnect_complete_ind() - Connection manager ext disconnect
  504. * complete indication
  505. * @vdev: VDEV object
  506. * @rsp: Connection manager disconnect response
  507. *
  508. * Return: QDF_STATUS
  509. */
  510. QDF_STATUS mlme_cm_disconnect_complete_ind(struct wlan_objmgr_vdev *vdev,
  511. struct wlan_cm_discon_rsp *rsp);
  512. /**
  513. * mlme_cm_vdev_down() - Connection manager ext req to send vdev down to FW
  514. * @vdev: VDEV object
  515. *
  516. * Return: QDF_STATUS
  517. */
  518. QDF_STATUS mlme_cm_vdev_down_req(struct wlan_objmgr_vdev *vdev);
  519. /**
  520. * mlme_cm_osif_connect_complete() - Connect complete resp to osif
  521. * @vdev: vdev pointer
  522. * @rsp: Connect response
  523. *
  524. * Return: QDF_STATUS
  525. */
  526. QDF_STATUS mlme_cm_osif_connect_complete(struct wlan_objmgr_vdev *vdev,
  527. struct wlan_cm_connect_resp *rsp);
  528. /**
  529. * mlme_cm_osif_failed_candidate_ind() - Failed Candidate indication to osif
  530. * @vdev: vdev pointer
  531. * @rsp: Connect response
  532. *
  533. * Return: QDF_STATUS
  534. */
  535. QDF_STATUS
  536. mlme_cm_osif_failed_candidate_ind(struct wlan_objmgr_vdev *vdev,
  537. struct wlan_cm_connect_resp *rsp);
  538. /**
  539. * mlme_cm_osif_update_id_and_src() - Update connection id and source to osif
  540. * @vdev: vdev pointer
  541. * @source: source of request
  542. * @cm_id: connection manager id
  543. *
  544. * Return: QDF_STATUS
  545. */
  546. QDF_STATUS mlme_cm_osif_update_id_and_src(struct wlan_objmgr_vdev *vdev,
  547. enum wlan_cm_source source,
  548. wlan_cm_id cm_id);
  549. /**
  550. * mlme_cm_osif_disconnect_complete() - Disconnect complete osif response
  551. * @vdev: vdev pointer
  552. * @cm_conn_rsp: Connect response
  553. *
  554. * Return: QDF_STATUS
  555. */
  556. QDF_STATUS
  557. mlme_cm_osif_disconnect_complete(struct wlan_objmgr_vdev *vdev,
  558. struct wlan_cm_discon_rsp *rsp);
  559. /**
  560. * mlme_cm_osif_disconnect_start_ind() - osif Disconnect start indication
  561. * @vdev: vdev pointer
  562. * @cm_conn_rsp: Connect response
  563. *
  564. * Return: QDF_STATUS
  565. */
  566. QDF_STATUS mlme_cm_osif_disconnect_start_ind(struct wlan_objmgr_vdev *vdev);
  567. #ifdef WLAN_FEATURE_ROAM_OFFLOAD
  568. /**
  569. * mlme_cm_osif_roam_start_ind() - osif Roam start indication
  570. * @vdev: vdev pointer
  571. *
  572. * Return: QDF_STATUS
  573. */
  574. QDF_STATUS mlme_cm_osif_roam_start_ind(struct wlan_objmgr_vdev *vdev);
  575. /**
  576. * mlme_cm_osif_roam_abort_ind() - osif Roam abort indication
  577. * @vdev: vdev pointer
  578. *
  579. * Return: QDF_STATUS
  580. */
  581. QDF_STATUS mlme_cm_osif_roam_abort_ind(struct wlan_objmgr_vdev *vdev);
  582. /**
  583. * mlme_cm_osif_roam_sync_ind() - osif Roam sync indication
  584. * @vdev: vdev pointer
  585. *
  586. * Return: QDF_STATUS
  587. */
  588. QDF_STATUS mlme_cm_osif_roam_sync_ind(struct wlan_objmgr_vdev *vdev);
  589. /**
  590. * mlme_cm_osif_roam_complete() - osif Roam sync complete callback
  591. * @vdev: vdev pointer
  592. *
  593. * Return: QDF_STATUS
  594. */
  595. QDF_STATUS mlme_cm_osif_roam_complete(struct wlan_objmgr_vdev *vdev);
  596. #endif
  597. /**
  598. * typedef osif_cm_get_global_ops_cb() - Callback to get connection manager
  599. * global ops
  600. */
  601. typedef struct mlme_cm_ops *(*osif_cm_get_global_ops_cb)(void);
  602. /**
  603. * mlme_set_osif_cm_cb() - Sets ops registration callback
  604. * @cm_osif_ops: Function pointer
  605. *
  606. * API to set ops registration call back
  607. *
  608. * Return: void
  609. */
  610. void mlme_set_osif_cm_cb(osif_cm_get_global_ops_cb cm_osif_ops);
  611. #endif
  612. #endif