wlan_mlme_cmn.h 20 KB

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