wlan_mlme_cmn.h 23 KB

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