wlan_mlme_cmn.h 42 KB

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