xref: /wlan-driver/qca-wifi-host-cmn/umac/mlo_mgr/inc/wlan_mlo_mgr_peer.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name /*
2*5113495bSYour Name  * Copyright (c) 2021, The Linux Foundation. All rights reserved.
3*5113495bSYour Name  * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
4*5113495bSYour Name  *
5*5113495bSYour Name  * Permission to use, copy, modify, and/or distribute this software for any
6*5113495bSYour Name  * purpose with or without fee is hereby granted, provided that the above
7*5113495bSYour Name  * copyright notice and this permission notice appear in all copies.
8*5113495bSYour Name  *
9*5113495bSYour Name  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10*5113495bSYour Name  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11*5113495bSYour Name  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12*5113495bSYour Name  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13*5113495bSYour Name  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14*5113495bSYour Name  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15*5113495bSYour Name  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16*5113495bSYour Name  */
17*5113495bSYour Name 
18*5113495bSYour Name /*
19*5113495bSYour Name  * DOC: contains MLO manager public file containing peer functionality
20*5113495bSYour Name  */
21*5113495bSYour Name #ifndef _WLAN_MLO_MGR_PEER_H_
22*5113495bSYour Name #define _WLAN_MLO_MGR_PEER_H_
23*5113495bSYour Name 
24*5113495bSYour Name #include "wlan_objmgr_peer_obj.h"
25*5113495bSYour Name 
26*5113495bSYour Name #define WLAN_LINK_ID_INVALID    0xff
27*5113495bSYour Name #define WLAN_NUM_TWO_LINK_PSOC  2
28*5113495bSYour Name 
29*5113495bSYour Name /**
30*5113495bSYour Name  * mlo_peer_create - Initiatiate peer create on secondary link(s)
31*5113495bSYour Name  * by posting a message
32*5113495bSYour Name  *
33*5113495bSYour Name  * @vdev: pointer to vdev
34*5113495bSYour Name  * @peer: pointer to peer context
35*5113495bSYour Name  * @mlo_ie: MLO information element
36*5113495bSYour Name  * @aid: association ID
37*5113495bSYour Name  *
38*5113495bSYour Name  * Initiate the peer on the second link
39*5113495bSYour Name  *
40*5113495bSYour Name  * Return: none
41*5113495bSYour Name  */
42*5113495bSYour Name void mlo_peer_create(struct wlan_objmgr_vdev *vdev,
43*5113495bSYour Name 			       struct wlan_objmgr_peer *peer, uint8_t *mlo_ie,
44*5113495bSYour Name 			       uint8_t aid);
45*5113495bSYour Name 
46*5113495bSYour Name /**
47*5113495bSYour Name  * mlo_get_mlpeer - Get ML peer corresponds to the MLD address
48*5113495bSYour Name  * @ml_dev: MLO DEV object
49*5113495bSYour Name  * @ml_addr: MLD MAC address
50*5113495bSYour Name  *
51*5113495bSYour Name  * This API will be used to get the ML peer associated with MLD address.
52*5113495bSYour Name  * It will return Null if the peer does not exist for the given MLD address.
53*5113495bSYour Name  *
54*5113495bSYour Name  * Return: Pointer to the ML peer context structure
55*5113495bSYour Name  */
56*5113495bSYour Name struct wlan_mlo_peer_context *mlo_get_mlpeer(
57*5113495bSYour Name 				struct wlan_mlo_dev_context *ml_dev,
58*5113495bSYour Name 				const struct qdf_mac_addr *ml_addr);
59*5113495bSYour Name 
60*5113495bSYour Name /**
61*5113495bSYour Name  * mlo_peer_attach - Attaches the peer by updating the MLO peer context with
62*5113495bSYour Name  * the new link information
63*5113495bSYour Name  *
64*5113495bSYour Name  * @vdev: pointer to vdev
65*5113495bSYour Name  * @peer: pointer to peer context
66*5113495bSYour Name  *
67*5113495bSYour Name  * Return: none
68*5113495bSYour Name  */
69*5113495bSYour Name void mlo_peer_attach(struct wlan_objmgr_vdev *vdev,
70*5113495bSYour Name 		     struct wlan_objmgr_peer *peer);
71*5113495bSYour Name 
72*5113495bSYour Name /**
73*5113495bSYour Name  * mlo_peer_setup_failed_notify - Notify MLO manager that peer setup has failed
74*5113495bSYour Name  * and to cleanup by deleting the partner peers
75*5113495bSYour Name  *
76*5113495bSYour Name  * @vdev: pointer to vdev
77*5113495bSYour Name  *
78*5113495bSYour Name  * This API is called in scenarios where peer create or peer assoc fails
79*5113495bSYour Name  *
80*5113495bSYour Name  * Return: none
81*5113495bSYour Name  */
82*5113495bSYour Name void mlo_peer_setup_failed_notify(struct wlan_objmgr_vdev *vdev);
83*5113495bSYour Name 
84*5113495bSYour Name /**
85*5113495bSYour Name  * mlo_peer_disconnect_notify - Notify MLO manager that peer has disconnected
86*5113495bSYour Name  * and to clean up by deleting partner peers
87*5113495bSYour Name  *
88*5113495bSYour Name  * @peer: pointer to peer context
89*5113495bSYour Name  *
90*5113495bSYour Name  * Return: none
91*5113495bSYour Name  */
92*5113495bSYour Name void mlo_peer_disconnect_notify(struct wlan_objmgr_peer *peer);
93*5113495bSYour Name 
94*5113495bSYour Name /**
95*5113495bSYour Name  * wlan_peer_delete_complete - Notify MLO manager that peer delete is completed
96*5113495bSYour Name  * and to clean up by unlinking the peer object
97*5113495bSYour Name  *
98*5113495bSYour Name  * @peer: pointer to peer context
99*5113495bSYour Name  *
100*5113495bSYour Name  * Return: none
101*5113495bSYour Name  */
102*5113495bSYour Name void wlan_peer_delete_complete(struct wlan_objmgr_peer *peer);
103*5113495bSYour Name 
104*5113495bSYour Name /**
105*5113495bSYour Name  * mlo_peer_delete - Delete the peer object
106*5113495bSYour Name  *
107*5113495bSYour Name  * @peer: pointer to peer context
108*5113495bSYour Name  *
109*5113495bSYour Name  * Return: none
110*5113495bSYour Name  */
111*5113495bSYour Name void mlo_peer_delete(struct wlan_objmgr_peer *peer);
112*5113495bSYour Name 
113*5113495bSYour Name /**
114*5113495bSYour Name  * wlan_mlo_peer_delete - Initiate deletion of MLO peer
115*5113495bSYour Name  *
116*5113495bSYour Name  * @ml_peer: pointer to ML peer context
117*5113495bSYour Name  *
118*5113495bSYour Name  * Return: none
119*5113495bSYour Name  */
120*5113495bSYour Name void wlan_mlo_peer_delete(struct wlan_mlo_peer_context *ml_peer);
121*5113495bSYour Name 
122*5113495bSYour Name /**
123*5113495bSYour Name  * is_mlo_all_peer_links_deleted - Check if all the peer links are deleted
124*5113495bSYour Name  *
125*5113495bSYour Name  * Return: true if all the peer links are deleted, false otherwise
126*5113495bSYour Name  */
127*5113495bSYour Name bool is_mlo_all_peer_links_deleted(void);
128*5113495bSYour Name 
129*5113495bSYour Name /**
130*5113495bSYour Name  * wlan_mlo_peer_is_disconnect_progress() - MLO peer is in disconnect progress
131*5113495bSYour Name  * @ml_peer: MLO peer
132*5113495bSYour Name  *
133*5113495bSYour Name  * This function checks whether MLO Peer is in disconnect progress
134*5113495bSYour Name  *
135*5113495bSYour Name  * Return: SUCCESS if MLO Peer is in disconnect progress
136*5113495bSYour Name  */
137*5113495bSYour Name QDF_STATUS wlan_mlo_peer_is_disconnect_progress(
138*5113495bSYour Name 					struct wlan_mlo_peer_context *ml_peer);
139*5113495bSYour Name 
140*5113495bSYour Name /**
141*5113495bSYour Name  * wlan_mlo_peer_is_assoc_done() - MLO peer is Assoc complete
142*5113495bSYour Name  * @ml_peer: MLO peer
143*5113495bSYour Name  *
144*5113495bSYour Name  * This function checks whether MLO Peer's Assoc is completed
145*5113495bSYour Name  *
146*5113495bSYour Name  * Return: SUCCESS if MLO Peer Assoc is completed
147*5113495bSYour Name  */
148*5113495bSYour Name QDF_STATUS wlan_mlo_peer_is_assoc_done(struct wlan_mlo_peer_context *ml_peer);
149*5113495bSYour Name 
150*5113495bSYour Name /**
151*5113495bSYour Name  * wlan_mlo_peer_get_assoc_peer() - get assoc peer
152*5113495bSYour Name  * @ml_peer: MLO peer
153*5113495bSYour Name  *
154*5113495bSYour Name  * This function returns assoc peer of MLO peer
155*5113495bSYour Name  *
156*5113495bSYour Name  * Return: assoc peer, if it is found, otherwise NULL
157*5113495bSYour Name  */
158*5113495bSYour Name struct wlan_objmgr_peer *wlan_mlo_peer_get_assoc_peer(
159*5113495bSYour Name 					struct wlan_mlo_peer_context *ml_peer);
160*5113495bSYour Name 
161*5113495bSYour Name /**
162*5113495bSYour Name  * wlan_mlo_peer_get_primary_link_vdev() - Get primary link vdev
163*5113495bSYour Name  * @ml_peer: MLO peer
164*5113495bSYour Name  *
165*5113495bSYour Name  * This function iterates through ml_peer to find primary link
166*5113495bSYour Name  * and returns VDEV to which primary link is attached.
167*5113495bSYour Name  *
168*5113495bSYour Name  * Return: Pointer to vdev, if primary link is found else NULL
169*5113495bSYour Name  */
170*5113495bSYour Name struct wlan_objmgr_vdev *
171*5113495bSYour Name wlan_mlo_peer_get_primary_link_vdev(struct wlan_mlo_peer_context *ml_peer);
172*5113495bSYour Name 
173*5113495bSYour Name /**
174*5113495bSYour Name  * wlan_mlo_peer_get_bridge_peer() - get bridge peer
175*5113495bSYour Name  * @ml_peer: MLO peer
176*5113495bSYour Name  *
177*5113495bSYour Name  * This function returns bridge peer of MLO peer
178*5113495bSYour Name  *
179*5113495bSYour Name  * Return: bridge peer, if it is found, otherwise NULL
180*5113495bSYour Name  */
181*5113495bSYour Name struct wlan_objmgr_peer *wlan_mlo_peer_get_bridge_peer(
182*5113495bSYour Name 					struct wlan_mlo_peer_context *ml_peer);
183*5113495bSYour Name /**
184*5113495bSYour Name  * mlo_peer_is_assoc_peer() - check whether the peer is assoc peer
185*5113495bSYour Name  * @ml_peer: MLO peer
186*5113495bSYour Name  * @peer: Link peer
187*5113495bSYour Name  *
188*5113495bSYour Name  * This function checks whether the peer is assoc peer of MLO peer,
189*5113495bSYour Name  * This API doesn't have lock protection, caller needs to take the lock
190*5113495bSYour Name  *
191*5113495bSYour Name  * Return: true, if it is assoc peer
192*5113495bSYour Name  */
193*5113495bSYour Name bool mlo_peer_is_assoc_peer(struct wlan_mlo_peer_context *ml_peer,
194*5113495bSYour Name 			    struct wlan_objmgr_peer *peer);
195*5113495bSYour Name 
196*5113495bSYour Name /**
197*5113495bSYour Name  * wlan_mlo_peer_is_assoc_peer() - check whether the peer is assoc peer
198*5113495bSYour Name  * @ml_peer: MLO peer
199*5113495bSYour Name  * @peer: Link peer
200*5113495bSYour Name  *
201*5113495bSYour Name  * This function checks whether the peer is assoc peer of MLO peer
202*5113495bSYour Name  *
203*5113495bSYour Name  * Return: true, if it is assoc peer
204*5113495bSYour Name  */
205*5113495bSYour Name bool wlan_mlo_peer_is_assoc_peer(struct wlan_mlo_peer_context *ml_peer,
206*5113495bSYour Name 				 struct wlan_objmgr_peer *peer);
207*5113495bSYour Name 
208*5113495bSYour Name /**
209*5113495bSYour Name  * wlan_mlo_peer_is_link_peer() - check whether the peer is link peer
210*5113495bSYour Name  * @ml_peer: MLO peer
211*5113495bSYour Name  * @peer: Link peer
212*5113495bSYour Name  *
213*5113495bSYour Name  * This function checks whether the peer is link peer of MLO peer
214*5113495bSYour Name  *
215*5113495bSYour Name  * Return: true, if it is link peer
216*5113495bSYour Name  */
217*5113495bSYour Name bool wlan_mlo_peer_is_link_peer(struct wlan_mlo_peer_context *ml_peer,
218*5113495bSYour Name 				struct wlan_objmgr_peer *peer);
219*5113495bSYour Name 
220*5113495bSYour Name /**
221*5113495bSYour Name  * wlan_mlo_partner_peer_assoc_post() - Notify partner peer assoc
222*5113495bSYour Name  * @assoc_peer: Link peer
223*5113495bSYour Name  *
224*5113495bSYour Name  * This function notifies link peers to send peer assoc command to FW
225*5113495bSYour Name  *
226*5113495bSYour Name  * Return: void
227*5113495bSYour Name  */
228*5113495bSYour Name void wlan_mlo_partner_peer_assoc_post(struct wlan_objmgr_peer *assoc_peer);
229*5113495bSYour Name 
230*5113495bSYour Name /**
231*5113495bSYour Name  * wlan_mlo_link_peer_assoc_set() - Set Peer assoc sent flag
232*5113495bSYour Name  * @peer: Link peer
233*5113495bSYour Name  * @is_sent: indicates whether peer assoc is queued to FW
234*5113495bSYour Name  *
235*5113495bSYour Name  * This function updates that the Peer assoc commandis sent for the link peer
236*5113495bSYour Name  *
237*5113495bSYour Name  * Return: void
238*5113495bSYour Name  */
239*5113495bSYour Name void wlan_mlo_link_peer_assoc_set(struct wlan_objmgr_peer *peer, bool is_sent);
240*5113495bSYour Name 
241*5113495bSYour Name /**
242*5113495bSYour Name  * wlan_mlo_peer_get_del_hw_bitmap() - Gets peer del hw bitmap for link peer
243*5113495bSYour Name  * @peer: Link peer
244*5113495bSYour Name  * @hw_link_id_bitmap: WMI peer delete HW link bitmap
245*5113495bSYour Name  *
246*5113495bSYour Name  * This function gets hw bitmap for peer delete command, which includes
247*5113495bSYour Name  * hw link id of partner links for which peer assoc was not sent to FW
248*5113495bSYour Name  *
249*5113495bSYour Name  * Return: void
250*5113495bSYour Name  */
251*5113495bSYour Name void wlan_mlo_peer_get_del_hw_bitmap(struct wlan_objmgr_peer *peer,
252*5113495bSYour Name 				     uint32_t *hw_link_id_bitmap);
253*5113495bSYour Name 
254*5113495bSYour Name /**
255*5113495bSYour Name  * wlan_mlo_peer_deauth_init() - Initiate Deauth of MLO peer
256*5113495bSYour Name  * @ml_peer: MLO peer
257*5113495bSYour Name  * @src_peer: Source peer, if this pointer is valid, send deauth on other link
258*5113495bSYour Name  * @is_disassoc: to indicate, whether Disassoc to be sent instead of deauth
259*5113495bSYour Name  *
260*5113495bSYour Name  * This function initiates deauth on MLO peer and its links peers
261*5113495bSYour Name  *
262*5113495bSYour Name  * Return: void
263*5113495bSYour Name  */
264*5113495bSYour Name void
265*5113495bSYour Name wlan_mlo_peer_deauth_init(struct wlan_mlo_peer_context *ml_peer,
266*5113495bSYour Name 			  struct wlan_objmgr_peer *src_peer,
267*5113495bSYour Name 			  uint8_t is_disassoc);
268*5113495bSYour Name 
269*5113495bSYour Name /**
270*5113495bSYour Name  * wlan_mlo_partner_peer_create_failed_notify() - Notify peer creation fail
271*5113495bSYour Name  * @ml_peer: MLO peer
272*5113495bSYour Name  *
273*5113495bSYour Name  * This function notifies about link peer creation failure
274*5113495bSYour Name  *
275*5113495bSYour Name  * Return: void
276*5113495bSYour Name  */
277*5113495bSYour Name void wlan_mlo_partner_peer_create_failed_notify(
278*5113495bSYour Name 					struct wlan_mlo_peer_context *ml_peer);
279*5113495bSYour Name 
280*5113495bSYour Name /**
281*5113495bSYour Name  * wlan_mlo_partner_peer_disconnect_notify() - Notify peer disconnect
282*5113495bSYour Name  * @src_peer: Link peer
283*5113495bSYour Name  *
284*5113495bSYour Name  * This function notifies about disconnect is being initilated on link peer
285*5113495bSYour Name  *
286*5113495bSYour Name  * Return: void
287*5113495bSYour Name  */
288*5113495bSYour Name void wlan_mlo_partner_peer_disconnect_notify(struct wlan_objmgr_peer *src_peer);
289*5113495bSYour Name 
290*5113495bSYour Name /**
291*5113495bSYour Name  * wlan_mlo_peer_create() - MLO peer create
292*5113495bSYour Name  * @vdev: Link VDEV
293*5113495bSYour Name  * @link_peer: Link peer
294*5113495bSYour Name  * @ml_info: ML links info
295*5113495bSYour Name  * @frm_buf: Assoc req buffer
296*5113495bSYour Name  * @aid: AID, if already allocated
297*5113495bSYour Name  *
298*5113495bSYour Name  * This function creates MLO peer and notifies other partner VDEVs to create
299*5113495bSYour Name  * link peers
300*5113495bSYour Name  *
301*5113495bSYour Name  * Return: SUCCESS, if MLO peer is successfully created
302*5113495bSYour Name  */
303*5113495bSYour Name QDF_STATUS wlan_mlo_peer_create(struct wlan_objmgr_vdev *vdev,
304*5113495bSYour Name 				struct wlan_objmgr_peer *link_peer,
305*5113495bSYour Name 				struct mlo_partner_info *ml_info,
306*5113495bSYour Name 				qdf_nbuf_t frm_buf,
307*5113495bSYour Name 				uint16_t aid);
308*5113495bSYour Name 
309*5113495bSYour Name /**
310*5113495bSYour Name  * wlan_mlo_peer_asreq() - MLO peer process assoc req
311*5113495bSYour Name  * @vdev: Link VDEV
312*5113495bSYour Name  * @link_peer: Link peer
313*5113495bSYour Name  * @ml_info: ML links info
314*5113495bSYour Name  * @frm_buf: Assoc req buffer
315*5113495bSYour Name  *
316*5113495bSYour Name  * This function process assoc req on existing MLO peer and notifies other
317*5113495bSYour Name  * partner peers to process assoc request
318*5113495bSYour Name  *
319*5113495bSYour Name  * Return: SUCCESS, if MLO peer is successfully processed
320*5113495bSYour Name  */
321*5113495bSYour Name QDF_STATUS wlan_mlo_peer_asreq(struct wlan_objmgr_vdev *vdev,
322*5113495bSYour Name 			       struct wlan_objmgr_peer *link_peer,
323*5113495bSYour Name 			       struct mlo_partner_info *ml_info,
324*5113495bSYour Name 			       qdf_nbuf_t frm_buf);
325*5113495bSYour Name 
326*5113495bSYour Name /**
327*5113495bSYour Name  * mlo_peer_cleanup() - Free MLO peer
328*5113495bSYour Name  * @ml_peer: MLO peer
329*5113495bSYour Name  *
330*5113495bSYour Name  * This function frees MLO peer and resets MLO peer associations
331*5113495bSYour Name  * Note, this API is ref count protected, it should be always invoked
332*5113495bSYour Name  * from wlan_mlo_peer_release_ref()
333*5113495bSYour Name  *
334*5113495bSYour Name  * Return: void
335*5113495bSYour Name  */
336*5113495bSYour Name void mlo_peer_cleanup(struct wlan_mlo_peer_context *ml_peer);
337*5113495bSYour Name 
338*5113495bSYour Name /**
339*5113495bSYour Name  * wlan_mlo_peer_get_ref() - Get ref of MLO peer
340*5113495bSYour Name  * @ml_peer: MLO peer
341*5113495bSYour Name  *
342*5113495bSYour Name  * This function gets ref of MLO peer
343*5113495bSYour Name  *
344*5113495bSYour Name  * Return: void
345*5113495bSYour Name  */
wlan_mlo_peer_get_ref(struct wlan_mlo_peer_context * ml_peer)346*5113495bSYour Name static inline void wlan_mlo_peer_get_ref(struct wlan_mlo_peer_context *ml_peer)
347*5113495bSYour Name {
348*5113495bSYour Name 	qdf_atomic_inc(&ml_peer->ref_cnt);
349*5113495bSYour Name }
350*5113495bSYour Name 
351*5113495bSYour Name /**
352*5113495bSYour Name  * wlan_mlo_peer_release_ref() - Release ref of MLO peer
353*5113495bSYour Name  * @ml_peer: MLO peer
354*5113495bSYour Name  *
355*5113495bSYour Name  * This function releases ref of MLO peer, if ref is 0, invokes MLO peer free
356*5113495bSYour Name  *
357*5113495bSYour Name  * Return: void
358*5113495bSYour Name  */
wlan_mlo_peer_release_ref(struct wlan_mlo_peer_context * ml_peer)359*5113495bSYour Name static inline void wlan_mlo_peer_release_ref(
360*5113495bSYour Name 					struct wlan_mlo_peer_context *ml_peer)
361*5113495bSYour Name {
362*5113495bSYour Name 	if (qdf_atomic_dec_and_test(&ml_peer->ref_cnt))
363*5113495bSYour Name 		mlo_peer_cleanup(ml_peer);
364*5113495bSYour Name }
365*5113495bSYour Name 
366*5113495bSYour Name /**
367*5113495bSYour Name  * wlan_mlo_link_peer_attach() - MLO link peer attach
368*5113495bSYour Name  * @ml_peer: MLO peer
369*5113495bSYour Name  * @peer: Link peer
370*5113495bSYour Name  * @frm_buf: Assoc resp buffer of non-assoc link
371*5113495bSYour Name  *
372*5113495bSYour Name  * This function attaches link peer to MLO peer
373*5113495bSYour Name  *
374*5113495bSYour Name  * Return: SUCCESS, if peer is successfully attached to MLO peer
375*5113495bSYour Name  */
376*5113495bSYour Name QDF_STATUS wlan_mlo_link_peer_attach(struct wlan_mlo_peer_context *ml_peer,
377*5113495bSYour Name 				     struct wlan_objmgr_peer *peer,
378*5113495bSYour Name 				     qdf_nbuf_t frm_buf);
379*5113495bSYour Name 
380*5113495bSYour Name /**
381*5113495bSYour Name  * wlan_mlo_link_asresp_attach() - MLO link peer assoc resp attach
382*5113495bSYour Name  * @ml_peer: MLO peer
383*5113495bSYour Name  * @peer: Link peer
384*5113495bSYour Name  * @frm_buf: Assoc resp buffer of non-assoc link
385*5113495bSYour Name  *
386*5113495bSYour Name  * This function attaches assoc resp of link peer to MLO peer
387*5113495bSYour Name  *
388*5113495bSYour Name  * Return: SUCCESS, if peer is successfully attached to MLO peer
389*5113495bSYour Name  */
390*5113495bSYour Name QDF_STATUS wlan_mlo_link_asresp_attach(struct wlan_mlo_peer_context *ml_peer,
391*5113495bSYour Name 				       struct wlan_objmgr_peer *peer,
392*5113495bSYour Name 				       qdf_nbuf_t frm_buf);
393*5113495bSYour Name 
394*5113495bSYour Name /**
395*5113495bSYour Name  * wlan_mlo_link_peer_delete() - MLO link peer delete
396*5113495bSYour Name  * @peer: Link peer
397*5113495bSYour Name  *
398*5113495bSYour Name  * This function detaches link peer from MLO peer, if this peer is last link
399*5113495bSYour Name  * peer, then MLO peer gets deleted
400*5113495bSYour Name  *
401*5113495bSYour Name  * Return: SUCCESS, if peer is detached from MLO peer
402*5113495bSYour Name  */
403*5113495bSYour Name QDF_STATUS wlan_mlo_link_peer_delete(struct wlan_objmgr_peer *peer);
404*5113495bSYour Name 
405*5113495bSYour Name /**
406*5113495bSYour Name  * mlo_peer_get_link_peer_assoc_req_buf() - API to get link assoc req buffer
407*5113495bSYour Name  * @ml_peer: Object manager peer
408*5113495bSYour Name  * @link_ix: link id of vdev
409*5113495bSYour Name  *
410*5113495bSYour Name  * Return: assoc req buffer
411*5113495bSYour Name  */
412*5113495bSYour Name qdf_nbuf_t mlo_peer_get_link_peer_assoc_req_buf(
413*5113495bSYour Name 			struct wlan_mlo_peer_context *ml_peer,
414*5113495bSYour Name 			uint8_t link_ix);
415*5113495bSYour Name 
416*5113495bSYour Name /**
417*5113495bSYour Name  * mlo_peer_get_link_peer_assoc_resp_buf() - get MLO link peer assoc resp buf
418*5113495bSYour Name  * @ml_peer: MLO peer
419*5113495bSYour Name  * @link_ix: Link index of the link peer
420*5113495bSYour Name  *
421*5113495bSYour Name  * This function retrieves stored assoc resp buffer of link peer
422*5113495bSYour Name  *
423*5113495bSYour Name  * Return: resp_buf, if link_peer is available
424*5113495bSYour Name  *         NULL, if link_peer is not present
425*5113495bSYour Name  */
426*5113495bSYour Name qdf_nbuf_t mlo_peer_get_link_peer_assoc_resp_buf(
427*5113495bSYour Name 		struct wlan_mlo_peer_context *ml_peer,
428*5113495bSYour Name 		uint8_t link_ix);
429*5113495bSYour Name 
430*5113495bSYour Name /**
431*5113495bSYour Name  * wlan_mlo_peer_free_all_link_assoc_resp_buf() - Free all assoc resp buffers
432*5113495bSYour Name  * @peer: Link peer
433*5113495bSYour Name  *
434*5113495bSYour Name  * This function frees all assoc resp link buffers
435*5113495bSYour Name  *
436*5113495bSYour Name  * Return: void
437*5113495bSYour Name  */
438*5113495bSYour Name void wlan_mlo_peer_free_all_link_assoc_resp_buf(struct wlan_objmgr_peer *peer);
439*5113495bSYour Name 
440*5113495bSYour Name /**
441*5113495bSYour Name  * wlan_mlo_peer_get_links_info() - get MLO peer partner links info
442*5113495bSYour Name  * @peer: Link peer
443*5113495bSYour Name  * @ml_links: structure to be filled with partner link info
444*5113495bSYour Name  *
445*5113495bSYour Name  * This function retrieves partner link info of link peer such as hw link id,
446*5113495bSYour Name  * vdev id
447*5113495bSYour Name  *
448*5113495bSYour Name  * Return: void
449*5113495bSYour Name  */
450*5113495bSYour Name void wlan_mlo_peer_get_links_info(struct wlan_objmgr_peer *peer,
451*5113495bSYour Name 				  struct mlo_tgt_partner_info *ml_links);
452*5113495bSYour Name 
453*5113495bSYour Name /**
454*5113495bSYour Name  * wlan_mlo_peer_get_primary_peer_link_id() - get vdev link ID of primary peer
455*5113495bSYour Name  * @peer: Link peer
456*5113495bSYour Name  *
457*5113495bSYour Name  * This function checks for the peers and returns vdev link id of the primary
458*5113495bSYour Name  * peer.
459*5113495bSYour Name  *
460*5113495bSYour Name  * Return: link id of primary vdev
461*5113495bSYour Name  */
462*5113495bSYour Name uint8_t wlan_mlo_peer_get_primary_peer_link_id(struct wlan_objmgr_peer *peer);
463*5113495bSYour Name 
464*5113495bSYour Name /**
465*5113495bSYour Name  * wlan_mlo_peer_get_primary_peer_link_id_by_ml_peer() - get vdev link ID of
466*5113495bSYour Name  * primary peer using ml peer.
467*5113495bSYour Name  * @ml_peer: ML peer
468*5113495bSYour Name  *
469*5113495bSYour Name  * This function checks for the peers and returns vdev link id of the primary
470*5113495bSYour Name  * peer.
471*5113495bSYour Name  *
472*5113495bSYour Name  * Return: link id of primary vdev
473*5113495bSYour Name  */
474*5113495bSYour Name uint8_t wlan_mlo_peer_get_primary_peer_link_id_by_ml_peer(
475*5113495bSYour Name 				struct wlan_mlo_peer_context *ml_peer);
476*5113495bSYour Name 
477*5113495bSYour Name /**
478*5113495bSYour Name  * wlan_mlo_peer_get_partner_links_info() - get MLO peer partner links info
479*5113495bSYour Name  * @peer: Link peer
480*5113495bSYour Name  * @ml_links: structure to be filled with partner link info
481*5113495bSYour Name  *
482*5113495bSYour Name  * This function retrieves partner link info of link peer such as link id,
483*5113495bSYour Name  * mac address
484*5113495bSYour Name  *
485*5113495bSYour Name  * Return: void
486*5113495bSYour Name  */
487*5113495bSYour Name void wlan_mlo_peer_get_partner_links_info(struct wlan_objmgr_peer *peer,
488*5113495bSYour Name 					  struct mlo_partner_info *ml_links);
489*5113495bSYour Name 
490*5113495bSYour Name #ifdef WLAN_MLO_MULTI_CHIP
491*5113495bSYour Name /**
492*5113495bSYour Name  * wlan_mlo_peer_get_str_capability() - get STR capability of non-AP MLD
493*5113495bSYour Name  * @peer: Link peer
494*5113495bSYour Name  * @max_simult_links: Pointer to fill maximum simultaneous links
495*5113495bSYour Name  *
496*5113495bSYour Name  * This function retrieves maximum simultaneous links from connected ml peer,
497*5113495bSYour Name  *
498*5113495bSYour Name  * Return: void
499*5113495bSYour Name  */
500*5113495bSYour Name void wlan_mlo_peer_get_str_capability(struct wlan_objmgr_peer *peer,
501*5113495bSYour Name 				      uint8_t *max_simult_links);
502*5113495bSYour Name 
503*5113495bSYour Name /**
504*5113495bSYour Name  * wlan_mlo_peer_get_eml_capability() - get EML capability
505*5113495bSYour Name  * @peer: Link peer
506*5113495bSYour Name  * @is_emlsr_capable: Pointer to fill EMLSR capability
507*5113495bSYour Name  * @is_emlmr_capable: Pointer to fill EMLMR capability
508*5113495bSYour Name  *
509*5113495bSYour Name  * This function retrieves EML capability from connected ml peer,
510*5113495bSYour Name  *
511*5113495bSYour Name  * Return: void
512*5113495bSYour Name  */
513*5113495bSYour Name void wlan_mlo_peer_get_eml_capability(struct wlan_objmgr_peer *peer,
514*5113495bSYour Name 				      uint8_t *is_emlsr_capable,
515*5113495bSYour Name 				      uint8_t *is_emlmr_capable);
516*5113495bSYour Name #endif
517*5113495bSYour Name 
518*5113495bSYour Name /*
519*5113495bSYour Name  * APIs to operations on ML peer object
520*5113495bSYour Name  */
521*5113495bSYour Name typedef QDF_STATUS (*wlan_mlo_op_handler)(struct wlan_mlo_dev_context *ml_dev,
522*5113495bSYour Name 				    void *ml_peer,
523*5113495bSYour Name 				    void *arg);
524*5113495bSYour Name 
525*5113495bSYour Name /**
526*5113495bSYour Name  * wlan_mlo_iterate_ml_peerlist() - iterate through all ml peer objects
527*5113495bSYour Name  * @ml_dev: MLO DEV object
528*5113495bSYour Name  * @handler: the handler will be called for each ml peer
529*5113495bSYour Name  *            the handler should be implemented to perform required operation
530*5113495bSYour Name  * @arg:     arguments passed by caller
531*5113495bSYour Name  *
532*5113495bSYour Name  * API to be used for performing the operations on all ML PEER objects
533*5113495bSYour Name  *
534*5113495bSYour Name  * Return: SUCCESS/FAILURE
535*5113495bSYour Name  */
536*5113495bSYour Name QDF_STATUS wlan_mlo_iterate_ml_peerlist(struct wlan_mlo_dev_context *ml_dev,
537*5113495bSYour Name 					wlan_mlo_op_handler handler,
538*5113495bSYour Name 					void *arg);
539*5113495bSYour Name 
540*5113495bSYour Name /**
541*5113495bSYour Name  * wlan_mlo_get_mlpeer_by_linkmac() - find ML peer by Link MAC address
542*5113495bSYour Name  * @ml_dev: MLO DEV object
543*5113495bSYour Name  * @link_mac:  Link peer MAC address
544*5113495bSYour Name  *
545*5113495bSYour Name  * API to get ML peer using link MAC address
546*5113495bSYour Name  *
547*5113495bSYour Name  * Return: ML peer object, if it is found
548*5113495bSYour Name  *         otherwise, returns NULL
549*5113495bSYour Name  */
550*5113495bSYour Name struct wlan_mlo_peer_context *wlan_mlo_get_mlpeer_by_linkmac(
551*5113495bSYour Name 				struct wlan_mlo_dev_context *ml_dev,
552*5113495bSYour Name 				struct qdf_mac_addr *link_mac);
553*5113495bSYour Name 
554*5113495bSYour Name /**
555*5113495bSYour Name  * wlan_mlo_get_mlpeer_by_mld_mac() - find ML peer by MLD MAC address
556*5113495bSYour Name  * @ml_dev: MLO DEV object
557*5113495bSYour Name  * @mld_mac:  Peer MLD MAC address
558*5113495bSYour Name  *
559*5113495bSYour Name  * API to get ML peer using link MAC address
560*5113495bSYour Name  *
561*5113495bSYour Name  * Return: ML peer object, if it is found
562*5113495bSYour Name  *         otherwise, returns NULL
563*5113495bSYour Name  */
564*5113495bSYour Name struct wlan_mlo_peer_context *wlan_mlo_get_mlpeer_by_mld_mac(
565*5113495bSYour Name 				struct wlan_mlo_dev_context *ml_dev,
566*5113495bSYour Name 				struct qdf_mac_addr *mld_mac);
567*5113495bSYour Name 
568*5113495bSYour Name /**
569*5113495bSYour Name  * mlo_get_link_vdev_from_psoc_id() - Get link vdev from psoc id
570*5113495bSYour Name  * @ml_dev: MLO DEV object
571*5113495bSYour Name  * @psoc_id: psoc_id
572*5113495bSYour Name  * @get_bridge_vdev: Flag to indicate bridge vdev search is needed
573*5113495bSYour Name  *
574*5113495bSYour Name  * API to get vdev using psoc_id. When get_bridg_vdev flag is passed as true,
575*5113495bSYour Name  * this API searches vdev from bridge vdev list. If there are no bridge
576*5113495bSYour Name  * vdevs present, then it searches in actual vdev list. If flag is
577*5113495bSYour Name  * passed as false, vdev search will be directly from actual vdev list.
578*5113495bSYour Name  *
579*5113495bSYour Name  * Return: Pointer to vdev, if it is found
580*5113495bSYour Name  *         otherwise, returns NULL
581*5113495bSYour Name  */
582*5113495bSYour Name struct wlan_objmgr_vdev *mlo_get_link_vdev_from_psoc_id(
583*5113495bSYour Name 				struct wlan_mlo_dev_context *ml_dev,
584*5113495bSYour Name 				uint8_t psoc_id, bool get_bridge_vdev);
585*5113495bSYour Name 
586*5113495bSYour Name /**
587*5113495bSYour Name  * wlan_mlo_get_mlpeer_by_peer_mladdr() - Get ML peer from the list of MLD's
588*5113495bSYour Name  *                                        using MLD MAC address
589*5113495bSYour Name  *
590*5113495bSYour Name  * @mldaddr: MAC address of the ML peer
591*5113495bSYour Name  * @mldev: Update corresponding ML dev context in which peer is found
592*5113495bSYour Name  *
593*5113495bSYour Name  * Return: Pointer to mlo peer context
594*5113495bSYour Name  */
595*5113495bSYour Name struct wlan_mlo_peer_context
596*5113495bSYour Name *wlan_mlo_get_mlpeer_by_peer_mladdr(struct qdf_mac_addr *mldaddr,
597*5113495bSYour Name 				    struct wlan_mlo_dev_context **mldev);
598*5113495bSYour Name 
599*5113495bSYour Name /**
600*5113495bSYour Name  * wlan_mlo_get_mlpeer_by_aid() - find ML peer by AID
601*5113495bSYour Name  * @ml_dev: MLO DEV object
602*5113495bSYour Name  * @assoc_id:  AID
603*5113495bSYour Name  *
604*5113495bSYour Name  * API to get ML peer using AID
605*5113495bSYour Name  *
606*5113495bSYour Name  * Return: ML peer object, if it is found
607*5113495bSYour Name  *         otherwise, returns NULL
608*5113495bSYour Name  */
609*5113495bSYour Name struct wlan_mlo_peer_context *wlan_mlo_get_mlpeer_by_aid(
610*5113495bSYour Name 				struct wlan_mlo_dev_context *ml_dev,
611*5113495bSYour Name 				uint16_t assoc_id);
612*5113495bSYour Name 
613*5113495bSYour Name /**
614*5113495bSYour Name  * wlan_mlo_get_mlpeer_by_ml_peerid() - find ML peer by ML peer id
615*5113495bSYour Name  * @ml_dev: MLO DEV object
616*5113495bSYour Name  * @ml_peerid:  ML Peer ID
617*5113495bSYour Name  *
618*5113495bSYour Name  * API to get ML peer using ML peer id
619*5113495bSYour Name  *
620*5113495bSYour Name  * Return: ML peer object, if it is found
621*5113495bSYour Name  *         otherwise, returns NULL
622*5113495bSYour Name  */
623*5113495bSYour Name struct wlan_mlo_peer_context *wlan_mlo_get_mlpeer_by_ml_peerid(
624*5113495bSYour Name 				struct wlan_mlo_dev_context *ml_dev,
625*5113495bSYour Name 				uint16_t ml_peerid);
626*5113495bSYour Name 
627*5113495bSYour Name /**
628*5113495bSYour Name  * wlan_mlo_get_mlpeer() - find ML peer by MLD MAC address
629*5113495bSYour Name  * @ml_dev: MLO DEV object
630*5113495bSYour Name  * @ml_addr: MLO MAC address
631*5113495bSYour Name  *
632*5113495bSYour Name  * API to get ML peer using MLO MAC address
633*5113495bSYour Name  *
634*5113495bSYour Name  * Return: ML peer object, if it is found
635*5113495bSYour Name  *         otherwise, returns NULL
636*5113495bSYour Name  */
637*5113495bSYour Name struct wlan_mlo_peer_context *wlan_mlo_get_mlpeer(
638*5113495bSYour Name 				struct wlan_mlo_dev_context *ml_dev,
639*5113495bSYour Name 				struct qdf_mac_addr *ml_addr);
640*5113495bSYour Name 
641*5113495bSYour Name /**
642*5113495bSYour Name  * mlo_dev_mlpeer_attach() - Add ML PEER to ML peer list
643*5113495bSYour Name  * @ml_dev: MLO DEV object
644*5113495bSYour Name  * @ml_peer: ML peer
645*5113495bSYour Name  *
646*5113495bSYour Name  * API to attach ML PEER to MLD PEER table
647*5113495bSYour Name  *
648*5113495bSYour Name  * Return: SUCCESS, if it attached successfully
649*5113495bSYour Name  *         otherwise, returns FAILURE
650*5113495bSYour Name  */
651*5113495bSYour Name QDF_STATUS mlo_dev_mlpeer_attach(struct wlan_mlo_dev_context *ml_dev,
652*5113495bSYour Name 				 struct wlan_mlo_peer_context *ml_peer);
653*5113495bSYour Name 
654*5113495bSYour Name /**
655*5113495bSYour Name  * mlo_dev_mlpeer_detach() - Delete ML PEER from ML peer list
656*5113495bSYour Name  * @ml_dev: MLO DEV object
657*5113495bSYour Name  * @ml_peer: ML peer
658*5113495bSYour Name  *
659*5113495bSYour Name  * API to detach ML PEER from MLD PEER table
660*5113495bSYour Name  *
661*5113495bSYour Name  * Return: SUCCESS, if it detached successfully
662*5113495bSYour Name  *         otherwise, returns FAILURE
663*5113495bSYour Name  */
664*5113495bSYour Name QDF_STATUS mlo_dev_mlpeer_detach(struct wlan_mlo_dev_context *ml_dev,
665*5113495bSYour Name 				 struct wlan_mlo_peer_context *ml_peer);
666*5113495bSYour Name 
667*5113495bSYour Name /**
668*5113495bSYour Name  * mlo_dev_mlpeer_list_init() - Initialize ML peer list
669*5113495bSYour Name  * @ml_dev: MLO DEV object
670*5113495bSYour Name  *
671*5113495bSYour Name  * API to initialize MLO peer list
672*5113495bSYour Name  *
673*5113495bSYour Name  * Return: SUCCESS, if initialized successfully
674*5113495bSYour Name  */
675*5113495bSYour Name QDF_STATUS mlo_dev_mlpeer_list_init(struct wlan_mlo_dev_context *ml_dev);
676*5113495bSYour Name 
677*5113495bSYour Name /**
678*5113495bSYour Name  * mlo_dev_mlpeer_list_deinit() - destroys ML peer list
679*5113495bSYour Name  * @ml_dev: MLO DEV object
680*5113495bSYour Name  *
681*5113495bSYour Name  * API to destroys MLO peer list
682*5113495bSYour Name  *
683*5113495bSYour Name  * Return: SUCCESS, if initialized successfully
684*5113495bSYour Name  */
685*5113495bSYour Name QDF_STATUS mlo_dev_mlpeer_list_deinit(struct wlan_mlo_dev_context *ml_dev);
686*5113495bSYour Name 
687*5113495bSYour Name /**
688*5113495bSYour Name  * wlan_peer_is_mlo() - check whether peer is MLO link peer
689*5113495bSYour Name  * @peer: link peer object
690*5113495bSYour Name  *
691*5113495bSYour Name  * API to check link peer is part of MLO peer or not
692*5113495bSYour Name  *
693*5113495bSYour Name  * Return: true if it MLO peer
694*5113495bSYour Name  *         false, if it is not MLO peer
695*5113495bSYour Name  */
wlan_peer_is_mlo(struct wlan_objmgr_peer * peer)696*5113495bSYour Name static inline uint8_t wlan_peer_is_mlo(struct wlan_objmgr_peer *peer)
697*5113495bSYour Name {
698*5113495bSYour Name 	return wlan_peer_mlme_flag_ext_get(peer, WLAN_PEER_FEXT_MLO);
699*5113495bSYour Name }
700*5113495bSYour Name 
701*5113495bSYour Name /**
702*5113495bSYour Name  * wlan_peer_set_mlo() - Set peer as MLO link peer
703*5113495bSYour Name  * @peer: link peer object
704*5113495bSYour Name  *
705*5113495bSYour Name  * API to set MLO peer flag in link peer is part of MLO peer
706*5113495bSYour Name  *
707*5113495bSYour Name  * Return: void
708*5113495bSYour Name  */
wlan_peer_set_mlo(struct wlan_objmgr_peer * peer)709*5113495bSYour Name static inline void wlan_peer_set_mlo(struct wlan_objmgr_peer *peer)
710*5113495bSYour Name {
711*5113495bSYour Name 	return wlan_peer_mlme_flag_ext_set(peer, WLAN_PEER_FEXT_MLO);
712*5113495bSYour Name }
713*5113495bSYour Name 
714*5113495bSYour Name /**
715*5113495bSYour Name  * wlan_peer_clear_mlo() - clear peer as MLO link peer
716*5113495bSYour Name  * @peer: link peer object
717*5113495bSYour Name  *
718*5113495bSYour Name  * API to clear MLO peer flag in link peer
719*5113495bSYour Name  *
720*5113495bSYour Name  * Return: void
721*5113495bSYour Name  */
wlan_peer_clear_mlo(struct wlan_objmgr_peer * peer)722*5113495bSYour Name static inline void wlan_peer_clear_mlo(struct wlan_objmgr_peer *peer)
723*5113495bSYour Name {
724*5113495bSYour Name 	return wlan_peer_mlme_flag_ext_clear(peer, WLAN_PEER_FEXT_MLO);
725*5113495bSYour Name }
726*5113495bSYour Name 
727*5113495bSYour Name #if defined(MESH_MODE_SUPPORT) && defined(WLAN_FEATURE_11BE_MLO)
728*5113495bSYour Name /**
729*5113495bSYour Name  * wlan_mlo_peer_is_mesh() - Check if ml_peer is configured to operate as MESH
730*5113495bSYour Name  * @ml_peer: MLO peer
731*5113495bSYour Name  *
732*5113495bSYour Name  * Return: TRUE if ml peer is configured as MESH
733*5113495bSYour Name  */
734*5113495bSYour Name bool wlan_mlo_peer_is_mesh(struct wlan_mlo_peer_context *ml_peer);
735*5113495bSYour Name #else
736*5113495bSYour Name static inline
wlan_mlo_peer_is_mesh(struct wlan_mlo_peer_context * ml_peer)737*5113495bSYour Name bool wlan_mlo_peer_is_mesh(struct wlan_mlo_peer_context *ml_peer)
738*5113495bSYour Name {
739*5113495bSYour Name 	return false;
740*5113495bSYour Name }
741*5113495bSYour Name #endif
742*5113495bSYour Name 
743*5113495bSYour Name #ifdef UMAC_SUPPORT_MLNAWDS
744*5113495bSYour Name /**
745*5113495bSYour Name  * wlan_mlo_peer_is_nawds() - Check if ml_peer is configured to operate as NAWDS
746*5113495bSYour Name  * @ml_peer: MLO peer
747*5113495bSYour Name  *
748*5113495bSYour Name  * Return TRUE if ml peer is configured as NAWDS
749*5113495bSYour Name  */
750*5113495bSYour Name bool wlan_mlo_peer_is_nawds(struct wlan_mlo_peer_context *ml_peer);
751*5113495bSYour Name #else
752*5113495bSYour Name static inline
wlan_mlo_peer_is_nawds(struct wlan_mlo_peer_context * ml_peer)753*5113495bSYour Name bool wlan_mlo_peer_is_nawds(struct wlan_mlo_peer_context *ml_peer)
754*5113495bSYour Name {
755*5113495bSYour Name 	return false;
756*5113495bSYour Name }
757*5113495bSYour Name #endif
758*5113495bSYour Name #ifdef UMAC_MLO_AUTH_DEFER
759*5113495bSYour Name /**
760*5113495bSYour Name  * mlo_peer_link_auth_defer() - Auth request defer for MLO peer
761*5113495bSYour Name  * @ml_peer: ML peer
762*5113495bSYour Name  * @link_mac:  Link peer MAC address
763*5113495bSYour Name  * @auth_params: Defer Auth param
764*5113495bSYour Name  *
765*5113495bSYour Name  * This function saves Auth request params in MLO peer
766*5113495bSYour Name  *
767*5113495bSYour Name  * Return: SUCCESS if MAC address matches one of the link peers
768*5113495bSYour Name  *         FAILURE, if MAC address doesn't match
769*5113495bSYour Name  */
770*5113495bSYour Name QDF_STATUS mlo_peer_link_auth_defer(struct wlan_mlo_peer_context *ml_peer,
771*5113495bSYour Name 				    struct qdf_mac_addr *link_mac,
772*5113495bSYour Name 				    struct mlpeer_auth_params *auth_params);
773*5113495bSYour Name 
774*5113495bSYour Name /**
775*5113495bSYour Name  * mlo_peer_free_auth_param() - Free deferred Auth request params
776*5113495bSYour Name  * @auth_params: Defer Auth param
777*5113495bSYour Name  *
778*5113495bSYour Name  * This function frees Auth request params
779*5113495bSYour Name  *
780*5113495bSYour Name  * Return: void
781*5113495bSYour Name  */
782*5113495bSYour Name void mlo_peer_free_auth_param(struct mlpeer_auth_params *auth_params);
783*5113495bSYour Name #else
784*5113495bSYour Name static inline void
mlo_peer_free_auth_param(struct mlpeer_auth_params * auth_params)785*5113495bSYour Name mlo_peer_free_auth_param(struct mlpeer_auth_params *auth_params)
786*5113495bSYour Name {
787*5113495bSYour Name }
788*5113495bSYour Name #endif
789*5113495bSYour Name 
790*5113495bSYour Name /**
791*5113495bSYour Name  * wlan_mlo_partner_peer_delete_is_allowed() - Checks MLO peer delete is allowed
792*5113495bSYour Name  * @src_peer: Link peer
793*5113495bSYour Name  *
794*5113495bSYour Name  * This function checks whether MLO peer can be deleted along with link peer
795*5113495bSYour Name  * delete in link removal cases
796*5113495bSYour Name  *
797*5113495bSYour Name  * Return: true, if MLO peer can be deleted
798*5113495bSYour Name  */
799*5113495bSYour Name bool wlan_mlo_partner_peer_delete_is_allowed(struct wlan_objmgr_peer *src_peer);
800*5113495bSYour Name 
801*5113495bSYour Name /**
802*5113495bSYour Name  * wlan_mlo_validate_reassocreq() - Checks MLO peer reassoc processing
803*5113495bSYour Name  * @ml_peer: ML peer
804*5113495bSYour Name  *
805*5113495bSYour Name  * This function checks whether Reassoc from MLO peer is processed successfully
806*5113495bSYour Name  *
807*5113495bSYour Name  * Return: SUCCESS, if Reassoc processing is done
808*5113495bSYour Name  */
809*5113495bSYour Name QDF_STATUS wlan_mlo_validate_reassocreq(struct wlan_mlo_peer_context *ml_peer);
810*5113495bSYour Name 
811*5113495bSYour Name #ifdef QCA_SUPPORT_PRIMARY_LINK_MIGRATE
812*5113495bSYour Name /**
813*5113495bSYour Name  * wlan_objmgr_mlo_update_primary_info() - Update is_primary flag
814*5113495bSYour Name  * @peer: new primary link peer object
815*5113495bSYour Name  *
816*5113495bSYour Name  * API to update is_primary flag in peer list
817*5113495bSYour Name  *
818*5113495bSYour Name  * Return: void
819*5113495bSYour Name  */
820*5113495bSYour Name void wlan_objmgr_mlo_update_primary_info(struct wlan_objmgr_peer *peer);
821*5113495bSYour Name #endif
822*5113495bSYour Name 
823*5113495bSYour Name /**
824*5113495bSYour Name  * wlan_mld_get_best_primary_umac_w_rssi() - API to get primary umac using rssi
825*5113495bSYour Name  * @ml_peer: ml peer object
826*5113495bSYour Name  * @link_vdevs: list of vdevs from which new primary link is to be selected
827*5113495bSYour Name  * @allow_all_links: Flag to allow all links to be able to get selected as
828*5113495bSYour Name  * primary. This flag will be used to override primary_umac_skip ini
829*5113495bSYour Name  *
830*5113495bSYour Name  * API to get primary umac using rssi
831*5113495bSYour Name  *
832*5113495bSYour Name  * Return: primary umac psoc id
833*5113495bSYour Name  */
834*5113495bSYour Name uint8_t
835*5113495bSYour Name wlan_mld_get_best_primary_umac_w_rssi(struct wlan_mlo_peer_context *ml_peer,
836*5113495bSYour Name 				      struct wlan_objmgr_vdev *link_vdevs[],
837*5113495bSYour Name 				      bool allow_all_links);
838*5113495bSYour Name 
839*5113495bSYour Name /**
840*5113495bSYour Name  * wlan_mlo_wsi_link_info_send_cmd() - Send WSI stats to FW
841*5113495bSYour Name  *
842*5113495bSYour Name  * API to send WMI commands for all radios of all PSOCs
843*5113495bSYour Name  *
844*5113495bSYour Name  * Return: SUCCESS, on sending WMI commands
845*5113495bSYour Name  */
846*5113495bSYour Name QDF_STATUS wlan_mlo_wsi_link_info_send_cmd(void);
847*5113495bSYour Name 
848*5113495bSYour Name /**
849*5113495bSYour Name  * wlan_mlo_wsi_stats_allow_cmd() - Allow WSI stats to FW
850*5113495bSYour Name  *
851*5113495bSYour Name  * API to allows WSI stats WMI commands for all radios of all PSOCs
852*5113495bSYour Name  *
853*5113495bSYour Name  * Return: void
854*5113495bSYour Name  */
855*5113495bSYour Name void wlan_mlo_wsi_stats_allow_cmd(void);
856*5113495bSYour Name 
857*5113495bSYour Name /**
858*5113495bSYour Name  * wlan_mlo_wsi_stats_block_cmd() - Block WSI stats to FW
859*5113495bSYour Name  *
860*5113495bSYour Name  * API to block WST stats WMI commands for all radios of all PSOCs
861*5113495bSYour Name  *
862*5113495bSYour Name  * Return: void
863*5113495bSYour Name  */
864*5113495bSYour Name void wlan_mlo_wsi_stats_block_cmd(void);
865*5113495bSYour Name /**
866*5113495bSYour Name  * wlan_mlo_peer_wsi_link_add() - Add peer to WSI info list
867*5113495bSYour Name  * @ml_peer: ML peer context
868*5113495bSYour Name  *
869*5113495bSYour Name  * API to add peer to WSI link stats
870*5113495bSYour Name  *
871*5113495bSYour Name  * Return: SUCCESS, if peer details added to WSI link stats
872*5113495bSYour Name  */
873*5113495bSYour Name QDF_STATUS wlan_mlo_peer_wsi_link_add(struct wlan_mlo_peer_context *ml_peer);
874*5113495bSYour Name 
875*5113495bSYour Name /**
876*5113495bSYour Name  * wlan_mlo_peer_wsi_link_delete() - Delete peer to WSI info list
877*5113495bSYour Name  * @ml_peer: ML peer context
878*5113495bSYour Name  *
879*5113495bSYour Name  * API to Delete peer from WSI link stats
880*5113495bSYour Name  *
881*5113495bSYour Name  * Return: SUCCESS, if peer details deleted from WSI link stats
882*5113495bSYour Name  */
883*5113495bSYour Name QDF_STATUS wlan_mlo_peer_wsi_link_delete(struct wlan_mlo_peer_context *ml_peer);
884*5113495bSYour Name 
885*5113495bSYour Name /**
886*5113495bSYour Name  * wlan_mlo_ap_vdev_add_assoc_entry() - Add mlo ap vdev assoc entry
887*5113495bSYour Name  * @vdev: vdev object
888*5113495bSYour Name  * @mld_addr: MLD mac address
889*5113495bSYour Name  *
890*5113495bSYour Name  * API to add mlo ap vdev in assoc list
891*5113495bSYour Name  *
892*5113495bSYour Name  * Return: void
893*5113495bSYour Name  */
894*5113495bSYour Name void wlan_mlo_ap_vdev_add_assoc_entry(struct wlan_objmgr_vdev *vdev,
895*5113495bSYour Name 				      struct qdf_mac_addr *mld_addr);
896*5113495bSYour Name 
897*5113495bSYour Name /**
898*5113495bSYour Name  * wlan_mlo_ap_vdev_del_assoc_entry() - Delete mlo ap vdev assoc entry
899*5113495bSYour Name  * @vdev: vdev object
900*5113495bSYour Name  * @mld_addr: MLD mac address
901*5113495bSYour Name  *
902*5113495bSYour Name  * API to delete mlo ap vdev in assoc list
903*5113495bSYour Name  *
904*5113495bSYour Name  * Return: void
905*5113495bSYour Name  */
906*5113495bSYour Name void wlan_mlo_ap_vdev_del_assoc_entry(struct wlan_objmgr_vdev *vdev,
907*5113495bSYour Name 				      struct qdf_mac_addr *mld_addr);
908*5113495bSYour Name 
909*5113495bSYour Name /**
910*5113495bSYour Name  * wlan_mlo_ap_vdev_find_assoc_entry() - Find mlo ap vdev assoc entry
911*5113495bSYour Name  * @vdev: vdev object
912*5113495bSYour Name  * @mld_addr: MLD mac address
913*5113495bSYour Name  *
914*5113495bSYour Name  * API to find mlo ap vdev in assoc list
915*5113495bSYour Name  *
916*5113495bSYour Name  * Return: sta entry
917*5113495bSYour Name  */
918*5113495bSYour Name struct wlan_mlo_sta_entry *
919*5113495bSYour Name wlan_mlo_ap_vdev_find_assoc_entry(struct wlan_objmgr_vdev *vdev,
920*5113495bSYour Name 				  struct qdf_mac_addr *mld_addr);
921*5113495bSYour Name #endif
922