Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1 | /* |
Kiet Lam | 0fb93dd | 2014-02-19 00:32:59 -0800 | [diff] [blame] | 2 | * Copyright (c) 2012-2013 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. |
Gopichand Nakkala | 92f07d8 | 2013-01-08 21:16:34 -0800 | [diff] [blame] | 20 | */ |
Kiet Lam | 0fb93dd | 2014-02-19 00:32:59 -0800 | [diff] [blame] | 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 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 28 | #if !defined( __SMEQOSINTERNAL_H ) |
| 29 | #define __SMEQOSINTERNAL_H |
| 30 | |
| 31 | |
| 32 | /**========================================================================= |
| 33 | |
| 34 | \file smeQosInternal.h |
| 35 | |
| 36 | \brief prototype for SME QoS APIs |
| 37 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 38 | |
| 39 | ========================================================================*/ |
| 40 | |
| 41 | /* $Header$ */ |
| 42 | |
| 43 | /*-------------------------------------------------------------------------- |
| 44 | Include Files |
| 45 | ------------------------------------------------------------------------*/ |
| 46 | #include "vos_lock.h" |
| 47 | #include "vos_trace.h" |
| 48 | #include "vos_memory.h" |
| 49 | #include "vos_types.h" |
| 50 | #include "aniGlobal.h" |
| 51 | #include "sirApi.h" |
| 52 | #include "sme_QosApi.h" |
| 53 | #include "smeInternal.h" |
| 54 | |
| 55 | /*-------------------------------------------------------------------------- |
| 56 | Type declarations |
| 57 | ------------------------------------------------------------------------*/ |
| 58 | #define SME_QOS_AP_SUPPORTS_APSD 0x80 |
| 59 | |
| 60 | /*--------------------------------------------------------------------------- |
| 61 | Enumeration of the various EDCA Access Categories: |
| 62 | Based on AC to ACI mapping in 802.11e spec (identical to WMM) |
| 63 | ---------------------------------------------------------------------------*/ |
| 64 | typedef enum |
| 65 | { |
| 66 | SME_QOS_EDCA_AC_BE = 0, /* Best effort access category */ |
| 67 | SME_QOS_EDCA_AC_BK = 1, /* Background access category */ |
| 68 | SME_QOS_EDCA_AC_VI = 2, /* Video access category */ |
| 69 | SME_QOS_EDCA_AC_VO = 3, /* Voice access category */ |
| 70 | |
| 71 | SME_QOS_EDCA_AC_MAX |
| 72 | } sme_QosEdcaAcType; |
| 73 | |
| 74 | |
| 75 | /*--------------------------------------------------------------------------- |
| 76 | Enumeration of the various CSR event indication types that would be reported |
| 77 | by CSR |
| 78 | ---------------------------------------------------------------------------*/ |
| 79 | typedef enum |
| 80 | { |
| 81 | SME_QOS_CSR_JOIN_REQ = 0, |
| 82 | SME_QOS_CSR_ASSOC_COMPLETE, |
| 83 | SME_QOS_CSR_REASSOC_REQ, |
| 84 | SME_QOS_CSR_REASSOC_COMPLETE, |
| 85 | SME_QOS_CSR_REASSOC_FAILURE, |
| 86 | SME_QOS_CSR_DISCONNECT_REQ, |
| 87 | SME_QOS_CSR_DISCONNECT_IND, |
| 88 | SME_QOS_CSR_HANDOFF_ASSOC_REQ, |
| 89 | SME_QOS_CSR_HANDOFF_COMPLETE, |
| 90 | SME_QOS_CSR_HANDOFF_FAILURE, |
| 91 | #ifdef WLAN_FEATURE_VOWIFI_11R |
| 92 | SME_QOS_CSR_PREAUTH_SUCCESS_IND, |
| 93 | SME_QOS_CSR_SET_KEY_SUCCESS_IND, |
| 94 | #endif |
| 95 | }sme_QosCsrEventIndType; |
| 96 | |
| 97 | #ifdef FEATURE_WLAN_DIAG_SUPPORT |
| 98 | typedef enum |
| 99 | { |
| 100 | SME_QOS_DIAG_ADDTS_REQ = 0, |
| 101 | SME_QOS_DIAG_ADDTS_RSP, |
| 102 | SME_QOS_DIAG_DELTS |
| 103 | |
| 104 | }sme_QosDiagQosEventSubtype; |
| 105 | |
| 106 | typedef enum |
| 107 | { |
| 108 | SME_QOS_DIAG_ADDTS_ADMISSION_ACCEPTED = 0, |
| 109 | SME_QOS_DIAG_ADDTS_INVALID_PARAMS, |
| 110 | SME_QOS_DIAG_ADDTS_RESERVED, |
| 111 | SME_QOS_DIAG_ADDTS_REFUSED, |
| 112 | SME_QOS_DIAG_USER_REQUESTED, |
| 113 | SME_QOS_DIAG_DELTS_IND_FROM_AP, |
| 114 | |
| 115 | }sme_QosDiagQosEventReasonCode; |
| 116 | |
| 117 | #endif //FEATURE_WLAN_DIAG_SUPPORT |
| 118 | /*--------------------------------------------------------------------------- |
| 119 | The association information structure to be passed by CSR after assoc or |
| 120 | reassoc is done |
| 121 | ---------------------------------------------------------------------------*/ |
| 122 | typedef struct |
| 123 | { |
| 124 | tSirBssDescription *pBssDesc; |
| 125 | tCsrRoamProfile *pProfile; |
| 126 | } sme_QosAssocInfo; |
| 127 | |
| 128 | /*-------------------------------------------------------------------------- |
| 129 | External APIs for CSR - Internal to SME |
| 130 | ------------------------------------------------------------------------*/ |
| 131 | |
| 132 | /* -------------------------------------------------------------------------- |
| 133 | \brief sme_QosOpen() - This function must be called before any API call to |
| 134 | SME QoS module. |
| 135 | |
| 136 | \param pMac - Pointer to the global MAC parameter structure. |
| 137 | |
| 138 | \return eHalStatus |
| 139 | ----------------------------------------------------------------------------*/ |
| 140 | eHalStatus sme_QosOpen(tpAniSirGlobal pMac); |
| 141 | |
| 142 | /* -------------------------------------------------------------------------- |
| 143 | \brief sme_QosClose() - To close down SME QoS module. There should not be |
| 144 | any API call into this module after calling this function until another |
| 145 | call of sme_QosOpen. |
| 146 | |
| 147 | \param pMac - Pointer to the global MAC parameter structure. |
| 148 | |
| 149 | \return eHalStatus |
| 150 | ----------------------------------------------------------------------------*/ |
| 151 | eHalStatus sme_QosClose(tpAniSirGlobal pMac); |
| 152 | |
| 153 | /*-------------------------------------------------------------------------- |
| 154 | \brief sme_QosSetParams() - This function is used by HDD to provide the |
| 155 | default TSPEC params to SME. |
| 156 | |
| 157 | \param pMac - Pointer to the global MAC parameter structure. |
| 158 | \param pQoSInfo - Pointer to sme_QosWmmTspecInfo which contains the WMM TSPEC |
| 159 | related info per AC as defined above, provided by HDD |
| 160 | |
| 161 | \return eHAL_STATUS_SUCCESS - Setparam is successful. |
| 162 | |
| 163 | \sa |
| 164 | |
| 165 | --------------------------------------------------------------------------*/ |
| 166 | eHalStatus sme_QosSetParams(tpAniSirGlobal pMac, sme_QosWmmTspecInfo * pQoSInfo); |
| 167 | |
| 168 | /*-------------------------------------------------------------------------- |
| 169 | \brief sme_QosMsgProcessor() - sme_ProcessMsg() calls this function for the |
| 170 | messages that are handled by SME QoS module. |
| 171 | |
| 172 | \param pMac - Pointer to the global MAC parameter structure. |
| 173 | \param msg_type - the type of msg passed by PE as defined in wniApi.h |
| 174 | \param pMsgBuf - a pointer to a buffer that maps to various structures base |
| 175 | on the message type. |
| 176 | The beginning of the buffer can always map to tSirSmeRsp. |
| 177 | |
| 178 | \return eHalStatus. |
| 179 | |
| 180 | \sa |
| 181 | |
| 182 | --------------------------------------------------------------------------*/ |
| 183 | eHalStatus sme_QosMsgProcessor( tpAniSirGlobal pMac, v_U16_t msg_type, |
| 184 | void *pMsgBuf); |
| 185 | |
| 186 | /*-------------------------------------------------------------------------- |
| 187 | Internal APIs for CSR |
| 188 | ------------------------------------------------------------------------*/ |
| 189 | |
| 190 | /*-------------------------------------------------------------------------- |
| 191 | \brief sme_QosValidateParams() - The SME QoS API exposed to CSR to validate AP |
| 192 | capabilities regarding QoS support & any other QoS parameter validation. |
| 193 | |
| 194 | \param pMac - Pointer to the global MAC parameter structure. |
| 195 | \param pBssDesc - Pointer to the BSS Descriptor information passed down by |
| 196 | CSR to PE while issuing the Join request |
| 197 | |
| 198 | \return eHAL_STATUS_SUCCESS - Validation is successful |
| 199 | |
| 200 | \sa |
| 201 | |
| 202 | --------------------------------------------------------------------------*/ |
| 203 | eHalStatus sme_QosValidateParams(tpAniSirGlobal pMac, |
| 204 | tSirBssDescription *pBssDesc); |
| 205 | |
| 206 | /*-------------------------------------------------------------------------- |
| 207 | \brief sme_QosCsrEventInd() - The QoS sub-module in SME expects notifications |
| 208 | from CSR when certain events occur as mentioned in sme_QosCsrEventIndType. |
| 209 | |
| 210 | \param pMac - Pointer to the global MAC parameter structure. |
| 211 | \param ind - The event occurred of type sme_QosCsrEventIndType. |
| 212 | \param pEvent_info - Information related to the event |
| 213 | |
| 214 | \return eHalStatus |
| 215 | |
| 216 | \sa |
| 217 | |
| 218 | --------------------------------------------------------------------------*/ |
| 219 | eHalStatus sme_QosCsrEventInd(tpAniSirGlobal pMac, |
| 220 | v_U8_t sessionId, |
| 221 | sme_QosCsrEventIndType ind, |
| 222 | void *pEvent_info); |
| 223 | |
| 224 | /*-------------------------------------------------------------------------- |
| 225 | \brief sme_QosGetACMMask() - The QoS sub-module API to find out on which ACs |
| 226 | AP mandates Admission Control (ACM = 1) |
| 227 | |
| 228 | \param pMac - Pointer to the global MAC parameter structure. |
| 229 | \param pSirBssDesc - The event occurred of type sme_QosCsrEventIndType. |
| 230 | \param pIes - the parsed IE for pSirBssDesc. This can be NULL. |
| 231 | |
| 232 | |
| 233 | \return a bit mask indicating for which ACs AP has ACM set to 1 |
| 234 | |
| 235 | \sa |
| 236 | |
| 237 | --------------------------------------------------------------------------*/ |
| 238 | v_U8_t sme_QosGetACMMask(tpAniSirGlobal pMac, tSirBssDescription *pSirBssDesc, tDot11fBeaconIEs *pIes); |
| 239 | |
| 240 | /* |
| 241 | sme_QosTriggerUapsdChange |
| 242 | It trigger a change on UAPSD (either disable/enable UAPSD) on current QoS flows |
| 243 | */ |
| 244 | sme_QosStatusType sme_QosTriggerUapsdChange( tpAniSirGlobal pMac ); |
| 245 | |
Kanchanapally, Vidyullatha | 23cea3c | 2014-11-04 13:05:20 +0530 | [diff] [blame] | 246 | void sme_QoSUpdateUapsdBTEvent(tpAniSirGlobal pMac); |
| 247 | |
Varun Reddy Yeturu | 5d5e2c6 | 2014-02-27 13:31:29 -0800 | [diff] [blame] | 248 | #ifdef FEATURE_WLAN_ESE |
| 249 | v_U8_t sme_QosESERetrieveTspecInfo(tpAniSirGlobal pMac, v_U8_t sessionId, tTspecInfo *pTspecInfo); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 250 | |
| 251 | #endif |
| 252 | |
| 253 | #endif //#if !defined( __SMEQOSINTERNAL_H ) |