blob: 80771c7cf5284e4ddb0dbe1ac2e82c721c3040f9 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Gopichand Nakkala92f07d82013-01-08 21:16:34 -08002 * 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.
20 */
21/*
Jeff Johnson32d95a32012-09-10 13:15:23 -070022 * Copyright (c) 2012, The Linux Foundation. All rights reserved.
Jeff Johnson295189b2012-06-20 16:38:30 -070023 *
24 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
25 *
26 *
27 * Permission to use, copy, modify, and/or distribute this software for
28 * any purpose with or without fee is hereby granted, provided that the
29 * above copyright notice and this permission notice appear in all
30 * copies.
31 *
32 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
33 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
34 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
35 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
36 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
37 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
38 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
39 * PERFORMANCE OF THIS SOFTWARE.
40 */
41
42/*============================================================================
43limLogDump.c
44
45Implements the dump commands specific to the lim module.
46
47Copyright (c) 2007 QUALCOMM Incorporated.
48All Rights Reserved.
49Qualcomm Confidential and Proprietary
50 ============================================================================*/
51
52#include "vos_types.h"
53#include "limApi.h"
54
55#if defined(ANI_LOGDUMP)
56
57
58#include "limUtils.h"
59#include "limSecurityUtils.h"
60#include "schApi.h"
61#include "limSerDesUtils.h"
62#include "limAssocUtils.h"
63#include "limSendMessages.h"
64#include "logDump.h"
65#include "limTrace.h"
66#if defined WLAN_FEATURE_VOWIFI
67#include "rrmApi.h"
68#endif
69#if defined WLAN_FEATURE_VOWIFI_11R
70#include <limFT.h>
71#endif
72#include "smeInside.h"
Madan Mohan Koyyalamudi01cba042013-01-10 21:56:05 -080073#include "wlan_qct_wda.h"
Viral Modif45f7672013-09-06 13:29:06 -070074#include "wlan_qct_wdi_dts.h"
Madan Mohan Koyyalamudi01cba042013-01-10 21:56:05 -080075
76void WDA_TimerTrafficStatsInd(tWDA_CbContext *pWDA);
Ravi Kumar Vaishnavb7652402013-01-18 19:05:15 -080077#ifdef WLANTL_DEBUG
78extern void WLANTLPrintPktsRcvdPerRssi(v_PVOID_t pAdapter, v_U8_t staId, v_BOOL_t flush);
79extern void WLANTLPrintPktsRcvdPerRateIdx(v_PVOID_t pAdapter, v_U8_t staId, v_BOOL_t flush);
80#endif
Jeff Johnson295189b2012-06-20 16:38:30 -070081
82static char *getRole( tLimSystemRole role )
83{
84 switch (role)
85 {
86 case eLIM_UNKNOWN_ROLE:
87 return "eLIM_UNKNOWN_ROLE";
88 case eLIM_AP_ROLE:
89 return "eLIM_AP_ROLE";
90 case eLIM_STA_IN_IBSS_ROLE:
91 return "eLIM_STA_IN_IBSS_ROLE";
92 case eLIM_STA_ROLE:
93 return "eLIM_STA_ROLE";
94 case eLIM_BT_AMP_STA_ROLE:
95 return "eLIM_BT_AMP_STA_ROLE";
96 case eLIM_BT_AMP_AP_ROLE:
97 return "eLIM_BT_AMP_AP_ROLE";
98 default:
99 return "UNKNOWN";
100 }
101}
102
Jeff Johnson295189b2012-06-20 16:38:30 -0700103
104
Jeff Johnsone7245742012-09-05 17:12:55 -0700105char *dumpLim( tpAniSirGlobal pMac, char *p, tANI_U32 sessionId)
Jeff Johnson295189b2012-06-20 16:38:30 -0700106{
107 #ifdef FIXME_GEN6
108 //iterate through the sessionTable and dump sta entries for each session.
109 //Keep this code under 'WLAN_DEBUG' compile flag.
110
111 tANI_U16 i, j;
112
Jeff Johnsone7245742012-09-05 17:12:55 -0700113 tpPESession psessionEntry = peFindSessionBySessionId(pMac, sessionId);
114
115 if (psessionEntry == NULL)
116 {
117 p += log_sprintf( pMac, p, "Invalid sessionId: %d \n ", sessionId);
118 return p;
119 }
Jeff Johnson295189b2012-06-20 16:38:30 -0700120
121 p += log_sprintf( pMac,p, "\n ----- LIM Debug Information ----- \n");
122 p += log_sprintf( pMac,p, "LIM Role = (%d) %s\n",
123 pMac->lim.gLimSystemRole, getRole(pMac->lim.gLimSystemRole));
124 p += log_sprintf( pMac,p, "SME State = (%d) %s",
125 pMac->lim.gLimSmeState, limSmeStateStr(pMac->lim.gLimSmeState));
126 p += log_sprintf( pMac,p, "MLM State = (%d) %s",
127 pMac->lim.gLimMlmState, limMlmStateStr(pMac->lim.gLimMlmState));
Jeff Johnsone7245742012-09-05 17:12:55 -0700128 p += log_sprintf( pMac,p, "802.11n session HT Capability: %s\n",
129 (psessionEntry->htCapability == 1) ? "Enabled" : "Disabled");
Jeff Johnson295189b2012-06-20 16:38:30 -0700130 p += log_sprintf( pMac,p, "gLimProcessDefdMsgs: %s\n",
131 (pMac->lim.gLimProcessDefdMsgs == 1) ? "Enabled" : "Disabled");
132
133 if (pMac->lim.gLimSystemRole == eLIM_STA_ROLE)
134 {
135 p += log_sprintf( pMac,p, "AID = %X\t\t\n", pMac->lim.gLimAID);
136 p += log_sprintf( pMac,p, "SSID mismatch in Beacon Count = %d\n",
137 pMac->lim.gLimBcnSSIDMismatchCnt);
138 p += log_sprintf( pMac,p, "Number of link establishments = %d\n",
139 pMac->lim.gLimNumLinkEsts);
140 }
141 else if (pMac->lim.gLimSystemRole == eLIM_AP_ROLE)
142 {
143 p += log_sprintf( pMac,p, "Num of STAs associated = %d\n",
Gopichand Nakkala777e6032012-12-31 16:39:21 -0800144 peGetCurrentSTAsCount(pMac));
Jeff Johnson295189b2012-06-20 16:38:30 -0700145
146 p += log_sprintf( pMac,p, "Num of Pre-auth contexts = %d\n",
147 pMac->lim.gLimNumPreAuthContexts);
148
149 p += log_sprintf( pMac,p, "Num of AssocReq dropped in invalid State = %d\n",
150 pMac->lim.gLimNumAssocReqDropInvldState);
151
152 p += log_sprintf( pMac,p, "Num of ReassocReq dropped in invalid State = %d\n",
153 pMac->lim.gLimNumReassocReqDropInvldState);
154
155 p += log_sprintf( pMac,p, "Num of Hash Miss Event ignored = %d\n",
156 pMac->lim.gLimNumHashMissIgnored);
Jeff Johnson295189b2012-06-20 16:38:30 -0700157 }
158
159 p += log_sprintf( pMac,p, "Num of RxCleanup Count = %d\n",
160 pMac->lim.gLimNumRxCleanup);
161 p += log_sprintf( pMac,p, "Unexpected Beacon Count = %d\n",
162 pMac->lim.gLimUnexpBcnCnt);
163 p += log_sprintf( pMac,p, "Number of Re/Assoc rejects of 11b STAs = %d\n",
164 pMac->lim.gLim11bStaAssocRejectCount);
165 p += log_sprintf( pMac,p, "No. of HeartBeat Failures in LinkEst State = %d\n",
166 pMac->lim.gLimHBfailureCntInLinkEstState);
167 p += log_sprintf( pMac,p, "No. of Probe Failures after HB failed = %d\n",
168 pMac->lim.gLimProbeFailureAfterHBfailedCnt);
169 p += log_sprintf( pMac,p, "No. of HeartBeat Failures in Other States = %d\n",
170 pMac->lim.gLimHBfailureCntInOtherStates);
171 p += log_sprintf( pMac,p, "No. of Beacons Rxed During HB Interval = %d\n",
172 pMac->lim.gLimRxedBeaconCntDuringHB);
173 p += log_sprintf( pMac,p, "Self Operating Mode = %s\n", limDot11ModeStr(pMac, (tANI_U8)pMac->lim.gLimDot11Mode));
Jeff Johnson295189b2012-06-20 16:38:30 -0700174 p += log_sprintf( pMac,p, "\n");
175
176 if (pMac->lim.gLimSystemRole == eLIM_AP_ROLE)
177 i = 2;
178 else
179 i = 1;
180
181
182 for (; i< pMac->lim.maxStation; i++)
183 {
184 tpDphHashNode pSta = dphGetHashEntry(pMac, (unsigned short)i);
185 if (pSta && pSta->added)
186 {
187 p += log_sprintf( pMac,p, "\nSTA AID: %d STA ID: %d Valid: %d AuthType: %d MLM State: %s",
188 i, pSta->staIndex, pSta->valid,
189 pSta->mlmStaContext.authType,
190 limMlmStateStr(pSta->mlmStaContext.mlmState));
191
192 p += log_sprintf( pMac,p, "\tAID:%-2d OpRateMode:%s ShPrmbl:%d HT:%d GF:%d TxChWidth:%d MimoPS:%d LsigProt:%d\n",
193 pSta->assocId, limStaOpRateModeStr(pSta->supportedRates.opRateMode),
194 pSta->shortPreambleEnabled, pSta->mlmStaContext.htCapability,
195 pSta->htGreenfield, pSta->htSupportedChannelWidthSet,
196 pSta->htMIMOPSState, pSta->htLsigTXOPProtection);
197
198 p += log_sprintf( pMac,p, "\tAMPDU [MaxSz(Factor):%d, Dens: %d] AMSDU-MaxLen: %d\n",
199 pSta->htMaxRxAMpduFactor, pSta->htAMpduDensity,pSta->htMaxAmsduLength);
200 p += log_sprintf( pMac,p, "\tDSSCCkMode40Mhz: %d, SGI20: %d, SGI40: %d\n",
201 pSta->htDsssCckRate40MHzSupport, pSta->htShortGI20Mhz,
202 pSta->htShortGI40Mhz);
203
204 p += log_sprintf( pMac,p, "\t11b Rates: ");
205 for(j=0; j<SIR_NUM_11B_RATES; j++)
206 if(pSta->supportedRates.llbRates[j] > 0)
207 p += log_sprintf( pMac,p, "%d ", pSta->supportedRates.llbRates[j]);
208
209 p += log_sprintf( pMac,p, "\n\t11a Rates: ");
210 for(j=0; j<SIR_NUM_11A_RATES; j++)
211 if(pSta->supportedRates.llaRates[j] > 0)
212 p += log_sprintf( pMac,p, "%d ", pSta->supportedRates.llaRates[j]);
213
214 p += log_sprintf( pMac,p, "\n\tPolaris Rates: ");
215 for(j=0; j<SIR_NUM_POLARIS_RATES; j++)
216 if(pSta->supportedRates.aniLegacyRates[j] > 0)
217 p += log_sprintf( pMac,p, "%d ", pSta->supportedRates.aniLegacyRates[j]);
218
219 p += log_sprintf( pMac,p, "\n\tTitan and Taurus Proprietary Rate Bitmap: %08x\n",
220 pSta->supportedRates.aniEnhancedRateBitmap);
221 p += log_sprintf( pMac,p, "\tMCS Rate Set Bitmap: ");
222 for(j=0; j<SIR_MAC_MAX_SUPPORTED_MCS_SET; j++)
223 p += log_sprintf( pMac,p, "%x ", pSta->supportedRates.supportedMCSSet[j]);
224
225 }
226 }
227 p += log_sprintf( pMac,p, "\nProbe response disable = %d\n",
228 pMac->lim.gLimProbeRespDisableFlag);
229
Jeff Johnson295189b2012-06-20 16:38:30 -0700230 p += log_sprintf( pMac,p, "Scan mode enable = %d\n",
231 pMac->sys.gSysEnableScanMode);
232 p += log_sprintf( pMac,p, "BackgroundScanDisable = %d\n",
233 pMac->lim.gLimBackgroundScanDisable);
234 p += log_sprintf( pMac,p, "ForceBackgroundScanDisable = %d\n",
235 pMac->lim.gLimForceBackgroundScanDisable);
236 p += log_sprintf( pMac,p, "LinkMonitor mode enable = %d\n",
237 pMac->sys.gSysEnableLinkMonitorMode);
238 p += log_sprintf( pMac,p, "Qos Capable = %d\n",
239 SIR_MAC_GET_QOS(pMac->lim.gLimCurrentBssCaps));
240 p += log_sprintf( pMac,p, "Wme Capable = %d\n",
241 LIM_BSS_CAPS_GET(WME, pMac->lim.gLimCurrentBssQosCaps));
242 p += log_sprintf( pMac,p, "Wsm Capable = %d\n",
243 LIM_BSS_CAPS_GET(WSM, pMac->lim.gLimCurrentBssQosCaps));
244 if (pMac->lim.gLimSystemRole == eLIM_STA_IN_IBSS_ROLE)
245 {
246 p += log_sprintf( pMac,p, "Number of peers in IBSS = %d\n",
247 pMac->lim.gLimNumIbssPeers);
248 if (pMac->lim.gLimNumIbssPeers)
249 {
250 tLimIbssPeerNode *pTemp;
251 pTemp = pMac->lim.gLimIbssPeerList;
252 p += log_sprintf( pMac,p, "MAC-Addr Ani Edca WmeInfo HT Caps #S,#E(Rates)\n");
253 while (pTemp != NULL)
254 {
255 p += log_sprintf( pMac,p, "%02X:%02X:%02X:%02X:%02X:%02X ",
256 pTemp->peerMacAddr[0],
257 pTemp->peerMacAddr[1],
258 pTemp->peerMacAddr[2],
259 pTemp->peerMacAddr[3],
260 pTemp->peerMacAddr[4],
261 pTemp->peerMacAddr[5]);
262 p += log_sprintf( pMac,p, " %d %d,%d %d %d %04X %d,%d\n",
263 pTemp->aniIndicator,
264 pTemp->edcaPresent, pTemp->wmeEdcaPresent,
265 pTemp->wmeInfoPresent,
266 pTemp->htCapable,
267 pTemp->capabilityInfo,
268 pTemp->supportedRates.numRates,
269 pTemp->extendedRates.numRates);
270 pTemp = pTemp->next;
271 }
272 }
273 }
Jeff Johnson295189b2012-06-20 16:38:30 -0700274 p += log_sprintf( pMac,p, "System Scan/Learn Mode bit = %d\n",
275 pMac->lim.gLimSystemInScanLearnMode);
276 p += log_sprintf( pMac,p, "Scan override = %d\n",
277 pMac->lim.gLimScanOverride);
278 p += log_sprintf( pMac,p, "CB State protection = %d\n",
279 pMac->lim.gLimCBStateProtection);
280 p += log_sprintf( pMac,p, "Count of Titan STA's = %d\n",
281 pMac->lim.gLimTitanStaCount);
282
283 //current BSS capability
284 p += log_sprintf( pMac,p, "**********Current BSS Capability********\n");
285 p += log_sprintf( pMac,p, "Ess = %d, ", SIR_MAC_GET_ESS(pMac->lim.gLimCurrentBssCaps));
286 p += log_sprintf( pMac,p, "Privacy = %d, ", SIR_MAC_GET_PRIVACY(pMac->lim.gLimCurrentBssCaps));
287 p += log_sprintf( pMac,p, "Short Preamble = %d, ", SIR_MAC_GET_SHORT_PREAMBLE(pMac->lim.gLimCurrentBssCaps));
288 p += log_sprintf( pMac,p, "Short Slot = %d, ", SIR_MAC_GET_SHORT_SLOT_TIME(pMac->lim.gLimCurrentBssCaps));
289 p += log_sprintf( pMac,p, "Qos = %d\n", SIR_MAC_GET_QOS(pMac->lim.gLimCurrentBssCaps));
290
291 //Protection related information
292 p += log_sprintf( pMac,p, "*****Protection related information******\n");
293 p += log_sprintf( pMac,p, "Protection %s\n", pMac->lim.gLimProtectionControl ? "Enabled" : "Disabled");
294
295 p += log_sprintf( pMac,p, "OBSS MODE = %d\n", pMac->lim.gHTObssMode);
Jeff Johnson295189b2012-06-20 16:38:30 -0700296 p += log_sprintf( pMac, p, "HT operating Mode = %d, llbCoexist = %d, llgCoexist = %d, ht20Coexist = %d, nonGfPresent = %d, RifsMode = %d, lsigTxop = %d\n",
297 pMac->lim.gHTOperMode, pMac->lim.llbCoexist, pMac->lim.llgCoexist,
298 pMac->lim.ht20MhzCoexist, pMac->lim.gHTNonGFDevicesPresent,
299 pMac->lim.gHTRifsMode, pMac->lim.gHTLSigTXOPFullSupport);
Jeff Johnson295189b2012-06-20 16:38:30 -0700300 p += log_sprintf(pMac, p, "2nd Channel offset = %d\n",
Jeff Johnsone7245742012-09-05 17:12:55 -0700301 psessionEntry->hHTSecondaryChannelOffset);
Jeff Johnson295189b2012-06-20 16:38:30 -0700302#endif
303 return p;
304}
305
306/*******************************************
307 * FUNCTION: triggerBeaconGen()
308 *
309 * This logdump sends SIR_SCH_BEACON_GEN_IND to SCH.
310 * SCH then proceeds to generate a beacon template
311 * and copy it to the Host/SoftMAC shared memory
312 *
313 * TODO - This routine can safely be deleted once
314 * beacon generation is working
315 ******************************************/
316char *triggerBeaconGen( tpAniSirGlobal pMac, char *p )
317{
318 tSirMsgQ mesg = { (tANI_U16) SIR_LIM_BEACON_GEN_IND, (tANI_U16) 0, (tANI_U32) 0 };
319
320 pMac->lim.gLimSmeState = eLIM_SME_NORMAL_STATE;
Jeff Johnsone7245742012-09-05 17:12:55 -0700321 MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, NO_SESSION, pMac->lim.gLimSmeState));
Jeff Johnson295189b2012-06-20 16:38:30 -0700322 pMac->lim.gLimSystemRole = eLIM_AP_ROLE;
323
324 p += log_sprintf( pMac, p,
325 "Posted SIR_LIM_BEACON_GEN_IND with result = %s\n",
326 (eSIR_SUCCESS == limPostMsgApi( pMac, &mesg ))?
327 "Success": "Failure" );
328
329 return p;
330}
331
332
333/*******************************************
334 * FUNCTION: testLimSendProbeRsp()
335 *
336 * This logdump sends SIR_MAC_MGMT_PROBE_RSP
337 *
338 * TODO - This routine can safely be deleted once
339 * the MGMT frame transmission is working
340 ******************************************/
341char *testLimSendProbeRsp( tpAniSirGlobal pMac, char *p )
342{
343 tSirMacAddr peerMacAddr = { 0, 1, 2, 3, 4, 5 };
344 tAniSSID ssId;
345 tANI_U32 len = SIR_MAC_MAX_SSID_LENGTH;
346 tpPESession psessionEntry = &pMac->lim.gpSession[0]; //TBD-RAJESH HOW TO GET sessionEntry?????
347
348
349 if( eSIR_SUCCESS != wlan_cfgGetStr( pMac,
350 WNI_CFG_SSID,
351 (tANI_U8 *) &ssId.ssId,
352 (tANI_U32 *) &len ))
353 {
354 // Could not get SSID from CFG. Log error.
355 p += log_sprintf( pMac, p, "Unable to retrieve SSID\n" );
356 return p;
357 }
358 else
359 ssId.length = (tANI_U8) len;
360
361 p += log_sprintf( pMac, p, "Calling limSendProbeRspMgmtFrame...\n" );
362 limSendProbeRspMgmtFrame( pMac, peerMacAddr, &ssId, -1, 1, psessionEntry , 0);
363
364 return p;
365}
366
367
368static char *sendSmeScanReq(tpAniSirGlobal pMac, char *p)
369{
370 tSirMsgQ msg;
371 tSirSmeScanReq scanReq, *pScanReq;
372
373 p += log_sprintf( pMac,p, "sendSmeScanReq: Preparing eWNI_SME_SCAN_REQ message\n");
374
375 pScanReq = (tSirSmeScanReq *) &scanReq;
376
Bansidhar Gopalachari2f7395d2013-07-12 11:24:23 +0530377 pScanReq = vos_mem_malloc(sizeof(tSirSmeScanReq));
378 if (NULL == pScanReq)
Jeff Johnson295189b2012-06-20 16:38:30 -0700379 {
Bansidhar Gopalachari2f7395d2013-07-12 11:24:23 +0530380 p += log_sprintf( pMac,p,"sendSmeScanReq: AllocateMemory() failed \n");
Jeff Johnson295189b2012-06-20 16:38:30 -0700381 return p;
382 }
383
384 pScanReq->messageType = eWNI_SME_SCAN_REQ;
385 pScanReq->minChannelTime = 30;
386 pScanReq->maxChannelTime = 130;
387 pScanReq->bssType = eSIR_INFRASTRUCTURE_MODE;
388 limGetMyMacAddr(pMac, pScanReq->bssId);
389 pScanReq->numSsid = 1;
Bansidhar Gopalachari2f7395d2013-07-12 11:24:23 +0530390 vos_mem_copy((void *) &pScanReq->ssId[0].ssId, (void *)"Ivan", 4);
Jeff Johnson295189b2012-06-20 16:38:30 -0700391 pScanReq->ssId[0].length = 4;
392 pScanReq->scanType = eSIR_ACTIVE_SCAN;
393 pScanReq->returnAfterFirstMatch = 0;
394 pScanReq->returnUniqueResults = 0;
395 pScanReq->returnFreshResults = SIR_BG_SCAN_PURGE_RESUTLS|SIR_BG_SCAN_RETURN_FRESH_RESULTS;
396 pScanReq->channelList.numChannels = 1;
397 pScanReq->channelList.channelNumber[0] = 6;
398 pScanReq->uIEFieldLen = 0;
399 pScanReq->uIEFieldOffset = sizeof(tSirSmeScanReq);
400 pScanReq->sessionId = 0;
401
402 msg.type = eWNI_SME_SCAN_REQ;
403 msg.bodyptr = pScanReq;
404 msg.bodyval = 0;
405 p += log_sprintf( pMac,p, "sendSmeScanReq: limPostMsgApi(eWNI_SME_SCAN_REQ) \n");
406 limPostMsgApi(pMac, &msg);
407
408 return p;
409}
410
411static char *sendSmeDisAssocReq(tpAniSirGlobal pMac, char *p,tANI_U32 arg1 ,tANI_U32 arg2)
412{
413
414 tpDphHashNode pStaDs;
415 tSirMsgQ msg;
416 tSirSmeDisassocReq *pDisAssocReq;
417 tpPESession psessionEntry;
418
419 //arg1 - assocId
420 //arg2 - sessionId
421 if( arg1 < 1 )
422 {
423 p += log_sprintf( pMac,p,"Invalid session OR Assoc ID \n");
424 return p;
425 }
426
427 if((psessionEntry = peFindSessionBySessionId(pMac,(tANI_U8)arg2) )== NULL)
428 {
429 p += log_sprintf( pMac,p,"Session does not exist for given session Id \n");
430 return p;
431 }
432
433 pStaDs = dphGetHashEntry(pMac, (tANI_U16)arg1, &psessionEntry->dph.dphHashTable);
434
435 if(NULL == pStaDs)
436 {
437 p += log_sprintf( pMac,p, "Could not find station with assocId = %d\n", arg1);
438 return p;
439 }
440
Bansidhar Gopalachari2f7395d2013-07-12 11:24:23 +0530441 pDisAssocReq = vos_mem_malloc(sizeof(tSirSmeDisassocReq));
442 if (NULL == pDisAssocReq)
Jeff Johnson295189b2012-06-20 16:38:30 -0700443 {
Bansidhar Gopalachari2f7395d2013-07-12 11:24:23 +0530444 p += log_sprintf( pMac,p,"sendSmeDisAssocReq: AllocateMemory() failed \n");
Jeff Johnson295189b2012-06-20 16:38:30 -0700445 return p;
446 }
447
448 if( ( (psessionEntry->limSystemRole == eLIM_STA_ROLE) ||
449 (psessionEntry ->limSystemRole == eLIM_BT_AMP_STA_ROLE) ) &&
450 (psessionEntry->statypeForBss == STA_ENTRY_PEER))
451 {
452 sirCopyMacAddr(pDisAssocReq->bssId,psessionEntry->bssId);
453 sirCopyMacAddr(pDisAssocReq->peerMacAddr,psessionEntry->bssId);
454 }
455 if((psessionEntry->limSystemRole == eLIM_BT_AMP_AP_ROLE)
Jeff Johnson295189b2012-06-20 16:38:30 -0700456 || (psessionEntry->limSystemRole == eLIM_AP_ROLE)
Jeff Johnson295189b2012-06-20 16:38:30 -0700457 )
458 {
459 sirCopyMacAddr(pDisAssocReq->peerMacAddr,pStaDs->staAddr);
460 sirCopyMacAddr(pDisAssocReq->bssId,psessionEntry->bssId);
461 }
462
463 pDisAssocReq->messageType = eWNI_SME_DISASSOC_REQ;
464
465 pDisAssocReq->length = sizeof(tSirSmeDisassocReq);
466
467 pDisAssocReq->reasonCode = eSIR_MAC_UNSPEC_FAILURE_REASON;
468
469 pDisAssocReq->sessionId = 0;
470
471 pDisAssocReq->transactionId = 0;
472
473 msg.type = eWNI_SME_DISASSOC_REQ;
474 msg.bodyptr = pDisAssocReq;
475 msg.bodyval = 0;
476
477 p += log_sprintf( pMac,p, "sendSmeDisAssocReq: limPostMsgApi(eWNI_SME_DISASSOC_REQ) \n");
478 limPostMsgApi(pMac, &msg);
479
480 return p;
481}
482
483
484static char *sendSmeStartBssReq(tpAniSirGlobal pMac, char *p,tANI_U32 arg1)
485{
486 tSirMsgQ msg;
487 tSirSmeStartBssReq *pStartBssReq;
488 unsigned char *pBuf;
Jeff Johnsone7245742012-09-05 17:12:55 -0700489 ePhyChanBondState cbMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700490 tSirNwType nwType;
491
492 p += log_sprintf( pMac,p, "sendSmeStartBssReq: Preparing eWNI_SME_START_BSS_REQ message\n");
493
494 if(arg1 > 2)
495 {
496 p += log_sprintf( pMac,p,"Invalid Argument1 \n");
497 return p;
498 }
499
Bansidhar Gopalachari2f7395d2013-07-12 11:24:23 +0530500 pStartBssReq = vos_mem_malloc(sizeof(tSirSmeStartBssReq));
501 if (NULL == pStartBssReq)
Jeff Johnson295189b2012-06-20 16:38:30 -0700502 {
Bansidhar Gopalachari2f7395d2013-07-12 11:24:23 +0530503 p += log_sprintf( pMac,p,"sendSmeStartBssReq: AllocateMemory() failed \n");
Jeff Johnson295189b2012-06-20 16:38:30 -0700504 return p;
505 }
506
507 pStartBssReq->messageType = eWNI_SME_START_BSS_REQ;
508 pStartBssReq->length = 29; // 0x1d
509
510 if(arg1 == 0) //BTAMP STATION
511 {
512 pStartBssReq->bssType = eSIR_BTAMP_STA_MODE;
513
514 pStartBssReq->ssId.length = 5;
Bansidhar Gopalachari2f7395d2013-07-12 11:24:23 +0530515 vos_mem_copy((void *) &pStartBssReq->ssId.ssId, (void *)"BTSTA", 5);
Jeff Johnson295189b2012-06-20 16:38:30 -0700516 }
517 else if(arg1 == 1) //BTAMP AP
518 {
519 pStartBssReq->bssType = eSIR_BTAMP_AP_MODE;
520 pStartBssReq->ssId.length = 4;
Bansidhar Gopalachari2f7395d2013-07-12 11:24:23 +0530521 vos_mem_copy((void *) &pStartBssReq->ssId.ssId, (void *)"BTAP", 4);
Jeff Johnson295189b2012-06-20 16:38:30 -0700522 }
523 else //IBSS
524 {
525 pStartBssReq->bssType = eSIR_IBSS_MODE;
526 pStartBssReq->ssId.length = 4;
Bansidhar Gopalachari2f7395d2013-07-12 11:24:23 +0530527 vos_mem_copy((void *) &pStartBssReq->ssId.ssId, (void *)"Ibss", 4);
Jeff Johnson295189b2012-06-20 16:38:30 -0700528 }
529
530 // Filling in channel ID 6
531 pBuf = &(pStartBssReq->ssId.ssId[pStartBssReq->ssId.length]);
532 *pBuf = 6;
533 pBuf++;
534
535 // Filling in CB mode
Jeff Johnsone7245742012-09-05 17:12:55 -0700536 cbMode = PHY_SINGLE_CHANNEL_CENTERED;
Bansidhar Gopalachari2f7395d2013-07-12 11:24:23 +0530537 vos_mem_copy(pBuf, (tANI_U8 *)&cbMode, sizeof(ePhyChanBondState));
Jeff Johnsone7245742012-09-05 17:12:55 -0700538 pBuf += sizeof(ePhyChanBondState);
Jeff Johnson295189b2012-06-20 16:38:30 -0700539
540 // Filling in RSN IE Length to zero
Bansidhar Gopalachari2f7395d2013-07-12 11:24:23 +0530541 vos_mem_set(pBuf, sizeof(tANI_U16), 0); //tSirRSNie->length
Jeff Johnson295189b2012-06-20 16:38:30 -0700542 pBuf += sizeof(tANI_U16);
543
544 // Filling in NW Type
545 nwType = eSIR_11G_NW_TYPE;
Bansidhar Gopalachari2f7395d2013-07-12 11:24:23 +0530546 vos_mem_copy(pBuf, (tANI_U8 *)&nwType, sizeof(tSirNwType));
Jeff Johnson295189b2012-06-20 16:38:30 -0700547 pBuf += sizeof(tSirNwType);
548
549 /* ---- To be filled by LIM later ----
550 pStartBssReq->operationalRateSet
551 pStartBssReq->extendedRateSet
552 pStartBssReq->dot11mode
553 pStartBssReq->bssId
554 pStartBssReq->selfMacAddr
555 pStartBssReq->beaconInterval
556 pStartBssReq->sessionId = 0;
557 pStartBssReq->transactionId = 0;
558 * ------------------------------------ */
559
560 msg.type = eWNI_SME_START_BSS_REQ;
561 msg.bodyptr = pStartBssReq;
562 msg.bodyval = 0;
563 p += log_sprintf( pMac,p, "sendSmeStartBssReq: limPostMsgApi(eWNI_SME_START_BSS_REQ) \n");
564 limPostMsgApi(pMac, &msg);
565
566 return p;
567}
568
569static char *sendSmeStopBssReq(tpAniSirGlobal pMac, char *p, tANI_U32 sessionId)
570{
571 tSirMsgQ msg;
572 tSirSmeStopBssReq stopBssReq, *pStopBssReq;
573 tANI_U16 msgLen = 0;
574 tpPESession psessionEntry;
575
576 psessionEntry = peFindSessionBySessionId(pMac, (tANI_U8)sessionId);
577 if ( psessionEntry == NULL )
578 {
579 limLog(pMac, LOGP, FL("Session entry does not exist for given sessionID \n"));
580 return p;
581 }
582
583 p += log_sprintf( pMac,p, "sendSmeStopBssReq: Preparing eWNI_SME_STOP_BSS_REQ message\n");
584 pStopBssReq = (tSirSmeStopBssReq *) &stopBssReq;
585
Bansidhar Gopalachari2f7395d2013-07-12 11:24:23 +0530586 pStopBssReq = vos_mem_malloc(sizeof(tSirSmeStopBssReq));
587 if (NULL == pStopBssReq)
Jeff Johnson295189b2012-06-20 16:38:30 -0700588 {
Bansidhar Gopalachari2f7395d2013-07-12 11:24:23 +0530589 p += log_sprintf( pMac,p,"sendSmeStopBssReq: AllocateMemory() failed \n");
Jeff Johnson295189b2012-06-20 16:38:30 -0700590 return p;
591 }
592
593 pStopBssReq->messageType = eWNI_SME_STOP_BSS_REQ;
594 msgLen += sizeof(tANI_U32); // msgType + length
595
596 pStopBssReq->reasonCode = eSIR_SME_SUCCESS;
597 msgLen += sizeof(tSirResultCodes);
598
Bansidhar Gopalachari2f7395d2013-07-12 11:24:23 +0530599 vos_mem_copy((void *) &pStopBssReq->bssId, (void *)psessionEntry->bssId, 6);
Jeff Johnson295189b2012-06-20 16:38:30 -0700600 msgLen += sizeof(tSirMacAddr);
601
602 pStopBssReq->sessionId = (tANI_U8)sessionId;
603 msgLen += sizeof(tANI_U8);
604
605 pStopBssReq->transactionId = 0;
606 msgLen += sizeof(tANI_U16);
607
608 pStopBssReq->length = msgLen;
609
610 msg.type = eWNI_SME_STOP_BSS_REQ;
611 msg.bodyptr = pStopBssReq;
612 msg.bodyval = 0;
613 p += log_sprintf( pMac,p, "sendSmeStopBssReq: limPostMsgApi(eWNI_SME_STOP_BSS_REQ) \n");
614 limPostMsgApi(pMac, &msg);
615
616 return p;
617}
618
619static char *sendSmeJoinReq(tpAniSirGlobal pMac, char *p)
620{
621 tSirMsgQ msg;
622 tSirSmeJoinReq *pJoinReq;
623 unsigned char *pBuf;
624 tANI_U16 msgLen = 307;
625
626 tANI_U8 msgDump[307] = {
627 0x06, 0x12, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
628 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00,
629 0xDE, 0xAD, 0xBA, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
630 0x00, 0x00, 0x00, 0x64, 0x00, 0x21, 0x04, 0x02, 0x00, 0x00,
631 0x00, 0x01, 0x1E, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x18,
632 0x00, 0x00, 0x00, 0xA8, 0x85, 0x4F, 0x7A, 0x00, 0x06, 0x41,
633 0x6E, 0x69, 0x4E, 0x65, 0x74, 0x01, 0x04, 0x82, 0x84, 0x8B,
634 0x96, 0x03, 0x01, 0x06, 0x07, 0x06, 0x55, 0x53, 0x49, 0x01,
635 0x0E, 0x1E, 0x2A, 0x01, 0x00, 0x32, 0x08, 0x0C, 0x12, 0x18,
636 0x24, 0x30, 0x48, 0x60, 0x6C, 0x2D, 0x1A, 0xEE, 0x11, 0x03,
637 0xFF, 0xFF, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
638 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
639 0x00, 0x00, 0x00, 0x3D, 0x16, 0x06, 0x07, 0x11, 0x00, 0x00,
640 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
641 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xDD, 0x18, 0x00,
642 0x50, 0xF2, 0x02, 0x01, 0x01, 0x01, 0x00, 0x03, 0xA4, 0x00,
643 0x00, 0x27, 0xA4, 0x00, 0x00, 0x42, 0x43, 0x5E, 0x00, 0x62,
644 0x32, 0x2F, 0x00, 0xDD, 0x14, 0x00, 0x0A, 0xF5, 0x00, 0x03,
645 0x01, 0x03, 0x05, 0x0A, 0x02, 0x80, 0xC0, 0x12, 0x06, 0xFF,
646 0xFF, 0xFF, 0xFF, 0xB6, 0x0D, 0xDD, 0x6E, 0x00, 0x50, 0xF2,
647 0x04, 0x10, 0x4A, 0x00, 0x01, 0x10, 0x10, 0x44, 0x00, 0x01,
648 0x01, 0x10, 0x3B, 0x00, 0x01, 0x03, 0x10, 0x47, 0x00, 0x10,
649 0xDB, 0xC6, 0x77, 0x28, 0xB9, 0xF3, 0xD8, 0x58, 0x86, 0xFF,
650 0xFC, 0x6B, 0xB6, 0xB9, 0x27, 0x79, 0x10, 0x21, 0x00, 0x08,
651 0x51, 0x75, 0x61, 0x6C, 0x63, 0x6F, 0x6D, 0x6D, 0x10, 0x23,
652 0x00, 0x07, 0x57, 0x46, 0x52, 0x34, 0x30, 0x33, 0x31, 0x10,
653 0x24, 0x00, 0x06, 0x4D, 0x4E, 0x31, 0x32, 0x33, 0x34, 0x10,
654 0x42, 0x00, 0x06, 0x53, 0x4E, 0x31, 0x32, 0x33, 0x34, 0x10,
655 0x54, 0x00, 0x08, 0x00, 0x06, 0x00, 0x50, 0xF2, 0x04, 0x00,
656 0x01, 0x10, 0x11, 0x00, 0x06, 0x31, 0x31, 0x6E, 0x2D, 0x41,
657 0x50, 0x10, 0x08, 0x00, 0x02, 0x01, 0x8E
658 };
659
Bansidhar Gopalachari2f7395d2013-07-12 11:24:23 +0530660 pJoinReq = vos_mem_malloc(msgLen);
661 if (NULL == pJoinReq)
Jeff Johnson295189b2012-06-20 16:38:30 -0700662 {
Bansidhar Gopalachari2f7395d2013-07-12 11:24:23 +0530663 p += log_sprintf( pMac,p,"sendSmeJoinReq: AllocateMemory() failed \n");
Jeff Johnson295189b2012-06-20 16:38:30 -0700664 return p;
665 }
666
667 pBuf = (unsigned char *)pJoinReq;
Bansidhar Gopalachari2f7395d2013-07-12 11:24:23 +0530668 vos_mem_copy(pBuf, (tANI_U8 *)msgDump, msgLen);
Jeff Johnson295189b2012-06-20 16:38:30 -0700669
670 msg.type = eWNI_SME_JOIN_REQ;
671 msg.bodyptr = pJoinReq;
672 msg.bodyval = 0;
673 limPostMsgApi(pMac, &msg);
674
675 return p;
676}
677
678
679static char *printSessionInfo(tpAniSirGlobal pMac, char *p)
680{
681 tpPESession psessionEntry = &pMac->lim.gpSession[0];
682 tANI_U8 i;
683
684 p += log_sprintf( pMac, p, "Dump PE Session \n");
685
686 for(i=0; i < pMac->lim.maxBssId; i++)
687 {
688 if( pMac->lim.gpSession[i].valid )
689 {
690 psessionEntry = &pMac->lim.gpSession[i];
691 p += log_sprintf( pMac,p, "*****************************************\n");
692 p += log_sprintf( pMac,p, " PE Session [%d] \n", i);
693 p += log_sprintf( pMac,p, "available: %d \n", psessionEntry->available);
694 p += log_sprintf( pMac,p, "peSessionId: %d, smeSessionId: %d, transactionId: %d \n",
695 psessionEntry->peSessionId, psessionEntry->smeSessionId, psessionEntry->smeSessionId);
696 p += log_sprintf( pMac,p, "bssId: %02X:%02X:%02X:%02X:%02X:%02X \n",
697 psessionEntry->bssId[0], psessionEntry->bssId[1], psessionEntry->bssId[2],
698 psessionEntry->bssId[3], psessionEntry->bssId[4], psessionEntry->bssId[5]);
699 p += log_sprintf( pMac,p, "selfMacAddr: %02X:%02X:%02X:%02X:%02X:%02X \n",
700 psessionEntry->selfMacAddr[0], psessionEntry->selfMacAddr[1], psessionEntry->selfMacAddr[2],
701 psessionEntry->selfMacAddr[3], psessionEntry->selfMacAddr[4], psessionEntry->selfMacAddr[5]);
702 p += log_sprintf( pMac,p, "bssIdx: %d \n", psessionEntry->bssIdx);
703 p += log_sprintf( pMac,p, "valid: %d \n", psessionEntry->valid);
704 p += log_sprintf( pMac,p, "limMlmState: (%d) %s ", psessionEntry->limMlmState, limMlmStateStr(psessionEntry->limMlmState) );
705 p += log_sprintf( pMac,p, "limPrevMlmState: (%d) %s ", psessionEntry->limPrevMlmState, limMlmStateStr(psessionEntry->limMlmState) );
706 p += log_sprintf( pMac,p, "limSmeState: (%d) %s ", psessionEntry->limSmeState, limSmeStateStr(psessionEntry->limSmeState) );
707 p += log_sprintf( pMac,p, "limPrevSmeState: (%d) %s ", psessionEntry->limPrevSmeState, limSmeStateStr(psessionEntry->limPrevSmeState) );
708 p += log_sprintf( pMac,p, "limSystemRole: (%d) %s \n", psessionEntry->limSystemRole, getRole(psessionEntry->limSystemRole) );
709 p += log_sprintf( pMac,p, "bssType: (%d) %s \n", psessionEntry->bssType, limBssTypeStr(psessionEntry->bssType));
710 p += log_sprintf( pMac,p, "operMode: %d \n", psessionEntry->operMode);
711 p += log_sprintf( pMac,p, "dot11mode: %d \n", psessionEntry->dot11mode);
Jeff Johnsone7245742012-09-05 17:12:55 -0700712 p += log_sprintf( pMac,p, "htCapability: %d \n", psessionEntry->htCapability);
Jeff Johnson295189b2012-06-20 16:38:30 -0700713 p += log_sprintf( pMac,p, "limRFBand: %d \n", psessionEntry->limRFBand);
714 p += log_sprintf( pMac,p, "limIbssActive: %d \n", psessionEntry->limIbssActive);
715 p += log_sprintf( pMac,p, "limCurrentAuthType: %d \n", psessionEntry->limCurrentAuthType);
716 p += log_sprintf( pMac,p, "limCurrentBssCaps: %d \n", psessionEntry->limCurrentBssCaps);
717 p += log_sprintf( pMac,p, "limCurrentBssQosCaps: %d \n", psessionEntry->limCurrentBssQosCaps);
718 p += log_sprintf( pMac,p, "limCurrentBssPropCap: %d \n", psessionEntry->limCurrentBssPropCap);
719 p += log_sprintf( pMac,p, "limSentCapsChangeNtf: %d \n", psessionEntry->limSentCapsChangeNtf);
720 p += log_sprintf( pMac,p, "LimAID: %d \n", psessionEntry->limAID);
721 p += log_sprintf( pMac,p, "ReassocbssId: %02X:%02X:%02X:%02X:%02X:%02X \n",
722 psessionEntry->limReAssocbssId[0], psessionEntry->limReAssocbssId[1], psessionEntry->limReAssocbssId[2],
723 psessionEntry->limReAssocbssId[3], psessionEntry->limReAssocbssId[4], psessionEntry->limReAssocbssId[5]);
724 p += log_sprintf( pMac,p, "limReassocChannelId: %d \n", psessionEntry->limReassocChannelId);
725 p += log_sprintf( pMac,p, "limReassocBssCaps: %d \n", psessionEntry->limReassocBssCaps);
726 p += log_sprintf( pMac,p, "limReassocBssQosCaps: %d \n", psessionEntry->limReassocBssQosCaps);
727 p += log_sprintf( pMac,p, "limReassocBssPropCap: %d \n", psessionEntry->limReassocBssPropCap);
Jeff Johnson295189b2012-06-20 16:38:30 -0700728 p += log_sprintf( pMac,p, "********************************************\n");
729 }
730 }
731 return p;
732}
733
734void
735limSetEdcaBcastACMFlag(tpAniSirGlobal pMac, tANI_U32 ac, tANI_U32 acmFlag)
736{
737 tpPESession psessionEntry = &pMac->lim.gpSession[0]; //TBD-RAJESH HOW TO GET sessionEntry?????
738 psessionEntry->gLimEdcaParamsBC[ac].aci.acm = (tANI_U8)acmFlag;
739 psessionEntry->gLimEdcaParamSetCount++;
740 schSetFixedBeaconFields(pMac,psessionEntry);
741}
742
743static char *
744limDumpEdcaParams(tpAniSirGlobal pMac, char *p)
745{
746 tANI_U8 i = 0;
747 tpPESession psessionEntry = &pMac->lim.gpSession[0]; //TBD-RAJESH HOW TO GET sessionEntry?????
748 p += log_sprintf( pMac,p, "EDCA parameter set count = %d\n", psessionEntry->gLimEdcaParamSetCount);
749 p += log_sprintf( pMac,p, "Broadcast parameters\n");
750 p += log_sprintf( pMac,p, "AC\tACI\tACM\tAIFSN\tCWMax\tCWMin\tTxopLimit\t\n");
751 for(i = 0; i < MAX_NUM_AC; i++)
752 {
753 //right now I am just interested in ACM bit. this can be extended for all other EDCA paramters.
754 p += log_sprintf( pMac,p, "%d\t%d\t%d\t%d\t%d\t%d\t%d\n", i,
755 psessionEntry->gLimEdcaParamsBC[i].aci.aci, psessionEntry->gLimEdcaParamsBC[i].aci.acm,
756 psessionEntry->gLimEdcaParamsBC[i].aci.aifsn, psessionEntry->gLimEdcaParamsBC[i].cw.max,
757 psessionEntry->gLimEdcaParamsBC[i].cw.min, psessionEntry->gLimEdcaParamsBC[i].txoplimit);
758 }
759
760 p += log_sprintf( pMac,p, "\nLocal parameters\n");
761 p += log_sprintf( pMac,p, "AC\tACI\tACM\tAIFSN\tCWMax\tCWMin\tTxopLimit\t\n");
762 for(i = 0; i < MAX_NUM_AC; i++)
763 {
764 //right now I am just interested in ACM bit. this can be extended for all other EDCA paramters.
765 p += log_sprintf( pMac,p, "%d\t%d\t%d\t%d\t%d\t%d\t%d\n", i,
766 psessionEntry->gLimEdcaParams[i].aci.aci, psessionEntry->gLimEdcaParams[i].aci.acm,
767 psessionEntry->gLimEdcaParams[i].aci.aifsn, psessionEntry->gLimEdcaParams[i].cw.max,
768 psessionEntry->gLimEdcaParams[i].cw.min, psessionEntry->gLimEdcaParams[i].txoplimit);
769 }
770
771 return p;
772}
773
774
775static char* limDumpTspecEntry(tpAniSirGlobal pMac, char *p, tANI_U32 tspecEntryNo)
776{
777 tpLimTspecInfo pTspecList;
778 if(tspecEntryNo >= LIM_NUM_TSPEC_MAX)
779 {
780 p += log_sprintf( pMac,p, "Tspec Entry no. %d is out of allowed range(0 .. %d)\n",
781 tspecEntryNo, (LIM_NUM_TSPEC_MAX - 1));
782 return p;
783 }
784 pTspecList = &pMac->lim.tspecInfo[tspecEntryNo];
785 if (pTspecList->inuse)
786 p += log_sprintf( pMac,p, "Entry %d is VALID\n", tspecEntryNo);
787 else
788 {
789 p += log_sprintf( pMac,p, "Entry %d is UNUSED\n", tspecEntryNo);
790 return p;
791 }
792 p += log_sprintf( pMac,p, "\tSta %0x:%0x:%0x:%0x:%0x:%0x, AID %d, Index %d\n",
793 pTspecList->staAddr[0], pTspecList->staAddr[1],
794 pTspecList->staAddr[2], pTspecList->staAddr[3],
795 pTspecList->staAddr[4], pTspecList->staAddr[5],
796 pTspecList->assocId, pTspecList->idx);
797 p += log_sprintf( pMac,p, "\tType %d, Length %d, ackPolicy %d, userPrio %d, accessPolicy = %d, Dir %d, tsid %d\n",
798 pTspecList->tspec.type, pTspecList->tspec.length,
799 pTspecList->tspec.tsinfo.traffic.ackPolicy, pTspecList->tspec.tsinfo.traffic.userPrio,
800 pTspecList->tspec.tsinfo.traffic.accessPolicy, pTspecList->tspec.tsinfo.traffic.direction,
801 pTspecList->tspec.tsinfo.traffic.tsid);
802 p += log_sprintf( pMac,p, "\tPsb %d, Agg %d, TrafficType %d, schedule %d; msduSz: nom %d, max %d\n",
803 pTspecList->tspec.tsinfo.traffic.psb, pTspecList->tspec.tsinfo.traffic.aggregation,
804 pTspecList->tspec.tsinfo.traffic.trafficType, pTspecList->tspec.tsinfo.schedule.schedule,
805 pTspecList->tspec.nomMsduSz, pTspecList->tspec.maxMsduSz);
806 p += log_sprintf( pMac,p, "\tSvcInt: Min %d, Max %d; dataRate: Min %d, mean %d, peak %d\n",
807 pTspecList->tspec.minSvcInterval, pTspecList->tspec.maxSvcInterval,
808 pTspecList->tspec.minDataRate, pTspecList->tspec.meanDataRate,
809 pTspecList->tspec.peakDataRate);
810 p += log_sprintf( pMac,p, "\tmaxBurstSz %d, delayBound %d, minPhyRate %d, surplusBw %d, mediumTime %d\n",
811 pTspecList->tspec.maxBurstSz, pTspecList->tspec.delayBound,
812 pTspecList->tspec.minPhyRate, pTspecList->tspec.surplusBw,
813 pTspecList->tspec.mediumTime);
814
815 return p;
816}
817
818static char* dumpTspecTableSummary(tpAniSirGlobal pMac, tpLimTspecInfo pTspecList, char *p, int ctspec)
819{
820 p += log_sprintf( pMac, p, "%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\n",
821 ctspec, pTspecList->idx, pTspecList->assocId,
822 pTspecList->tspec.tsinfo.traffic.ackPolicy, pTspecList->tspec.tsinfo.traffic.userPrio,
823 pTspecList->tspec.tsinfo.traffic.psb, pTspecList->tspec.tsinfo.traffic.aggregation,
824 pTspecList->tspec.tsinfo.traffic.accessPolicy, pTspecList->tspec.tsinfo.traffic.direction,
825 pTspecList->tspec.tsinfo.traffic.tsid, pTspecList->tspec.tsinfo.traffic.trafficType);
826
827 return p;
828}
829
830
831static char* limDumpDphTableSummary(tpAniSirGlobal pMac,char *p)
832{
833 tANI_U8 i, j;
834 p += log_sprintf( pMac,p, "DPH Table dump\n");
835
836 for(j=0; j < pMac->lim.maxBssId; j++)
837 {
838 /* Find first free room in session table */
839 if(pMac->lim.gpSession[j].valid)
840 {
841 p += log_sprintf( pMac,p, "aid staId bssid encPol qosMode wme 11e wsm staaddr\n");
842 for(i = 0; i < pMac->lim.gpSession[j].dph.dphHashTable.size; i++)
843 {
844 if (pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].added)
845 {
846 p += log_sprintf( pMac,p, "%d %d %d %d %d %d %d %d %x:%x:%x:%x:%x:%x\n",
847 pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].assocId,
848 pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].staIndex,
849 pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].bssId,
850 pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].encPolicy,
851 pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].qosMode,
852 pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].wmeEnabled,
853 pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].lleEnabled,
854 pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].wsmEnabled,
855 pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].staAuthenticated,
856 pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].staAddr[0],
857 pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].staAddr[1],
858 pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].staAddr[2],
859 pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].staAddr[3],
860 pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].staAddr[4],
861 pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].staAddr[5]);
862 }
863 }
864 }
865 }
866 return p;
867}
868
869// add the specified tspec to the tspec list
870static char* limDumpTsecTable( tpAniSirGlobal pMac, char* p)
871{
872 int ctspec;
873 tpLimTspecInfo pTspecList = &pMac->lim.tspecInfo[0];
874
875 p += log_sprintf( pMac,p, "=======LIM TSPEC TABLE DUMP\n");
876 p += log_sprintf( pMac,p, "Num\tIdx\tAID\tAckPol\tUP\tPSB\tAgg\tAccessPol\tDir\tTSID\ttraffic\n");
877
878 for (ctspec = 0; ctspec < LIM_NUM_TSPEC_MAX; ctspec++, pTspecList++)
879 {
880 if (pTspecList->inuse)
881 p = dumpTspecTableSummary(pMac, pTspecList, p, ctspec);
882 }
883 return p;
884}
885
886static char *
887dump_lim_tspec_table( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
888{
889 (void) arg1; (void) arg2; (void) arg3; (void) arg4;
890 p = limDumpTsecTable(pMac, p);
891 return p;
892}
893
894static char *
895dump_lim_tspec_entry( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
896{
897 (void) arg2; (void) arg3; (void) arg4;
898 p = limDumpTspecEntry(pMac, p, arg1);
899 return p;
900}
901
902static char *
903dump_lim_dph_table_summary( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
904{
905 (void) arg2; (void) arg3; (void) arg4;
906 p = limDumpDphTableSummary(pMac, p);
907 return p;
908}
909
910
911static char *
912dump_lim_link_monitor_stats( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
913{
914 tANI_U32 ind, val;
915
916 (void) arg2; (void) arg3; (void) arg4;
917 p += log_sprintf( pMac,p, "\n ----- LIM Heart Beat Stats ----- \n");
918 p += log_sprintf( pMac,p, "No. of HeartBeat Failures in LinkEst State = %d\n",
919 pMac->lim.gLimHBfailureCntInLinkEstState);
920 p += log_sprintf( pMac,p, "No. of Probe Failures after HB failed = %d\n",
921 pMac->lim.gLimProbeFailureAfterHBfailedCnt);
922 p += log_sprintf( pMac,p, "No. of HeartBeat Failures in Other States = %d\n",
923 pMac->lim.gLimHBfailureCntInOtherStates);
924
925 if (wlan_cfgGetInt(pMac, WNI_CFG_HEART_BEAT_THRESHOLD, &val) == eSIR_SUCCESS)
926 p += log_sprintf( pMac,p, "Cfg HeartBeat Threshold = %d\n", val);
927
928 p += log_sprintf( pMac,p, "# Beacons Rcvd in HB interval # of times\n");
929
930 for (ind = 1; ind < MAX_NO_BEACONS_PER_HEART_BEAT_INTERVAL; ind++)
931 {
932 p += log_sprintf( pMac,p, "\t\t\t\t\t\t\t\t%2d\t\t\t\t\t\t\t\t\t\t\t%8d\n", ind,
933 pMac->lim.gLimHeartBeatBeaconStats[ind]);
934 }
935 p += log_sprintf( pMac,p, "\t\t\t\t\t\t\t\t%2d>\t\t\t\t\t\t\t\t\t\t%8d\n",
936 MAX_NO_BEACONS_PER_HEART_BEAT_INTERVAL-1,
937 pMac->lim.gLimHeartBeatBeaconStats[0]);
938
939 if (arg1 != 0)
940 {
941 for (ind = 0; ind < MAX_NO_BEACONS_PER_HEART_BEAT_INTERVAL; ind++)
942 pMac->lim.gLimHeartBeatBeaconStats[ind] = 0;
943
944 pMac->lim.gLimHBfailureCntInLinkEstState = 0;
945 pMac->lim.gLimProbeFailureAfterHBfailedCnt = 0;
946 pMac->lim.gLimHBfailureCntInOtherStates = 0;
947
948 p += log_sprintf( pMac,p, "\nReset HeartBeat Statistics\n");
949 }
950 return p;
951}
952
953static char *
954dump_lim_edca_params( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
955{
956 (void) arg1; (void) arg2; (void) arg3; (void) arg4;
957 p = limDumpEdcaParams(pMac, p);
958 return p;
959}
960
961static char *
962dump_lim_acm_set( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
963{
964 (void) arg3; (void) arg4;
965 limSetEdcaBcastACMFlag(pMac, arg1 /*ac(0..3)*/, arg2 /*(acmFlag = 1 to set ACM*/);
966 return p;
967}
968
969static char *
970dump_lim_bgscan_toggle( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
971{
972 (void) arg2; (void) arg3; (void) arg4;
973 pMac->lim.gLimForceBackgroundScanDisable = (arg1 == 0) ? 1 : 0;
974 p += log_sprintf( pMac,p, "Bgnd scan is now %s\n",
975 (pMac->lim.gLimForceBackgroundScanDisable) ? "Disabled" : "On");
976 return p;
977}
978
979static char *
980dump_lim_linkmonitor_toggle( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
981{
982 (void) arg2; (void) arg3; (void) arg4;
983 pMac->sys.gSysEnableLinkMonitorMode = (arg1 == 0) ? 0 : 1;
984 p += log_sprintf( pMac,p, "LinkMonitor mode enable = %s\n",
985 (pMac->sys.gSysEnableLinkMonitorMode) ? "On" : "Off");
986 return p;
987}
988
989static char *
990dump_lim_proberesp_toggle( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
991{
992 (void) arg2; (void) arg3; (void) arg4;
993 pMac->lim.gLimProbeRespDisableFlag = (arg1 == 0) ? 0 : 1;
994 p += log_sprintf( pMac,p, "ProbeResponse mode disable = %s\n",
995 (pMac->lim.gLimProbeRespDisableFlag) ? "On" : "Off");
996 return p;
997}
998
999static char *
1000dump_lim_add_sta( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
1001{
1002#ifdef FIXME_GEN6
1003 tpDphHashNode pStaDs;
1004 tpPESession psessionEntry = &pMac->lim.gpSession[0]; //TBD-RAJESH HOW TO GET sessionEntry?????
1005 tSirMacAddr staMac = {0};
Gopichand Nakkala777e6032012-12-31 16:39:21 -08001006 tANI_U16 peerIdx;
Jeff Johnson295189b2012-06-20 16:38:30 -07001007 if(arg2 > 5)
1008 goto addStaFail;
Gopichand Nakkala777e6032012-12-31 16:39:21 -08001009 peerIdx = limAssignPeerIdx(pMac, psessionEntry);
1010 pStaDs = dphGetHashEntry(pMac, peerIdx);
Jeff Johnson295189b2012-06-20 16:38:30 -07001011 if(NULL == pStaDs)
1012 {
1013 staMac[5] = (tANI_U8) arg1;
Gopichand Nakkala777e6032012-12-31 16:39:21 -08001014 pStaDs = dphAddHashEntry(pMac, staMac, peerIdx, &psessionEntry->dph.dphHashTable);
Jeff Johnson295189b2012-06-20 16:38:30 -07001015 if(NULL == pStaDs)
1016 goto addStaFail;
1017
1018 pStaDs->staType = STA_ENTRY_PEER;
1019 switch(arg2)
1020 {
1021 //11b station
1022 case 0:
1023 {
1024 pStaDs->mlmStaContext.htCapability = 0;
1025 pStaDs->erpEnabled = 0;
1026 p += log_sprintf( pMac,p, "11b");
1027 }
1028 break;
1029 //11g station
1030 case 1:
1031 {
1032 pStaDs->mlmStaContext.htCapability = 0;
1033 pStaDs->erpEnabled = 1;
1034 p += log_sprintf( pMac,p, "11g");
1035 }
1036 break;
1037 //ht20 station non-GF
1038 case 2:
1039 {
1040 pStaDs->mlmStaContext.htCapability = 1;
1041 pStaDs->erpEnabled = 1;
1042 pStaDs->htSupportedChannelWidthSet = 0;
1043 pStaDs->htGreenfield = 0;
1044 p += log_sprintf( pMac,p, "HT20 non-GF");
1045 }
1046 break;
1047 //ht20 station GF
1048 case 3:
1049 {
1050 pStaDs->mlmStaContext.htCapability = 1;
1051 pStaDs->erpEnabled = 1;
1052 pStaDs->htSupportedChannelWidthSet = 0;
1053 pStaDs->htGreenfield = 1;
1054 p += log_sprintf( pMac,p, "HT20 GF");
1055 }
1056 break;
1057 //ht40 station non-GF
1058 case 4:
1059 {
1060 pStaDs->mlmStaContext.htCapability = 1;
1061 pStaDs->erpEnabled = 1;
1062 pStaDs->htSupportedChannelWidthSet = 1;
1063 pStaDs->htGreenfield = 0;
1064 p += log_sprintf( pMac,p, "HT40 non-GF");
1065 }
1066 break;
1067 //ht40 station GF
1068 case 5:
1069 {
1070 pStaDs->mlmStaContext.htCapability = 1;
1071 pStaDs->erpEnabled = 1;
1072 pStaDs->htSupportedChannelWidthSet = 1;
1073 pStaDs->htGreenfield = 1;
1074 p += log_sprintf( pMac,p, "HT40 GF");
1075 }
1076 break;
1077 default:
1078 {
1079 p += log_sprintf( pMac,p, "arg2 not in range [0..3]. Station not added.\n");
1080 goto addStaFail;
1081 }
1082 break;
1083 }
1084
1085 pStaDs->added = 1;
1086 p += log_sprintf( pMac,p, " station with mac address 00:00:00:00:00:%x added.\n", (tANI_U8)arg1);
1087 limAddSta(pMac, pStaDs,psessionEntry);
1088 }
1089 else
1090 {
1091addStaFail:
1092 p += log_sprintf( pMac,p, "Could not add station\n");
1093 p += log_sprintf( pMac,p, "arg1: 6th byte of the station MAC address\n");
1094 p += log_sprintf( pMac,p, "arg2[0..5] : station type as described below\n");
1095 p += log_sprintf( pMac,p, "\t 0: 11b, 1: 11g, 2: HT20 non-GF, 3: HT20 GF, 4: HT40 non-GF, 5: HT40 GF\n");
1096 }
1097#endif
1098 return p;
1099}
1100
1101static char *
1102dump_lim_del_sta( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
1103{
1104
1105 tpDphHashNode pStaDs;
1106 tLimMlmDisassocInd mlmDisassocInd;
1107 tpPESession psessionEntry;
1108 tANI_U8 reasonCode = eSIR_MAC_DISASSOC_DUE_TO_INACTIVITY_REASON;
1109
1110 if((psessionEntry = peFindSessionBySessionId(pMac,(tANI_U8)arg2) )== NULL)
1111 {
1112 p += log_sprintf( pMac,p,"Session does not exist for given session Id \n");
1113 return p;
1114 }
1115
1116 pStaDs = dphGetHashEntry(pMac, (tANI_U16)arg1, &psessionEntry->dph.dphHashTable);
1117
1118 if(NULL == pStaDs)
1119 {
1120 p += log_sprintf( pMac,p, "Could not find station with assocId = %d\n", arg1);
1121 return p;
1122 }
1123
1124 if (pStaDs->mlmStaContext.mlmState != eLIM_MLM_LINK_ESTABLISHED_STATE)
1125 {
1126 p += log_sprintf( pMac,p, "received Disassoc frame from peer that is in state %X \n", pStaDs->mlmStaContext.mlmState);
1127 return p;
1128 }
1129
1130 pStaDs->mlmStaContext.cleanupTrigger = eLIM_PEER_ENTITY_DISASSOC;
1131 pStaDs->mlmStaContext.disassocReason = (tSirMacReasonCodes) reasonCode;
1132
1133 // Issue Disassoc Indication to SME.
Bansidhar Gopalachari2f7395d2013-07-12 11:24:23 +05301134 vos_mem_copy((tANI_U8 *) &mlmDisassocInd.peerMacAddr,
Jeff Johnson295189b2012-06-20 16:38:30 -07001135 (tANI_U8 *) pStaDs->staAddr, sizeof(tSirMacAddr));
1136 mlmDisassocInd.reasonCode = reasonCode;
Jeff Johnson295189b2012-06-20 16:38:30 -07001137 mlmDisassocInd.disassocTrigger = eLIM_PEER_ENTITY_DISASSOC;
1138
1139 mlmDisassocInd.sessionId = psessionEntry->peSessionId;
1140
1141 limPostSmeMessage(pMac, LIM_MLM_DISASSOC_IND, (tANI_U32 *) &mlmDisassocInd);
1142 // Receive path cleanup
1143 limCleanupRxPath(pMac, pStaDs,psessionEntry);
1144 return p;
1145}
1146
1147
1148
1149
1150static char *
1151set_lim_prot_cfg( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
1152{
1153
1154/**********************************
1155* Protection Enable
1156*
1157*LOWER byte for associated stations
1158*UPPER byte for overlapping stations.
1159*11g ==> protection from 11g
1160*11b ==> protection from 11b
1161*each byte will have the following info
1162*bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
1163*reserved reserved RIFS Lsig n-GF ht20 11g 11b
1164**********************************
1165WNI_CFG_PROTECTION_ENABLED I 4 9
1166V RW NP RESTART
1167LIM
11680 0xff 0xff
1169V RW NP RESTART
1170LIM
11710 0xffff 0xffff
1172
1173#ENUM FROM_llB 0
1174#ENUM FROM_llG 1
1175#ENUM HT_20 2
1176#ENUM NON_GF 3
1177#ENUM LSIG_TXOP 4
1178#ENUM RIFS 5
1179#ENUM OLBC_FROM_llB 8
1180#ENUM OLBC_FROM_llG 9
1181#ENUM OLBC_HT20 10
1182#ENUM OLBC_NON_GF 11
1183#ENUM OLBC_LSIG_TXOP 12
1184#ENUM OLBC_RIFS 13
1185******************************************/
1186 if(1 == arg1)
1187 dump_cfg_set(pMac, WNI_CFG_PROTECTION_ENABLED, 0xff, arg3, arg4, p);
1188 else if(2 == arg1)
1189 dump_cfg_set(pMac, WNI_CFG_PROTECTION_ENABLED, arg2 & 0xff, arg3, arg4, p);
1190 else
1191 {
1192 p += log_sprintf( pMac,p, "To set protection config:\n");
1193 p += log_sprintf( pMac,p, "arg1: operation type(1 -> set to Default 0xff, 2-> set to a arg2, else print help)\n");
1194 }
1195 return p;
1196}
1197
1198
1199static char *
1200dump_lim_set_protection_control( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
1201{
1202 dump_cfg_set(pMac, WNI_CFG_FORCE_POLICY_PROTECTION, arg1, arg2, arg3, p);
Jeff Johnson295189b2012-06-20 16:38:30 -07001203 limSetCfgProtection(pMac, NULL);
Jeff Johnson295189b2012-06-20 16:38:30 -07001204 return p;
1205}
1206
1207
1208static char *
1209dump_lim_send_SM_Power_Mode( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
1210{
1211 tSirMsgQ msg;
1212 tpSirMbMsg pMBMsg;
1213 tSirMacHTMIMOPowerSaveState state;
1214
Madan Mohan Koyyalamudi87054ba2012-11-02 13:24:12 -07001215 p += log_sprintf( pMac,p, "%s: Verifying the Arguments\n", __func__);
Jeff Johnson295189b2012-06-20 16:38:30 -07001216 if ((arg1 > 3) || (arg1 == 2))
1217 {
1218 p += log_sprintf( pMac,p, "Invalid Argument , enter one of the valid states\n");
1219 return p;
1220 }
1221
1222 state = (tSirMacHTMIMOPowerSaveState) arg1;
1223
Bansidhar Gopalachari2f7395d2013-07-12 11:24:23 +05301224 pMBMsg = vos_mem_malloc(WNI_CFG_MB_HDR_LEN + sizeof(tSirMacHTMIMOPowerSaveState));
Jeff Johnson295189b2012-06-20 16:38:30 -07001225 if(NULL == pMBMsg)
1226 {
1227 p += log_sprintf( pMac,p, "pMBMsg is NULL\n");
1228 return p;
1229 }
1230 pMBMsg->type = eWNI_PMC_SMPS_STATE_IND;
1231 pMBMsg->msgLen = (tANI_U16)(WNI_CFG_MB_HDR_LEN + sizeof(tSirMacHTMIMOPowerSaveState));
Bansidhar Gopalachari2f7395d2013-07-12 11:24:23 +05301232 vos_mem_copy(pMBMsg->data, &state, sizeof(tSirMacHTMIMOPowerSaveState));
Jeff Johnson295189b2012-06-20 16:38:30 -07001233
1234 msg.type = eWNI_PMC_SMPS_STATE_IND;
1235 msg.bodyptr = pMBMsg;
1236 msg.bodyval = 0;
1237
1238 if (limPostMsgApi(pMac, &msg) != TX_SUCCESS)
1239 {
1240 p += log_sprintf( pMac,p, "Updating the SMPower Request has failed \n");
Bansidhar Gopalachari2f7395d2013-07-12 11:24:23 +05301241 vos_mem_free(pMBMsg);
Jeff Johnson295189b2012-06-20 16:38:30 -07001242 }
1243 else
1244 {
1245 p += log_sprintf( pMac,p, "Updating the SMPower Request is Done \n");
1246 }
1247
1248 return p;
1249}
1250
1251
1252
1253
1254static char *
1255dump_lim_addba_req( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
1256{
1257tSirRetStatus status;
1258tpDphHashNode pSta;
1259 tpPESession psessionEntry = &pMac->lim.gpSession[0]; //TBD-RAJESH HOW TO GET sessionEntry?????
1260
1261
1262 (void) arg4;
1263
1264 // Get DPH Sta entry for this ASSOC ID
1265 pSta = dphGetHashEntry( pMac, (tANI_U16) arg1, &psessionEntry->dph.dphHashTable);
1266 if( NULL == pSta )
1267 {
1268 p += log_sprintf( pMac, p,
1269 "\n%s: Could not find entry in DPH table for assocId = %d\n",
Madan Mohan Koyyalamudi87054ba2012-11-02 13:24:12 -07001270 __func__,
Jeff Johnson295189b2012-06-20 16:38:30 -07001271 arg1 );
1272 }
1273 else
1274 {
1275 status = limPostMlmAddBAReq( pMac, pSta, (tANI_U8) arg2, (tANI_U16) arg3,psessionEntry);
1276 p += log_sprintf( pMac, p,
1277 "\n%s: Attempted to send an ADDBA Req to STA Index %d, for TID %d. Send Status = %s\n",
Madan Mohan Koyyalamudi87054ba2012-11-02 13:24:12 -07001278 __func__,
Jeff Johnson295189b2012-06-20 16:38:30 -07001279 pSta->staIndex,
1280 arg2,
1281 limResultCodeStr( status ));
1282 }
1283
1284 return p;
1285}
1286
1287static char *
1288dump_lim_delba_req( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
1289{
1290tSirRetStatus status;
1291tpDphHashNode pSta;
1292 tpPESession psessionEntry = &pMac->lim.gpSession[0]; //TBD-RAJESH HOW TO GET sessionEntry?????
1293
1294 // Get DPH Sta entry for this ASSOC ID
1295 pSta = dphGetHashEntry( pMac, (tANI_U16) arg1, &psessionEntry->dph.dphHashTable );
1296 if( NULL == pSta )
1297 {
1298 p += log_sprintf( pMac, p,
1299 "\n%s: Could not find entry in DPH table for assocId = %d\n",
Madan Mohan Koyyalamudi87054ba2012-11-02 13:24:12 -07001300 __func__,
Jeff Johnson295189b2012-06-20 16:38:30 -07001301 arg1 );
1302 }
1303 else
1304 {
1305 status = limPostMlmDelBAReq( pMac, pSta, (tANI_U8) arg2, (tANI_U8) arg3, (tANI_U16) arg4 ,psessionEntry);
1306 p += log_sprintf( pMac, p,
1307 "\n%s: Attempted to send a DELBA Ind to STA Index %d, "
1308 "as the BA \"%s\" for TID %d, with Reason code %d. "
1309 "Send Status = %s\n",
Madan Mohan Koyyalamudi87054ba2012-11-02 13:24:12 -07001310 __func__,
Jeff Johnson295189b2012-06-20 16:38:30 -07001311 pSta->staIndex,
1312 (arg2 == 1)? "Initiator": "Recipient",
1313 arg3, // TID
1314 arg4, // Reason Code
1315 limResultCodeStr( status ));
1316 }
1317
1318 return p;
1319}
1320
1321static char *
1322dump_lim_ba_timeout( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
1323{
1324
1325/* FIXME: NO HAL IN UMAC for PRIMA */
Jeff Johnson295189b2012-06-20 16:38:30 -07001326
1327 p += log_sprintf( pMac, p,
1328 "\n%s: Attempted to trigger a BA Timeout Ind to STA Index %d, for TID %d, Direction %d\n",
Madan Mohan Koyyalamudi87054ba2012-11-02 13:24:12 -07001329 __func__,
Jeff Johnson295189b2012-06-20 16:38:30 -07001330 arg1, // STA index
1331 arg2, // TID
1332 arg3 ); // BA Direction
1333
1334 return p;
1335}
1336
1337static char *
1338dump_lim_list_active_ba( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
1339{
1340tANI_U32 i;
1341tpDphHashNode pSta;
1342
1343//TBD-RAJESH HOW TO GET sessionEntry?????
1344
1345tpPESession psessionEntry = &pMac->lim.gpSession[0]; //TBD-RAJESH
1346
1347 (void) arg2; (void) arg3; (void) arg4;
1348
1349 // Get DPH Sta entry for this ASSOC ID
1350 pSta = dphGetHashEntry( pMac, (tANI_U16) arg1, &psessionEntry->dph.dphHashTable);
1351 if( NULL == pSta )
1352 {
1353 p += log_sprintf( pMac, p,
1354 "\n%s: Could not find entry in DPH table for assocId = %d\n",
Madan Mohan Koyyalamudi87054ba2012-11-02 13:24:12 -07001355 __func__,
Jeff Johnson295189b2012-06-20 16:38:30 -07001356 arg1 );
1357 }
1358 else
1359 {
1360 p += log_sprintf( pMac, p,
1361 "\nList of Active BA sessions for STA Index %d with Assoc ID %d\n",
1362 pSta->staIndex,
1363 arg1 );
1364
1365 p += log_sprintf( pMac, p, "TID\tRxBA\tTxBA\tRxBufferSize\tTxBufferSize\tRxBATimeout\tTxBATimeout\n");
1366 for( i = 0; i < STACFG_MAX_TC; i ++ )
1367 p += log_sprintf( pMac, p,
1368 "%d\t%d\t%d\t%d\t%d\t%d\t%d\n",
1369 i, // TID
1370 pSta->tcCfg[i].fUseBARx,
1371 pSta->tcCfg[i].fUseBATx,
1372 pSta->tcCfg[i].rxBufSize,
1373 pSta->tcCfg[i].txBufSize,
1374 pSta->tcCfg[i].tuRxBAWaitTimeout,
1375 pSta->tcCfg[i].tuTxBAWaitTimeout );
1376 }
1377
1378 return p;
1379}
1380
1381
1382static char *
1383dump_lim_AddBA_DeclineStat( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
1384{
1385
1386 int Tid, Enable=(arg1 & 0x1);
1387 tANI_U8 val;
1388
1389 if (arg1 > 1) {
Madan Mohan Koyyalamudi87054ba2012-11-02 13:24:12 -07001390 log_sprintf( pMac,p, "%s:Invalid Value is entered for Enable/Disable \n", __func__ );
Jeff Johnson295189b2012-06-20 16:38:30 -07001391 arg1 &= 1;
1392 }
1393
1394 val = pMac->lim.gAddBA_Declined;
1395
1396 if (arg2 > 7) {
Madan Mohan Koyyalamudi87054ba2012-11-02 13:24:12 -07001397 log_sprintf( pMac,p, "%s:Invalid Value is entered for Tid \n", __func__ );
Jeff Johnson295189b2012-06-20 16:38:30 -07001398 Tid = arg2 & 0x7;
1399 } else
1400 Tid = arg2;
1401
1402
1403 if ( Enable)
1404 val |= Enable << Tid;
1405 else
1406 val &= ~(0x1 << Tid);
1407
1408 if (cfgSetInt(pMac, (tANI_U16)WNI_CFG_ADDBA_REQ_DECLINE, (tANI_U32) val) != eSIR_SUCCESS)
Madan Mohan Koyyalamudi87054ba2012-11-02 13:24:12 -07001409 log_sprintf( pMac,p, "%s:Config Set for ADDBA REQ Decline has failed \n", __func__ );
Jeff Johnson295189b2012-06-20 16:38:30 -07001410
Madan Mohan Koyyalamudi87054ba2012-11-02 13:24:12 -07001411 log_sprintf( pMac,p, "%s:Decline value %d is being set for TID %d ,\n \tAddBA_Decline Cfg value is %d \n", __func__ , arg1, Tid, (int) val);
Jeff Johnson295189b2012-06-20 16:38:30 -07001412
1413 return p;
1414}
1415static char *
1416dump_lim_set_dot11_mode( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
1417{
1418
1419 tpPESession psessionEntry =&pMac->lim.gpSession[0]; //TBD-RAJESH HOW TO GET sessionEntry?????
1420 dump_cfg_set(pMac, WNI_CFG_DOT11_MODE, arg1, arg2, arg3, p);
1421 if ( (limGetSystemRole(psessionEntry) == eLIM_AP_ROLE) ||
1422 (limGetSystemRole(psessionEntry) == eLIM_STA_IN_IBSS_ROLE))
1423 schSetFixedBeaconFields(pMac,psessionEntry);
1424 p += log_sprintf( pMac,p, "The Dot11 Mode is set to %s", limDot11ModeStr(pMac, (tANI_U8)psessionEntry->dot11mode));
1425 return p;
1426}
1427
1428
1429static char* dump_lim_update_cb_Mode(tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
1430{
1431 tANI_U32 localPwrConstraint;
Jeff Johnsone7245742012-09-05 17:12:55 -07001432 tpPESession psessionEntry = peFindSessionBySessionId(pMac, arg1);
1433
1434 if (psessionEntry == NULL)
1435 {
1436 p += log_sprintf( pMac, p, "Invalid sessionId: %d \n ", arg1);
1437 return p;
1438 }
1439
1440 if ( !psessionEntry->htCapability )
Jeff Johnson295189b2012-06-20 16:38:30 -07001441 {
1442 p += log_sprintf( pMac,p, "Error: Dot11 mode is non-HT, can not change the CB mode.\n");
1443 return p;
1444 }
Jeff Johnsone7245742012-09-05 17:12:55 -07001445
1446 psessionEntry->htSupportedChannelWidthSet = arg2?1:0;
1447 psessionEntry->htRecommendedTxWidthSet = psessionEntry->htSupportedChannelWidthSet;
1448 psessionEntry->htSecondaryChannelOffset = arg2;
Jeff Johnson295189b2012-06-20 16:38:30 -07001449
1450 if(eSIR_SUCCESS != cfgSetInt(pMac, WNI_CFG_CHANNEL_BONDING_MODE,
Jeff Johnsone7245742012-09-05 17:12:55 -07001451 arg2 ? WNI_CFG_CHANNEL_BONDING_MODE_ENABLE : WNI_CFG_CHANNEL_BONDING_MODE_DISABLE))
Jeff Johnson295189b2012-06-20 16:38:30 -07001452 p += log_sprintf(pMac,p, "cfgSetInt failed for WNI_CFG_CHANNEL_BONDING_MODE\n");
Jeff Johnsone7245742012-09-05 17:12:55 -07001453
Jeff Johnson295189b2012-06-20 16:38:30 -07001454 wlan_cfgGetInt(pMac, WNI_CFG_LOCAL_POWER_CONSTRAINT, &localPwrConstraint);
Jeff Johnsone7245742012-09-05 17:12:55 -07001455
1456 limSendSwitchChnlParams(pMac, psessionEntry->currentOperChannel, psessionEntry->htSecondaryChannelOffset,
Jeff Johnson295189b2012-06-20 16:38:30 -07001457 (tPowerdBm) localPwrConstraint, psessionEntry->peSessionId);
1458 if ( (limGetSystemRole(psessionEntry) == eLIM_AP_ROLE) ||
1459 (limGetSystemRole(psessionEntry) == eLIM_STA_IN_IBSS_ROLE))
1460 schSetFixedBeaconFields(pMac,psessionEntry);
1461 return p;
Jeff Johnsone7245742012-09-05 17:12:55 -07001462
Jeff Johnson295189b2012-06-20 16:38:30 -07001463}
1464
1465static char* dump_lim_abort_scan(tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
1466{
1467 (void) arg1; (void) arg2; (void) arg3; (void) arg4;
1468 //csrScanAbortMacScan(pMac);
1469 return p;
1470
1471}
1472
1473static char* dump_lim_start_stop_bg_scan(tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
1474{
1475 (void) arg2; (void) arg3; (void) arg4;
1476
1477 if (TX_TIMER_VALID(pMac->lim.limTimers.gLimBackgroundScanTimer))
1478 {
1479 limDeactivateAndChangeTimer(pMac, eLIM_BACKGROUND_SCAN_TIMER);
1480 }
1481
1482 if(arg1 == 1)
1483 {
1484 if (tx_timer_activate(
1485 &pMac->lim.limTimers.gLimBackgroundScanTimer) != TX_SUCCESS)
1486 {
1487 pMac->lim.gLimBackgroundScanTerminate = TRUE;
1488 }
1489 else
1490 {
1491 pMac->lim.gLimBackgroundScanTerminate = FALSE;
1492 pMac->lim.gLimBackgroundScanDisable = false;
1493 pMac->lim.gLimForceBackgroundScanDisable = false;
1494 }
1495 }
1496 else
1497 {
1498 pMac->lim.gLimBackgroundScanTerminate = TRUE;
1499 pMac->lim.gLimBackgroundScanChannelId = 0;
1500 pMac->lim.gLimBackgroundScanDisable = true;
1501 pMac->lim.gLimForceBackgroundScanDisable = true;
1502 }
1503 return p;
1504
1505}
1506
1507static char*
1508dump_lim_get_pe_statistics(tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
1509{
Jeff Johnson295189b2012-06-20 16:38:30 -07001510 tpAniGetPEStatsReq pReq;
1511 tANI_U32 statsMask;
1512
1513 (void) arg2; (void) arg3; (void) arg4;
1514
1515
1516 switch(arg1)
1517 {
1518 case 1:
1519 statsMask = PE_SUMMARY_STATS_INFO;
1520 break;
1521 case 2:
1522 statsMask = PE_GLOBAL_CLASS_A_STATS_INFO;
1523 break;
1524 case 3:
1525 statsMask = PE_GLOBAL_CLASS_B_STATS_INFO;
1526 break;
1527 case 4:
1528 statsMask = PE_GLOBAL_CLASS_C_STATS_INFO;
1529 break;
1530 case 5:
1531 statsMask = PE_PER_STA_STATS_INFO;
1532 break;
1533 default:
1534 return p;
1535 }
1536
Bansidhar Gopalachari2f7395d2013-07-12 11:24:23 +05301537 pReq = vos_mem_malloc(sizeof(tAniGetPEStatsReq));
1538 if (NULL == pReq)
Jeff Johnson295189b2012-06-20 16:38:30 -07001539 {
1540 p += log_sprintf( pMac,p, "Error: Unable to allocate memory.\n");
1541 return p;
1542 }
1543
Bansidhar Gopalachari2f7395d2013-07-12 11:24:23 +05301544 vos_mem_set(pReq, sizeof(*pReq), 0);
Jeff Johnson295189b2012-06-20 16:38:30 -07001545
1546 pReq->msgType = eWNI_SME_GET_STATISTICS_REQ;
1547 pReq->statsMask = statsMask;
1548 pReq->staId = (tANI_U16)arg2;
1549
1550 pMac->lim.gLimRspReqd = eANI_BOOLEAN_TRUE;
1551 limPostSmeMessage(pMac, eWNI_SME_GET_STATISTICS_REQ, (tANI_U32 *) pReq);
1552
1553 return p;
1554
1555}
1556
1557extern char* setLOGLevel( tpAniSirGlobal pMac, char *p, tANI_U32 module, tANI_U32 level );
1558static char *
1559dump_lim_set_log_level( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
1560{
1561 p = setLOGLevel(pMac, p, arg1, arg2);
1562 return p;
1563}
1564
1565static char *
1566dump_lim_update_log_level( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
1567{
1568 vos_trace_setLevel( arg1, arg2 );
1569 return p;
1570}
1571
1572static char *
1573dump_lim_scan_req_send( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
1574{
1575 (void) arg1; (void) arg2; (void) arg3; (void) arg4;
1576 p = sendSmeScanReq(pMac, p);
1577 return p;
1578}
1579
1580static char *
1581dump_lim_send_start_bss_req( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
1582{
1583 (void) arg1; (void) arg2; (void) arg3; (void) arg4;
1584 p = sendSmeStartBssReq(pMac, p,arg1);
1585 return p;
1586}
1587
1588static char *
1589dump_lim_send_join_req( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
1590{
1591 (void) arg1; (void) arg2; (void) arg3; (void) arg4;
1592 p = sendSmeJoinReq(pMac, p);
1593 return p;
1594}
1595
1596static char *
1597dump_lim_send_disassoc_req( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
1598{
1599 (void) arg1; (void) arg2; (void) arg3; (void) arg4;
1600
1601 p = sendSmeDisAssocReq(pMac, p, arg1 ,arg2);
1602 return p;
1603}
1604
1605static char *
1606dump_lim_stop_bss_req( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
1607{
1608 (void) arg2; (void) arg3; (void) arg4;
1609 p = sendSmeStopBssReq(pMac, p, arg1);
1610 return p;
1611}
1612
1613
1614static char *
1615dump_lim_session_print( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
1616{
1617 (void) arg1; (void) arg2; (void) arg3; (void) arg4;
1618 p = printSessionInfo(pMac, p);
1619 return p;
1620}
1621
1622static char *
1623dump_lim_sme_reassoc_req( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
1624{
1625 tANI_U32 sessionId = arg1;
1626 tCsrRoamModifyProfileFields modifyProfileFields;
1627 tANI_U32 roamId;
1628
1629 (void) arg2; (void) arg3; (void) arg4;
1630
1631 if( CSR_IS_SESSION_VALID( pMac, sessionId ) )
1632 {
1633 if(HAL_STATUS_SUCCESS(sme_AcquireGlobalLock( &pMac->sme )))
1634 {
1635 csrGetModifyProfileFields(pMac, sessionId, &modifyProfileFields);
1636 csrReassoc( pMac, sessionId, &modifyProfileFields, &roamId, 0);
1637 sme_ReleaseGlobalLock( &pMac->sme );
1638 }
1639 }
1640 else
1641 {
1642 p += log_sprintf( pMac,p, "Invalid session = %d\n", sessionId);
1643 }
1644
1645 return p;
1646}
1647
1648static char *
1649dump_lim_dot11h_stats( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
1650{
Jeff Johnson295189b2012-06-20 16:38:30 -07001651 return p;
1652}
1653
1654static char *
1655dump_lim_enable_measurement( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
1656{
1657 (void) arg2; (void) arg3; (void) arg4;
1658
1659 if (arg1)
1660 {
1661 pMac->sys.gSysEnableLearnMode = eANI_BOOLEAN_TRUE;
1662 p += log_sprintf(pMac, p, "Measurement enabled\n");
1663 }
1664 else
1665 {
1666 pMac->sys.gSysEnableLearnMode = eANI_BOOLEAN_FALSE;
1667 p += log_sprintf(pMac, p, "Measurement disabled\n");
1668 }
1669
1670 return p;
1671}
1672
1673static char *
1674dump_lim_enable_quietIE( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
1675{
1676 (void) arg2; (void) arg3; (void) arg4;
Jeff Johnsone7245742012-09-05 17:12:55 -07001677#if 0
Jeff Johnson295189b2012-06-20 16:38:30 -07001678 if (arg1)
1679 {
1680 pMac->lim.gLimSpecMgmt.fQuietEnabled = eANI_BOOLEAN_TRUE;
1681 p += log_sprintf(pMac, p, "QuietIE enabled\n");
1682 }
1683 else
1684 {
1685 pMac->lim.gLimSpecMgmt.fQuietEnabled = eANI_BOOLEAN_FALSE;
1686 p += log_sprintf(pMac, p, "QuietIE disabled\n");
1687 }
Jeff Johnsone7245742012-09-05 17:12:55 -07001688#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001689
1690 return p;
1691}
1692
1693static char *
1694dump_lim_disable_enable_scan( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
1695{
1696 (void) arg2; (void) arg3; (void) arg4;
1697
1698 if (arg1)
1699 {
1700 pMac->lim.fScanDisabled = 1;
1701 p += log_sprintf(pMac, p, "Scan disabled\n");
1702 }
1703 else
1704 {
1705 pMac->lim.fScanDisabled = 0;
1706 p += log_sprintf(pMac, p, "scan enabled\n");
1707 }
1708
1709 return p;
1710}
1711
1712static char *finishScan(tpAniSirGlobal pMac, char *p)
1713{
1714 tSirMsgQ msg;
1715
1716 p += log_sprintf( pMac,p, "logDump finishScan \n");
1717
1718 msg.type = SIR_LIM_MIN_CHANNEL_TIMEOUT;
1719 msg.bodyval = 0;
1720 msg.bodyptr = NULL;
1721
1722 limPostMsgApi(pMac, &msg);
1723 return p;
1724}
1725
1726
1727static char *
1728dump_lim_info( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
1729{
Jeff Johnsone7245742012-09-05 17:12:55 -07001730 (void) arg2; (void) arg3; (void) arg4;
1731 p = dumpLim( pMac, p, arg1);
Jeff Johnson295189b2012-06-20 16:38:30 -07001732 return p;
1733}
1734
1735static char *
1736dump_lim_finishscan_send( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
1737{
1738 (void) arg1; (void) arg2; (void) arg3; (void) arg4;
1739 p = finishScan(pMac, p);
1740 return p;
1741}
1742
1743static char *
1744dump_lim_prb_rsp_send( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
1745{
1746 (void) arg1; (void) arg2; (void) arg3; (void) arg4;
1747 p = testLimSendProbeRsp( pMac, p );
1748 return p;
1749}
1750
1751static char *
1752dump_sch_beacon_trigger( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
1753{
1754 (void) arg1; (void) arg2; (void) arg3; (void) arg4;
1755 p = triggerBeaconGen(pMac, p);
1756 return p;
1757}
1758
1759
1760static char* dump_lim_trace_cfg(tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
1761{
1762 MTRACE(macTraceCfg(pMac, arg1, arg2, arg3, arg4);)
1763 return p;
1764}
1765
1766static char* dump_lim_trace_dump(tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
1767{
1768 MTRACE(macTraceDumpAll(pMac, (tANI_U8)arg1, (tANI_U8)arg2, arg3);)
1769 return p;
1770}
1771
1772static char* dump_lim_set_scan_in_powersave( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
1773{
1774 p += log_sprintf( pMac,p, "logDump set scan in powersave to %d \n", arg1);
1775 dump_cfg_set(pMac, WNI_CFG_SCAN_IN_POWERSAVE, arg1, arg2, arg3, p);
1776 return p;
1777}
1778
1779#if defined WLAN_FEATURE_VOWIFI
1780static char *
1781dump_lim_send_rrm_action( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
1782{
1783 tpPESession psessionEntry;
Madan Mohan Koyyalamudi8f207c12012-10-30 18:18:38 -07001784 tSirMacRadioMeasureReport *pRRMReport =
1785 vos_mem_malloc(4*sizeof(tSirMacRadioMeasureReport));
Jeff Johnson295189b2012-06-20 16:38:30 -07001786 tANI_U8 num = (tANI_U8)(arg4 > 4 ? 4 : arg4);
1787 tANI_U8 i;
1788
Madan Mohan Koyyalamudi8f207c12012-10-30 18:18:38 -07001789 if (!pRRMReport)
1790 {
1791 p += log_sprintf(pMac, p,
1792 "Unable to allocate memory to process command\n");
1793 goto done;
1794 }
1795
Jeff Johnson295189b2012-06-20 16:38:30 -07001796 if((psessionEntry = peFindSessionBySessionId(pMac,(tANI_U8)arg2) )== NULL)
1797 {
1798 p += log_sprintf( pMac,p,"Session does not exist for given session Id \n");
Madan Mohan Koyyalamudi8f207c12012-10-30 18:18:38 -07001799 goto done;
Jeff Johnson295189b2012-06-20 16:38:30 -07001800 }
1801 switch (arg3)
1802 {
1803 case 0:
1804 /* send two reports with incapable bit set */
1805 pRRMReport[0].type = 6;
1806 pRRMReport[1].type = 7;
1807 limSendRadioMeasureReportActionFrame( pMac, 1, 2, &pRRMReport[0], psessionEntry->bssId, psessionEntry );
1808 break;
1809 case 1:
1810 for ( i = 0 ; i < num ; i++ )
1811 {
1812 pRRMReport[i].type = 5;
1813 if ( i == 3 )
1814 pRRMReport[i].refused = 1;
1815 else
1816 pRRMReport[i].refused = 0;
1817
1818 pRRMReport[i].report.beaconReport.regClass = 32;
1819 pRRMReport[i].report.beaconReport.channel = i;
1820 pRRMReport[i].report.beaconReport.measDuration = 23;
1821 pRRMReport[i].report.beaconReport.phyType = i << 4; //some value.
1822 pRRMReport[i].report.beaconReport.bcnProbeRsp = 1;
1823 pRRMReport[i].report.beaconReport.rsni = 10;
1824 pRRMReport[i].report.beaconReport.rcpi = 40;
1825
1826 pRRMReport[i].report.beaconReport.bssid[0] = 0x00;
1827 pRRMReport[i].report.beaconReport.bssid[1] = 0xAA;
1828 pRRMReport[i].report.beaconReport.bssid[2] = 0xBB;
1829 pRRMReport[i].report.beaconReport.bssid[3] = 0xCC;
1830 pRRMReport[i].report.beaconReport.bssid[4] = 0x00;
1831 pRRMReport[i].report.beaconReport.bssid[5] = 0x01 << i;
1832
1833
1834 pRRMReport[i].report.beaconReport.antennaId = 10;
1835 pRRMReport[i].report.beaconReport.parentTSF = 0x1234;
1836
1837 pRRMReport[i].report.beaconReport.numIes = i * 10;
1838 {
1839 tANI_U8 j;
1840 for( j = 0; j < pRRMReport[i].report.beaconReport.numIes ; j++ )
1841 {
1842 pRRMReport[i].report.beaconReport.Ies[j] = j + i; //Junk values.
1843 }
1844 }
1845
1846 }
1847 limSendRadioMeasureReportActionFrame( pMac, 1, num, &pRRMReport[0], psessionEntry->bssId, psessionEntry );
1848 break;
1849 case 2:
1850 //send Neighbor request.
1851 {
1852 tSirMacNeighborReportReq neighbor;
1853 neighbor.dialogToken = 2;
1854 neighbor.ssid_present = (tANI_U8) arg4;
1855 neighbor.ssid.length = 5;
Bansidhar Gopalachari2f7395d2013-07-12 11:24:23 +05301856 vos_mem_copy(neighbor.ssid.ssId, "abcde", 5);
Jeff Johnson295189b2012-06-20 16:38:30 -07001857
1858 limSendNeighborReportRequestFrame( pMac, &neighbor, psessionEntry->bssId, psessionEntry );
1859
1860 }
1861
1862 break;
1863 case 3:
1864 //send Link measure report.
1865 {
1866 tSirMacLinkReport link;
1867 link.dialogToken = 4;
1868 link.txPower = 34;
1869 link.rxAntenna = 2;
1870 link.txAntenna = 1;
1871 link.rcpi = 9;
1872 link.rsni = 3;
1873 limSendLinkReportActionFrame( pMac, &link, psessionEntry->bssId, psessionEntry );
1874 }
1875 break;
1876 default:
1877 break;
1878 }
Madan Mohan Koyyalamudi8f207c12012-10-30 18:18:38 -07001879
1880done:
1881 vos_mem_free(pRRMReport);
Jeff Johnson295189b2012-06-20 16:38:30 -07001882 return p;
1883}
1884
1885static char *
1886dump_lim_unpack_rrm_action( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
1887{
1888 tpPESession psessionEntry;
1889 tANI_U32 status;
1890
1891 tANI_U8 size[] = {
1892 0x2C,
1893 0x2F,
1894 0x25,
1895 0x2C,
1896 0x1C,
1897 0x05
1898 };
1899
1900 tANI_U8 pBody[][100] = {
1901 {
1902 /*Beacon Request 0*/
1903 0x05, 0x00, 0x01, 0x00, 0x00,
1904 //Measurement request IE
1905 0x26, 0x25, 0x01, 0x00,
1906 //Beacon request type
1907 0x05,
1908 //Beacon request starts here
1909 0x0C, 0x01, 0x30, 0x00, 0x14, 0x00, 0x01,
1910 //BSSID
1911 0xFF, 0xFF, 0xFF, 0xFF, 0xff, 0xFF,
1912 //SSID
1913 0x00, 0x05, 0x57, 0x69, 0x46, 0x69, 0x31,
1914 //Reporting Condition
1915 0x01, 0x02, 0x00, 0x00,
1916 //Reporting Detail
1917 0x02, 0x01, 0x1,
1918 //Request IE
1919 0x0A, 0x05, 0x00, 0x30, 0x46, 0x36, 0xDD
1920 },
1921 {
1922 /*Beacon Request 1*/
1923 0x05, 0x00, 0x01, 0x00, 0x00,
1924 //Measurement request IE
1925 0x26, 0x28, 0x01, 0x00,
1926 //Beacon request type
1927 0x05,
1928 //Beacon request starts here
1929 0x0C, 0xFF, 0x30, 0x00, 0x14, 0x00, 0x01,
1930 //BSSID
1931 0xFF, 0xFF, 0xFF, 0xFF, 0xff, 0xFF,
1932 //SSID
1933/* 0x00, 0x08, 0x35, 0x36, 0x37, 0x38, 0x39, 0x40, 0x41, 0x42, */
1934 //Reporting Condition
1935 0x01, 0x02, 0x00, 0x00,
1936 //Reporting Detail
1937 0x02, 0x01, 0x1,
1938 //Request IE
1939 0x0A, 0x05, 0x00, 0x30, 0x46, 0x36, 0xDD,
1940 //AP channel report
1941 0x33, 0x03, 0x0C, 0x01, 0x06,
1942 0x33, 0x03, 0x0C, 0x24, 0x30,
1943 },
1944 {
1945 /*Beacon Request 2*/
1946 0x05, 0x00, 0x01, 0x00, 0x00,
1947 //Measurement request IE
1948 0x26, 0x1E, 0x01, 0x00,
1949 //Beacon request type
1950 0x05,
1951 //Beacon request starts here
1952 0x0C, 0x00, 0x30, 0x00, 0x14, 0x00, 0x02,
1953 //BSSID
1954 0xFF, 0xFF, 0xFF, 0xFF, 0xff, 0xFF,
1955 //SSID
1956 0x00, 0x05, 0x57, 0x69, 0x46, 0x69, 0x31,
1957 //0x00, 0x08, 0x41, 0x53, 0x54, 0x2D, 0x57, 0x41, 0x50, 0x49,
1958 //Reporting Condition
1959 0x01, 0x02, 0x00, 0x00,
1960 //Reporting Detail
1961 0x02, 0x01, 0x0
1962 //Request IE
1963 },
1964 {
1965 /*Beacon Request 3*/
1966 0x05, 0x00, 0x01, 0x00, 0x00,
1967 //Measurement request IE
1968 0x26, 0x25, 0x01, 0x00,
1969 //Beacon request type
1970 0x05,
1971 //Beacon request starts here
1972 0x0C, 0x01, 0x30, 0x00, 0x69, 0x00, 0x00,
1973 //BSSID
1974 0xFF, 0xFF, 0xFF, 0xFF, 0xff, 0xFF,
1975 //SSID
1976 0x00, 0x05, 0x57, 0x69, 0x46, 0x69, 0x31,
1977 //Reporting Condition
1978 0x01, 0x02, 0x00, 0x00,
1979 //Reporting Detail
1980 0x02, 0x01, 0x1,
1981 //Request IE
1982 0x0A, 0x05, 0x00, 0x30, 0x46, 0x36, 0xDD
1983 },
1984 {
1985 /*Neighbor report*/
1986 0x05, 0x05, 0x01,
1987 //Measurement request IE
1988 0x34, 0x17,
1989 //BSSID
1990 0xFF, 0xFF, 0xFF, 0xFF, 0xff, 0xFF,
1991 //BSSID INFOo
1992 0xED, 0x01, 0x00, 0x00,
1993 //Reg class, channel, Phy type
1994 0x20, 0x01, 0x02,
1995 //TSF Info
1996 0x01, 0x04, 0x02, 0x00, 0x60, 0x00,
1997 //Condensed country
1998 0x02, 0x02, 0x62, 0x63
1999 },
2000 {
2001 /* Link measurement request */
2002 0x05, 0x02, 0x00,
2003 //Txpower used
2004 0x00,
2005 //Max Tx Power
2006 0x00
2007 }
2008 };
2009
2010 if((psessionEntry = peFindSessionBySessionId(pMac,(tANI_U8)arg1) )== NULL)
2011 {
2012 p += log_sprintf( pMac,p,"Session does not exist for given session Id \n");
2013 return p;
2014 }
2015 switch (arg2)
2016 {
2017 case 0:
2018 case 1:
2019 case 2:
2020 case 3:
2021 {
Madan Mohan Koyyalamudi8f207c12012-10-30 18:18:38 -07002022 tDot11fRadioMeasurementRequest *frm =
2023 vos_mem_malloc(sizeof(tDot11fRadioMeasurementRequest));
2024 if (!frm)
2025 {
2026 p += log_sprintf(pMac, p,
2027 "Unable to allocate memory to process command\n");
2028 break;
2029 }
2030 if( (status = dot11fUnpackRadioMeasurementRequest( pMac, &pBody[arg2][0], size[arg2], frm )) != 0 )
Jeff Johnson295189b2012-06-20 16:38:30 -07002031 p += log_sprintf( pMac, p, "failed to unpack.....status = %x\n", status);
2032 else
Madan Mohan Koyyalamudi8f207c12012-10-30 18:18:38 -07002033 rrmProcessRadioMeasurementRequest( pMac, psessionEntry->bssId, frm, psessionEntry );
2034 vos_mem_free(frm);
Jeff Johnson295189b2012-06-20 16:38:30 -07002035 }
2036 break;
2037 case 4:
2038 {
Madan Mohan Koyyalamudi8f207c12012-10-30 18:18:38 -07002039 tDot11fNeighborReportResponse *frm =
2040 vos_mem_malloc(sizeof(tDot11fNeighborReportResponse));
2041 if (!frm)
2042 {
2043 p += log_sprintf(pMac, p,
2044 "Unable to allocate memory to process command\n");
2045 break;
2046 }
Jeff Johnson295189b2012-06-20 16:38:30 -07002047 pBody[arg2][2] = (tANI_U8)arg3; //Dialog Token
Madan Mohan Koyyalamudi8f207c12012-10-30 18:18:38 -07002048 if( (status = dot11fUnpackNeighborReportResponse( pMac, &pBody[arg2][0], size[arg2], frm )) != 0 )
Jeff Johnson295189b2012-06-20 16:38:30 -07002049 p += log_sprintf( pMac, p, "failed to unpack.....status = %x\n", status);
2050 else
Madan Mohan Koyyalamudi8f207c12012-10-30 18:18:38 -07002051 rrmProcessNeighborReportResponse( pMac, frm, psessionEntry );
2052 vos_mem_free(frm);
Jeff Johnson295189b2012-06-20 16:38:30 -07002053 }
2054 break;
2055 case 5:
2056 {
2057// FIXME.
Jeff Johnson295189b2012-06-20 16:38:30 -07002058 }
2059 break;
2060 case 6:
2061 {
2062 tPowerdBm localConstraint = (tPowerdBm) arg3;
2063 tPowerdBm maxTxPower = cfgGetRegulatoryMaxTransmitPower( pMac, psessionEntry->currentOperChannel );
2064 maxTxPower = VOS_MIN( maxTxPower, maxTxPower-localConstraint );
2065 if( maxTxPower != psessionEntry->maxTxPower )
2066 {
2067 rrmSendSetMaxTxPowerReq( pMac, maxTxPower, psessionEntry );
2068 psessionEntry->maxTxPower = maxTxPower;
2069 }
2070 }
2071 break;
2072 default:
2073 p += log_sprintf( pMac, p, "Invalid option" );
2074 break;
2075 }
2076 return p;
2077}
2078#endif
2079
2080#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
2081#ifdef RSSI_HACK
2082/* This dump command is needed to set the RSSI values in TL while testing handoff. Handoff code was tested
2083 * using this dump command. Whatever the value gives as the first parameter will be considered as the average
2084 * RSSI by TL and invokes corresponding callback registered by the clients */
2085extern int dumpCmdRSSI;
2086static char *
2087dump_lim_set_tl_data_pkt_rssi( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
2088{
2089 dumpCmdRSSI = arg1;
2090 limLog(pMac, LOGE, FL("Setting TL data packet RSSI to %d"), dumpCmdRSSI);
2091 return p;
2092}
2093#endif
2094#endif
2095
2096#if defined WLAN_FEATURE_VOWIFI_11R
2097/* This command is used to trigger FT Preauthentication with the AP with BSSID below */
2098static char *
2099dump_lim_ft_event( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
2100{
2101 static tANI_U8 macAddr[6] = {0x00, 0xde, 0xad, 0xaf, 0xaf, 0x04};
2102 tpPESession psessionEntry;
2103 tSirMsgQ msg;
2104 tpSirFTPreAuthReq pftPreAuthReq;
2105 tANI_U16 auth_req_len = 0;
2106 tCsrRoamConnectedProfile Profile;
2107
2108 csrRoamCopyConnectProfile(pMac, arg2, &Profile);
2109
2110 if((psessionEntry = peFindSessionBySessionId(pMac,(tANI_U8)arg2) )== NULL)
2111 {
2112 p += log_sprintf( pMac,
2113 p,"Session does not exist usage: 363 <0> sessionid channel \n");
2114 return p;
2115 }
2116
2117 switch (arg1)
2118 {
2119 case 0:
2120 // Send Pre-auth event
2121 {
2122 /*----------------*/
2123 p += log_sprintf( pMac,p, "Preparing Pre Auth Req message\n");
2124 auth_req_len = sizeof(tSirFTPreAuthReq);
2125
2126 pftPreAuthReq = vos_mem_malloc(auth_req_len);
Bansidhar Gopalachari2f7395d2013-07-12 11:24:23 +05302127 if (NULL == pftPreAuthReq)
Jeff Johnson295189b2012-06-20 16:38:30 -07002128 {
Bansidhar Gopalachari2f7395d2013-07-12 11:24:23 +05302129 p += log_sprintf( pMac,p,"Pre auth dump: AllocateMemory() failed \n");
Jeff Johnson295189b2012-06-20 16:38:30 -07002130 return p;
2131 }
2132 pftPreAuthReq->pbssDescription = vos_mem_malloc(sizeof(Profile.pBssDesc->length)+
2133 Profile.pBssDesc->length);
2134
2135 pftPreAuthReq->messageType = eWNI_SME_FT_PRE_AUTH_REQ;
2136 pftPreAuthReq->length = auth_req_len + sizeof(Profile.pBssDesc->length) +
2137 Profile.pBssDesc->length;
2138 pftPreAuthReq->preAuthchannelNum = 6;
2139
Bansidhar Gopalachari2f7395d2013-07-12 11:24:23 +05302140 vos_mem_copy((void *) &pftPreAuthReq->currbssId,
Jeff Johnson295189b2012-06-20 16:38:30 -07002141 (void *)psessionEntry->bssId, 6);
Bansidhar Gopalachari2f7395d2013-07-12 11:24:23 +05302142 vos_mem_copy((void *) &pftPreAuthReq->preAuthbssId,
Jeff Johnson295189b2012-06-20 16:38:30 -07002143 (void *)macAddr, 6);
2144 pftPreAuthReq->ft_ies_length = (tANI_U16)pMac->ft.ftSmeContext.auth_ft_ies_length;
2145
2146 // Also setup the mac address in sme context.
Bansidhar Gopalachari2f7395d2013-07-12 11:24:23 +05302147 vos_mem_copy(pMac->ft.ftSmeContext.preAuthbssId, macAddr, 6);
Jeff Johnson295189b2012-06-20 16:38:30 -07002148
2149 vos_mem_copy(pftPreAuthReq->ft_ies, pMac->ft.ftSmeContext.auth_ft_ies,
2150 pMac->ft.ftSmeContext.auth_ft_ies_length);
2151
2152 vos_mem_copy(Profile.pBssDesc->bssId, macAddr, 6);
2153
2154 p += log_sprintf( pMac,p, "\n ----- LIM Debug Information ----- \n");
Madan Mohan Koyyalamudi87054ba2012-11-02 13:24:12 -07002155 p += log_sprintf( pMac, p, "%s: length = %d\n", __func__,
Jeff Johnson295189b2012-06-20 16:38:30 -07002156 (int)pMac->ft.ftSmeContext.auth_ft_ies_length);
Madan Mohan Koyyalamudi87054ba2012-11-02 13:24:12 -07002157 p += log_sprintf( pMac, p, "%s: length = %02x\n", __func__,
Jeff Johnson295189b2012-06-20 16:38:30 -07002158 (int)pMac->ft.ftSmeContext.auth_ft_ies[0]);
2159 p += log_sprintf( pMac, p, "%s: Auth Req %02x %02x %02x\n",
Madan Mohan Koyyalamudi87054ba2012-11-02 13:24:12 -07002160 __func__, pftPreAuthReq->ft_ies[0],
Jeff Johnson295189b2012-06-20 16:38:30 -07002161 pftPreAuthReq->ft_ies[1], pftPreAuthReq->ft_ies[2]);
2162
Madan Mohan Koyyalamudi87054ba2012-11-02 13:24:12 -07002163 p += log_sprintf( pMac, p, "%s: Session %02x %02x %02x\n", __func__,
Jeff Johnson295189b2012-06-20 16:38:30 -07002164 psessionEntry->bssId[0],
2165 psessionEntry->bssId[1], psessionEntry->bssId[2]);
Madan Mohan Koyyalamudi87054ba2012-11-02 13:24:12 -07002166 p += log_sprintf( pMac, p, "%s: Session %02x %02x %02x %p\n", __func__,
Jeff Johnson295189b2012-06-20 16:38:30 -07002167 pftPreAuthReq->currbssId[0],
2168 pftPreAuthReq->currbssId[1],
2169 pftPreAuthReq->currbssId[2], pftPreAuthReq);
2170
2171 Profile.pBssDesc->channelId = (tANI_U8)arg3;
2172 vos_mem_copy((void *)pftPreAuthReq->pbssDescription, (void *)Profile.pBssDesc,
2173 Profile.pBssDesc->length);
2174
2175 msg.type = eWNI_SME_FT_PRE_AUTH_REQ;
2176 msg.bodyptr = pftPreAuthReq;
2177 msg.bodyval = 0;
2178
2179 p += log_sprintf( pMac, p, "limPostMsgApi(eWNI_SME_FT_PRE_AUTH_REQ) \n");
2180 limPostMsgApi(pMac, &msg);
2181 }
2182 break;
2183
2184 default:
2185 break;
2186 }
2187 return p;
2188}
2189#endif
Jeff Johnsone7245742012-09-05 17:12:55 -07002190static char *
2191dump_lim_channel_switch_announcement( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
2192{
2193 tpPESession psessionEntry;
2194 tANI_U8 nMode = arg2;
2195 tANI_U8 nNewChannel = arg3;
2196 tANI_U8 nCount = arg4;
2197 tANI_U8 peer[] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
Jeff Johnson295189b2012-06-20 16:38:30 -07002198
Jeff Johnsone7245742012-09-05 17:12:55 -07002199 if((psessionEntry = peFindSessionBySessionId(pMac,(tANI_U8)arg1) )== NULL)
2200 {
2201 p += log_sprintf( pMac,
2202 p,"Session does not exist usage: 363 <0> sessionid channel \n");
Mahesh Kumar Kalikot Veetil2aad8d82013-02-07 12:31:28 -08002203 VOS_TRACE(VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_WARN,"Session Not found!!!!");
Jeff Johnsone7245742012-09-05 17:12:55 -07002204 return p;
2205 }
2206
2207 limSendChannelSwitchMgmtFrame( pMac, peer, nMode, nNewChannel, nCount, psessionEntry );
2208
2209 psessionEntry->gLimChannelSwitch.switchCount = nCount;
2210 psessionEntry->gLimSpecMgmt.dot11hChanSwState = eLIM_11H_CHANSW_RUNNING;
2211 psessionEntry->gLimChannelSwitch.switchMode = nMode;
2212 psessionEntry->gLimChannelSwitch.primaryChannel = nNewChannel;
2213
2214 schSetFixedBeaconFields(pMac, psessionEntry);
2215 limSendBeaconInd(pMac, psessionEntry);
2216
2217 return p;
2218}
2219
Mohit Khanna4a70d262012-09-11 16:30:12 -07002220#ifdef WLAN_FEATURE_11AC
2221static char *
2222dump_lim_vht_opmode_notification(tpAniSirGlobal pMac, tANI_U32 arg1,tANI_U32 arg2,tANI_U32 arg3, tANI_U32 arg4, char *p)
2223{
2224 tANI_U8 peer[] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
2225 tANI_U8 nMode = arg2;
2226 tpPESession psessionEntry;
2227
2228 if((psessionEntry = peFindSessionBySessionId(pMac,(tANI_U8)arg1) )== NULL)
2229 {
2230 p += log_sprintf( pMac,
2231 p,"Session does not exist usage: 366 <0> sessionid channel \n");
2232 return p;
2233 }
2234
2235 limSendVHTOpmodeNotificationFrame(pMac, peer, nMode,psessionEntry);
2236
2237 psessionEntry->gLimOperatingMode.present = 1;
2238 psessionEntry->gLimOperatingMode.chanWidth = nMode;
2239 psessionEntry->gLimOperatingMode.rxNSS = 0;
2240 psessionEntry->gLimOperatingMode.rxNSSType = 0;
2241
2242 schSetFixedBeaconFields(pMac, psessionEntry);
2243 limSendBeaconInd(pMac, psessionEntry);
2244
2245 return p;
2246}
Madan Mohan Koyyalamudic6226de2012-09-18 16:33:31 -07002247
2248static char *
2249dump_lim_vht_channel_switch_notification(tpAniSirGlobal pMac, tANI_U32 arg1,tANI_U32 arg2,tANI_U32 arg3, tANI_U32 arg4, char *p)
2250{
2251 tpPESession psessionEntry;
2252 tANI_U8 nChanWidth = arg2;
2253 tANI_U8 nNewChannel = arg3;
2254 tANI_U8 ncbMode = arg4;
2255 tANI_U8 peer[] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
2256
2257 if((psessionEntry = peFindSessionBySessionId(pMac,(tANI_U8)arg1) )== NULL)
2258 {
2259 p += log_sprintf( pMac,
2260 p,"Session does not exist usage: 367 <0> sessionid channel \n");
Mahesh Kumar Kalikot Veetil2aad8d82013-02-07 12:31:28 -08002261 VOS_TRACE(VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_WARN,"Session Not found!!!!");
Madan Mohan Koyyalamudic6226de2012-09-18 16:33:31 -07002262 return p;
2263 }
2264
2265 limSendVHTChannelSwitchMgmtFrame( pMac, peer, nChanWidth, nNewChannel, (ncbMode+1), psessionEntry );
2266
2267 psessionEntry->gLimChannelSwitch.switchCount = 0;
2268 psessionEntry->gLimSpecMgmt.dot11hChanSwState = eLIM_11H_CHANSW_RUNNING;
2269 psessionEntry->gLimChannelSwitch.switchMode = 1;
2270 psessionEntry->gLimChannelSwitch.primaryChannel = nNewChannel;
2271 psessionEntry->gLimWiderBWChannelSwitch.newChanWidth = nChanWidth;
2272 psessionEntry->gLimWiderBWChannelSwitch.newCenterChanFreq0 = limGetCenterChannel(pMac,nNewChannel,(ncbMode+1),nChanWidth);
2273 psessionEntry->gLimWiderBWChannelSwitch.newCenterChanFreq1 = 0;
2274
2275 schSetFixedBeaconFields(pMac, psessionEntry);
2276 limSendBeaconInd(pMac, psessionEntry);
2277
2278 return p;
2279}
2280
Mohit Khanna4a70d262012-09-11 16:30:12 -07002281#endif
Jeff Johnsone7245742012-09-05 17:12:55 -07002282static char *
2283dump_lim_cancel_channel_switch_announcement( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
2284{
2285 tpPESession psessionEntry;
2286
2287 if((psessionEntry = peFindSessionBySessionId(pMac,(tANI_U8)arg1) )== NULL)
2288 {
2289 p += log_sprintf( pMac,
2290 p,"Session does not exist usage: 363 <0> sessionid channel \n");
Mahesh Kumar Kalikot Veetil2aad8d82013-02-07 12:31:28 -08002291 VOS_TRACE(VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_WARN,"Session Not found!!!!");
Jeff Johnsone7245742012-09-05 17:12:55 -07002292 return p;
2293 }
2294 psessionEntry->gLimChannelSwitch.switchCount = 0;
2295 psessionEntry->gLimSpecMgmt.dot11hChanSwState = eLIM_11H_CHANSW_INIT;
2296 psessionEntry->gLimChannelSwitch.switchMode = 0;
2297 psessionEntry->gLimChannelSwitch.primaryChannel = 0;
2298
2299 schSetFixedBeaconFields(pMac, psessionEntry);
2300 limSendBeaconInd(pMac, psessionEntry);
2301
2302 return p;
2303}
Madan Mohan Koyyalamudi01cba042013-01-10 21:56:05 -08002304
2305
2306static char *
2307dump_lim_mcc_policy_maker(tpAniSirGlobal pMac, tANI_U32 arg1,tANI_U32 arg2,tANI_U32 arg3, tANI_U32 arg4, char *p)
2308{
2309 VOS_TRACE(VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_FATAL, "dump_lim_mcc_policy_maker arg = %d",arg1);
2310
2311 if(arg1 == 0) //Disable feature completely
2312 {
2313 WDA_TrafficStatsTimerActivate(FALSE);
2314 if (ccmCfgSetInt(pMac, WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED, FALSE,
2315 NULL, eANI_BOOLEAN_FALSE)==eHAL_STATUS_FAILURE)
2316 {
2317 limLog( pMac, LOGE, FL("Could not get WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED"));
2318 }
2319 }
2320 else if(arg1 == 1) //Enable feature
2321 {
2322 if (ccmCfgSetInt(pMac, WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED, TRUE,
2323 NULL, eANI_BOOLEAN_FALSE)==eHAL_STATUS_FAILURE)
2324 {
2325 limLog( pMac, LOGE, FL("Could not set WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED"));
2326 }
2327 }
2328 else if(arg1 == 2) //Enable feature and activate periodic timer
2329 {
2330 if (ccmCfgSetInt(pMac, WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED, TRUE,
2331 NULL, eANI_BOOLEAN_FALSE)==eHAL_STATUS_FAILURE)
2332 {
2333 limLog( pMac, LOGE, FL("Could not set WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED"));
2334 }
2335 WDA_TrafficStatsTimerActivate(TRUE);
2336 }
2337 else if(arg1 == 3) //Enable only stats collection - Used for unit testing
2338 {
2339 VOS_TRACE(VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_FATAL, "Enabling Traffic Stats in DTS");
2340 WDI_DS_ActivateTrafficStats();
2341 }
2342 else if(arg1 == 4) //Send current stats snapshot to Riva -- Used for unit testing
2343 {
2344 v_VOID_t * pVosContext = vos_get_global_context(VOS_MODULE_ID_WDA, NULL);
2345 tWDA_CbContext *pWDA = vos_get_context(VOS_MODULE_ID_WDA, pVosContext);
2346 ccmCfgSetInt(pMac, WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED, TRUE, NULL, eANI_BOOLEAN_FALSE);
Kiran Kumar Lokerea4db3dc2013-03-25 18:05:24 -07002347 if(pWDA != NULL)
2348 {
2349 WDA_TimerTrafficStatsInd(pWDA);
2350 }
Madan Mohan Koyyalamudi01cba042013-01-10 21:56:05 -08002351 WDA_TrafficStatsTimerActivate(FALSE);
2352 ccmCfgSetInt(pMac, WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED, FALSE,NULL, eANI_BOOLEAN_FALSE);
2353 }
2354 else if (arg1 == 5) //Change the periodicity of TX stats timer
2355 {
2356 v_VOID_t * pVosContext = vos_get_global_context(VOS_MODULE_ID_WDA, NULL);
2357 tWDA_CbContext *pWDA = vos_get_context(VOS_MODULE_ID_WDA, pVosContext);
Kiran Kumar Lokerea4db3dc2013-03-25 18:05:24 -07002358 if (pWDA != NULL && tx_timer_change(&pWDA->wdaTimers.trafficStatsTimer, arg2/10, arg2/10) != TX_SUCCESS)
Madan Mohan Koyyalamudi01cba042013-01-10 21:56:05 -08002359 {
2360 limLog(pMac, LOGP, FL("Disable timer before changing timeout value"));
2361 }
2362 }
2363 return p;
2364}
2365
Ravi Kumar Vaishnavb7652402013-01-18 19:05:15 -08002366#ifdef WLANTL_DEBUG
2367/* API to print number of pkts received based on rate index */
2368/* arg1 = station Id */
2369/* arg2 = BOOLEAN value to either or not flush the counters */
2370static char *
2371dump_lim_get_pkts_rcvd_per_rate_idx( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
2372{
2373 /* if anything other than 1, then we need not flush the counters */
2374 if( arg2 != 1)
2375 arg2 = FALSE;
2376
2377 WLANTLPrintPktsRcvdPerRateIdx(pMac->roam.gVosContext, (tANI_U8)arg1, (v_BOOL_t)arg2);
2378 return p;
2379}
2380
2381/* API to print number of pkts received based on rssi */
2382/* arg1 = station Id */
2383/* arg2 = BOOLEAN value to either or not flush the counters */
2384static char *
2385dump_lim_get_pkts_rcvd_per_rssi_values( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
2386{
2387 /* if anything other than 1, then we need not flush the counters */
2388 if( arg2 != 1)
2389 arg2 = FALSE;
2390
2391 WLANTLPrintPktsRcvdPerRssi(pMac->roam.gVosContext, (tANI_U8)arg1, (v_BOOL_t)arg2);
2392 return p;
2393}
2394#endif
2395
Praveen Kumar Sirisilla7ea8dc92013-12-22 16:35:05 -08002396#ifdef WLAN_FEATURE_RELIABLE_MCAST
2397
2398static char *
2399dump_lim_enable_reliable_mcast_data_path
2400(
2401 tpAniSirGlobal pMac,
2402 tANI_U32 arg1,
2403 tANI_U32 arg2,
2404 tANI_U32 arg3,
2405 tANI_U32 arg4,
2406 char *p
2407)
2408{
2409 v_MACADDR_t reliableMcastTransmitterAddr;
2410 v_VOID_t * pVosContext = vos_get_global_context(VOS_MODULE_ID_WDA, NULL);
2411
2412 reliableMcastTransmitterAddr.bytes[0] = (tANI_U8)((arg1 & 0xFF000000) >> 24);
2413 reliableMcastTransmitterAddr.bytes[1] = (tANI_U8)((arg1 & 0x00FF0000) >> 16);
2414 reliableMcastTransmitterAddr.bytes[2] = (tANI_U8)((arg1 & 0x0000FF00) >> 8);
2415 reliableMcastTransmitterAddr.bytes[3] = (tANI_U8)((arg1 & 0x000000FF));
2416 reliableMcastTransmitterAddr.bytes[4] = (tANI_U8)((arg2 & 0xFF000000) >> 24);
2417 reliableMcastTransmitterAddr.bytes[5] = (tANI_U8)((arg2 & 0x00FF0000) >> 16);
2418
2419 limLog(pMac, LOGE,
2420 FL("Enable RMCAST data path for MCAST transmitter:" MAC_ADDRESS_STR),
2421 MAC_ADDR_ARRAY( reliableMcastTransmitterAddr.bytes));
2422
2423 /*Input format is in MAC address fromat for example
2424 iwpriv wlan0 dump 0xaabbccdd 0xeeff0000 translates into enable RMCAST for
2425 MAC address 0xaa:0xbb:0xcc:0xdd:0xee:0xff*/
2426
2427 /*Enable TL data path*/
2428 WLANTL_EnableReliableMcast( pVosContext, &reliableMcastTransmitterAddr );
2429
2430 return p;
2431}
2432
2433static char *
2434dump_lim_disable_reliable_mcast_data_path
2435(
2436 tpAniSirGlobal pMac,
2437 tANI_U32 arg1,
2438 tANI_U32 arg2,
2439 tANI_U32 arg3,
2440 tANI_U32 arg4,
2441 char *p
2442)
2443{
2444 v_MACADDR_t reliableMcastTransmitterAddr;
2445 v_VOID_t * pVosContext = vos_get_global_context(VOS_MODULE_ID_WDA, NULL);
2446
2447 reliableMcastTransmitterAddr.bytes[0] = (tANI_U8)((arg1 & 0xFF000000) >> 24);
2448 reliableMcastTransmitterAddr.bytes[1] = (tANI_U8)((arg1 & 0x00FF0000) >> 16);
2449 reliableMcastTransmitterAddr.bytes[2] = (tANI_U8)((arg1 & 0x0000FF00) >> 8);
2450 reliableMcastTransmitterAddr.bytes[3] = (tANI_U8)((arg1 & 0x000000FF));
2451 reliableMcastTransmitterAddr.bytes[4] = (tANI_U8)((arg2 & 0xFF000000) >> 24);
2452 reliableMcastTransmitterAddr.bytes[5] = (tANI_U8)((arg2 & 0x00FF0000) >> 16);
2453
2454
2455 limLog(pMac, LOGE,
2456 FL("Disable RMCAST data path for MCAST transmitter:" MAC_ADDRESS_STR),
2457 MAC_ADDR_ARRAY( reliableMcastTransmitterAddr.bytes));
2458
2459 /*Input format is in MAC address fromat for example
2460 iwpriv wlan0 dump 0xaabbccdd 0xeeff0000 translates into enable RMCAST for
2461 MAC address 0xaa:0xbb:0xcc:0xdd:0xee:0xff*/
2462
2463
2464 /*Disable TL data path*/
2465 WLANTL_DisableReliableMcast( pVosContext, &reliableMcastTransmitterAddr );
2466
2467 return p;
2468}
2469
2470static char *
2471dump_lim_rmc_status(tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2,
2472 tANI_U32 arg3, tANI_U32 arg4, char *p)
2473{
2474 limRmcDumpStatus(pMac);
2475 return p;
2476}
2477
2478static char *
2479dump_set_mcast_dup_detect(tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2,
2480 tANI_U32 arg3, tANI_U32 arg4, char *p)
2481{
2482 v_VOID_t * pVosContext = vos_get_global_context(VOS_MODULE_ID_WDA, NULL);
2483 v_U8_t enable;
2484
2485 enable = (tANI_U8)arg1;
2486
2487 /* Enable or Disable Multicast Duplicate Detection */
2488 WLANTL_SetMcastDuplicateDetection( pVosContext, enable);
2489
2490 return p;
2491}
2492#endif /* WLAN_FEATURE_RELIABLE_MCAST */
2493
2494static char *
2495dump_set_max_probe_req(tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2,
2496 tANI_U32 arg3, tANI_U32 arg4, char *p)
2497{
2498 if ((arg1 <= 0) || (arg1 > 4)){
2499 limLog(pMac, LOGE,
2500 FL("invalid number. valid range 1 - 4 \n"));
2501 return p;
2502 }
2503 pMac->lim.maxProbe = arg1;
2504 return p;
2505}
Viral Modif45f7672013-09-06 13:29:06 -07002506/* API to fill Rate Info based on mac efficiency
2507 * arg 1: mac efficiency to be used to calculate mac thorughput for a given rate index
2508 * arg 2: starting rateIndex to apply the macEfficiency to
2509 * arg 3: ending rateIndex to apply the macEfficiency to
2510 */
2511static char *
2512dump_limRateInfoBasedOnMacEff(tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
2513{
2514 limLog(pMac, LOGE, FL("arg1 %u, arg2 %u, arg3 %u"), arg1, arg2, arg3);
2515 WDTS_FillRateInfo((tANI_U8)(arg1), (tANI_U16)(arg2), (tANI_U16)(arg3));
2516 return p;
2517}
2518
Jeff Johnson295189b2012-06-20 16:38:30 -07002519static tDumpFuncEntry limMenuDumpTable[] = {
2520 {0, "PE (300-499)", NULL},
Jeff Johnsone7245742012-09-05 17:12:55 -07002521 {300, "LIM: Dump state(s)/statistics <session id>", dump_lim_info},
Jeff Johnson295189b2012-06-20 16:38:30 -07002522 {301, "PE.LIM: dump TSPEC Table", dump_lim_tspec_table},
2523 {302, "PE.LIM: dump specified TSPEC entry (id)", dump_lim_tspec_entry},
2524 {303, "PE.LIM: dump EDCA params", dump_lim_edca_params},
2525 {304, "PE.LIM: dump DPH table summary", dump_lim_dph_table_summary},
2526 {305, "PE.LIM: dump link monitor stats", dump_lim_link_monitor_stats},
2527 {306, "PE.LIM:dump Set the BAR Decline stat(arg1= 1/0 (enable/disable) arg2 =TID", dump_lim_AddBA_DeclineStat},
2528 {307, "PE: LIM: dump CSR Send ReAssocReq", dump_lim_sme_reassoc_req},
2529 {308, "PE:LIM: dump all 11H related data", dump_lim_dot11h_stats},
2530 {309, "PE:LIM: dump to enable Measurement on AP", dump_lim_enable_measurement},
2531 {310, "PE:LIM: dump to enable QuietIE on AP", dump_lim_enable_quietIE},
2532 {311, "PE:LIM: disable/enable scan 1(disable)", dump_lim_disable_enable_scan},
2533 {320, "PE.LIM: send sme scan request", dump_lim_scan_req_send},
2534
2535
2536 /*FIXME_GEN6*/
2537 /* This dump command is more of generic dump cmd and hence it should
2538 * be moved to logDump.c
2539 */
2540 {321, "PE:LIM: Set Log Level <VOS Module> <VOS Log Level>", dump_lim_update_log_level},
2541 {322, "PE.LIM: Enable/Disable PE Tracing", dump_lim_trace_cfg},
2542 {323, "PE.LIM: Trace Dump if enabled", dump_lim_trace_dump},
2543 {331, "PE.LIM: Send finish scan to LIM", dump_lim_finishscan_send},
2544 {332, "PE.LIM: force probe rsp send from LIM", dump_lim_prb_rsp_send},
2545 {333, "PE.SCH: Trigger to generate a beacon", dump_sch_beacon_trigger},
2546 {335, "PE.LIM: set ACM flag (0..3)", dump_lim_acm_set},
2547 {336, "PE.LIM: Send an ADDBA Req to peer MAC arg1=aid,arg2=tid, arg3=ssn", dump_lim_addba_req},
2548 {337, "PE.LIM: Send a DELBA Ind to peer MAC arg1=aid,arg2=recipient(0)/initiator(1),arg3=tid,arg4=reasonCode", dump_lim_delba_req},
2549 {338, "PE.LIM: Trigger a BA timeout for STA index", dump_lim_ba_timeout},
2550 {339, "PE.LIM: List active BA session(s) for AssocID", dump_lim_list_active_ba},
2551 {340, "PE.LIM: Set background scan flag (0-disable, 1-enable)",dump_lim_bgscan_toggle},
2552 {341, "PE.LIM: Set link monitoring mode", dump_lim_linkmonitor_toggle},
2553 {342, "PE.LIM: AddSta <6th byte of station Mac>", dump_lim_add_sta},
2554 {343, "PE.LIM: DelSta <aid>", dump_lim_del_sta},
2555 {344, "PE.LIM: Set probe respond flag", dump_lim_proberesp_toggle},
2556 {345, "PE.LIM: set protection config bitmap", set_lim_prot_cfg},
2557 {346, "PE:LIM: Set the Dot11 Mode", dump_lim_set_dot11_mode},
2558 {347, "PE:Enable or Disable Protection", dump_lim_set_protection_control},
2559 {348, "PE:LIM: Send SM Power Mode Action frame", dump_lim_send_SM_Power_Mode},
Jeff Johnsone7245742012-09-05 17:12:55 -07002560 {349, "PE: LIM: Change CB Mode <session id> <sec chnl offset>",dump_lim_update_cb_Mode},
Jeff Johnson295189b2012-06-20 16:38:30 -07002561 {350, "PE: LIM: abort scan", dump_lim_abort_scan},
2562 {351, "PE: LIM: Start stop BG scan", dump_lim_start_stop_bg_scan},
2563 {352, "PE: LIM: PE statistics <scanmask>", dump_lim_get_pe_statistics},
2564 {353, "PE: LIM: Set MAC log level <Mac Module ID> <Log Level>", dump_lim_set_log_level},
2565 {354, "PE: LIM: Set Scan in Power Save <0-disable, 1-enable>", dump_lim_set_scan_in_powersave},
2566 {355, "PE.LIM: send sme start BSS request", dump_lim_send_start_bss_req},
2567 {356, "PE.LIM: dump pesession info ", dump_lim_session_print},
2568 {357, "PE.LIM: send DisAssocRequest", dump_lim_send_disassoc_req},
2569 {358, "PE.LIM: send sme stop bss request <session ID>", dump_lim_stop_bss_req},
2570 {359, "PE.LIM: send sme join request", dump_lim_send_join_req},
2571#if defined WLAN_FEATURE_VOWIFI
2572 {360, "PE.LIM: send an RRM action frame", dump_lim_send_rrm_action},
2573 {361, "PE.LIM: unpack an RRM action frame", dump_lim_unpack_rrm_action},
2574#endif
2575#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
2576#ifdef RSSI_HACK
2577 {362, "TL Set current RSSI", dump_lim_set_tl_data_pkt_rssi},
2578#endif
2579#endif
2580#ifdef WLAN_FEATURE_VOWIFI_11R
2581 {363, "PE.LIM: trigger pre auth/reassoc event", dump_lim_ft_event},
2582#endif
Jeff Johnsone7245742012-09-05 17:12:55 -07002583 {364, "PE.LIM: Send a channel switch announcement", dump_lim_channel_switch_announcement},
2584 {365, "PE.LIM: Cancel channel switch announcement", dump_lim_cancel_channel_switch_announcement},
Mohit Khanna4a70d262012-09-11 16:30:12 -07002585#ifdef WLAN_FEATURE_11AC
2586 {366, "PE.LIM: Send a VHT OPMode Action Frame", dump_lim_vht_opmode_notification},
Madan Mohan Koyyalamudic6226de2012-09-18 16:33:31 -07002587 {367, "PE.LIM: Send a VHT Channel Switch Announcement", dump_lim_vht_channel_switch_notification},
Madan Mohan Koyyalamudi01cba042013-01-10 21:56:05 -08002588 {368, "PE.LIM: MCC Policy Maker", dump_lim_mcc_policy_maker},
Mohit Khanna4a70d262012-09-11 16:30:12 -07002589#endif
Ravi Kumar Vaishnavb7652402013-01-18 19:05:15 -08002590#ifdef WLANTL_DEBUG
2591 {369, "PE.LIM: pkts/rateIdx: iwpriv wlan0 dump 368 <staId> <boolean to flush counter>", dump_lim_get_pkts_rcvd_per_rate_idx},
2592 {370, "PE.LIM: pkts/rssi: : iwpriv wlan0 dump 369 <staId> <boolean to flush counter>", dump_lim_get_pkts_rcvd_per_rssi_values},
2593#endif
Praveen Kumar Sirisilla7ea8dc92013-12-22 16:35:05 -08002594#ifdef WLAN_FEATURE_RELIABLE_MCAST
2595 {371, "PE.LIM: Enable RMCAST data path in TL for input MCAST addr",
2596 dump_lim_enable_reliable_mcast_data_path },
2597 {372, "PE.LIM: Disable RMCAST data path in TL for input MCAST addr",
2598 dump_lim_disable_reliable_mcast_data_path },
2599 {373, "PE.LIM: Dump RMCAST transmitter and leader status", dump_lim_rmc_status },
2600#endif /* WLAN_FEATURE_RELIABLE_MCAST */
2601 {374, "PE.LIM: MAS RX stats MAC eff <MAC eff in percentage>", dump_limRateInfoBasedOnMacEff},
2602#ifdef WLAN_FEATURE_RELIABLE_MCAST
2603 {375, "PE.LIM: Enable(1)/Disable(0) RMCAST duplicate detection", dump_set_mcast_dup_detect },
2604#endif /* WLAN_FEATURE_RELIABLE_MCAST */
2605 {376, "PE.LIM: max number of probe per scan", dump_set_max_probe_req },
Jeff Johnson295189b2012-06-20 16:38:30 -07002606};
2607
2608
2609
2610void limDumpInit(tpAniSirGlobal pMac)
2611{
2612 logDumpRegisterTable( pMac, &limMenuDumpTable[0],
2613 sizeof(limMenuDumpTable)/sizeof(limMenuDumpTable[0]) );
2614}
2615
2616
2617#endif //#if defined(ANI_LOGDUMP)
2618