wlan_mlme_cmn.h 40 KB

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