• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * qosMngr_API.h
3  *
4  * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  *
11  *  * Redistributions of source code must retain the above copyright
12  *    notice, this list of conditions and the following disclaimer.
13  *  * Redistributions in binary form must reproduce the above copyright
14  *    notice, this list of conditions and the following disclaimer in
15  *    the documentation and/or other materials provided with the
16  *    distribution.
17  *  * Neither the name Texas Instruments nor the names of its
18  *    contributors may be used to endorse or promote products derived
19  *    from this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32  */
33 
34 /** \file qosMngr_API.h
35  *  \brief QOS manager module external header file
36  *
37  *  \see qosMngr.c
38  */
39 
40 /***************************************************************************/
41 /*                                                                         */
42 /*    MODULE:   qosMgr_API.h                                               */
43 /*    PURPOSE:  QOS manager module external header file                    */
44 /*                                                                         */
45 /***************************************************************************/
46 #ifndef __QOS_MNGR_API_H__
47 #define __QOS_MNGR_API_H__
48 
49 #include "mlmeApi.h"
50 #include "tiQosTypes.h"
51 #include "DrvMainModules.h"
52 
53 #define USER_PRIORITY_4 (WMEQosTagToACTable[4])
54 #define USER_PRIORITY_6 (WMEQosTagToACTable[6])
55 
56 /* User priority is in second byte of tsInfoField (that follows 8 bytes from beginning of the TSPEC IE) */
57 #define GET_USER_PRIORITY_FROM_WME_TSPEC_IE(pTspecIe)   \
58     (( *(((TI_UINT8 *)pData) + 9) & TS_INFO_1_USER_PRIORITY_MASK) >> USER_PRIORITY_SHIFT)
59 
60 
61 
62 typedef struct
63 {
64     EAcTrfcType         AC;
65     TI_UINT8            tid;
66     TI_UINT8            userPriority;
67     TI_UINT16           nominalMsduSize; /* in bytes */
68     TI_UINT32           meanDataRate;    /* bits per second */
69     TI_UINT16           surplausBwAllowance;
70     TI_INT32            minimumPHYRate;
71     TI_UINT16           mediumTime;
72     TI_BOOL             UPSDFlag;
73     TI_UINT32           uMinimumServiceInterval;
74     TI_UINT32           uMaximumServiceInterval;
75     EStreamDirection    streamDirection;
76     ETrafficAdmState    trafficAdmState;
77     TI_UINT8            statusCode;
78 }tspecInfo_t;
79 
80 typedef enum
81 {
82     STATUS_TRAFFIC_ADM_REQUEST_ACCEPT       = 0,
83     STATUS_TRAFFIC_ADM_REQUEST_REJECT       = 1,
84     STATUS_TRAFFIC_ADM_REQUEST_TIMEOUT      = 2
85 } trafficAdmRequestStatus_e;
86 
87 
88 TI_HANDLE qosMngr_create(TI_HANDLE hOs);
89 
90 TI_STATUS qosMngr_destroy(TI_HANDLE hQosMngr);
91 
92 void      qosMngr_init (TStadHandlesList *pStadHandles);
93 
94 TI_STATUS qosMngr_SetDefaults (TI_HANDLE hQosMngr, QosMngrInitParams_t *pQosMngrInitParams);
95 
96 TI_STATUS qosMngr_disconnect (TI_HANDLE hQosMngr, TI_BOOL bDisconnect);
97 
98 TI_STATUS qosMngr_connect(TI_HANDLE hQosMngr);
99 
100 void qosMngr_SetBaPolicies(TI_HANDLE hQosMngr);
101 
102 TI_STATUS qosMngr_setParams(TI_HANDLE  hQosMngr,paramInfo_t *pParamInfo);
103 
104 TI_STATUS qosMngr_getParamsActiveProtocol(TI_HANDLE hQosMngr, EQosProtocol *actProt);
105 TI_STATUS qosMngr_getParams(TI_HANDLE  hQosMngr,paramInfo_t *pParamInfo);
106 
107 TI_STATUS qosMngr_assocReqBuild(TI_HANDLE  hQosMngr, TI_UINT8 *pQosIe, TI_UINT32 *pLen);
108 
109 TI_STATUS qosMngr_setSite(TI_HANDLE hQosMngr, assocRsp_t *assocRsp);
110 
111 void      qosMngr_updateIEinfo(TI_HANDLE hQosMngr, TI_UINT8 *pQosIeParams, EQosProtocol qosSetProtocol);
112 
113 TI_UINT8 qosMngr_evalSite(TI_HANDLE hQosMngr, TI_BOOL siteAPSDSupport);
114 
115 TI_STATUS qosMngr_getQosCapabiltyInfeElement(TI_HANDLE  hQosMngr, TI_UINT8 *pQosIe, TI_UINT32 *pLen);
116 
117 TI_STATUS qosMngr_requestAdmission(TI_HANDLE            hQosMngr,
118                                    OS_802_11_QOS_TSPEC_PARAMS *addTspecParams);
119 
120 TI_STATUS qosMngr_deleteAdmission(TI_HANDLE hQosMngr, OS_802_11_QOS_DELETE_TSPEC_PARAMS *delAdmissionParams);
121 
122 TI_STATUS qosMngr_selectActiveProtocol(TI_HANDLE  hQosMngr);
123 
124 TI_STATUS qosMngr_setAcPsDeliveryMode(TI_HANDLE  hQosMngr);
125 
126 TI_STATUS qosMngr_sendUnexpectedTSPECResponseEvent(TI_HANDLE    hQosMngr,
127                                    tspecInfo_t  *pTspecInfo);
128 
129 TI_STATUS qosMngr_setAdmissionInfo(TI_HANDLE    hQosMngr,
130                                    TI_UINT8     acID,
131                                    tspecInfo_t  *pTspecInfo,
132                                    trafficAdmRequestStatus_e trafficAdmRequestStatus);
133 
134 
135 
136 TI_STATUS QosMngr_receiveActionFrames(TI_HANDLE hQosMngr, TI_UINT8* pData, TI_UINT8 action, TI_UINT32 bodyLen);
137 
138 void qosMngr_checkTspecRenegResults(TI_HANDLE hQosMngr, assocRsp_t *assocRsp);
139 
140 TI_UINT32 qosMngr_buildTSPec(TI_HANDLE hQosMngr, TI_UINT32 user_priority, TI_UINT8 *pQosIe);
141 
142 TI_STATUS qosMngr_GetWmeEnableFlag(TI_HANDLE hQosMngr, TI_BOOL *bWmeEnable);
143 
144 #endif /* __QOS_MNGR_API_H__ */
145 
146