wlan_mlme_cmn.h 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297
  1. /*
  2. * Copyright (c) 2019-2021 The Linux Foundation. All rights reserved.
  3. * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  4. *
  5. * Permission to use, copy, modify, and/or distribute this software for any
  6. * purpose with or without fee is hereby granted, provided that the above
  7. * copyright notice and this permission notice appear in all copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  10. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  11. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  12. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  13. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  14. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  15. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  16. */
  17. /**
  18. * DOC: Define Common MLME structure and APIs
  19. */
  20. #ifndef _WLAN_MLME_CMN_H_
  21. #define _WLAN_MLME_CMN_H_
  22. #include <include/wlan_psoc_mlme.h>
  23. #include <include/wlan_pdev_mlme.h>
  24. #include <include/wlan_vdev_mlme.h>
  25. #include "wlan_cm_public_struct.h"
  26. #include "wlan_twt_public_structs.h"
  27. /**
  28. * struct mlme_cm_ops: connection manager osif callbacks
  29. * @mlme_cm_connect_complete_cb: Connect done callback
  30. * @vdev: vdev pointer
  31. * @rsp: connect response
  32. *
  33. * @mlme_cm_failed_candidate_cb: Callback to indicate failed candidate
  34. * @vdev: vdev pointer
  35. * @rsp: connect response
  36. *
  37. * @mlme_cm_update_id_and_src_cb: Callback to update connect id and
  38. * source of the connect request
  39. * @vdev: vdev pointer
  40. * @Source: Source of the connect req
  41. * @cm_id: connection manager id
  42. *
  43. * @mlme_cm_disconnect_complete_cb: Disconnect done callback
  44. * @vdev: vdev pointer
  45. * @rsp: Disconnect response
  46. *
  47. * @mlme_cm_disconnect_start_cb: Disconnect start callback
  48. * @vdev: vdev pointer
  49. *
  50. * @mlme_cm_roam_sync_cb: Roam sync callback
  51. * @vdev: vdev pointer
  52. *
  53. * @mlme_cm_pmksa_candidate_notify_cb: Roam pmksa candidate notify callback
  54. * @vdev: vdev pointer
  55. * @bssid: bssid
  56. * @index: index
  57. * @preauth: preauth flag
  58. *
  59. * @mlme_cm_send_keys_cb:
  60. * @vdev: vdev pointer
  61. * @key_index: key index
  62. * @pairwise: true if a pairwise key
  63. * @cipher_type: key cipher type
  64. *
  65. * @mlme_cm_roam_start_cb: Roam start callback
  66. * @vdev: vdev pointer
  67. *
  68. * @mlme_cm_roam_abort_cb: Roam abort callback
  69. * @vdev: vdev pointer
  70. *
  71. * @mlme_cm_roam_cmpl_cb: Roam sync complete cb
  72. * @vdev: vdev pointer
  73. *
  74. * @mlme_cm_roam_get_scan_ie_cb: Get scan ie cb
  75. * @vdev: vdev pointer
  76. * @scan_ie: scan ie element pointer
  77. * @dot11mode_filter: dot11mode filter enumn pointer
  78. *
  79. * @mlme_cm_ft_preauth_cmpl_cb: Roam ft preauth complete cb
  80. * @vdev: vdev pointer
  81. * @rsp: preauth response pointer
  82. *
  83. * @mlme_cm_cckm_preauth_cmpl_cb: Roam cckm preauth complete cb
  84. * @vdev: vdev pointer
  85. * @rsp: preauth response pointer
  86. *
  87. * @mlme_cm_get_vendor_handoff_params_cb: get vendor handoff params cb
  88. * @psoc: psoc pointer
  89. * @rsp: vendor handoff response pointer
  90. * @vendor_handoff_context: vendor handoff context
  91. */
  92. struct mlme_cm_ops {
  93. QDF_STATUS (*mlme_cm_connect_complete_cb)(
  94. struct wlan_objmgr_vdev *vdev,
  95. struct wlan_cm_connect_resp *rsp);
  96. QDF_STATUS (*mlme_cm_failed_candidate_cb)(
  97. struct wlan_objmgr_vdev *vdev,
  98. struct wlan_cm_connect_resp *rsp);
  99. QDF_STATUS (*mlme_cm_update_id_and_src_cb)(
  100. struct wlan_objmgr_vdev *vdev,
  101. enum wlan_cm_source source,
  102. wlan_cm_id cm_id);
  103. QDF_STATUS (*mlme_cm_disconnect_complete_cb)(
  104. struct wlan_objmgr_vdev *vdev,
  105. struct wlan_cm_discon_rsp *rsp);
  106. QDF_STATUS (*mlme_cm_disconnect_start_cb)(
  107. struct wlan_objmgr_vdev *vdev);
  108. #ifdef CONN_MGR_ADV_FEATURE
  109. QDF_STATUS (*mlme_cm_roam_sync_cb)(struct wlan_objmgr_vdev *vdev);
  110. QDF_STATUS (*mlme_cm_pmksa_candidate_notify_cb)(
  111. struct wlan_objmgr_vdev *vdev,
  112. struct qdf_mac_addr *bssid,
  113. int index, bool preauth);
  114. QDF_STATUS (*mlme_cm_send_keys_cb)(struct wlan_objmgr_vdev *vdev,
  115. uint8_t key_index, bool pairwise,
  116. enum wlan_crypto_cipher_type cipher_type);
  117. #endif
  118. #ifdef WLAN_FEATURE_ROAM_OFFLOAD
  119. QDF_STATUS (*mlme_cm_roam_start_cb)(struct wlan_objmgr_vdev *vdev);
  120. QDF_STATUS (*mlme_cm_roam_abort_cb)(struct wlan_objmgr_vdev *vdev);
  121. QDF_STATUS (*mlme_cm_roam_cmpl_cb)(struct wlan_objmgr_vdev *vdev);
  122. QDF_STATUS (*mlme_cm_roam_get_scan_ie_cb)(struct wlan_objmgr_vdev *vdev,
  123. struct element_info *scan_ie,
  124. enum dot11_mode_filter *dot11mode_filter);
  125. #endif
  126. #ifdef WLAN_FEATURE_PREAUTH_ENABLE
  127. QDF_STATUS (*mlme_cm_ft_preauth_cmpl_cb)(
  128. struct wlan_objmgr_vdev *vdev,
  129. struct wlan_preauth_rsp *rsp);
  130. #ifdef FEATURE_WLAN_ESE
  131. QDF_STATUS (*mlme_cm_cckm_preauth_cmpl_cb)(
  132. struct wlan_objmgr_vdev *vdev,
  133. struct wlan_preauth_rsp *rsp);
  134. #endif
  135. #endif
  136. #ifdef WLAN_VENDOR_HANDOFF_CONTROL
  137. QDF_STATUS (*mlme_cm_get_vendor_handoff_params_cb)(
  138. struct wlan_objmgr_psoc *psoc,
  139. void *vendor_handoff_context);
  140. #endif
  141. };
  142. /**
  143. * struct mlme_vdev_mgr_ops - MLME VDEV mgr osif callbacks
  144. * @mlme_vdev_mgr_set_mac_addr_response: Callback to indicate set MAC address
  145. * response to osif
  146. */
  147. struct mlme_vdev_mgr_ops {
  148. #ifdef WLAN_FEATURE_DYNAMIC_MAC_ADDR_UPDATE
  149. QDF_STATUS (*mlme_vdev_mgr_set_mac_addr_response)(uint8_t vdev_id,
  150. uint8_t resp_status);
  151. #endif
  152. };
  153. /**
  154. * struct mlme_twt_ops: twt component osif callbacks
  155. * @mlme_twt_enable_complete_cb: TWT enable complete callback
  156. * @psoc: psoc pointer
  157. * @event: response
  158. * @context: context
  159. *
  160. * @mlme_twt_disable_complete_cb: TWT disable complete callback
  161. * @psoc: psoc pointer
  162. * @event: response
  163. * @context: context
  164. *
  165. * @mlme_twt_ack_complete_cb: TWT ack complete callback
  166. * @psoc: psoc pointer
  167. * @event: response
  168. * @context: context
  169. *
  170. * @mlme_twt_setup_complete_cb: TWT setup complete callback
  171. * @psoc: psoc pointer
  172. * @event: response
  173. * @renego_fail: flag to indicate if renegotiation failure case
  174. *
  175. * @mlme_twt_teardown_complete_cb: TWT teardown complete callback
  176. * @psoc: psoc pointer
  177. * @event: response
  178. *
  179. * @mlme_twt_pause_complete_cb: TWT pause complete callback
  180. * @psoc: psoc pointer
  181. * @event: response
  182. *
  183. * @mlme_twt_resume_complete_cb: TWT resume complete callback
  184. * @psoc: psoc pointer
  185. * @event: response
  186. *
  187. * @mlme_twt_nudge_complete_cb: TWT nudge complete callback
  188. * @psoc: psoc pointer
  189. * @event: response
  190. *
  191. * @mlme_twt_notify_complete_cb: TWT notify complete callback
  192. * @psoc: psoc pointer
  193. * @event: response
  194. *
  195. * @mlme_twt_vdev_create_cb: TWT vdev create callback
  196. * @vdev: vdev pointer
  197. *
  198. * @mlme_twt_vdev_destroy_cb: TWT vdev destroy callback
  199. * @vdev: vdev pointer
  200. */
  201. struct mlme_twt_ops {
  202. QDF_STATUS (*mlme_twt_enable_complete_cb)(
  203. struct wlan_objmgr_psoc *psoc,
  204. struct twt_enable_complete_event_param *event,
  205. void *context);
  206. QDF_STATUS (*mlme_twt_disable_complete_cb)(
  207. struct wlan_objmgr_psoc *psoc,
  208. struct twt_disable_complete_event_param *event,
  209. void *context);
  210. QDF_STATUS (*mlme_twt_ack_complete_cb)(
  211. struct wlan_objmgr_psoc *psoc,
  212. struct twt_ack_complete_event_param *event,
  213. void *context);
  214. QDF_STATUS (*mlme_twt_setup_complete_cb)(
  215. struct wlan_objmgr_psoc *psoc,
  216. struct twt_add_dialog_complete_event *event,
  217. bool renego_fail);
  218. QDF_STATUS (*mlme_twt_teardown_complete_cb)(
  219. struct wlan_objmgr_psoc *psoc,
  220. struct twt_del_dialog_complete_event_param *event);
  221. QDF_STATUS (*mlme_twt_pause_complete_cb)(
  222. struct wlan_objmgr_psoc *psoc,
  223. struct twt_pause_dialog_complete_event_param *event);
  224. QDF_STATUS (*mlme_twt_resume_complete_cb)(
  225. struct wlan_objmgr_psoc *psoc,
  226. struct twt_resume_dialog_complete_event_param *event);
  227. QDF_STATUS (*mlme_twt_nudge_complete_cb)(
  228. struct wlan_objmgr_psoc *psoc,
  229. struct twt_nudge_dialog_complete_event_param *event);
  230. QDF_STATUS (*mlme_twt_notify_complete_cb)(
  231. struct wlan_objmgr_psoc *psoc,
  232. struct twt_notify_event_param *event);
  233. QDF_STATUS (*mlme_twt_vdev_create_cb)(
  234. struct wlan_objmgr_vdev *vdev);
  235. QDF_STATUS (*mlme_twt_vdev_destroy_cb)(
  236. struct wlan_objmgr_vdev *vdev);
  237. };
  238. /**
  239. * struct mlme_ext_ops - MLME legacy callbacks structure
  240. * @mlme_psoc_ext_hdl_create: callback to invoke creation of
  241. * legacy psoc object
  242. * @mlme_psoc_ext_hdl_destroy: callback to invoke destroy of legacy
  243. * psoc object
  244. * @mlme_pdev_ext_hdl_create: callback to invoke creation of
  245. * legacy pdev object
  246. * @mlme_pdev_ext_hdl_destroy: callback to invoke destroy of legacy
  247. * pdev object
  248. * @mlme_vdev_ext_hdl_create: callback to invoke creation of
  249. * legacy vdev object
  250. * @mlme_vdev_ext_hdl_post_create: callback to invoke post creation
  251. * actions of legacy vdev object
  252. * @mlme_vdev_ext_hdl_destroy: callback to invoke destroy of legacy
  253. * vdev object
  254. * @mlme_vdev_start_fw_send: callback to invoke vdev start
  255. * command
  256. * @mlme_vdev_stop_fw_send: callback to invoke vdev stop command
  257. * @mlme_vdev_down_fw_send: callback to invoke vdev down command
  258. * @mlme_multivdev_restart_fw_send: callback to invoke multivdev restart
  259. * command
  260. * @mlme_vdev_enqueue_exp_cmd: callback to enqueue exception
  261. * command
  262. * required by serialization
  263. * @mlme_vdev_ext_delete_rsp: callback to process vdev ext delete
  264. * @mlme_multi_vdev_restart_resp: callback to process multivdev
  265. * restart response
  266. * @mlme_cm_ext_hdl_create_cb: callback to create ext cm context
  267. * @mlme_cm_ext_hdl_destroy_cb: callback to destroy ext cm context
  268. * @mlme_cm_ext_connect_start_ind_cb: callback to indicate connect start
  269. * @mlme_cm_ext_bss_select_ind_cb: callback to indicate candidate
  270. * select for connect
  271. * @mlme_cm_ext_bss_peer_create_req_cb: callback to bss peer create request
  272. * @mlme_cm_ext_connect_req_cb: callback for connect request to
  273. * VDEV/PEER SM
  274. * @mlme_cm_ext_connect_complete_ind_cb: callback to indicate connect
  275. * complete
  276. * @mlme_cm_ext_disconnect_start_ind_cb : callback to indicate disconnect
  277. * start
  278. * @mlme_cm_ext_disconnect_req_cb: callback to disconnect req to
  279. * VDEV/PEER SM
  280. * @mlme_cm_ext_bss_peer_delete_req_cb: callback to bss peer delete request
  281. * @mlme_cm_ext_disconnect_complete_ind_cb: callback to indicate disconnect
  282. * complete
  283. * @mlme_cm_ext_vdev_down_req_cb: callback to send vdev down to FW
  284. * @mlme_cm_ext_roam_start_ind_cb: callback to indicate roam start
  285. * @mlme_cm_ext_rso_stop_cb: callback to send rso stop to FW
  286. * @mlme_cm_ext_reassoc_req_cb: callback for reassoc request to
  287. * VDEV/PEER SM
  288. * @mlme_vdev_send_set_mac_addr: callback to send set MAC address
  289. * request to FW
  290. * @mlme_ext_get_acs_inprogress: callback to determine if ACS is
  291. * in progress on a given vdev
  292. */
  293. struct mlme_ext_ops {
  294. QDF_STATUS (*mlme_psoc_ext_hdl_create)(
  295. struct psoc_mlme_obj *psoc_mlme);
  296. QDF_STATUS (*mlme_psoc_ext_hdl_destroy)(
  297. struct psoc_mlme_obj *pdev_mlme);
  298. QDF_STATUS (*mlme_pdev_ext_hdl_create)(
  299. struct pdev_mlme_obj *pdev_mlme);
  300. QDF_STATUS (*mlme_pdev_ext_hdl_destroy)(
  301. struct pdev_mlme_obj *pdev_mlme);
  302. QDF_STATUS (*mlme_vdev_ext_hdl_create)(
  303. struct vdev_mlme_obj *vdev_mlme);
  304. QDF_STATUS (*mlme_vdev_ext_hdl_post_create)(
  305. struct vdev_mlme_obj *vdev_mlme);
  306. QDF_STATUS (*mlme_vdev_ext_hdl_destroy)(
  307. struct vdev_mlme_obj *vdev_mlme);
  308. QDF_STATUS (*mlme_vdev_start_fw_send)(
  309. struct wlan_objmgr_vdev *vdev, uint8_t restart);
  310. QDF_STATUS (*mlme_vdev_stop_fw_send)(struct wlan_objmgr_vdev *vdev);
  311. QDF_STATUS (*mlme_vdev_down_fw_send)(struct wlan_objmgr_vdev *vdev);
  312. QDF_STATUS (*mlme_multivdev_restart_fw_send)(
  313. struct wlan_objmgr_pdev *pdev);
  314. QDF_STATUS (*mlme_vdev_enqueue_exp_cmd)(
  315. struct vdev_mlme_obj *vdev_mlme,
  316. uint8_t cmd_type);
  317. QDF_STATUS (*mlme_vdev_ext_delete_rsp)(
  318. struct wlan_objmgr_psoc *psoc,
  319. struct vdev_delete_response *rsp);
  320. QDF_STATUS (*mlme_multi_vdev_restart_resp)(
  321. struct wlan_objmgr_psoc *psoc,
  322. struct multi_vdev_restart_resp *resp);
  323. QDF_STATUS (*mlme_cm_ext_hdl_create_cb)(struct wlan_objmgr_vdev *vdev,
  324. cm_ext_t **ext_cm_ptr);
  325. QDF_STATUS (*mlme_cm_ext_hdl_destroy_cb)(struct wlan_objmgr_vdev *vdev,
  326. cm_ext_t *ext_cm_ptr);
  327. QDF_STATUS (*mlme_cm_ext_connect_start_ind_cb)(
  328. struct wlan_objmgr_vdev *vdev,
  329. struct wlan_cm_connect_req *req);
  330. QDF_STATUS (*mlme_cm_ext_bss_select_ind_cb)(
  331. struct wlan_objmgr_vdev *vdev,
  332. struct wlan_cm_vdev_connect_req *req);
  333. QDF_STATUS (*mlme_cm_ext_bss_peer_create_req_cb)(
  334. struct wlan_objmgr_vdev *vdev,
  335. struct qdf_mac_addr *peer_mac,
  336. struct qdf_mac_addr *mld_mac,
  337. bool is_assoc_link);
  338. QDF_STATUS (*mlme_cm_ext_connect_req_cb)(struct wlan_objmgr_vdev *vdev,
  339. struct wlan_cm_vdev_connect_req *req);
  340. QDF_STATUS (*mlme_cm_ext_connect_complete_ind_cb)(
  341. struct wlan_objmgr_vdev *vdev,
  342. struct wlan_cm_connect_resp *rsp);
  343. QDF_STATUS (*mlme_cm_ext_disconnect_start_ind_cb)(
  344. struct wlan_objmgr_vdev *vdev,
  345. struct wlan_cm_disconnect_req *req);
  346. QDF_STATUS (*mlme_cm_ext_disconnect_req_cb)
  347. (struct wlan_objmgr_vdev *vdev,
  348. struct wlan_cm_vdev_discon_req *req);
  349. QDF_STATUS (*mlme_cm_ext_bss_peer_delete_req_cb)(
  350. struct wlan_objmgr_vdev *vdev);
  351. QDF_STATUS (*mlme_cm_ext_disconnect_complete_ind_cb)(
  352. struct wlan_objmgr_vdev *vdev,
  353. struct wlan_cm_discon_rsp *rsp);
  354. QDF_STATUS (*mlme_cm_ext_vdev_down_req_cb)(
  355. struct wlan_objmgr_vdev *vdev);
  356. QDF_STATUS (*mlme_cm_ext_roam_start_ind_cb)(
  357. struct wlan_objmgr_vdev *vdev,
  358. struct wlan_cm_roam_req *req);
  359. QDF_STATUS (*mlme_cm_ext_rso_stop_cb)(struct wlan_objmgr_vdev *vdev);
  360. QDF_STATUS (*mlme_cm_ext_reassoc_req_cb)(
  361. struct wlan_objmgr_vdev *vdev,
  362. struct wlan_cm_vdev_reassoc_req *req);
  363. #ifdef WLAN_FEATURE_DYNAMIC_MAC_ADDR_UPDATE
  364. QDF_STATUS (*mlme_vdev_send_set_mac_addr)(
  365. struct qdf_mac_addr mac_addr,
  366. struct qdf_mac_addr mld_addr,
  367. struct wlan_objmgr_vdev *vdev);
  368. #endif
  369. QDF_STATUS (*mlme_ext_get_acs_inprogress)(
  370. struct wlan_objmgr_vdev *vdev,
  371. bool *is_acs_inprogress);
  372. };
  373. enum wlan_mlme_peer_param;
  374. enum wlan_mlme_vdev_param;
  375. enum wlan_mlme_pdev_param;
  376. /**
  377. * struct mlme_external_tx_ops - MLME external callbacks structure
  378. * @peer_ops: callback to invoke peer mlme ops from external module
  379. * @vdev_ops: callback to invoke vdev mlme ops from external module
  380. * @pdev_ops: callback to invoke pdev mlme ops from external module
  381. * @scan_db_iterate: callback to invoke scan database iterate
  382. */
  383. struct mlme_external_tx_ops {
  384. QDF_STATUS (*peer_ops)(
  385. struct wlan_objmgr_peer *peer,
  386. enum wlan_mlme_peer_param type,
  387. void *data, void *ret);
  388. QDF_STATUS (*vdev_ops)(
  389. struct wlan_objmgr_vdev *vdev,
  390. enum wlan_mlme_vdev_param type,
  391. void *data, void *ret);
  392. QDF_STATUS (*pdev_ops)(
  393. struct wlan_objmgr_pdev *pdev,
  394. enum wlan_mlme_pdev_param type,
  395. void *data, void *ret);
  396. QDF_STATUS (*scan_db_iterate)(
  397. struct wlan_objmgr_pdev *pdev,
  398. scan_iterator_func handler, void *arg);
  399. };
  400. /**
  401. * mlme_psoc_ops_ext_hdl_create() - Alloc PSOC mlme ext handle
  402. * @psoc_mlme: PSOC MLME comp object
  403. *
  404. * API to allocate PSOC MLME ext handle
  405. *
  406. * Return: SUCCESS on successful allocation
  407. * Else FAILURE
  408. */
  409. QDF_STATUS mlme_psoc_ops_ext_hdl_create(struct psoc_mlme_obj *psoc_mlme);
  410. /**
  411. * mlme_psoc_ops_ext_hdl_destroy() - Destroy PSOC mlme ext handle
  412. * @psoc_mlme: PSOC MLME comp object
  413. *
  414. * API to free psoc MLME ext handle
  415. *
  416. * Return: SUCCESS on successful free
  417. * Else FAILURE
  418. */
  419. QDF_STATUS mlme_psoc_ops_ext_hdl_destroy(struct psoc_mlme_obj *psoc_mlme);
  420. /**
  421. * mlme_pdev_ops_ext_hdl_create - Alloc PDEV mlme ext handle
  422. * @pdev_mlme: PDEV MLME comp object
  423. *
  424. * API to allocate PDEV MLME ext handle
  425. *
  426. * Return: SUCCESS on successful allocation
  427. * Else FAILURE
  428. */
  429. QDF_STATUS mlme_pdev_ops_ext_hdl_create(struct pdev_mlme_obj *pdev_mlme);
  430. /**
  431. * mlme_pdev_ops_ext_hdl_destroy - Destroy PDEV mlme ext handle
  432. * @pdev_mlme: PDEV MLME comp object
  433. *
  434. * API to free pdev MLME ext handle
  435. *
  436. * Return: SUCCESS on successful free
  437. * Else FAILURE
  438. */
  439. QDF_STATUS mlme_pdev_ops_ext_hdl_destroy(struct pdev_mlme_obj *pdev_mlme);
  440. /**
  441. * mlme_vdev_ops_ext_hdl_create - Alloc VDEV mlme ext handle
  442. * @vdev_mlme: VDEV MLME comp object
  443. *
  444. * API to allocate VDEV MLME ext handle
  445. *
  446. * Return: SUCCESS on successful allocation
  447. * Else FAILURE
  448. */
  449. QDF_STATUS mlme_vdev_ops_ext_hdl_create(struct vdev_mlme_obj *vdev_mlme);
  450. /**
  451. * mlme_vdev_ops_ext_hdl_post_create - Perform post VDEV mlme ext handle alloc
  452. * operations
  453. * @vdev_mlme: VDEV MLME comp object
  454. *
  455. * API to perform post vdev MLME ext handle allocation operations
  456. *
  457. * Return: SUCCESS on initialization successful
  458. * Else FAILURE
  459. */
  460. QDF_STATUS mlme_vdev_ops_ext_hdl_post_create(struct vdev_mlme_obj *vdev_mlme);
  461. /**
  462. * mlme_vdev_ops_ext_hdl_destroy - Destroy VDEV mlme ext handle
  463. * @vdev_mlme: VDEV MLME comp object
  464. *
  465. * API to free vdev MLME ext handle
  466. *
  467. * Return: SUCCESS on successful free
  468. * Else FAILURE
  469. */
  470. QDF_STATUS mlme_vdev_ops_ext_hdl_destroy(struct vdev_mlme_obj *vdev_mlme);
  471. /**
  472. * mlme_vdev_enqueue_exp_ser_cmd - Enqueue exception serialization cmd
  473. * @vdev_mlme: VDEV MLME comp object
  474. * @cmd_type: Serialization command type
  475. *
  476. * API to enqueue the exception serialization command, used by
  477. * mlme-serialization wrapper layer
  478. *
  479. * Return: SUCCESS on successful enqueuing the command
  480. * Else FAILURE
  481. */
  482. QDF_STATUS mlme_vdev_enqueue_exp_ser_cmd(struct vdev_mlme_obj *vdev_mlme,
  483. uint8_t cmd_type);
  484. /**
  485. * mlme_vdev_ops_start_fw_send - Send WMI START/RESTART command to FW
  486. * @vdev: VDEV object
  487. * @restart: send start vs restart
  488. *
  489. * API to send WMI start/restart command to FW
  490. *
  491. * Return: SUCCESS on successful sending the command
  492. * Else FAILURE
  493. */
  494. QDF_STATUS mlme_vdev_ops_start_fw_send(struct wlan_objmgr_vdev *vdev,
  495. uint8_t restart);
  496. /**
  497. * mlme_vdev_ops_multivdev_restart_fw_cmd_send - Send WMI Multivdev restart
  498. * command to FW
  499. * @pdev: PDEV object
  500. *
  501. * API to send WMI multivdev restart command to FW
  502. *
  503. * Return: SUCCESS on successful sending the command
  504. * Else FAILURE
  505. */
  506. QDF_STATUS mlme_vdev_ops_multivdev_restart_fw_cmd_send(
  507. struct wlan_objmgr_pdev *pdev);
  508. /**
  509. * mlme_vdev_ops_stop_fw_send - Send WMI STOP command to FW
  510. * @vdev: VDEV object
  511. *
  512. * API to send WMI stop command to FW
  513. *
  514. * Return: SUCCESS on successful sending the command
  515. * Else FAILURE
  516. */
  517. QDF_STATUS mlme_vdev_ops_stop_fw_send(struct wlan_objmgr_vdev *vdev);
  518. /**
  519. * mlme_vdev_ops_down_fw_send - Send WMI Down command to FW
  520. * @vdev: VDEV object
  521. *
  522. * API to send WMI down command to FW
  523. *
  524. * Return: SUCCESS on successful sending the command
  525. * Else FAILURE
  526. */
  527. QDF_STATUS mlme_vdev_ops_down_fw_send(struct wlan_objmgr_vdev *vdev);
  528. /**
  529. * mlme_vdev_ops_ext_hdl_multivdev_restart_resp() - Handler multivdev restart
  530. * response event
  531. * @psoc: PSOC object manager handle
  532. * @resp: Restart response event
  533. *
  534. * Return: Success on successful handling of the response event,
  535. * Else failure
  536. */
  537. QDF_STATUS mlme_vdev_ops_ext_hdl_multivdev_restart_resp(
  538. struct wlan_objmgr_psoc *psoc,
  539. struct multi_vdev_restart_resp *resp);
  540. /*
  541. * typedef mlme_get_global_ops_cb() - callback to get MLME ext ops
  542. *
  543. * NB: kernel-doc Cannot parse typedef
  544. */
  545. typedef struct mlme_ext_ops *(*mlme_get_global_ops_cb)(void);
  546. /**
  547. * mlme_set_ops_register_cb - Sets ops registration callback
  548. * @ops_cb: Function pointer
  549. *
  550. * API to set ops registration call back
  551. *
  552. * Return: void
  553. */
  554. void mlme_set_ops_register_cb(mlme_get_global_ops_cb ops_cb);
  555. /**
  556. * wlan_cmn_mlme_init - Initializes MLME component
  557. *
  558. * Registers callbacks with object manager for create/destroy
  559. *
  560. * Return: SUCCESS on successful registration
  561. * FAILURE, if registration fails
  562. */
  563. QDF_STATUS wlan_cmn_mlme_init(void);
  564. /**
  565. * wlan_cmn_mlme_deinit - Uninitializes MLME component
  566. *
  567. * Unregisters callbacks with object manager for create/destroy
  568. *
  569. * Return: SUCCESS on successful registration
  570. * FAILURE, if registration fails
  571. */
  572. QDF_STATUS wlan_cmn_mlme_deinit(void);
  573. /**
  574. * mlme_vdev_ops_ext_hdl_delete_rsp - Vdev Delete response ext handler
  575. * @psoc: PSOC object
  576. * @rsp: Vdev delete response received from the firmware
  577. *
  578. * API to invoke the legacy delete response handler for legacy cleanup
  579. *
  580. * Return: SUCCESS on successful deletion
  581. * FAILURE, if deletion fails
  582. */
  583. QDF_STATUS mlme_vdev_ops_ext_hdl_delete_rsp(struct wlan_objmgr_psoc *psoc,
  584. struct vdev_delete_response *rsp);
  585. /**
  586. * mlme_cm_ext_hdl_create() - Connection manager callback to create ext
  587. * context
  588. * @vdev: VDEV object
  589. * @ext_cm_ptr: pointer to connection manager ext pointer
  590. *
  591. * Return: QDF_STATUS
  592. */
  593. QDF_STATUS mlme_cm_ext_hdl_create(struct wlan_objmgr_vdev *vdev,
  594. cm_ext_t **ext_cm_ptr);
  595. /**
  596. * mlme_cm_ext_hdl_destroy() - Connection manager callback to destroy ext
  597. * context
  598. * @vdev: VDEV object
  599. * @ext_cm_ptr: connection manager ext pointer
  600. *
  601. * Return: QDF_STATUS
  602. */
  603. QDF_STATUS mlme_cm_ext_hdl_destroy(struct wlan_objmgr_vdev *vdev,
  604. cm_ext_t *ext_cm_ptr);
  605. /**
  606. * mlme_cm_connect_start_ind() - Connection manager ext Connect start indication
  607. * @vdev: VDEV object
  608. * @req: Connection manager connect request
  609. *
  610. * Return: QDF_STATUS
  611. */
  612. QDF_STATUS mlme_cm_connect_start_ind(struct wlan_objmgr_vdev *vdev,
  613. struct wlan_cm_connect_req *req);
  614. /**
  615. * mlme_cm_bss_select_ind() - Connection manager ext Connect candidate
  616. * select indication, to do operations for the candidate
  617. * @vdev: VDEV object
  618. * @req: Vdev connect request
  619. *
  620. * Return: QDF_STATUS
  621. */
  622. QDF_STATUS mlme_cm_bss_select_ind(struct wlan_objmgr_vdev *vdev,
  623. struct wlan_cm_vdev_connect_req *req);
  624. /**
  625. * mlme_cm_bss_peer_create_req() - Connection manager ext bss peer create
  626. * request
  627. * @vdev: VDEV object
  628. * @peer_mac: Peer mac address
  629. * @mld_mac: mld mac address
  630. * @is_assoc_link: assoc happens on this link or not
  631. *
  632. * Return: QDF_STATUS
  633. */
  634. QDF_STATUS mlme_cm_bss_peer_create_req(struct wlan_objmgr_vdev *vdev,
  635. struct qdf_mac_addr *peer_mac,
  636. struct qdf_mac_addr *mld_mac,
  637. bool is_assoc_link);
  638. /**
  639. * mlme_cm_connect_req() - Connection manager ext connect request to start vdev
  640. * and peer assoc state machine
  641. * @vdev: VDEV object
  642. * @req: Vdev connect request
  643. *
  644. * Context: The req is on stack, so the API need to make a copy, if it want to
  645. * use the req after return.
  646. *
  647. * Return: QDF_STATUS
  648. */
  649. QDF_STATUS mlme_cm_connect_req(struct wlan_objmgr_vdev *vdev,
  650. struct wlan_cm_vdev_connect_req *req);
  651. /**
  652. * mlme_cm_connect_complete_ind() - Connection manager ext connect complete
  653. * indication
  654. * @vdev: VDEV object
  655. * @rsp: Connection manager connect response
  656. *
  657. * Return: QDF_STATUS
  658. */
  659. QDF_STATUS mlme_cm_connect_complete_ind(struct wlan_objmgr_vdev *vdev,
  660. struct wlan_cm_connect_resp *rsp);
  661. /**
  662. * mlme_cm_roam_start_ind() - Connection manager ext Connect start indication
  663. * @vdev: VDEV object
  664. * @req: Connection manager roam request
  665. *
  666. * Return: QDF_STATUS
  667. */
  668. QDF_STATUS mlme_cm_roam_start_ind(struct wlan_objmgr_vdev *vdev,
  669. struct wlan_cm_roam_req *req);
  670. /**
  671. * mlme_cm_rso_stop_req() - Connection manager ext RSO stop request
  672. * @vdev: VDEV object
  673. *
  674. * Return: QDF_STATUS
  675. */
  676. QDF_STATUS mlme_cm_rso_stop_req(struct wlan_objmgr_vdev *vdev);
  677. /**
  678. * mlme_cm_reassoc_req() - Connection manager ext reassoc request
  679. * @vdev: VDEV object
  680. * @req: Vdev reassoc request
  681. *
  682. * Context: The req is on stack, so the API need to make a copy, if it want to
  683. * use the req after return.
  684. *
  685. * Return: QDF_STATUS
  686. */
  687. QDF_STATUS mlme_cm_reassoc_req(struct wlan_objmgr_vdev *vdev,
  688. struct wlan_cm_vdev_reassoc_req *req);
  689. /**
  690. * mlme_cm_disconnect_start_ind() - Connection manager ext disconnect start
  691. * indication
  692. * @vdev: VDEV object
  693. * @req: Connection manager disconnect request
  694. *
  695. * Return: QDF_STATUS
  696. */
  697. QDF_STATUS mlme_cm_disconnect_start_ind(struct wlan_objmgr_vdev *vdev,
  698. struct wlan_cm_disconnect_req *req);
  699. /**
  700. * mlme_cm_disconnect_req() - Connection manager ext disconnect
  701. * req to vdev and peer sm
  702. * @vdev: VDEV object
  703. * @req: vdev disconnect request
  704. *
  705. * Return: QDF_STATUS
  706. */
  707. QDF_STATUS mlme_cm_disconnect_req(struct wlan_objmgr_vdev *vdev,
  708. struct wlan_cm_vdev_discon_req *req);
  709. /**
  710. * mlme_cm_bss_peer_delete_req() - Connection manager ext bss peer delete
  711. * request
  712. * @vdev: VDEV object
  713. *
  714. * Return: QDF_STATUS
  715. */
  716. QDF_STATUS
  717. mlme_cm_bss_peer_delete_req(struct wlan_objmgr_vdev *vdev);
  718. /**
  719. * mlme_cm_disconnect_complete_ind() - Connection manager ext disconnect
  720. * complete indication
  721. * @vdev: VDEV object
  722. * @rsp: Connection manager disconnect response
  723. *
  724. * Return: QDF_STATUS
  725. */
  726. QDF_STATUS mlme_cm_disconnect_complete_ind(struct wlan_objmgr_vdev *vdev,
  727. struct wlan_cm_discon_rsp *rsp);
  728. /**
  729. * mlme_cm_vdev_down_req() - Connection manager ext req to send vdev down to FW
  730. * @vdev: VDEV object
  731. *
  732. * Return: QDF_STATUS
  733. */
  734. QDF_STATUS mlme_cm_vdev_down_req(struct wlan_objmgr_vdev *vdev);
  735. /**
  736. * mlme_ext_hdl_get_acs_in_progress() - Check if ACS is in progress
  737. * @vdev: VDEV object
  738. * @acs_in_progress: ACS in progress flag
  739. *
  740. * Return: QDF_STATUS
  741. */
  742. QDF_STATUS mlme_ext_hdl_get_acs_in_progress(struct wlan_objmgr_vdev *vdev,
  743. bool *acs_in_progress);
  744. /**
  745. * mlme_cm_osif_connect_complete() - Connect complete resp to osif
  746. * @vdev: vdev pointer
  747. * @rsp: Connect response
  748. *
  749. * Return: QDF_STATUS
  750. */
  751. QDF_STATUS mlme_cm_osif_connect_complete(struct wlan_objmgr_vdev *vdev,
  752. struct wlan_cm_connect_resp *rsp);
  753. /**
  754. * mlme_cm_osif_failed_candidate_ind() - Failed Candidate indication to osif
  755. * @vdev: vdev pointer
  756. * @rsp: Connect response
  757. *
  758. * Return: QDF_STATUS
  759. */
  760. QDF_STATUS
  761. mlme_cm_osif_failed_candidate_ind(struct wlan_objmgr_vdev *vdev,
  762. struct wlan_cm_connect_resp *rsp);
  763. /**
  764. * mlme_cm_osif_update_id_and_src() - Update connection id and source to osif
  765. * @vdev: vdev pointer
  766. * @source: source of request
  767. * @cm_id: connection manager id
  768. *
  769. * Return: QDF_STATUS
  770. */
  771. QDF_STATUS mlme_cm_osif_update_id_and_src(struct wlan_objmgr_vdev *vdev,
  772. enum wlan_cm_source source,
  773. wlan_cm_id cm_id);
  774. /**
  775. * mlme_cm_osif_disconnect_complete() - Disconnect complete osif response
  776. * @vdev: vdev pointer
  777. * @rsp: Disconnect response
  778. *
  779. * Return: QDF_STATUS
  780. */
  781. QDF_STATUS
  782. mlme_cm_osif_disconnect_complete(struct wlan_objmgr_vdev *vdev,
  783. struct wlan_cm_discon_rsp *rsp);
  784. /**
  785. * mlme_cm_osif_disconnect_start_ind() - osif Disconnect start indication
  786. * @vdev: vdev pointer
  787. *
  788. * Return: QDF_STATUS
  789. */
  790. QDF_STATUS mlme_cm_osif_disconnect_start_ind(struct wlan_objmgr_vdev *vdev);
  791. #ifdef WLAN_VENDOR_HANDOFF_CONTROL
  792. /**
  793. * mlme_cm_osif_get_vendor_handoff_params() - osif get vendor handoff params
  794. * indication
  795. * @psoc: psoc pointer
  796. * @vendor_handoff_context: vendor handoff context
  797. *
  798. * Return: QDF_STATUS
  799. */
  800. QDF_STATUS mlme_cm_osif_get_vendor_handoff_params(struct wlan_objmgr_psoc *psoc,
  801. void *vendor_handoff_context);
  802. #endif
  803. #ifdef CONN_MGR_ADV_FEATURE
  804. /**
  805. * mlme_cm_osif_roam_sync_ind() - osif Roam sync indication
  806. * @vdev: vdev pointer
  807. *
  808. * Return: QDF_STATUS
  809. */
  810. QDF_STATUS mlme_cm_osif_roam_sync_ind(struct wlan_objmgr_vdev *vdev);
  811. /**
  812. * mlme_cm_osif_pmksa_candidate_notify() - osif roam pmksa candidate notify
  813. * @vdev: vdev pointer
  814. * @bssid: bssid
  815. * @index: index
  816. * @preauth: preauth flag
  817. *
  818. * Return: QDF_STATUS
  819. */
  820. QDF_STATUS mlme_cm_osif_pmksa_candidate_notify(struct wlan_objmgr_vdev *vdev,
  821. struct qdf_mac_addr *bssid,
  822. int index, bool preauth);
  823. /**
  824. * mlme_cm_osif_send_keys() - send vdev keys
  825. * @vdev: vdev pointer
  826. * @key_index: key index value
  827. * @pairwise: pairwise bool value
  828. * @cipher_type: cipher enum value
  829. *
  830. * Return: QDF_STATUS
  831. */
  832. QDF_STATUS mlme_cm_osif_send_keys(struct wlan_objmgr_vdev *vdev,
  833. uint8_t key_index, bool pairwise,
  834. enum wlan_crypto_cipher_type cipher_type);
  835. #else
  836. static inline
  837. QDF_STATUS mlme_cm_osif_roam_sync_ind(struct wlan_objmgr_vdev *vdev)
  838. {
  839. return QDF_STATUS_SUCCESS;
  840. }
  841. static inline
  842. QDF_STATUS mlme_cm_osif_send_keys(struct wlan_objmgr_vdev *vdev,
  843. uint8_t key_index, bool pairwise,
  844. enum wlan_crypto_cipher_type cipher_type)
  845. {
  846. return QDF_STATUS_SUCCESS;
  847. }
  848. #endif
  849. #ifdef WLAN_FEATURE_ROAM_OFFLOAD
  850. /**
  851. * mlme_cm_osif_roam_start_ind() - osif Roam start indication
  852. * @vdev: vdev pointer
  853. *
  854. * Return: QDF_STATUS
  855. */
  856. QDF_STATUS mlme_cm_osif_roam_start_ind(struct wlan_objmgr_vdev *vdev);
  857. /**
  858. * mlme_cm_osif_roam_abort_ind() - osif Roam abort indication
  859. * @vdev: vdev pointer
  860. *
  861. * Return: QDF_STATUS
  862. */
  863. QDF_STATUS mlme_cm_osif_roam_abort_ind(struct wlan_objmgr_vdev *vdev);
  864. /**
  865. * mlme_cm_osif_roam_complete() - osif Roam sync complete callback
  866. * @vdev: vdev pointer
  867. *
  868. * Return: QDF_STATUS
  869. */
  870. QDF_STATUS mlme_cm_osif_roam_complete(struct wlan_objmgr_vdev *vdev);
  871. /**
  872. * mlme_cm_osif_roam_get_scan_params() - osif Roam get scan params callback
  873. * @vdev: vdev pointer
  874. * @scan_ie: Pointer to scan_ie
  875. * @dot11mode_filter: Pointer to dot11mode_filter
  876. *
  877. * Get scan IE params from adapter corresponds to given vdev
  878. *
  879. * Return: QDF_STATUS
  880. */
  881. QDF_STATUS
  882. mlme_cm_osif_roam_get_scan_params(struct wlan_objmgr_vdev *vdev,
  883. struct element_info *scan_ie,
  884. enum dot11_mode_filter *dot11mode_filter);
  885. #endif
  886. #ifdef WLAN_FEATURE_PREAUTH_ENABLE
  887. /**
  888. * mlme_cm_osif_ft_preauth_complete() - osif roam ft preauth complete callback
  889. * @vdev: vdev pointer
  890. * @rsp: preauth response pointer
  891. *
  892. * Return: QDF_STATUS
  893. */
  894. QDF_STATUS
  895. mlme_cm_osif_ft_preauth_complete(struct wlan_objmgr_vdev *vdev,
  896. struct wlan_preauth_rsp *rsp);
  897. #ifdef FEATURE_WLAN_ESE
  898. /**
  899. * mlme_cm_osif_cckm_preauth_complete() - osif cckm preauth complete callback
  900. * @vdev: vdev pointer
  901. * @rsp: preauth response pointer
  902. *
  903. * Return: QDF_STATUS
  904. */
  905. QDF_STATUS
  906. mlme_cm_osif_cckm_preauth_complete(struct wlan_objmgr_vdev *vdev,
  907. struct wlan_preauth_rsp *rsp);
  908. #else
  909. static inline QDF_STATUS
  910. mlme_cm_osif_cckm_preauth_complete(struct wlan_objmgr_vdev *vdev,
  911. struct wlan_preauth_rsp *rsp)
  912. {
  913. return QDF_STATUS_SUCCESS;
  914. }
  915. #endif /* FEATURE_WLAN_ESE */
  916. #endif /* WLAN_FEATURE_PREAUTH_ENABLE */
  917. /*
  918. * typedef osif_cm_get_global_ops_cb() - Callback to get connection manager
  919. * global ops
  920. *
  921. * NB: kernel-doc Cannot parse typedef
  922. */
  923. typedef struct mlme_cm_ops *(*osif_cm_get_global_ops_cb)(void);
  924. /*
  925. * typedef osif_twt_get_global_ops_cb() - Callback to get twt global ops
  926. *
  927. * NB: kernel-doc Cannot parse typedef
  928. */
  929. typedef struct mlme_twt_ops *(*osif_twt_get_global_ops_cb)(void);
  930. /**
  931. * mlme_set_osif_cm_cb() - Sets ops registration callback
  932. * @cm_osif_ops: Function pointer
  933. *
  934. * API to set ops registration call back
  935. *
  936. * Return: void
  937. */
  938. void mlme_set_osif_cm_cb(osif_cm_get_global_ops_cb cm_osif_ops);
  939. /*
  940. * typedef osif_vdev_mgr_get_global_ops_cb() - Callback to get vdev manager
  941. * global ops
  942. *
  943. * NB: kernel-doc Cannot parse typedef
  944. */
  945. typedef struct mlme_vdev_mgr_ops *(*osif_vdev_mgr_get_global_ops_cb)(void);
  946. /**
  947. * mlme_set_osif_vdev_mgr_cb() - Sets ops registration callback
  948. * @mlme_vdev_mgr_osif_ops: Function pointer
  949. *
  950. * API to set ops registration call back
  951. *
  952. * Return: void
  953. */
  954. void mlme_set_osif_vdev_mgr_cb(
  955. osif_vdev_mgr_get_global_ops_cb mlme_vdev_mgr_osif_ops);
  956. /**
  957. * mlme_set_osif_twt_cb() - Sets twt ops registration callback
  958. * @twt_osif_ops: Function pointer
  959. *
  960. * API to set twt ops registration call back
  961. *
  962. * Return: void
  963. */
  964. void mlme_set_osif_twt_cb(osif_twt_get_global_ops_cb twt_osif_ops);
  965. /**
  966. * mlme_max_chan_switch_is_set() - Get if max chan switch IE is enabled
  967. * @psoc: Object manager psoc pointer
  968. *
  969. * Return: True if max chan switch is enabled else false
  970. */
  971. bool mlme_max_chan_switch_is_set(struct wlan_objmgr_psoc *psoc);
  972. #ifdef WLAN_FEATURE_DYNAMIC_MAC_ADDR_UPDATE
  973. /**
  974. * mlme_vdev_ops_send_set_mac_address() - Send set MAC address request to FW
  975. * @mac_addr: VDEV MAC address
  976. * @mld_addr: VDEV MLD address
  977. * @vdev: vdev pointer
  978. *
  979. * API to send set MAC address request command to FW
  980. *
  981. * Return: QDF_STATUS
  982. */
  983. QDF_STATUS mlme_vdev_ops_send_set_mac_address(struct qdf_mac_addr mac_addr,
  984. struct qdf_mac_addr mld_addr,
  985. struct wlan_objmgr_vdev *vdev);
  986. /**
  987. * mlme_vdev_mgr_notify_set_mac_addr_response() - Notify set MAC address
  988. * response
  989. * @vdev_id: VDEV ID
  990. * @resp_status: FW response for the set MAC address operation
  991. *
  992. * API to notify set MAC address to osif
  993. *
  994. * Return: None
  995. */
  996. void mlme_vdev_mgr_notify_set_mac_addr_response(uint8_t vdev_id,
  997. uint8_t resp_status);
  998. #endif
  999. #if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED)
  1000. /**
  1001. * mlme_twt_osif_enable_complete_ind() - enable complete resp to osif
  1002. * @psoc: psoc pointer
  1003. * @event: enable complete response
  1004. * @context: context registered by OSIF
  1005. *
  1006. * Return: QDF_STATUS
  1007. */
  1008. QDF_STATUS
  1009. mlme_twt_osif_enable_complete_ind(struct wlan_objmgr_psoc *psoc,
  1010. struct twt_enable_complete_event_param *event,
  1011. void *context);
  1012. /**
  1013. * mlme_twt_osif_disable_complete_ind() - disable complete resp to osif
  1014. * @psoc: psoc pointer
  1015. * @event: disable complete response
  1016. * @context: context registered by OSIF
  1017. *
  1018. * Return: QDF_STATUS
  1019. */
  1020. QDF_STATUS
  1021. mlme_twt_osif_disable_complete_ind(struct wlan_objmgr_psoc *psoc,
  1022. struct twt_disable_complete_event_param *event,
  1023. void *context);
  1024. /**
  1025. * mlme_twt_osif_ack_complete_ind() - ack complete resp to osif
  1026. * @psoc: psoc pointer
  1027. * @event: ack complete response
  1028. * @context: context registered by OSIF
  1029. *
  1030. * Return: QDF_STATUS
  1031. */
  1032. QDF_STATUS
  1033. mlme_twt_osif_ack_complete_ind(struct wlan_objmgr_psoc *psoc,
  1034. struct twt_ack_complete_event_param *event,
  1035. void *context);
  1036. /**
  1037. * mlme_twt_osif_setup_complete_ind() - setup complete resp to osif
  1038. * @psoc: psoc pointer
  1039. * @event: setup complete response
  1040. * @renego_fail: flag to indicate if renegotiation failure case
  1041. *
  1042. * Return: QDF_STATUS
  1043. */
  1044. QDF_STATUS
  1045. mlme_twt_osif_setup_complete_ind(struct wlan_objmgr_psoc *psoc,
  1046. struct twt_add_dialog_complete_event *event,
  1047. bool renego_fail);
  1048. /**
  1049. * mlme_twt_osif_teardown_complete_ind() - teardown complete resp to osif
  1050. * @psoc: psoc pointer
  1051. * @event: teardown complete response
  1052. *
  1053. * Return: QDF_STATUS
  1054. */
  1055. QDF_STATUS
  1056. mlme_twt_osif_teardown_complete_ind(struct wlan_objmgr_psoc *psoc,
  1057. struct twt_del_dialog_complete_event_param *event);
  1058. /**
  1059. * mlme_twt_osif_pause_complete_ind() - pause complete resp to osif
  1060. * @psoc: psoc pointer
  1061. * @event: pause complete response
  1062. *
  1063. * Return: QDF_STATUS
  1064. */
  1065. QDF_STATUS
  1066. mlme_twt_osif_pause_complete_ind(struct wlan_objmgr_psoc *psoc,
  1067. struct twt_pause_dialog_complete_event_param *event);
  1068. /**
  1069. * mlme_twt_osif_resume_complete_ind() - resume complete resp to osif
  1070. * @psoc: psoc pointer
  1071. * @event: resume complete response
  1072. *
  1073. * Return: QDF_STATUS
  1074. */
  1075. QDF_STATUS
  1076. mlme_twt_osif_resume_complete_ind(struct wlan_objmgr_psoc *psoc,
  1077. struct twt_resume_dialog_complete_event_param *event);
  1078. /**
  1079. * mlme_twt_osif_nudge_complete_ind() - nudge complete resp to osif
  1080. * @psoc: psoc pointer
  1081. * @event: nudge complete response
  1082. *
  1083. * Return: QDF_STATUS
  1084. */
  1085. QDF_STATUS
  1086. mlme_twt_osif_nudge_complete_ind(struct wlan_objmgr_psoc *psoc,
  1087. struct twt_nudge_dialog_complete_event_param *event);
  1088. /**
  1089. * mlme_twt_osif_notify_complete_ind() - notify complete resp to osif
  1090. * @psoc: psoc pointer
  1091. * @event: notify complete response
  1092. *
  1093. * Return: QDF_STATUS
  1094. */
  1095. QDF_STATUS
  1096. mlme_twt_osif_notify_complete_ind(struct wlan_objmgr_psoc *psoc,
  1097. struct twt_notify_event_param *event);
  1098. /**
  1099. * mlme_twt_vdev_create_notification() - vdev create notification to osif
  1100. * @vdev: vdev pointer
  1101. *
  1102. * Return: QDF_STATUS
  1103. */
  1104. QDF_STATUS
  1105. mlme_twt_vdev_create_notification(struct wlan_objmgr_vdev *vdev);
  1106. /**
  1107. * mlme_twt_vdev_destroy_notification() - vdev destroy notification to osif
  1108. * @vdev: vdev pointer
  1109. *
  1110. * Return: QDF_STATUS
  1111. */
  1112. QDF_STATUS
  1113. mlme_twt_vdev_destroy_notification(struct wlan_objmgr_vdev *vdev);
  1114. #else
  1115. static inline QDF_STATUS
  1116. mlme_twt_osif_enable_complete_ind(struct wlan_objmgr_psoc *psoc,
  1117. struct twt_enable_complete_event_param *event,
  1118. void *context)
  1119. {
  1120. return QDF_STATUS_SUCCESS;
  1121. }
  1122. static inline QDF_STATUS
  1123. mlme_twt_osif_disable_complete_ind(struct wlan_objmgr_psoc *psoc,
  1124. struct twt_disable_complete_event_param *event,
  1125. void *context)
  1126. {
  1127. return QDF_STATUS_SUCCESS;
  1128. }
  1129. static inline QDF_STATUS
  1130. mlme_twt_osif_ack_complete_ind(struct wlan_objmgr_psoc *psoc,
  1131. struct twt_ack_complete_event_param *event,
  1132. void *context)
  1133. {
  1134. return QDF_STATUS_SUCCESS;
  1135. }
  1136. static inline QDF_STATUS
  1137. mlme_twt_osif_setup_complete_ind(struct wlan_objmgr_psoc *psoc,
  1138. struct twt_add_dialog_complete_event *event,
  1139. bool renego_fail)
  1140. {
  1141. return QDF_STATUS_SUCCESS;
  1142. }
  1143. static inline QDF_STATUS
  1144. mlme_twt_osif_teardown_complete_ind(struct wlan_objmgr_psoc *psoc,
  1145. struct twt_del_dialog_complete_event_param *event)
  1146. {
  1147. return QDF_STATUS_SUCCESS;
  1148. }
  1149. static inline QDF_STATUS
  1150. mlme_twt_osif_pause_complete_ind(struct wlan_objmgr_psoc *psoc,
  1151. struct twt_pause_dialog_complete_event_param *event)
  1152. {
  1153. return QDF_STATUS_SUCCESS;
  1154. }
  1155. static inline QDF_STATUS
  1156. mlme_twt_osif_resume_complete_ind(struct wlan_objmgr_psoc *psoc,
  1157. struct twt_resume_dialog_complete_event_param *event)
  1158. {
  1159. return QDF_STATUS_SUCCESS;
  1160. }
  1161. static inline QDF_STATUS
  1162. mlme_twt_osif_nudge_complete_ind(struct wlan_objmgr_psoc *psoc,
  1163. struct twt_nudge_dialog_complete_event_param *event)
  1164. {
  1165. return QDF_STATUS_SUCCESS;
  1166. }
  1167. static inline QDF_STATUS
  1168. mlme_twt_osif_notify_complete_ind(struct wlan_objmgr_psoc *psoc,
  1169. struct twt_notify_event_param *event)
  1170. {
  1171. return QDF_STATUS_SUCCESS;
  1172. }
  1173. static inline QDF_STATUS
  1174. mlme_twt_vdev_create_notification(struct wlan_objmgr_vdev *vdev)
  1175. {
  1176. return QDF_STATUS_SUCCESS;
  1177. }
  1178. static inline QDF_STATUS
  1179. mlme_twt_vdev_destroy_notification(struct wlan_objmgr_vdev *vdev)
  1180. {
  1181. return QDF_STATUS_SUCCESS;
  1182. }
  1183. #endif /* WLAN_SUPPORT_TWT && WLAN_TWT_CONV_SUPPORTED */
  1184. /**
  1185. * mlme_vdev_reconfig_timer_cb() - vdev ml reconfig timer callback
  1186. * @arg: timer argument
  1187. *
  1188. * Return: None
  1189. */
  1190. void mlme_vdev_reconfig_timer_cb(void *arg);
  1191. /**
  1192. * mlme_mlo_is_reconfig_reassoc_enable() - Get if reassoc on mlo reconfig link
  1193. * add is enable
  1194. * @psoc: Object manager psoc pointer
  1195. *
  1196. * Return: True if reassoc on mlo reconfig link add ie enable
  1197. */
  1198. bool mlme_mlo_is_reconfig_reassoc_enable(struct wlan_objmgr_psoc *psoc);
  1199. #endif