1 /*
2 * qosMngrDbg.c
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
35 /***************************************************************************/
36 /* */
37 /* MODULE: */
38 /* PURPOSE: */
39 /* */
40 /***************************************************************************/
41 #include "tidef.h"
42 #include "osApi.h"
43 #include "qosMngr.h"
44 #include "report.h"
45 #include "paramOut.h"
46 #include "qosMngrDbg.h"
47
48 void printQosMngrParams(TI_HANDLE hQosMngr);
49 void printQosDbgFunction(TI_HANDLE hQosMngr);
50
51
qosMngrDebugFunction(TI_HANDLE hQosMngr,TI_UINT32 funcType,void * pParam)52 void qosMngrDebugFunction(TI_HANDLE hQosMngr, TI_UINT32 funcType, void *pParam)
53 {
54 switch (funcType)
55 {
56 case DBG_QOS_MNGR_PRINT_HELP:
57 printQosDbgFunction(hQosMngr);
58 break;
59
60 case DBG_QOS_MNGR_PRINT_PARAMS:
61 printQosMngrParams(hQosMngr);
62 break;
63
64 default:
65 WLAN_OS_REPORT(("\nInvalid function type in QOS MNGR Function Command: %d\n", funcType));
66 break;
67 }
68
69
70 }
printQosDbgFunction(TI_HANDLE hQosMngr)71 void printQosDbgFunction(TI_HANDLE hQosMngr)
72 {
73 WLAN_OS_REPORT(("\n qosMngr Debug Functions \n"));
74 WLAN_OS_REPORT(("-----------------------------\n"));
75
76 WLAN_OS_REPORT(("1000 - Print the QOS MNGR Debug Help\n"));
77
78 WLAN_OS_REPORT(("1001 - print QOS parameters\n"));
79
80 }
81
printQosMngrParams(TI_HANDLE hQosMngr)82 void printQosMngrParams(TI_HANDLE hQosMngr)
83 {
84 qosMngr_t *pQosMngr = (qosMngr_t *)hQosMngr;
85 EQosProtocol protocol = QOS_NONE;
86
87 WLAN_OS_REPORT(("QOS Parameters :\n"));
88
89 switch(pQosMngr->activeProtocol){
90 case QOS_WME:
91 WLAN_OS_REPORT(("QOS protocol = QOS_WME\n"));
92 protocol = QOS_WME;
93
94 break;
95 case QOS_NONE:
96 WLAN_OS_REPORT(("QOS protocol = NONE\n"));
97 break;
98
99 default:
100 break;
101
102 }
103 if(protocol != QOS_NONE)
104 {
105 WLAN_OS_REPORT(("PS POLL Modes:\n"));
106 WLAN_OS_REPORT(("PS_POLL: 0\n"));
107 WLAN_OS_REPORT(("UPSD : 1\n"));
108 WLAN_OS_REPORT(("Ps None: 2\n"));
109 }
110
111 if(pQosMngr->desiredPsMode == PS_SCHEME_UPSD_TRIGGER)
112 WLAN_OS_REPORT(("Desired Power Save Mode = UPSD\n"));
113 else
114 WLAN_OS_REPORT(("Desired Power Save Mode = Legacy\n"));
115
116 if(pQosMngr->currentPsMode == PS_SCHEME_UPSD_TRIGGER)
117 WLAN_OS_REPORT(("Current Power Save Mode = UPSD\n"));
118 else
119 WLAN_OS_REPORT(("Current Power Save Mode = Legacy\n"));
120
121 WLAN_OS_REPORT(("BK Parameters:\n"));
122 WLAN_OS_REPORT(("aifsn :%d\n",pQosMngr->acParams[QOS_AC_BK].acQosParams.aifsn));
123 WLAN_OS_REPORT(("cwMin :%d\n",pQosMngr->acParams[QOS_AC_BK].acQosParams.cwMin));
124 WLAN_OS_REPORT(("cwMax :%d\n",pQosMngr->acParams[QOS_AC_BK].acQosParams.cwMax));
125 WLAN_OS_REPORT(("txopLimit :%d\n",pQosMngr->acParams[QOS_AC_BK].acQosParams.txopLimit));
126 if(protocol == QOS_WME)
127 {
128 WLAN_OS_REPORT(("Desired PsMode :%d\n",pQosMngr->acParams[QOS_AC_BK].desiredWmeAcPsMode));
129 WLAN_OS_REPORT(("Current PsMode :%d\n",pQosMngr->acParams[QOS_AC_BK].currentWmeAcPsMode));
130 }
131
132 WLAN_OS_REPORT(("BE Parameters:\n"));
133 WLAN_OS_REPORT(("aifsn :%d\n",pQosMngr->acParams[QOS_AC_BE].acQosParams.aifsn));
134 WLAN_OS_REPORT(("cwMin :%d\n",pQosMngr->acParams[QOS_AC_BE].acQosParams.cwMin));
135 WLAN_OS_REPORT(("cwMax :%d\n",pQosMngr->acParams[QOS_AC_BE].acQosParams.cwMax));
136 WLAN_OS_REPORT(("txopLimit :%d\n",pQosMngr->acParams[QOS_AC_BE].acQosParams.txopLimit));
137 if(protocol == QOS_WME)
138 {
139 WLAN_OS_REPORT(("Desired PsMode :%d\n",pQosMngr->acParams[QOS_AC_BE].desiredWmeAcPsMode));
140 WLAN_OS_REPORT(("Current PsMode :%d\n",pQosMngr->acParams[QOS_AC_BE].currentWmeAcPsMode));
141 }
142
143 WLAN_OS_REPORT(("VI Parameters:\n"));
144 WLAN_OS_REPORT(("aifsn :%d\n",pQosMngr->acParams[QOS_AC_VI].acQosParams.aifsn));
145 WLAN_OS_REPORT(("cwMin :%d\n",pQosMngr->acParams[QOS_AC_VI].acQosParams.cwMin));
146 WLAN_OS_REPORT(("cwMax :%d\n",pQosMngr->acParams[QOS_AC_VI].acQosParams.cwMax));
147 WLAN_OS_REPORT(("txopLimit :%d\n",pQosMngr->acParams[QOS_AC_VI].acQosParams.txopLimit));
148 if(protocol == QOS_WME)
149 {
150 WLAN_OS_REPORT(("Desired PsMode :%d\n",pQosMngr->acParams[QOS_AC_VI].desiredWmeAcPsMode));
151 WLAN_OS_REPORT(("Current PsMode :%d\n",pQosMngr->acParams[QOS_AC_VI].currentWmeAcPsMode));
152 }
153
154 WLAN_OS_REPORT(("VO Parameters:\n"));
155 WLAN_OS_REPORT(("aifsn :%d\n",pQosMngr->acParams[QOS_AC_VO].acQosParams.aifsn));
156 WLAN_OS_REPORT(("cwMin :%d\n",pQosMngr->acParams[QOS_AC_VO].acQosParams.cwMin));
157 WLAN_OS_REPORT(("cwMax :%d\n",pQosMngr->acParams[QOS_AC_VO].acQosParams.cwMax));
158 WLAN_OS_REPORT(("txopLimit :%d\n",pQosMngr->acParams[QOS_AC_VO].acQosParams.txopLimit));
159 if(protocol == QOS_WME)
160 {
161 WLAN_OS_REPORT(("Desired PsMode :%d\n",pQosMngr->acParams[QOS_AC_VO].desiredWmeAcPsMode));
162 WLAN_OS_REPORT(("Current PsMode :%d\n",pQosMngr->acParams[QOS_AC_VO].currentWmeAcPsMode));
163 }
164 }
165
166