wlan_mlme_cmn.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667
  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 wlan_objmgr_vdev *vdev,
  168. cm_ext_t **ext_cm_ptr);
  169. QDF_STATUS (*mlme_cm_ext_hdl_destroy_cb)(struct wlan_objmgr_vdev *vdev,
  170. cm_ext_t *ext_cm_ptr);
  171. QDF_STATUS (*mlme_cm_ext_connect_start_ind_cb)(
  172. struct wlan_objmgr_vdev *vdev,
  173. struct wlan_cm_connect_req *req);
  174. QDF_STATUS (*mlme_cm_ext_bss_select_ind_cb)(
  175. struct wlan_objmgr_vdev *vdev,
  176. struct wlan_cm_vdev_connect_req *req);
  177. QDF_STATUS (*mlme_cm_ext_bss_peer_create_req_cb)(
  178. struct wlan_objmgr_vdev *vdev,
  179. struct qdf_mac_addr *peer_mac);
  180. QDF_STATUS (*mlme_cm_ext_connect_req_cb)(struct wlan_objmgr_vdev *vdev,
  181. struct wlan_cm_vdev_connect_req *req);
  182. QDF_STATUS (*mlme_cm_ext_connect_complete_ind_cb)(
  183. struct wlan_objmgr_vdev *vdev,
  184. struct wlan_cm_connect_resp *rsp);
  185. QDF_STATUS (*mlme_cm_ext_disconnect_start_ind_cb)(
  186. struct wlan_objmgr_vdev *vdev,
  187. struct wlan_cm_disconnect_req *req);
  188. QDF_STATUS (*mlme_cm_ext_disconnect_req_cb)
  189. (struct wlan_objmgr_vdev *vdev,
  190. struct wlan_cm_vdev_discon_req *req);
  191. QDF_STATUS (*mlme_cm_ext_bss_peer_delete_req_cb)(
  192. struct wlan_objmgr_vdev *vdev);
  193. QDF_STATUS (*mlme_cm_ext_disconnect_complete_ind_cb)(
  194. struct wlan_objmgr_vdev *vdev,
  195. struct wlan_cm_discon_rsp *rsp);
  196. QDF_STATUS (*mlme_cm_ext_vdev_down_req_cb)(
  197. struct wlan_objmgr_vdev *vdev);
  198. QDF_STATUS (*mlme_cm_ext_roam_start_ind_cb)(
  199. struct wlan_objmgr_vdev *vdev,
  200. struct wlan_cm_roam_req *req);
  201. QDF_STATUS (*mlme_cm_ext_reassoc_req_cb)(
  202. struct wlan_objmgr_vdev *vdev,
  203. struct wlan_cm_vdev_reassoc_req *req);
  204. #endif
  205. };
  206. /**
  207. * mlme_psoc_ops_ext_hdl_create() - Alloc PSOC mlme ext handle
  208. * @psoc_mlme: PSOC MLME comp object
  209. *
  210. * API to allocate PSOC MLME ext handle
  211. *
  212. * Return: SUCCESS on successful allocation
  213. * Else FAILURE
  214. */
  215. QDF_STATUS mlme_psoc_ops_ext_hdl_create(struct psoc_mlme_obj *psoc_mlme);
  216. /**
  217. * mlme_psoc_ops_ext_hdl_destroy() - Destroy PSOC mlme ext handle
  218. * @psoc_mlme: PSOC MLME comp object
  219. *
  220. * API to free psoc MLME ext handle
  221. *
  222. * Return: SUCCESS on successful free
  223. * Else FAILURE
  224. */
  225. QDF_STATUS mlme_psoc_ops_ext_hdl_destroy(struct psoc_mlme_obj *psoc_mlme);
  226. /**
  227. * mlme_pdev_ops_ext_hdl_create - Alloc PDEV mlme ext handle
  228. * @pdev_mlme_obj: PDEV MLME comp object
  229. *
  230. * API to allocate PDEV MLME ext handle
  231. *
  232. * Return: SUCCESS on successful allocation
  233. * Else FAILURE
  234. */
  235. QDF_STATUS mlme_pdev_ops_ext_hdl_create(struct pdev_mlme_obj *pdev_mlme);
  236. /**
  237. * mlme_pdev_ops_ext_hdl_destroy - Destroy PDEV mlme ext handle
  238. * @pdev_mlme_obj: PDEV MLME comp object
  239. *
  240. * API to free pdev MLME ext handle
  241. *
  242. * Return: SUCCESS on successful free
  243. * Else FAILURE
  244. */
  245. QDF_STATUS mlme_pdev_ops_ext_hdl_destroy(struct pdev_mlme_obj *pdev_mlme);
  246. /**
  247. * mlme_vdev_ops_ext_hdl_create - Alloc VDEV mlme ext handle
  248. * @vdev_mlme_obj: VDEV MLME comp object
  249. *
  250. * API to allocate VDEV MLME ext handle
  251. *
  252. * Return: SUCCESS on successful allocation
  253. * Else FAILURE
  254. */
  255. QDF_STATUS mlme_vdev_ops_ext_hdl_create(struct vdev_mlme_obj *vdev_mlme);
  256. /**
  257. * mlme_vdev_ops_ext_hdl_post_create - Perform post VDEV mlme ext handle alloc
  258. * operations
  259. * @vdev_mlme_obj: VDEV MLME comp object
  260. *
  261. * API to perform post vdev MLME ext handle allocation operations
  262. *
  263. * Return: SUCCESS on initialization successful
  264. * Else FAILURE
  265. */
  266. QDF_STATUS mlme_vdev_ops_ext_hdl_post_create(struct vdev_mlme_obj *vdev_mlme);
  267. /**
  268. * mlme_vdev_ops_ext_hdl_destroy - Destroy VDEV mlme ext handle
  269. * @vdev_mlme_obj: VDEV MLME comp object
  270. *
  271. * API to free vdev MLME ext handle
  272. *
  273. * Return: SUCCESS on successful free
  274. * Else FAILURE
  275. */
  276. QDF_STATUS mlme_vdev_ops_ext_hdl_destroy(struct vdev_mlme_obj *vdev_mlme);
  277. /**
  278. * mlme_vdev_enqueue_exp_ser_cmd - Enqueue exception serialization cmd
  279. * @vdev_mlme_obj: VDEV MLME comp object
  280. * @cmd_type: Serialization command type
  281. *
  282. * API to enqueue the exception serialization command, used by
  283. * mlme-serialization wrapper layer
  284. *
  285. * Return: SUCCESS on successful enqueuing the command
  286. * Else FAILURE
  287. */
  288. QDF_STATUS mlme_vdev_enqueue_exp_ser_cmd(struct vdev_mlme_obj *vdev_mlme,
  289. uint8_t cmd_type);
  290. /**
  291. * mlme_vdev_ops_start_fw_send - Send WMI START/RESTART commmand to FW
  292. * @vdev: VDEV object
  293. *
  294. * API to send WMI start/restart command to FW
  295. *
  296. * Return: SUCCESS on successful sending the command
  297. * Else FAILURE
  298. */
  299. QDF_STATUS mlme_vdev_ops_start_fw_send(struct wlan_objmgr_vdev *vdev,
  300. uint8_t restart);
  301. /**
  302. * mlme_vdev_ops_multivdev_restart_fw_cmd_send - Send WMI Multivdev restart
  303. * commmand to FW
  304. * @pdev: PDEV object
  305. *
  306. * API to send WMI multivdev restart command to FW
  307. *
  308. * Return: SUCCESS on successful sending the command
  309. * Else FAILURE
  310. */
  311. QDF_STATUS mlme_vdev_ops_multivdev_restart_fw_cmd_send(
  312. struct wlan_objmgr_pdev *pdev);
  313. /**
  314. * mlme_vdev_ops_stop_fw_send - Send WMI STOP commmand to FW
  315. * @vdev: VDEV object
  316. *
  317. * API to send WMI stop command to FW
  318. *
  319. * Return: SUCCESS on successful sending the command
  320. * Else FAILURE
  321. */
  322. QDF_STATUS mlme_vdev_ops_stop_fw_send(struct wlan_objmgr_vdev *vdev);
  323. /**
  324. * mlme_vdev_ops_down_fw_send - Send WMI Down commmand to FW
  325. * @vdev: VDEV object
  326. *
  327. * API to send WMI down command to FW
  328. *
  329. * Return: SUCCESS on successful sending the command
  330. * Else FAILURE
  331. */
  332. QDF_STATUS mlme_vdev_ops_down_fw_send(struct wlan_objmgr_vdev *vdev);
  333. /*
  334. * mlme_vdev_ops_ext_hdl_multivdev_restart_resp() - Handler multivdev restart
  335. * response event
  336. * @psoc: PSOC object manager handle
  337. * @resp: Restart response event
  338. *
  339. * Return: Success on successful handling of the response event,
  340. * Else failure
  341. */
  342. QDF_STATUS mlme_vdev_ops_ext_hdl_multivdev_restart_resp(
  343. struct wlan_objmgr_psoc *psoc,
  344. struct multi_vdev_restart_resp *resp);
  345. /**
  346. * mlme_set_ops_register_cb - Sets ops registration callback
  347. * @ops_cb: Function pointer
  348. *
  349. * API to set ops registration call back
  350. *
  351. * Return: void
  352. */
  353. typedef struct mlme_ext_ops *(*mlme_get_global_ops_cb)(void);
  354. void mlme_set_ops_register_cb(mlme_get_global_ops_cb ops_cb);
  355. /**
  356. * wlan_cmn_mlme_init - Initializes MLME component
  357. *
  358. * Registers callbacks with object manager for create/destroy
  359. *
  360. * Return: SUCCESS on successful registration
  361. * FAILURE, if registration fails
  362. */
  363. QDF_STATUS wlan_cmn_mlme_init(void);
  364. /**
  365. * wlan_cmn_mlme_deinit - Uninitializes MLME component
  366. *
  367. * Unregisters callbacks with object manager for create/destroy
  368. *
  369. * Return: SUCCESS on successful registration
  370. * FAILURE, if registration fails
  371. */
  372. QDF_STATUS wlan_cmn_mlme_deinit(void);
  373. /**
  374. * mlme_vdev_ops_ext_hdl_delete_rsp - Vdev Delete response ext handler
  375. * @psoc: PSOC object
  376. * @rsp: Vdev delete response received from the firmware
  377. *
  378. * API to invoke the legacy delete response handler for legacy cleanup
  379. *
  380. * Return: SUCCESS on successful deletion
  381. * FAILURE, if deletion fails
  382. */
  383. QDF_STATUS mlme_vdev_ops_ext_hdl_delete_rsp(struct wlan_objmgr_psoc *psoc,
  384. struct vdev_delete_response *rsp);
  385. #ifdef FEATURE_CM_ENABLE
  386. /**
  387. * mlme_cm_ext_hdl_create() - Connection manager callback to create ext
  388. * context
  389. * @vdev: VDEV object
  390. * @ext_cm_ptr: pointer to connection manager ext pointer
  391. *
  392. * Return: QDF_STATUS
  393. */
  394. QDF_STATUS mlme_cm_ext_hdl_create(struct wlan_objmgr_vdev *vdev,
  395. cm_ext_t **ext_cm_ptr);
  396. /**
  397. * mlme_cm_ext_hdl_destroy() - Connection manager callback to destroy ext
  398. * context
  399. * @vdev: VDEV object
  400. * @ext_cm_ptr: connection manager ext pointer
  401. *
  402. * Return: QDF_STATUS
  403. */
  404. QDF_STATUS mlme_cm_ext_hdl_destroy(struct wlan_objmgr_vdev *vdev,
  405. cm_ext_t *ext_cm_ptr);
  406. /**
  407. * mlme_cm_connect_start_ind() - Connection manager ext Connect start indication
  408. * @vdev: VDEV object
  409. * @req: Connection manager connect request
  410. *
  411. * Return: QDF_STATUS
  412. */
  413. QDF_STATUS mlme_cm_connect_start_ind(struct wlan_objmgr_vdev *vdev,
  414. struct wlan_cm_connect_req *req);
  415. /**
  416. * mlme_cm_bss_select_ind() - Connection manager ext Connect candidate
  417. * select indication, to do operations for the candidate
  418. * @vdev: VDEV object
  419. * @req: Vdev connect request
  420. *
  421. * Return: QDF_STATUS
  422. */
  423. QDF_STATUS mlme_cm_bss_select_ind(struct wlan_objmgr_vdev *vdev,
  424. struct wlan_cm_vdev_connect_req *req);
  425. /**
  426. * mlme_cm_bss_peer_create_req() - Connection manager ext bss peer create
  427. * request
  428. * @vdev: VDEV object
  429. * @peer_mac: Peer mac address
  430. *
  431. * Return: QDF_STATUS
  432. */
  433. QDF_STATUS mlme_cm_bss_peer_create_req(struct wlan_objmgr_vdev *vdev,
  434. struct qdf_mac_addr *peer_mac);
  435. /**
  436. * mlme_cm_connect_req() - Connection manager ext connect request to start vdev
  437. * and peer assoc state machine
  438. * @vdev: VDEV object
  439. * @req: Vdev connect request
  440. *
  441. * Context: The req is on stack, so the API need to make a copy, if it want to
  442. * use the req after return.
  443. *
  444. * Return: QDF_STATUS
  445. */
  446. QDF_STATUS mlme_cm_connect_req(struct wlan_objmgr_vdev *vdev,
  447. struct wlan_cm_vdev_connect_req *req);
  448. /**
  449. * mlme_cm_connect_complete_ind() - Connection manager ext connect complete
  450. * indication
  451. * @vdev: VDEV object
  452. * @rsp: Connection manager connect response
  453. *
  454. * Return: QDF_STATUS
  455. */
  456. QDF_STATUS mlme_cm_connect_complete_ind(struct wlan_objmgr_vdev *vdev,
  457. struct wlan_cm_connect_resp *rsp);
  458. /**
  459. * mlme_cm_roam_start_ind() - Connection manager ext Connect start indication
  460. * @vdev: VDEV object
  461. * @req: Connection manager roam request
  462. *
  463. * Return: QDF_STATUS
  464. */
  465. QDF_STATUS mlme_cm_roam_start_ind(struct wlan_objmgr_vdev *vdev,
  466. struct wlan_cm_roam_req *req);
  467. /**
  468. * mlme_cm_reassoc_req() - Connection manager ext reassoc request
  469. * @vdev: VDEV object
  470. * @req: Vdev reassoc request
  471. *
  472. * Context: The req is on stack, so the API need to make a copy, if it want to
  473. * use the req after return.
  474. *
  475. * Return: QDF_STATUS
  476. */
  477. QDF_STATUS mlme_cm_reassoc_req(struct wlan_objmgr_vdev *vdev,
  478. struct wlan_cm_vdev_reassoc_req *req);
  479. /**
  480. * mlme_cm_disconnect_start_ind() - Connection manager ext disconnect start
  481. * indication
  482. * @vdev: VDEV object
  483. * @req: Connection manager disconnect request
  484. *
  485. * Return: QDF_STATUS
  486. */
  487. QDF_STATUS mlme_cm_disconnect_start_ind(struct wlan_objmgr_vdev *vdev,
  488. struct wlan_cm_disconnect_req *req);
  489. /**
  490. * mlme_cm_disconnect_req() - Connection manager ext disconnect
  491. * req to vdev and peer sm
  492. * @vdev: VDEV object
  493. * @req: vdev disconnect request
  494. *
  495. * Return: QDF_STATUS
  496. */
  497. QDF_STATUS mlme_cm_disconnect_req(struct wlan_objmgr_vdev *vdev,
  498. struct wlan_cm_vdev_discon_req *req);
  499. /**
  500. * mlme_cm_bss_peer_delete_req() - Connection manager ext bss peer delete
  501. * request
  502. * @vdev: VDEV object
  503. *
  504. * Return: QDF_STATUS
  505. */
  506. QDF_STATUS
  507. mlme_cm_bss_peer_delete_req(struct wlan_objmgr_vdev *vdev);
  508. /**
  509. * mlme_cm_disconnect_complete_ind() - Connection manager ext disconnect
  510. * complete indication
  511. * @vdev: VDEV object
  512. * @rsp: Connection manager disconnect response
  513. *
  514. * Return: QDF_STATUS
  515. */
  516. QDF_STATUS mlme_cm_disconnect_complete_ind(struct wlan_objmgr_vdev *vdev,
  517. struct wlan_cm_discon_rsp *rsp);
  518. /**
  519. * mlme_cm_vdev_down() - Connection manager ext req to send vdev down to FW
  520. * @vdev: VDEV object
  521. *
  522. * Return: QDF_STATUS
  523. */
  524. QDF_STATUS mlme_cm_vdev_down_req(struct wlan_objmgr_vdev *vdev);
  525. /**
  526. * mlme_cm_osif_connect_complete() - Connect complete resp to osif
  527. * @vdev: vdev pointer
  528. * @rsp: Connect response
  529. *
  530. * Return: QDF_STATUS
  531. */
  532. QDF_STATUS mlme_cm_osif_connect_complete(struct wlan_objmgr_vdev *vdev,
  533. struct wlan_cm_connect_resp *rsp);
  534. /**
  535. * mlme_cm_osif_failed_candidate_ind() - Failed Candidate indication to osif
  536. * @vdev: vdev pointer
  537. * @rsp: Connect response
  538. *
  539. * Return: QDF_STATUS
  540. */
  541. QDF_STATUS
  542. mlme_cm_osif_failed_candidate_ind(struct wlan_objmgr_vdev *vdev,
  543. struct wlan_cm_connect_resp *rsp);
  544. /**
  545. * mlme_cm_osif_update_id_and_src() - Update connection id and source to osif
  546. * @vdev: vdev pointer
  547. * @source: source of request
  548. * @cm_id: connection manager id
  549. *
  550. * Return: QDF_STATUS
  551. */
  552. QDF_STATUS mlme_cm_osif_update_id_and_src(struct wlan_objmgr_vdev *vdev,
  553. enum wlan_cm_source source,
  554. wlan_cm_id cm_id);
  555. /**
  556. * mlme_cm_osif_disconnect_complete() - Disconnect complete osif response
  557. * @vdev: vdev pointer
  558. * @cm_conn_rsp: Connect response
  559. *
  560. * Return: QDF_STATUS
  561. */
  562. QDF_STATUS
  563. mlme_cm_osif_disconnect_complete(struct wlan_objmgr_vdev *vdev,
  564. struct wlan_cm_discon_rsp *rsp);
  565. /**
  566. * mlme_cm_osif_disconnect_start_ind() - osif Disconnect start indication
  567. * @vdev: vdev pointer
  568. * @cm_conn_rsp: Connect response
  569. *
  570. * Return: QDF_STATUS
  571. */
  572. QDF_STATUS mlme_cm_osif_disconnect_start_ind(struct wlan_objmgr_vdev *vdev);
  573. #ifdef WLAN_FEATURE_ROAM_OFFLOAD
  574. /**
  575. * mlme_cm_osif_roam_start_ind() - osif Roam start indication
  576. * @vdev: vdev pointer
  577. *
  578. * Return: QDF_STATUS
  579. */
  580. QDF_STATUS mlme_cm_osif_roam_start_ind(struct wlan_objmgr_vdev *vdev);
  581. /**
  582. * mlme_cm_osif_roam_abort_ind() - osif Roam abort indication
  583. * @vdev: vdev pointer
  584. *
  585. * Return: QDF_STATUS
  586. */
  587. QDF_STATUS mlme_cm_osif_roam_abort_ind(struct wlan_objmgr_vdev *vdev);
  588. /**
  589. * mlme_cm_osif_roam_sync_ind() - osif Roam sync indication
  590. * @vdev: vdev pointer
  591. *
  592. * Return: QDF_STATUS
  593. */
  594. QDF_STATUS mlme_cm_osif_roam_sync_ind(struct wlan_objmgr_vdev *vdev);
  595. /**
  596. * mlme_cm_osif_roam_complete() - osif Roam sync complete callback
  597. * @vdev: vdev pointer
  598. *
  599. * Return: QDF_STATUS
  600. */
  601. QDF_STATUS mlme_cm_osif_roam_complete(struct wlan_objmgr_vdev *vdev);
  602. #endif
  603. /**
  604. * typedef osif_cm_get_global_ops_cb() - Callback to get connection manager
  605. * global ops
  606. */
  607. typedef struct mlme_cm_ops *(*osif_cm_get_global_ops_cb)(void);
  608. /**
  609. * mlme_set_osif_cm_cb() - Sets ops registration callback
  610. * @cm_osif_ops: Function pointer
  611. *
  612. * API to set ops registration call back
  613. *
  614. * Return: void
  615. */
  616. void mlme_set_osif_cm_cb(osif_cm_get_global_ops_cb cm_osif_ops);
  617. #endif
  618. #endif