4 * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
11 * * Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * * Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in
15 * the documentation and/or other materials provided with the
17 * * Neither the name Texas Instruments nor the names of its
18 * contributors may be used to endorse or promote products derived
19 * from this software without specific prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 /** \file ScanMngrDbg.c
35 * \brief This file include the scan manager debug module implementation
44 #include "ScanMngrDbg.h"
45 #include "siteMgrApi.h"
46 #include "DataCtrl_Api.h"
51 * \date 29-March-2005\n
52 * \brief Main scan manager debug function
54 * Function Scope \e Public.\n
55 * \param hScanMngr - handle to the scan manager object.\n
56 * \param funcType - the specific debug function.\n
57 * \param pParam - parameters for the debug function.\n
58 * \param hSiteMgr - handle to th esite manager object.\n
59 * \param hCtrlData - handle to the data ctrl object.\n
61 void scanMngrDebugFunction( TI_HANDLE hScanMngr, TI_UINT32 funcType, void *pParam, TI_HANDLE hSiteMgr, TI_HANDLE hCtrlData )
65 case DBG_SCAN_MNGR_PRINT_HELP:
66 printScanMngrDbgFunctions();
69 case DBG_SCAN_MNGR_START_CONT_SCAN:
70 startContScan( hScanMngr, hSiteMgr, hCtrlData );
73 case DBG_SCAN_MNGR_STOP_CONT_SCAN:
74 scanMngr_stopContScan( hScanMngr );
77 case DBG_SCAN_MNGR_START_IMMED_SCAN:
78 scanMngr_startImmediateScan( hScanMngr, (1 == *((TI_INT32*)pParam) ? TI_TRUE : TI_FALSE) );
81 case DBG_SCAN_MNGR_STOP_IMMED_SCAN:
82 scanMngr_stopImmediateScan( hScanMngr );
85 case DBG_SCAN_MNGR_PRINT_TRACK_LIST:
86 scanMngrDebugPrintBSSList( hScanMngr );
89 case DBG_SCAN_MNGR_PRINT_STATS:
90 scanMngr_statsPrint( hScanMngr );
93 case DBG_SCAN_MNGR_RESET_STATS:
94 scanMngr_statsReset( hScanMngr );
97 case DBG_SCAN_MNGR_PIRNT_NEIGHBOR_APS:
98 scanMngrDebugPrintNeighborAPList( hScanMngr );
101 case DBG_SCAN_MNGR_PRINT_POLICY:
102 scanMngrTracePrintScanPolicy( &(((scanMngr_t*)hScanMngr)->scanPolicy) );
105 case DBG_SCAN_MNGR_PRINT_OBJECT:
106 scanMngrDebugPrintObject( hScanMngr );
110 WLAN_OS_REPORT(("Invalid function type in scan manager debug function: %d\n", funcType));
117 * \date 29-March-2005\n
118 * \brief Prints scan manager debug menu
120 * Function Scope \e Public.\n
122 void printScanMngrDbgFunctions(void)
124 WLAN_OS_REPORT((" Scan Manager Debug Functions \n"));
125 WLAN_OS_REPORT(("---------------------------------------\n"));
126 WLAN_OS_REPORT(("1500 - Print the scan manager Debug Help\n"));
127 WLAN_OS_REPORT(("1501 - Start continuous scan\n"));
128 WLAN_OS_REPORT(("1502 - Stop continuous scan\n"));
129 WLAN_OS_REPORT(("1503 - Start immediate scan\n"));
130 WLAN_OS_REPORT(("1504 - Stop immediate scan\n"));
131 WLAN_OS_REPORT(("1505 - Print tracking list\n"));
132 WLAN_OS_REPORT(("1506 - Print statistics\n"));
133 WLAN_OS_REPORT(("1507 - Reset statistics\n"));
134 WLAN_OS_REPORT(("1508 - Print neighbor APs list\n"));
135 WLAN_OS_REPORT(("1509 - Print Scan Policy\n"));
136 WLAN_OS_REPORT(("1510 - Print scan manager object\n"));
141 * \date 29-March-2005\n
142 * \brief Starts continuous scan process.\n
144 * Function Scope \e Public.\n
145 * \param hScanMngr - handle to the scan manager object.\n
146 * \param hSiteMgr - handle to the site manager object.\n\
147 * \param hCtrlData - handle to the data ctrl object.\n
149 void startContScan( TI_HANDLE hScanMngr, TI_HANDLE hSiteMgr, TI_HANDLE hCtrlData )
152 ERadioBand radioBand;
154 /* get current band */
155 param.paramType = SITE_MGR_RADIO_BAND_PARAM;
156 siteMgr_getParam( hSiteMgr, ¶m );
157 radioBand = param.content.siteMgrRadioBand;
159 /* get current BSSID */
160 param.paramType = CTRL_DATA_CURRENT_BSSID_PARAM;
161 ctrlData_getParam( hCtrlData, ¶m );
163 /* start continuous scan */
164 scanMngr_startContScan( hScanMngr, &(param.content.ctrlDataCurrentBSSID), radioBand );