1 2/** \file qosMngr.h 3 * \brief QOS manager module internal header file 4 * 5 * \see qosMngr.c 6 */ 7/**************************************************************************** 8**+-----------------------------------------------------------------------+** 9**| |** 10**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** 11**| All rights reserved. |** 12**| |** 13**| Redistribution and use in source and binary forms, with or without |** 14**| modification, are permitted provided that the following conditions |** 15**| are met: |** 16**| |** 17**| * Redistributions of source code must retain the above copyright |** 18**| notice, this list of conditions and the following disclaimer. |** 19**| * Redistributions in binary form must reproduce the above copyright |** 20**| notice, this list of conditions and the following disclaimer in |** 21**| the documentation and/or other materials provided with the |** 22**| distribution. |** 23**| * Neither the name Texas Instruments nor the names of its |** 24**| contributors may be used to endorse or promote products derived |** 25**| from this software without specific prior written permission. |** 26**| |** 27**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** 28**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** 29**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** 30**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** 31**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** 32**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** 33**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** 34**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** 35**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** 36**| (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |** 37**| OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |** 38**| |** 39**+-----------------------------------------------------------------------+** 40****************************************************************************/ 41 42/***************************************************************************/ 43/* */ 44/* MODULE: qosMgr.h */ 45/* PURPOSE: QOS manager module internal header file */ 46/* */ 47/***************************************************************************/ 48#ifndef __QOS_MNGR_H__ 49#define __QOS_MNGR_H__ 50 51#include "paramOut.h" 52#include "trafficAdmControl.h" 53 54/* 55 * Defines 56 */ 57 58#define QOS_MNGR_INIT_BIT_LOCAL_VECTOR (0x01) 59#define QOS_MNGR_INIT_BIT_ADM_CTRL (0x02) 60 61#define AC_PARAMS_AIFSN_MASK (0x0f) 62#define AC_PARAMS_ACI_MASK (0x60) 63#define AC_PARAMS_CWMIN_MASK (0x0f) 64#define AC_PARAMS_CWMAX_MASK (0xf0) 65#define AC_PARAMS_ACM_MASK (0x10) 66 67 68#if 0 69#define PS_PARAMETERS_LEGACY (0) 70#define PS_PARAMETERS_UPSD_TRIGGER_ENABLE_MASK (0x01) 71#define PS_PARAMETERS_UPSD_DELIVERY_ENABLE_MASK (0x02) 72#define PS_UPSD_TRIGER_AND_DELIVERY (PS_PARAMETERS_UPSD_TRIGGER_ENABLE_MASK | PS_PARAMETERS_UPSD_DELIVERY_ENABLE_MASK) 73 74#define CONVERT_DRIVER_PS_MODE_TO_FW(PsMode_e) ((PsMode_e == UPSD) ? PS_UPSD_TRIGER_AND_DELIVERY : PS_PARAMETERS_LEGACY) 75#endif 76 77 78/* 79 * Enumerations 80 */ 81 82 83/* 84 * Structures 85 */ 86 87typedef struct 88{ 89 tspecInfo_t currentTspecInfo[MAX_NUM_OF_AC]; 90 tspecInfo_t candidateTspecInfo[MAX_NUM_OF_AC]; 91 UINT16 totalAllocatedMediumTime; 92}resourceMgmt_t; 93 94/* 95 * per AC parameters 96 */ 97typedef struct 98{ 99 queueTrafficParams_t QtrafficParams; /* AC traffic confogiration params */ 100 queueTrafficParams_t QTrafficInitParams;/* for disconnect - defaults traffic params */ 101 acQosParams_t acQosParams; 102 acQosParams_t acQosInitParams; 103 AckPolicy_e wmeAcAckPolicy; /* ack policy per AC */ 104 PSScheme_e currentWmeAcPsMode; /* current wme per ac power save mode */ 105 PSScheme_e desiredWmeAcPsMode; /* desired wme per ac power save mode */ 106 admissionState_e apInitAdmissionState; /* AC admission state */ 107 UINT32 msduLifeTimeParam; 108}acParams_t; 109 110 111typedef TI_STATUS (*qosMngrCallb_t) (TI_HANDLE hApConn, trafficAdmRequestStatus_e result); 112 113/* 114 * qosMngr handle 115 */ 116 117typedef struct 118{ 119 TI_HANDLE hSiteMgr; 120 TI_HANDLE hHalCtrl; 121 TI_HANDLE hTxData; 122 TI_HANDLE hEvHandler; 123 124 TI_HANDLE hMeasurementMngr; 125 TI_HANDLE hSmeSm; 126 TI_HANDLE hCtrlData; 127 TI_HANDLE hMemMgr; 128 TI_HANDLE hExcMgr; 129 130 TI_HANDLE hReport; 131 TI_HANDLE hOs; 132 133 BOOL WMEEnable; /* driver supports WME protocol */ 134 BOOL WMESiteSupport; /* site support WME protocol */ 135 qosProtocols_e activeProtocol; /* active protocol: EXC,WME or none. */ 136 BOOL tagZeroConverHeader; /* converting tag zero headers */ 137 138 UINT8 qosPacketBurstEnable; /* Packet Burst is Enable or NOT */ 139 UINT32 qosPacketBurstTxOpLimit; /* TxOp limit in case of NON_QOS */ 140 /* protocol and Packet Burst is Enable */ 141 142 acParams_t acParams[MAX_NUM_OF_AC]; /* per ac parameters */ 143 144 BOOL isConnected; /* Connected or not ? */ 145 PSScheme_e desiredPsMode; /* The desired PS mode of the station */ 146 PSScheme_e currentPsMode; /* The current PS mode of the station */ 147 UINT8 ApQosCapabilityParameters; 148 UINT8 desiredMaxSpLen; 149 PSScheme_e desiredVoiceDeliveryProtocol; 150 151 headerConvetMode_e headerConvetMode; 152 rxTimeOut_t rxTimeOut; 153 154 155 /* traffic admission control parameters */ 156 BOOL trafficAdmCtrlEnable; /* driver supports Admission control */ 157 trafficAdmCtrl_t *pTrafficAdmCtrl; /* adm ctrl object */ 158 resourceMgmt_t resourceMgmtTable; 159 UINT8 QosNullDataTemplateUserPriority; /* Holds the last User Priority set into the firmware in the QOS Null data template */ 160 161 BOOL performTSPECRenegotiation; 162 BOOL voiceTspecConfigured; 163 BOOL videoTspecConfigured; 164 TI_HANDLE TSPECNegotiationResultModule; 165 qosMngrCallb_t TSPECNegotiationResultCallb; 166 OS_802_11_QOS_TSPEC_PARAMS tspecRenegotiationParams[MAX_NUM_OF_AC]; 167} qosMngr_t; 168 169 170#endif /* QOS_MNGR_H */ 171