xref: /wlan-dirver/qca-wifi-host-cmn/umac/mlo_mgr/inc/utils_mlo.h (revision 2f4b444fb7e689b83a4ab0e7b3b38f0bf4def8e0)
1 /*
2  * Copyright (c) 2021, The Linux Foundation. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for any
5  * purpose with or without fee is hereby granted, provided that the above
6  * copyright notice and this permission notice appear in all copies.
7  *
8  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 /*
18  * DOC: contains MLO manager containing util public api's
19  */
20 #ifndef _WLAN_UTILS_MLO_H_
21 #define _WLAN_UTILS_MLO_H_
22 
23 #include "wlan_mlo_mgr_public_structs.h"
24 #include <wlan_cm_ucfg_api.h>
25 #include <wlan_objmgr_vdev_obj.h>
26 #ifdef WLAN_FEATURE_11BE_MLO
27 
28 #define FC0_IEEE_MGMT_FRM 0x10
29 #define FC1_IEEE_MGMT_FRM 0x00
30 
31 /**
32  * util_gen_link_assoc_rsp - Generate link association response
33  *
34  * @frame: association response frame ptr
35  * @len: length of assoc rsp frame
36  * @link_addr: link mac addr
37  * @new_ie: Generated Link assoc rsp
38  *
39  * Return: true if vdev is a link vdev, false otherwise
40  */
41 QDF_STATUS
42 util_gen_link_assoc_rsp(uint8_t *frame, qdf_size_t len,
43 			struct qdf_mac_addr link_addr, uint8_t *new_ie);
44 
45 #else
46 static inline QDF_STATUS
47 util_gen_link_assoc_rsp(uint8_t *frame, qdf_size_t len,
48 			struct qdf_mac_addr link_addr, uint8_t *new_ie)
49 {
50 	return QDF_STATUS_E_NOSUPPORT;
51 }
52 #endif
53 #endif
54