xref: /wlan-driver/qcacld-3.0/core/mac/src/pe/include/sch_global.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2013-2014, 2017-2019, 2021 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for
6  * any purpose with or without fee is hereby granted, provided that the
7  * above copyright notice and this permission notice appear in all
8  * copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  * PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 /*
21  *
22  *
23  * Author:      Sandesh Goel
24  * Date:        02/25/02
25  * History:-
26  * Date            Modified by    Modification Information
27  * --------------------------------------------------------------------
28  *
29  */
30 
31 #ifndef __SCH_GLOBAL_H__
32 #define __SCH_GLOBAL_H__
33 
34 #include "sir_mac_prop_exts.h"
35 #include "lim_global.h"
36 
37 #include "parser_api.h"
38 
39 /* ----------------------- Beacon processing ------------------------ */
40 
41 /* / Beacon structure */
42 #define tSchBeaconStruct tSirProbeRespBeacon
43 #define tpSchBeaconStruct struct sSirProbeRespBeacon *
44 
45 #ifdef WLAN_FEATURE_11BE_MLO
46 /**
47  * struct ml_sch_partner_info - Partner link information
48  * @vdev_id: Vdev id
49  * @beacon_interval: Beacon interval
50  * @bcn_csa_cnt_ofst: CSA switch count offset in beacon frame
51  * @bcn_ext_csa_cnt_ofst: ECSA switch count offset in beacon frame
52  * @link_info_sta_prof_ofst: offset sta profile in link info.
53  *                           If per sta profile exists, this value is non zero
54  * @prb_csa_cnt_ofst: CSA switch count offset in probe frame
55  * @prb_ext_csa_cnt_ofst: ECSA switch count offset in probe frame
56  * @csa_ext_csa_exist: csa or ext csa exists
57  */
58 struct ml_sch_partner_info {
59 	uint32_t vdev_id;
60 	uint32_t beacon_interval;
61 	uint32_t bcn_csa_cnt_ofst;
62 	uint32_t bcn_ext_csa_cnt_ofst;
63 	uint16_t link_info_sta_prof_ofst;
64 	uint32_t prb_csa_cnt_ofst;
65 	uint32_t prb_ext_csa_cnt_ofst;
66 	bool csa_ext_csa_exist;
67 };
68 
69 /**
70  * struct mlo_sch_partner_links - ML partner links
71  * @num_links: Number of links
72  * @mlo_ie_link_info_ofst: offset of link info in mlo IE
73  * @partner_info: Partner link info
74  */
75 struct mlo_sch_partner_links {
76 	uint8_t num_links;
77 	uint16_t mlo_ie_link_info_ofst;
78 	struct ml_sch_partner_info partner_info[WLAN_UMAC_MLO_MAX_VDEVS];
79 };
80 #endif
81 
82 /**
83  * struct sch_context - SCH global context
84  * @beacon_interval: global beacon interval
85  * @beacon_changed: flag to indicate that beacon template has been updated
86  * @p2p_ie_offset: P2P IE offset
87  * @csa_count_offset: CSA Switch Count Offset to be sent to FW
88  * @ecsa_count_offset: ECSA Switch Count Offset to be sent to FW
89  */
90 struct sch_context {
91 	uint16_t beacon_interval;
92 	uint8_t beacon_changed;
93 	uint16_t p2p_ie_offset;
94 	uint32_t csa_count_offset;
95 	uint32_t ecsa_count_offset;
96 #ifdef WLAN_FEATURE_11BE_MLO
97 	struct mlo_sch_partner_links sch_mlo_partner;
98 #endif
99 };
100 
101 #endif
102