blob: f3db9e5d1d02b0a3ccb31edded3ae96873fff81e [file] [log] [blame]
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001/*
2 * Copyright (c) 2014-2015 The Linux Foundation. All rights reserved.
3 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20 */
21
22/*
23 * This file was originally distributed by Qualcomm Atheros, Inc.
24 * under proprietary terms before Copyright ownership was assigned
25 * to the Linux Foundation.
26 */
27
28#if !defined(__SMEQOSINTERNAL_H)
29#define __SMEQOSINTERNAL_H
30
31/**
32 * \file sme_qos_internal.h
33 *
34 * \brief prototype for SME QoS APIs
35 */
36
37/*--------------------------------------------------------------------------
38 Include Files
39 ------------------------------------------------------------------------*/
40#include "cdf_lock.h"
41#include "cdf_trace.h"
42#include "cdf_memory.h"
43#include "cdf_types.h"
44#include "ani_global.h"
45#include "sir_api.h"
46#include "sme_qos_api.h"
47#include "sme_internal.h"
48
49/*--------------------------------------------------------------------------
50 Type declarations
51 ------------------------------------------------------------------------*/
52#define SME_QOS_AP_SUPPORTS_APSD 0x80
53
54/*---------------------------------------------------------------------------
55 Enumeration of the various EDCA Access Categories:
56 Based on AC to ACI mapping in 802.11e spec (identical to WMM)
57 ---------------------------------------------------------------------------*/
58typedef enum {
59 SME_QOS_EDCA_AC_BE = 0, /* Best effort access category */
60 SME_QOS_EDCA_AC_BK = 1, /* Background access category */
61 SME_QOS_EDCA_AC_VI = 2, /* Video access category */
62 SME_QOS_EDCA_AC_VO = 3, /* Voice access category */
63
64 SME_QOS_EDCA_AC_MAX
65} sme_QosEdcaAcType;
66
67/*---------------------------------------------------------------------------
68 Enumeration of the various CSR event indication types that would be reported
69 by CSR
70 ---------------------------------------------------------------------------*/
71typedef enum {
72 SME_QOS_CSR_JOIN_REQ = 0,
73 SME_QOS_CSR_ASSOC_COMPLETE,
74 SME_QOS_CSR_REASSOC_REQ,
75 SME_QOS_CSR_REASSOC_COMPLETE,
76 SME_QOS_CSR_REASSOC_FAILURE,
77 SME_QOS_CSR_DISCONNECT_REQ,
78 SME_QOS_CSR_DISCONNECT_IND,
79 SME_QOS_CSR_HANDOFF_ASSOC_REQ,
80 SME_QOS_CSR_HANDOFF_COMPLETE,
81 SME_QOS_CSR_HANDOFF_FAILURE,
82#ifdef WLAN_FEATURE_VOWIFI_11R
83 SME_QOS_CSR_PREAUTH_SUCCESS_IND,
84 SME_QOS_CSR_SET_KEY_SUCCESS_IND,
85#endif
86} sme_qos_csr_event_indType;
87
88#ifdef FEATURE_WLAN_DIAG_SUPPORT
89typedef enum {
90 SME_QOS_DIAG_ADDTS_REQ = 0,
91 SME_QOS_DIAG_ADDTS_RSP,
92 SME_QOS_DIAG_DELTS
93} sme_QosDiagQosEventSubtype;
94
95typedef enum {
96 SME_QOS_DIAG_ADDTS_ADMISSION_ACCEPTED = 0,
97 SME_QOS_DIAG_ADDTS_INVALID_PARAMS,
98 SME_QOS_DIAG_ADDTS_RESERVED,
99 SME_QOS_DIAG_ADDTS_REFUSED,
100 SME_QOS_DIAG_USER_REQUESTED,
101 SME_QOS_DIAG_DELTS_IND_FROM_AP,
102
103} sme_QosDiagQosEventReasonCode;
104
105#endif /* FEATURE_WLAN_DIAG_SUPPORT */
106/*---------------------------------------------------------------------------
107 The association information structure to be passed by CSR after assoc or
108 reassoc is done
109 ---------------------------------------------------------------------------*/
110typedef struct {
111 tSirBssDescription *pBssDesc;
112 tCsrRoamProfile *pProfile;
113} sme_QosAssocInfo;
114
115/*--------------------------------------------------------------------------
116 External APIs for CSR - Internal to SME
117 ------------------------------------------------------------------------*/
118CDF_STATUS sme_qos_open(tpAniSirGlobal pMac);
119CDF_STATUS sme_qos_close(tpAniSirGlobal pMac);
120CDF_STATUS sme_qos_msg_processor(tpAniSirGlobal pMac, uint16_t msg_type,
121 void *pMsgBuf);
122
123/*--------------------------------------------------------------------------
124 Internal APIs for CSR
125 ------------------------------------------------------------------------*/
126CDF_STATUS sme_qos_validate_params(tpAniSirGlobal pMac,
127 tSirBssDescription *pBssDesc);
128CDF_STATUS sme_qos_csr_event_ind(tpAniSirGlobal pMac,
129 uint8_t sessionId,
130 sme_qos_csr_event_indType ind, void *pEvent_info);
131uint8_t sme_qos_get_acm_mask(tpAniSirGlobal pMac,
132 tSirBssDescription *pSirBssDesc, tDot11fBeaconIEs *pIes);
133#ifdef FEATURE_WLAN_ESE
134uint8_t sme_qos_ese_retrieve_tspec_info(tpAniSirGlobal pMac, uint8_t sessionId,
135 tTspecInfo * pTspecInfo);
136#endif
137
138#endif /* #if !defined( __SMEQOSINTERNAL_H ) */