wlan_mlme_cmn.h 41 KB

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