wlan_mlme_cmn.h 41 KB

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