wlan_mlme_cmn.h 39 KB

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