xref: /wlan-driver/qcacld-3.0/core/sme/inc/sme_qos_internal.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2014-2019, 2021 The Linux Foundation. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for
5  * any purpose with or without fee is hereby granted, provided that the
6  * above copyright notice and this permission notice appear in all
7  * copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16  * PERFORMANCE OF THIS SOFTWARE.
17  */
18 
19 #if !defined(__SMEQOSINTERNAL_H)
20 #define __SMEQOSINTERNAL_H
21 
22 /**
23  * \file  sme_qos_internal.h
24  *
25  * \brief prototype for SME QoS APIs
26  */
27 
28 /*--------------------------------------------------------------------------
29   Include Files
30   ------------------------------------------------------------------------*/
31 #include "qdf_lock.h"
32 #include "qdf_trace.h"
33 #include "qdf_mem.h"
34 #include "qdf_types.h"
35 #include "ani_global.h"
36 #include "sir_api.h"
37 #include "sme_qos_api.h"
38 #include "sme_internal.h"
39 
40 /*--------------------------------------------------------------------------
41   Type declarations
42   ------------------------------------------------------------------------*/
43 #define SME_QOS_AP_SUPPORTS_APSD         0x80
44 
45 /*---------------------------------------------------------------------------
46   Enumeration of the various CSR event indication types that would be reported
47   by CSR
48   ---------------------------------------------------------------------------*/
49 typedef enum {
50 	SME_QOS_CSR_JOIN_REQ = 0,
51 	SME_QOS_CSR_ASSOC_COMPLETE,
52 	SME_QOS_CSR_REASSOC_REQ,
53 	SME_QOS_CSR_REASSOC_COMPLETE,
54 	SME_QOS_CSR_REASSOC_FAILURE,
55 	SME_QOS_CSR_DISCONNECT_REQ,
56 	SME_QOS_CSR_DISCONNECT_IND,
57 	SME_QOS_CSR_HANDOFF_ASSOC_REQ,
58 	SME_QOS_CSR_HANDOFF_COMPLETE,
59 	SME_QOS_CSR_PREAUTH_SUCCESS_IND,
60 	SME_QOS_CSR_SET_KEY_SUCCESS_IND,
61 	SME_QOS_CSR_DISCONNECT_ROAM_COMPLETE,
62 } sme_qos_csr_event_indType;
63 
64 #ifdef FEATURE_WLAN_DIAG_SUPPORT
65 typedef enum {
66 	SME_QOS_DIAG_ADDTS_REQ = 0,
67 	SME_QOS_DIAG_ADDTS_RSP,
68 	SME_QOS_DIAG_DELTS
69 } sme_QosDiagQosEventSubtype;
70 
71 typedef enum {
72 	SME_QOS_DIAG_ADDTS_ADMISSION_ACCEPTED = 0,
73 	SME_QOS_DIAG_ADDTS_INVALID_PARAMS,
74 	SME_QOS_DIAG_ADDTS_RESERVED,
75 	SME_QOS_DIAG_ADDTS_REFUSED,
76 	SME_QOS_DIAG_USER_REQUESTED,
77 	SME_QOS_DIAG_DELTS_IND_FROM_AP,
78 
79 } sme_QosDiagQosEventReasonCode;
80 
81 #endif /* FEATURE_WLAN_DIAG_SUPPORT */
82 /*---------------------------------------------------------------------------
83   The association information structure to be passed by CSR after assoc or
84   reassoc is done
85   ---------------------------------------------------------------------------*/
86 typedef struct {
87 	struct bss_description *bss_desc;
88 	uint8_t uapsd_mask;
89 } sme_QosAssocInfo;
90 
91 /*--------------------------------------------------------------------------
92   External APIs for CSR - Internal to SME
93   ------------------------------------------------------------------------*/
94 QDF_STATUS sme_qos_open(struct mac_context *mac);
95 QDF_STATUS sme_qos_close(struct mac_context *mac);
96 QDF_STATUS sme_qos_msg_processor(struct mac_context *mac, uint16_t msg_type,
97 		void *msg_buf);
98 
99 /*--------------------------------------------------------------------------
100   Internal APIs for CSR
101   ------------------------------------------------------------------------*/
102 QDF_STATUS sme_qos_csr_event_ind(struct mac_context *mac,
103 		uint8_t sessionId,
104 		sme_qos_csr_event_indType ind, void *pEvent_info);
105 uint8_t sme_qos_get_acm_mask(struct mac_context *mac,
106 		struct bss_description *pSirBssDesc, tDot11fBeaconIEs *pIes);
107 #ifdef FEATURE_WLAN_ESE
108 uint8_t sme_qos_ese_retrieve_tspec_info(struct mac_context *mac, uint8_t sessionId,
109 		tTspecInfo * pTspecInfo);
110 #endif
111 
112 #endif /* #if !defined( __SMEQOSINTERNAL_H ) */
113