xref: /wlan-driver/qcacld-3.0/core/sme/inc/csr_support.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name /*
2*5113495bSYour Name  * Copyright (c) 2011-2021 The Linux Foundation. All rights reserved.
3*5113495bSYour Name  * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
4*5113495bSYour Name  *
5*5113495bSYour Name  * Permission to use, copy, modify, and/or distribute this software for
6*5113495bSYour Name  * any purpose with or without fee is hereby granted, provided that the
7*5113495bSYour Name  * above copyright notice and this permission notice appear in all
8*5113495bSYour Name  * copies.
9*5113495bSYour Name  *
10*5113495bSYour Name  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11*5113495bSYour Name  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12*5113495bSYour Name  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13*5113495bSYour Name  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14*5113495bSYour Name  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15*5113495bSYour Name  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16*5113495bSYour Name  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17*5113495bSYour Name  * PERFORMANCE OF THIS SOFTWARE.
18*5113495bSYour Name  */
19*5113495bSYour Name 
20*5113495bSYour Name /**
21*5113495bSYour Name  * \file csr_support.h
22*5113495bSYour Name  *
23*5113495bSYour Name  * Exports and types for the Common Scan and Roaming supporting interfaces.
24*5113495bSYour Name  */
25*5113495bSYour Name #ifndef CSR_SUPPORT_H__
26*5113495bSYour Name #define CSR_SUPPORT_H__
27*5113495bSYour Name 
28*5113495bSYour Name #include "csr_link_list.h"
29*5113495bSYour Name #include "csr_api.h"
30*5113495bSYour Name #include "cds_reg_service.h"
31*5113495bSYour Name 
32*5113495bSYour Name #ifdef FEATURE_WLAN_WAPI
33*5113495bSYour Name #define CSR_WAPI_OUI_SIZE              (4)
34*5113495bSYour Name #endif /* FEATURE_WLAN_WAPI */
35*5113495bSYour Name 
36*5113495bSYour Name #define CSR_RSN_OUI_SIZE              (4)
37*5113495bSYour Name #define CSR_WPA_OUI_SIZE              (4)
38*5113495bSYour Name 
39*5113495bSYour Name #define CSR_DOT11_SUPPORTED_RATES_MAX (12)
40*5113495bSYour Name #define CSR_DOT11_EXTENDED_SUPPORTED_RATES_MAX (8)
41*5113495bSYour Name 
42*5113495bSYour Name #define CSR_DOT11_BASIC_RATE_MASK    WLAN_DOT11_BASIC_RATE_MASK
43*5113495bSYour Name 
44*5113495bSYour Name /**
45*5113495bSYour Name  * struct csr_timer_info - CSR-specific timer context
46*5113495bSYour Name  * @mac: Global MAC context associated with the timer
47*5113495bSYour Name  * @vdev_id: Session associated with the timer
48*5113495bSYour Name  */
49*5113495bSYour Name struct csr_timer_info {
50*5113495bSYour Name 	struct mac_context *mac;
51*5113495bSYour Name 	uint8_t vdev_id;
52*5113495bSYour Name };
53*5113495bSYour Name 
54*5113495bSYour Name #define CSR_IS_QOS_BSS(pIes)  \
55*5113495bSYour Name 		((pIes)->WMMParams.present || (pIes)->WMMInfoAp.present)
56*5113495bSYour Name 
57*5113495bSYour Name uint32_t csr_get_frag_thresh(struct mac_context *mac_ctx);
58*5113495bSYour Name uint32_t csr_get_rts_thresh(struct mac_context *mac_ctx);
59*5113495bSYour Name 
60*5113495bSYour Name bool csr_is_bssid_match(struct qdf_mac_addr *pProfBssid,
61*5113495bSYour Name 			struct qdf_mac_addr *BssBssid);
62*5113495bSYour Name /*
63*5113495bSYour Name  * This function will allocate memory for the parsed IEs to the caller.
64*5113495bSYour Name  * Caller must free the memory. after it is done with the data only if
65*5113495bSYour Name  * this function succeeds
66*5113495bSYour Name  */
67*5113495bSYour Name QDF_STATUS csr_get_parsed_bss_description_ies(struct mac_context *mac_ctx,
68*5113495bSYour Name 					      struct bss_description *bss_desc,
69*5113495bSYour Name 					      tDot11fBeaconIEs **ppIEStruct);
70*5113495bSYour Name 
71*5113495bSYour Name /**
72*5113495bSYour Name  * csr_is_auth_type_ese() - Checks whether Auth type is ESE or not
73*5113495bSYour Name  * @AuthType: Authentication type
74*5113495bSYour Name  *
75*5113495bSYour Name  * Return: true, if auth type is ese, false otherwise
76*5113495bSYour Name  */
77*5113495bSYour Name bool csr_is_auth_type_ese(enum csr_akm_type AuthType);
78*5113495bSYour Name 
79*5113495bSYour Name #endif
80