summaryrefslogtreecommitdiff
path: root/wilink_6_1/Test/measurementDbg.c
blob: fb454f6a587c5ba4418ec6e3002475a7efa7767b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
/*
 * measurementDbg.c
 *
 * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.      
 * All rights reserved.                                                  
 *                                                                       
 * Redistribution and use in source and binary forms, with or without    
 * modification, are permitted provided that the following conditions    
 * are met:                                                              
 *                                                                       
 *  * Redistributions of source code must retain the above copyright     
 *    notice, this list of conditions and the following disclaimer.      
 *  * Redistributions in binary form must reproduce the above copyright  
 *    notice, this list of conditions and the following disclaimer in    
 *    the documentation and/or other materials provided with the         
 *    distribution.                                                      
 *  * Neither the name Texas Instruments nor the names of its            
 *    contributors may be used to endorse or promote products derived    
 *    from this software without specific prior written permission.      
 *                                                                       
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

/** \file measurementDbg.c
 *  \brief measurement module Debug interface
 *
 *  \see measurementDbg.h
 */

/***************************************************************************/
/*																	       */
/*	  MODULE:	measurementDbg.c										   */
/*    PURPOSE:	measurement module Debug interface						   */
/*																		   */
/***************************************************************************/
#include "tidef.h"
#include "osApi.h"
#include "report.h"
#include "paramOut.h"
#include "measurementDbg.h"
#include "siteMgrApi.h"
#include "measurementMgr.h"
#include "MeasurementSrv.h"
#include "MacServices_api.h"
#include "MacServices.h"
#include "sme.h"
#ifdef XCC_MODULE_INCLUDED  
#include "XCCRMMngr.h"
#endif
#include "SwitchChannelApi.h"
#include "TWDriver.h"


void printMeasurementDbgFunctions(void);   

void regDomainPrintValidTables(TI_HANDLE hRegulatoryDomain);

TI_UINT32			channelNum;
TI_BOOL            flag;

/*************************************************************************
 *					measurementDebugFunction							 *
 *************************************************************************
DESCRIPTION:                  
                                                      
INPUT:       

OUTPUT:      

RETURN:     
                                                   
************************************************************************/
void measurementDebugFunction(TI_HANDLE hMeasurementMgr, TI_HANDLE hSwitchChannel, TI_HANDLE hRegulatoryDomain, TI_UINT32 funcType, void *pParam)
{
	paramInfo_t		param;
#ifdef XCC_MODULE_INCLUDED
    TTwdParamInfo   tTwdParam;
#endif
	TI_STATUS	    status = TI_OK;
    TI_UINT8           rangeUpperBound;
    TI_UINT8           rangeIndex;
    TI_UINT16          trafficThreshold;
    TNoiseHistogram pNoiseHistParams;
	measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) hMeasurementMgr;
	TI_UINT8			SwitchChannelParam = *(TI_UINT8*)pParam;
	siteMgr_t		*pSiteMgr = (siteMgr_t *) pMeasurementMgr->hSiteMgr;
#ifdef XCC_MODULE_INCLUDED
    TI_UINT8           iappPacket[90] = {0xAA, 0xAA, 0x03, 0x00, 0x40, 0x96, 0x00, 0x00, 
                                      0x00, 0x20, 0x32, 0x01, 
                                      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                                      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                                      0x20, 0x00, 0x01, 0x02, 
                                      0x26, 0x00, 0x08, 0x00, 0xA1, 0x00, 0x00, 0x01, 
                                      0x0B, 0x00, 0x26, 0x26};
    
    TI_UINT8           iappPacket1[76] = {0xAA, 0xAA, 0x03, 0x00, 0x40, 0x96, 0x00, 0x00, 
                                       0x00, 0x20, 0x32, 0x01, 
                                       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                                       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                                       0x30, 0x00, 0x01, 0x02, 
                                       0x26, 0x00, 0x08, 0x00, 0xF1, 0x00, 0x00, 0x01, 
                                       0x06, 0x00, 0x64, 0x00};

    TI_UINT8           iappPacket2[76] = {0xAA, 0xAA, 0x03, 0x00, 0x40, 0x96, 0x00, 0x00, 
                                       0x00, 0x20, 0x32, 0x01, 
                                       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                                       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                                       0x13, 0x00, 0x01, 0x02, 
                                       0x26, 0x00, 0x08, 0x00, 0xA3, 0x00, 0x00, 0x03, 
                                       0x0B, 0x02, 0xD1, 0x03};

    TI_UINT8           iappPacket3[76] = {0xAA, 0xAA, 0x03, 0x00, 0x40, 0x96, 0x00, 0x00,
                                       0x00, 0x38, 0x32, 0x01,
                                       0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                                       0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                                       0x20, 0x00, 0x01, 0x02,
                                       0x26, 0x00, 0x08, 0x00, 0xA1, 0x00, 0x00, 0x03,
                                       0x03,
									   0X00, 0XFF, 0X00, 0X26, 0X00, 0X08,
									   0X00, 0XC1, 0X00, 0X00, 0X02, 0X03,
									   0X00, 0XFF, 0X00, 0X26, 0X00, 0X08,
									   0X00, 0XB1, 0X00, 0X00, 0X01, 0X03,
				                       0X00, 0XFF, 0X00};

    TI_UINT8           iappPacket4[76] = {0xAA, 0xAA, 0x03, 0x00, 0x40, 0x96, 0x00, 0x00,
                                       0x00, 0x38, 0x32, 0x01,
                                       0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                                       0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                                       0x20, 0x00, 0x01, 0x02,
                                       0x26, 0x00, 0x08, 0x00, 0xA1, 0x00, 0x00, 0x03,
                                       0x06,
									   0X00, 0X32, 0X00, 0X26, 0X00, 0X08,
									   0X00, 0XC1, 0X00, 0X00, 0X02, 0X01,
									   0X00, 0XFF, 0X00, 0X26, 0X00, 0X08,
									   0X00, 0XB1, 0X00, 0X01, 0X01, 0X01,
				                       0X00, 0X96, 0X00};
#endif

	switch (funcType)
	{
	case DBG_MEASUREMENT_PRINT_HELP:
		printMeasurementDbgFunctions();
		break;
	case DBG_MEASUREMENT_PRINT_STATUS:
		param.paramType = MEASUREMENT_GET_STATUS_PARAM;
		measurementMgr_getParam(hMeasurementMgr, &param);
		break;

#if 0

	case DBG_MEASUREMENT_CHANNEL_LOAD_START:
        
        /* Clearing the Medium Occupancy Register */
        tTwdParam.paramType = HAL_CTRL_MEDIUM_OCCUPANCY_PARAM;
        tTwdParam.content.interogateCmdCBParams.CB_Func = measurement_mediumUsageCB;
        tTwdParam.content.interogateCmdCBParams.CB_handle = hMeasurementMgr;
        tTwdParam.content.interogateCmdCBParams.CB_buf = (TI_UINT8*)(&(pMeasurementMgr->mediumOccupancyStart));

        if ((status = TWD_GetParam (pMeasurementMgr->hTWD, &tTwdParam)) == TI_OK)
        {
            WLAN_OS_REPORT(("%s: MEASUREMENT - Channel Load Started!\n", __FUNCTION__));            
		}
		
		break;

    case DBG_MEASUREMENT_CHANNEL_LOAD_STOP:
        
        /* Getting the Medium Occupancy Register */
        tTwdParam.paramType = HAL_CTRL_MEDIUM_OCCUPANCY_PARAM;
        tTwdParam.content.interogateCmdCBParams.CB_Func = measurement_channelLoadCallBackDbg;
        tTwdParam.content.interogateCmdCBParams.CB_handle = hMeasurementMgr;
        tTwdParam.content.interogateCmdCBParams.CB_buf = (TI_UINT8*)(&(pMeasurementMgr->mediumOccupancyEnd));
        
        if ((status = TWD_GetParam (pMeasurementMgr->hTWD, &tTwdParam)) == TI_OK)
        {
            WLAN_OS_REPORT(("%s: MEASUREMENT - Channel Load Stoped!", __FUNCTION__));            
        }

		break;

#endif /* 0 */

    case DBG_MEASUREMENT_SEND_FRAME_REQUEST:

	    WLAN_OS_REPORT(("-----------------------------------------------------\n"));
        WLAN_OS_REPORT(("   Measurement Debug Function: Sending Frame Request \n"));
	    WLAN_OS_REPORT(("-----------------------------------------------------\n"));

        WLAN_OS_REPORT(("beaconInterval = %d\n", pSiteMgr->pSitesMgmtParams->pPrimarySite->beaconInterval));
		WLAN_OS_REPORT(("dtimPeriod = %d\n", pSiteMgr->pSitesMgmtParams->pPrimarySite->dtimPeriod));

#ifdef XCC_MODULE_INCLUDED        
        measurementMgr_XCCParse(hMeasurementMgr, iappPacket);
#endif

	    WLAN_OS_REPORT(("-----------------------------------------------------\n"));
        WLAN_OS_REPORT(("   Measurement Debug Function: END                   \n"));
	    WLAN_OS_REPORT(("-----------------------------------------------------\n"));

        break;

    case DBG_MEASUREMENT_START_NOISE_HIST:
        /* Set Noise Histogram Cmd Params */
        pNoiseHistParams.cmd = START_NOISE_HIST;
        pNoiseHistParams.sampleInterval = 100;
        os_memoryZero(pMeasurementMgr->hOs, &(pNoiseHistParams.ranges[0]), MEASUREMENT_NOISE_HISTOGRAM_NUM_OF_RANGES);
        
        /* Set Ranges */
        rangeUpperBound = (TI_UINT8)-87; /* TWD_convertRSSIToRxLevel(pMeasurementMgr->hTWD, -87);*/
        for(rangeIndex = 0; rangeIndex < MEASUREMENT_NOISE_HISTOGRAM_NUM_OF_RANGES - 1; rangeIndex++)
        {
            pNoiseHistParams.ranges[rangeIndex] = rangeUpperBound;
            rangeUpperBound += 5; 
        }
        pNoiseHistParams.ranges[rangeIndex] = 0xFE;
        
        /* Send a Start command to the FW */
        status = TWD_CmdNoiseHistogram (pMeasurementMgr->hTWD, &pNoiseHistParams);		

        WLAN_OS_REPORT(("Measurement Debug Functions - Start Noise Hist Succeded"));
        
        if (status != TI_OK)
            WLAN_OS_REPORT(("Measurement Debug Functions - Start Noise Hist FAILED"));
        
        break;
        
    case DBG_MEASUREMENT_STOP_NOISE_HIST:
        /* Set Noise Histogram Cmd Params */
        pNoiseHistParams.cmd = STOP_NOISE_HIST;
        pNoiseHistParams.sampleInterval = 0;
        os_memoryZero(pMeasurementMgr->hOs, &(pNoiseHistParams.ranges[0]), MEASUREMENT_NOISE_HISTOGRAM_NUM_OF_RANGES);
        
        /* Send a Stop command to the FW */
        status = TWD_CmdNoiseHistogram (pMeasurementMgr->hTWD, &pNoiseHistParams);
			
        WLAN_OS_REPORT(("Measurement Debug Functions - Stop Noise Hist Succeded"));
        
        if (status != TI_OK)
            WLAN_OS_REPORT(("Measurement Debug Functions - Stop Noise Hist FAILED"));
        
        break;

    case DBG_MEASUREMENT_GET_NOISE_HIST_RESULTS:
		{
	#ifdef XCC_MODULE_INCLUDED
			TNoiseHistogramResults results;

			/* Get measurement results */
			tTwdParam.paramType = TWD_NOISE_HISTOGRAM_PARAM_ID;
			tTwdParam.content.interogateCmdCBParams.fCb = (void *)measurement_noiseHistCallBackDbg;
			tTwdParam.content.interogateCmdCBParams.hCb = 
                ((MacServices_t *)(((TTwd *)pMeasurementMgr->hTWD)->hMacServices))->hMeasurementSRV;
			tTwdParam.content.interogateCmdCBParams.pCb = (TI_UINT8 *)&results;

			TWD_GetParam (pMeasurementMgr->hTWD, &tTwdParam);
	#endif               

			break;
		}

    case DBG_MEASUREMENT_SEND_CHANNEL_LOAD_FRAME:
	    WLAN_OS_REPORT(("---------------------------------------------------------------\n"));
        WLAN_OS_REPORT(("   Measurement Debug Function: Sending another Frame Request   \n"));
	    WLAN_OS_REPORT(("---------------------------------------------------------------\n"));

        WLAN_OS_REPORT(("beaconInterval = %d\n", pSiteMgr->pSitesMgmtParams->pPrimarySite->beaconInterval));
		WLAN_OS_REPORT(("dtimPeriod = %d\n", pSiteMgr->pSitesMgmtParams->pPrimarySite->dtimPeriod));

#ifdef XCC_MODULE_INCLUDED        
        measurementMgr_XCCParse(hMeasurementMgr, iappPacket1);
#endif

	    WLAN_OS_REPORT(("---------------------------------------------------------------\n"));
        WLAN_OS_REPORT(("   Measurement Debug Function: END                             \n"));
	    WLAN_OS_REPORT(("---------------------------------------------------------------\n"));

        break;




        
    case DBG_MEASUREMENT_SEND_BEACON_TABLE_FRAME:
	    WLAN_OS_REPORT(("---------------------------------------------------------------\n"));
        WLAN_OS_REPORT(("   Measurement Debug Function: Sending Beacon Table Request    \n"));
	    WLAN_OS_REPORT(("---------------------------------------------------------------\n"));

        WLAN_OS_REPORT(("beaconInterval = %d\n", pSiteMgr->pSitesMgmtParams->pPrimarySite->beaconInterval));
		WLAN_OS_REPORT(("dtimPeriod = %d\n", pSiteMgr->pSitesMgmtParams->pPrimarySite->dtimPeriod));

#ifdef XCC_MODULE_INCLUDED        
        measurementMgr_XCCParse(hMeasurementMgr, iappPacket2);
#endif

	    WLAN_OS_REPORT(("---------------------------------------------------------------\n"));
        WLAN_OS_REPORT(("   Measurement Debug Function: END                             \n"));
	    WLAN_OS_REPORT(("---------------------------------------------------------------\n"));

        break;

		

        
    case DBG_MEASUREMENT_SEND_NOISE_HIST_1_FRAME:
	    WLAN_OS_REPORT(("---------------------------------------------------------------\n"));
        WLAN_OS_REPORT(("   Measurement Debug Function: Sending Unknown Request #1      \n"));
	    WLAN_OS_REPORT(("---------------------------------------------------------------\n"));

        WLAN_OS_REPORT(("beaconInterval = %d\n", pSiteMgr->pSitesMgmtParams->pPrimarySite->beaconInterval));
		WLAN_OS_REPORT(("dtimPeriod = %d\n", pSiteMgr->pSitesMgmtParams->pPrimarySite->dtimPeriod));

#ifdef XCC_MODULE_INCLUDED        
        measurementMgr_XCCParse(hMeasurementMgr, iappPacket3);
#endif

	    WLAN_OS_REPORT(("---------------------------------------------------------------\n"));
        WLAN_OS_REPORT(("   Measurement Debug Function: END                             \n"));
	    WLAN_OS_REPORT(("---------------------------------------------------------------\n"));

        break;





    case DBG_MEASUREMENT_SEND_NOISE_HIST_2_FRAME:
	    WLAN_OS_REPORT(("---------------------------------------------------------------\n"));
        WLAN_OS_REPORT(("   Measurement Debug Function: Sending Unknown Request #1      \n"));
	    WLAN_OS_REPORT(("---------------------------------------------------------------\n"));

        WLAN_OS_REPORT(("beaconInterval = %d\n", pSiteMgr->pSitesMgmtParams->pPrimarySite->beaconInterval));
		WLAN_OS_REPORT(("dtimPeriod = %d\n", pSiteMgr->pSitesMgmtParams->pPrimarySite->dtimPeriod));

#ifdef XCC_MODULE_INCLUDED        
        measurementMgr_XCCParse(hMeasurementMgr, iappPacket4);
#endif

	    WLAN_OS_REPORT(("---------------------------------------------------------------\n"));
        WLAN_OS_REPORT(("   Measurement Debug Function: END                             \n"));
	    WLAN_OS_REPORT(("---------------------------------------------------------------\n"));

        break;





    case DBG_MEASUREMENT_SET_TRAFFIC_THRSLD:

        trafficThreshold = *(TI_UINT16*)pParam;
        param.paramType = MEASUREMENT_TRAFFIC_THRESHOLD_PARAM;
        param.content.measurementTrafficThreshold = trafficThreshold;
        measurementMgr_setParam(hMeasurementMgr, &param);
        break;
		

	case DBG_SC_PRINT_STATUS:
		switchChannelDebug_printStatus(hSwitchChannel);
		break;
	case DBG_SC_SET_SWITCH_CHANNEL_NUM:
		switchChannelDebug_setCmdParams(hSwitchChannel, SC_SWITCH_CHANNEL_NUM , SwitchChannelParam);
		break;
	case DBG_SC_SET_SWITCH_CHANNEL_TBTT:
		switchChannelDebug_setCmdParams(hSwitchChannel, SC_SWITCH_CHANNEL_TBTT , SwitchChannelParam);
		break;
	case DBG_SC_SET_SWITCH_CHANNEL_MODE:
		switchChannelDebug_setCmdParams(hSwitchChannel, SC_SWITCH_CHANNEL_MODE , SwitchChannelParam);
		break;
	case DBG_SC_SET_CHANNEL_AS_VALID:
		switchChannelDebug_setChannelValidity(hSwitchChannel, SwitchChannelParam, TI_TRUE);
		break;
	case DBG_SC_SET_CHANNEL_AS_INVALID:
		switchChannelDebug_setChannelValidity(hSwitchChannel, SwitchChannelParam, TI_FALSE);
		break;
	case DBG_SC_SWITCH_CHANNEL_CMD:
		{
			switchChannelDebug_SwitchChannelCmdTest(hSwitchChannel, SwitchChannelParam);
		}
		break;
	case DBG_SC_CANCEL_SWITCH_CHANNEL_CMD:
		if ((SwitchChannelParam!=TI_TRUE) && (SwitchChannelParam!=TI_FALSE))
		{	/* default is TI_TRUE */
			SwitchChannelParam = TI_TRUE;
		}
		switchChannelDebug_CancelSwitchChannelCmdTest(hSwitchChannel, SwitchChannelParam);
		break;

	case DBG_REG_DOMAIN_PRINT_VALID_CHANNELS:
		regDomainPrintValidTables(hRegulatoryDomain);
		break;

		
	default:
		WLAN_OS_REPORT(("Invalid function type in MEASUREMENT Function Command: %d\n", funcType));
		break;
	}
} 

void measurement_channelLoadCallBackDbg(TI_HANDLE hMeasurementMgr, TI_STATUS status, 
                                        TI_UINT8* CB_buf)
{
    TMediumOccupancy *pMediumOccupancy = (TMediumOccupancy*)(CB_buf+4);
    
    WLAN_OS_REPORT(("MediumUsage = %d\nPeriod = %d\n", 
					pMediumOccupancy->MediumUsage/1000, pMediumOccupancy->Period/1000));            
}

void measurement_noiseHistCallBackDbg(TI_HANDLE hMeasurementSRV, TI_STATUS status, 
                                      TI_UINT8* CB_buf)
{
    TI_UINT8		            index;
    TNoiseHistogramResults *pNoiseHistogramResults = (TNoiseHistogramResults*)CB_buf;

    if(status == TI_OK)
    {
		report_PrintDump ((TI_UINT8 *)pNoiseHistogramResults, sizeof(TNoiseHistogramResults));
 
        WLAN_OS_REPORT(("Noise Histogram Measurement Results:\nNum of Lost Cycles = %u\nNum Of Tx Hw Gen Lost Cycles = %u\n Num Of Rx Lost Cycles = %u\n Num Of 'Exceed Last Threshold' Lost Cycles = %u\n", 
                         pNoiseHistogramResults->numOfLostCycles, 
                         pNoiseHistogramResults->numOfTxHwGenLostCycles,
                         pNoiseHistogramResults->numOfRxLostCycles,
                         pNoiseHistogramResults->numOfLostCycles - (pNoiseHistogramResults->numOfRxLostCycles)));
        
        for(index = 0;index < NUM_OF_NOISE_HISTOGRAM_COUNTERS; index++)
            WLAN_OS_REPORT(("Counter # %u = %u\n", index,
            pNoiseHistogramResults->counters[index]));
    }
    else
    {
        WLAN_OS_REPORT(("Measurement Debug Functions - Interogate Noise Hist FAILED"));
    }
}
             
           
     
      
     
       
        
 
     
     
                   
         
        
        
           
         
             
      
									   
    


void printMeasurementDbgFunctions(void)
{
	WLAN_OS_REPORT(("   Measurement Debug Functions   \n"));
	WLAN_OS_REPORT(("-----------------------------\n"));
	
	WLAN_OS_REPORT(("%d - DBG_MEASUREMENT_PRINT_HELP\n", DBG_MEASUREMENT_PRINT_HELP));

	WLAN_OS_REPORT(("%d - DBG_MEASUREMENT_PRINT_STATUS\n", DBG_MEASUREMENT_PRINT_STATUS));

	WLAN_OS_REPORT(("%d - DBG_MEASUREMENT_CHANNEL_LOAD_START\n", DBG_MEASUREMENT_CHANNEL_LOAD_START));

	WLAN_OS_REPORT(("%d - DBG_MEASUREMENT_CHANNEL_LOAD_STOP\n", DBG_MEASUREMENT_CHANNEL_LOAD_STOP));

	WLAN_OS_REPORT(("%d - DBG_MEASUREMENT_SEND_FRAME_REQUEST\n", DBG_MEASUREMENT_SEND_FRAME_REQUEST));

	WLAN_OS_REPORT(("%d - DBG_MEASUREMENT_START_NOISE_HIST\n", DBG_MEASUREMENT_START_NOISE_HIST));

	WLAN_OS_REPORT(("%d - DBG_MEASUREMENT_STOP_NOISE_HIST\n", DBG_MEASUREMENT_STOP_NOISE_HIST));

	WLAN_OS_REPORT(("%d - DBG_MEASUREMENT_GET_NOISE_HIST_RESULTS\n", DBG_MEASUREMENT_GET_NOISE_HIST_RESULTS));

	WLAN_OS_REPORT(("%d - DBG_MEASUREMENT_SEND_CHANNEL_LOAD_FRAME\n", DBG_MEASUREMENT_SEND_CHANNEL_LOAD_FRAME));

	WLAN_OS_REPORT(("%d - DBG_MEASUREMENT_SEND_BEACON_TABLE_FRAME\n", DBG_MEASUREMENT_SEND_BEACON_TABLE_FRAME));

	WLAN_OS_REPORT(("%d - DBG_MEASUREMENT_SEND_NOISE_HIST_1_FRAME\n", DBG_MEASUREMENT_SEND_NOISE_HIST_1_FRAME));

	WLAN_OS_REPORT(("%d - DBG_MEASUREMENT_SEND_NOISE_HIST_2_FRAME\n", DBG_MEASUREMENT_SEND_NOISE_HIST_2_FRAME));

	WLAN_OS_REPORT(("%d - DBG_MEASUREMENT_SET_TRAFFIC_THRSLD\n", DBG_MEASUREMENT_SET_TRAFFIC_THRSLD));

	WLAN_OS_REPORT(("%d - DBG_SC_PRINT_STATUS\n", DBG_SC_PRINT_STATUS));

	WLAN_OS_REPORT(("%d - DBG_SC_SET_SWITCH_CHANNEL_NUM\n", DBG_SC_SET_SWITCH_CHANNEL_NUM));

	WLAN_OS_REPORT(("%d - DBG_SC_SET_SWITCH_CHANNEL_TBTT\n", DBG_SC_SET_SWITCH_CHANNEL_TBTT));

	WLAN_OS_REPORT(("%d - DBG_SC_SET_SWITCH_CHANNEL_MODE\n", DBG_SC_SET_SWITCH_CHANNEL_MODE));

	WLAN_OS_REPORT(("%d - DBG_SC_SET_CHANNEL_AS_VALID\n", DBG_SC_SET_CHANNEL_AS_VALID));

	WLAN_OS_REPORT(("%d - DBG_SC_SET_CHANNEL_AS_INVALID\n", DBG_SC_SET_CHANNEL_AS_INVALID));

	WLAN_OS_REPORT(("%d - DBG_SC_SWITCH_CHANNEL_CMD\n", DBG_SC_SWITCH_CHANNEL_CMD));

	WLAN_OS_REPORT(("%d - DBG_SC_CANCEL_SWITCH_CHANNEL_CMD\n", DBG_SC_CANCEL_SWITCH_CHANNEL_CMD));

	WLAN_OS_REPORT(("%d - DBG_REG_DOMAIN_PRINT_VALID_CHANNELS\n", DBG_REG_DOMAIN_PRINT_VALID_CHANNELS));


}