summaryrefslogtreecommitdiff
path: root/wilink_6_1/Test
diff options
context:
space:
mode:
Diffstat (limited to 'wilink_6_1/Test')
-rw-r--r--wilink_6_1/Test/HealthMonitorDbg.c185
-rw-r--r--wilink_6_1/Test/HealthMonitorDbg.h116
-rw-r--r--wilink_6_1/Test/MibDbg.c281
-rw-r--r--wilink_6_1/Test/MibDbg.h66
-rw-r--r--wilink_6_1/Test/PowerMgrDebug.c108
-rw-r--r--wilink_6_1/Test/PowerMgrDebug.h99
-rw-r--r--wilink_6_1/Test/RxDbg.c40
-rw-r--r--wilink_6_1/Test/ScanMngrDbg.c166
-rw-r--r--wilink_6_1/Test/ScanMngrDbg.h127
-rw-r--r--wilink_6_1/Test/SoftGeminiDbg.c111
-rw-r--r--wilink_6_1/Test/SoftGeminiDbg.h117
-rw-r--r--wilink_6_1/Test/TWD_Debug.c995
-rw-r--r--wilink_6_1/Test/TwIfDebug.c107
-rw-r--r--wilink_6_1/Test/TwIfDebug.h67
-rw-r--r--wilink_6_1/Test/TxDbg.c208
-rw-r--r--wilink_6_1/Test/connDebug.c118
-rw-r--r--wilink_6_1/Test/connDebug.h50
-rw-r--r--wilink_6_1/Test/ctrlDbg.c111
-rw-r--r--wilink_6_1/Test/dataCtrlDbg.h86
-rw-r--r--wilink_6_1/Test/debug.c347
-rw-r--r--wilink_6_1/Test/debug.h52
-rw-r--r--wilink_6_1/Test/fwdriverdebug.c398
-rw-r--r--wilink_6_1/Test/fwdriverdebug.h127
-rw-r--r--wilink_6_1/Test/measurementDbg.c499
-rw-r--r--wilink_6_1/Test/measurementDbg.h75
-rw-r--r--wilink_6_1/Test/qosMngrDbg.c165
-rw-r--r--wilink_6_1/Test/qosMngrDbg.h45
-rw-r--r--wilink_6_1/Test/roamingMgrDebug.c361
-rw-r--r--wilink_6_1/Test/roamingMgrDebug.h68
-rw-r--r--wilink_6_1/Test/rsnDbg.c175
-rw-r--r--wilink_6_1/Test/rsnDbg.h58
-rw-r--r--wilink_6_1/Test/scanCncnDbg.c89
-rw-r--r--wilink_6_1/Test/scanCncnDbg.h124
-rw-r--r--wilink_6_1/Test/scrDbg.c282
-rw-r--r--wilink_6_1/Test/scrDbg.h167
-rw-r--r--wilink_6_1/Test/siteMgrDebug.c1193
-rw-r--r--wilink_6_1/Test/siteMgrDebug.h120
-rw-r--r--wilink_6_1/Test/smeDebug.c297
-rw-r--r--wilink_6_1/Test/smeDebug.h110
39 files changed, 7910 insertions, 0 deletions
diff --git a/wilink_6_1/Test/HealthMonitorDbg.c b/wilink_6_1/Test/HealthMonitorDbg.c
new file mode 100644
index 0000000..54c5ab5
--- /dev/null
+++ b/wilink_6_1/Test/HealthMonitorDbg.c
@@ -0,0 +1,185 @@
+/*
+ * HealthMonitorDbg.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 HealthMonitorDbg.c
+ * \brief This file include the HealthMonitordebug module implementation
+ * \
+ * \date 2-Apr-2006
+ */
+
+#include "tidef.h"
+#include "MacServices.h"
+#include "ScanCncn.h"
+#include "scanCncnDbg.h"
+#include "healthMonitor.h"
+#include "ScanSrv.h"
+#include "ScanSrvSM.h"
+#include "TWDriver.h"
+#include "conn.h"
+#include "PowerSrv.h"
+#include "PowerSrvSM.h"
+#include "MacServices_api.h"
+#include "HealthMonitorDbg.h"
+#include "report.h"
+#include "timer.h"
+#include "DrvMain.h"
+#include "DrvMainModules.h"
+
+
+static void noScanCompleteTimer (TI_HANDLE hTWD);
+
+
+/** \file HealthMonitorDbg.c
+ * \
+ * \date 2-Apr-2006
+ * \brief Main Recovery debug function
+ *
+ * Function Scope \e Public.\n
+ * \param pStadHandles - modules handles list.\n
+ * \param funcType - the specific debug function.\n
+ * \param pParam - parameters for the debug function.\n
+ */
+void healthMonitorDebugFunction (TStadHandlesList *pStadHandles, TI_UINT32 funcType, void *pParam)
+{
+ TI_HANDLE hHealthMonitor = pStadHandles->hHealthMonitor;
+ TI_HANDLE hTWD = pStadHandles->hTWD;
+ MacServices_t *pMacServices = ((TTwd *)hTWD)->hMacServices;
+ TI_HANDLE hMeasurementSRV = pMacServices->hMeasurementSRV;
+ scanSRV_t *pScanSRV = (scanSRV_t *)pMacServices->hScanSRV;
+ PowerSrvSM_t *pPowerSrvSM = (PowerSrvSM_t*)((powerSrv_t*)pMacServices->hPowerSrv)->hPowerSrvSM;
+
+ switch (funcType)
+ {
+ case DBG_HM_PRINT_HELP:
+ printHealthMonitorDbgFunctions();
+ break;
+
+ case DBG_HM_RECOVERY_NO_SCAN_COMPLETE:
+ /* check if the no scan complete timer is running. if so - we can stop the timer and trigger recovery */
+ if (pScanSRV->bTimerRunning)
+ {
+ /* perform the recovery directly */
+ noScanCompleteTimer (hTWD);
+ }
+ else /* scan Srv is probably entering/exiting PowerSave. We won't handle this case since it happens rarely */
+ {
+ WLAN_OS_REPORT(("Scan isn't running at the moment, so try again (make sure it is enabled)\n"));
+ }
+ break;
+
+ case DBG_HM_RECOVERY_MBOX_FAILURE:
+ TWD_CheckMailboxCb (hTWD, TI_NOK, NULL);
+ break;
+
+ case DBG_HM_RECOVERY_HW_AWAKE_FAILURE:
+ healthMonitor_sendFailureEvent (hHealthMonitor, HW_AWAKE_FAILURE);
+ break;
+
+ case DBG_HM_RECOVERY_TX_STUCK:
+ healthMonitor_sendFailureEvent (hHealthMonitor, TX_STUCK);
+ break;
+
+ case DBG_HM_DISCONNECT_TIMEOUT:
+ healthMonitor_sendFailureEvent (hHealthMonitor, DISCONNECT_TIMEOUT);
+ break;
+
+ case DBG_HM_RECOVERY_POWER_SAVE_FAILURE:
+ tmr_StopTimer (pPowerSrvSM->hPwrSrvSmTimer); /* stop the PS guard timer */
+ healthMonitor_sendFailureEvent (hHealthMonitor, POWER_SAVE_FAILURE);
+ break;
+
+ case DBG_HM_RECOVERY_MEASUREMENT_FAILURE:
+ MacServices_measurementSRV_startStopTimerExpired (hMeasurementSRV, TI_FALSE);
+ break;
+
+ case DBG_HM_RECOVERY_BUS_FAILURE:
+ healthMonitor_sendFailureEvent (hHealthMonitor, BUS_FAILURE);
+ break;
+
+ case DBG_HM_RECOVERY_FROM_CLI:
+ drvMain_Recovery (pStadHandles->hDrvMain);
+ break;
+
+ case DBG_HM_RECOVERY_FROM_HW_WD_EXPIRE:
+ healthMonitor_sendFailureEvent (hHealthMonitor, HW_WD_EXPIRE);
+ break;
+
+ case DBG_HM_RECOVERY_RX_XFER_FAILURE:
+ healthMonitor_sendFailureEvent (hHealthMonitor, RX_XFER_FAILURE);
+ break;
+
+ default:
+ WLAN_OS_REPORT(("Invalid function type in health monitor debug function: %d\n", funcType));
+ break;
+ }
+}
+
+
+/** \file HealthMonitorDbg.c
+ * \
+ * \date 2-Apr-2006
+ * \brief Prints Recovery debug menu
+ *
+ * Function Scope \e Public.\n
+ */
+void printHealthMonitorDbgFunctions(void)
+{
+ WLAN_OS_REPORT((" HealthMonitor Debug Functions \n"));
+ WLAN_OS_REPORT(("---------------------------------------\n"));
+ WLAN_OS_REPORT(("2000 - Print HealthMonitor Debug Help \n"));
+ WLAN_OS_REPORT(("2001 - Trigger NO_SCAN_COMPLETE \n"));
+ WLAN_OS_REPORT(("2002 - Trigger MBOX_FAILURE \n"));
+ WLAN_OS_REPORT(("2003 - Trigger HW_AWAKE_FAILURE \n"));
+ WLAN_OS_REPORT(("2004 - Trigger TX_STUCK \n"));
+ WLAN_OS_REPORT(("2005 - Trigger DISCONNECT_TIMEOUT \n"));
+ WLAN_OS_REPORT(("2006 - Trigger POWER_SAVE_FAILURE \n"));
+ WLAN_OS_REPORT(("2007 - Trigger MEASUREMENT_FAILURE \n"));
+ WLAN_OS_REPORT(("2008 - Trigger BUS_FAILURE \n"));
+ WLAN_OS_REPORT(("2009 - Start RECOVERY_FROM_CLI \n"));
+ WLAN_OS_REPORT(("2010 - Trigger HW_WD_EXPIRE \n"));
+ WLAN_OS_REPORT(("2011 - Trigger RX_XFER_FAILURE \n"));
+}
+
+static void noScanCompleteTimer (TI_HANDLE hTWD)
+{
+ MacServices_t *pMacServices = ((TTwd *)hTWD)->hMacServices;
+ scanSRV_t *pScanSRV = (scanSRV_t *)pMacServices->hScanSRV;
+
+
+ /* stop the no scan complete timer in the scan SRV */
+ tmr_StopTimer (pScanSRV->hScanSrvTimer);
+ pScanSRV->bTimerRunning = TI_FALSE;
+
+ /* simulate the timer expiry */
+ MacServices_scanSRV_scanTimerExpired ((TI_HANDLE)pScanSRV, TI_FALSE);
+}
diff --git a/wilink_6_1/Test/HealthMonitorDbg.h b/wilink_6_1/Test/HealthMonitorDbg.h
new file mode 100644
index 0000000..c127b4a
--- /dev/null
+++ b/wilink_6_1/Test/HealthMonitorDbg.h
@@ -0,0 +1,116 @@
+/*
+ * HealthMonitorDbg.h
+ *
+ * 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 SoftGeminiDbg.h
+ * \brief This file include private definitions for the soft Gemini debug module.
+ * \
+ * \date 30-Dec-2004
+ */
+
+#ifndef __HEALTH_MONITOR_DBG_H__
+#define __HEALTH_MONITOR_DBG_H__
+
+/*
+ ***********************************************************************
+ * Constant definitions.
+ ***********************************************************************
+ */
+
+/* debug functions */
+#define DBG_HM_PRINT_HELP 0
+#define DBG_HM_RECOVERY_NO_SCAN_COMPLETE 1
+#define DBG_HM_RECOVERY_MBOX_FAILURE 2
+#define DBG_HM_RECOVERY_HW_AWAKE_FAILURE 3
+#define DBG_HM_RECOVERY_TX_STUCK 4
+#define DBG_HM_DISCONNECT_TIMEOUT 5
+#define DBG_HM_RECOVERY_POWER_SAVE_FAILURE 6
+#define DBG_HM_RECOVERY_MEASUREMENT_FAILURE 7
+#define DBG_HM_RECOVERY_BUS_FAILURE 8
+#define DBG_HM_RECOVERY_FROM_CLI 9
+#define DBG_HM_RECOVERY_FROM_HW_WD_EXPIRE 10
+#define DBG_HM_RECOVERY_RX_XFER_FAILURE 11
+
+/*
+ ***********************************************************************
+ * Enums.
+ ***********************************************************************
+ */
+
+/*
+ ***********************************************************************
+ * Typedefs.
+ ***********************************************************************
+ */
+
+/*
+ ***********************************************************************
+ * Structure definitions.
+ ***********************************************************************
+ */
+
+/*
+ ***********************************************************************
+ * External data definitions.
+ ***********************************************************************
+ */
+
+/*
+ ***********************************************************************
+ * External functions definitions
+ ***********************************************************************
+ */
+
+/**
+ * \\n
+ * \date 14-Feb-2005\n
+ * \brief Main soft Geminirdebug function
+ *
+ * Function Scope \e Public.\n
+ * \param pStadHandles - modules handles list.\n
+ * \param funcType - the specific debug function.\n
+ * \param pParam - parameters for the debug function.\n
+ */
+void healthMonitorDebugFunction (TStadHandlesList *pStadHandles, TI_UINT32 funcType, void *pParam);
+
+/**
+ * \\n
+ * \date 14-Feb-2005\n
+ * \brief Prints scan concentrator debug menu
+ *
+ * Function Scope \e Public.\n
+ */
+void printHealthMonitorDbgFunctions(void);
+
+
+
+#endif /* __HEALTH_MONITOR_DBG_H__ */
diff --git a/wilink_6_1/Test/MibDbg.c b/wilink_6_1/Test/MibDbg.c
new file mode 100644
index 0000000..ffe48b6
--- /dev/null
+++ b/wilink_6_1/Test/MibDbg.c
@@ -0,0 +1,281 @@
+/*
+ * MibDbg.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.
+ */
+
+/***************************************************************************/
+/* */
+/* MODULE: MibDbg.c */
+/* PURPOSE: MIB debug implementation */
+/* */
+/***************************************************************************/
+
+#include "MibDbg.h"
+#include "TWDriver.h"
+#include "report.h"
+#include "osApi.h"
+
+/*
+ ***********************************************************************
+ * Internal functions definitions
+ ***********************************************************************
+ */
+
+static void mibDbgGetArpIpTable(TI_HANDLE hTWD)
+{
+ TI_STATUS status = TI_OK;
+ TMib mib;
+ TI_INT32 i;
+
+ /* init */
+ mib.aMib = MIB_arpIpAddressesTable;
+ mib.aData.ArpIpAddressesTable.FilteringEnable = 0;
+ for ( i = 0 ; i < IP_V4_ADDR_LEN ; i++ )
+ {
+ mib.aData.ArpIpAddressesTable.addr[i] = 0;
+ }
+
+ status = TWD_ReadMib(hTWD,NULL,NULL,(void*)&mib);
+ if (status != TI_OK)
+ {
+ WLAN_OS_REPORT(("Get ARP Table failed\n"));
+ return;
+ }
+
+ /* print ARP Table */
+ WLAN_OS_REPORT(("ARP IP Table:\n"));
+ WLAN_OS_REPORT(("FilteringEnable: %s (%d)\n",
+ (mib.aData.ArpIpAddressesTable.FilteringEnable)?"Enable":"Disable",
+ mib.aData.ArpIpAddressesTable.FilteringEnable));
+ WLAN_OS_REPORT(("ArpIpAddress: %d.%d.%d.%d\n",
+ mib.aData.ArpIpAddressesTable.addr[0],
+ mib.aData.ArpIpAddressesTable.addr[1],
+ mib.aData.ArpIpAddressesTable.addr[2],
+ mib.aData.ArpIpAddressesTable.addr[3]));
+}
+
+static void mibDbgGetGroupAddressTable(TI_HANDLE hTWD)
+{
+ TI_STATUS status = TI_OK;
+ TMib mib;
+ TI_INT32 i,j;
+
+ /* init */
+ mib.aMib = MIB_dot11GroupAddressesTable;
+ mib.aData.GroupAddressTable.bFilteringEnable = 0;
+ mib.aData.GroupAddressTable.nNumberOfAddresses = 0;
+ for ( i = 0 ; i < MIB_MAX_MULTICAST_GROUP_ADDRS ; i++ )
+ {
+ for ( j = 0 ; j < MAC_ADDR_LEN ; j++ )
+ {
+ mib.aData.GroupAddressTable.aGroupTable[i][j] = 0;
+ }
+ }
+
+ status = TWD_ReadMib(hTWD,NULL,NULL,(void*)&mib);
+ if (status != TI_OK)
+ {
+ WLAN_OS_REPORT(("Get Group Address Table failed\n"));
+ return;
+ }
+
+ /* print Group Address Table */
+ WLAN_OS_REPORT(("Group addresses Table:\n"));
+ WLAN_OS_REPORT(("FilteringEnable: %s (%d)\n",
+ (mib.aData.GroupAddressTable.bFilteringEnable)?"Enable":"Disable",
+ mib.aData.GroupAddressTable.bFilteringEnable));
+ WLAN_OS_REPORT(("nNumberOfAddresses: %d\n",
+ mib.aData.GroupAddressTable.nNumberOfAddresses));
+
+ WLAN_OS_REPORT(("Group addresses: \n"));
+ for ( i = 0 ; i < MIB_MAX_MULTICAST_GROUP_ADDRS ; i++ )
+ WLAN_OS_REPORT(("%x:%x:%x:%x:%x:%x\n",
+ mib.aData.GroupAddressTable.aGroupTable[i][0],
+ mib.aData.GroupAddressTable.aGroupTable[i][1],
+ mib.aData.GroupAddressTable.aGroupTable[i][2],
+ mib.aData.GroupAddressTable.aGroupTable[i][3],
+ mib.aData.GroupAddressTable.aGroupTable[i][4],
+ mib.aData.GroupAddressTable.aGroupTable[i][5]));
+}
+
+static void mibDbgGetCounterTable(TI_HANDLE hTWD)
+{
+ TI_STATUS status = TI_OK;
+ TMib mib;
+
+ /* init */
+ mib.aMib = MIB_countersTable;
+ mib.aData.CounterTable.FCSErrorCount = 0;
+ mib.aData.CounterTable.PLCPErrorCount = 0;
+ mib.aData.CounterTable.SeqNumMissCount = 0;
+
+ status = TWD_ReadMib(hTWD,NULL,NULL,(void*)&mib);
+ if (status != TI_OK)
+ {
+ WLAN_OS_REPORT(("Get Counter Table failed\n"));
+ return;
+ }
+
+ /* print Counter Table */
+ WLAN_OS_REPORT(("FCS error count= %d \nPLCP error count = %d \nSeq error count= %d\n",
+ mib.aData.CounterTable.FCSErrorCount,
+ mib.aData.CounterTable.PLCPErrorCount,
+ mib.aData.CounterTable.SeqNumMissCount));
+
+}
+
+static void mibDbgModifyCtsToSelf(TI_HANDLE hTWD, void* pParam)
+{
+ TI_STATUS status = TI_OK;
+ TMib mib;
+
+ if (pParam == NULL)
+ {
+ WLAN_OS_REPORT(("Modify CTS To Self failed: No Parameter received\n"));
+ return;
+ }
+
+ /* init */
+ mib.aMib = MIB_ctsToSelf;
+ mib.aData.CTSToSelfEnable = 0;
+ mib.aData.CTSToSelfEnable = *(TI_UINT32*)pParam;
+
+ status = TWD_WriteMib(hTWD, &mib);
+ if (status != TI_OK)
+ {
+ WLAN_OS_REPORT(("Modify CTS To Self failed\n"));
+ return;
+ }
+ WLAN_OS_REPORT(("Modify CTS To Self OK\n"));
+
+ WLAN_OS_REPORT(("CtsToSelf = %s (%d)\n",
+ mib.aData.CTSToSelfEnable?"Enable":"Disable",
+ mib.aData.CTSToSelfEnable));
+ WLAN_OS_REPORT(("CTS to self: [0 - Disable, 1 - Enable]\n"));
+}
+
+static void mibDbgGetCtsToSelf(TI_HANDLE hTWD)
+{
+ TI_STATUS status = TI_OK;
+ TMib mib;
+
+ /* init */
+ mib.aMib = MIB_ctsToSelf;
+ mib.aData.CTSToSelfEnable = 0;
+
+ status = TWD_ReadMib(hTWD,NULL,NULL,(void*)&mib);
+ if (status != TI_OK)
+ {
+ WLAN_OS_REPORT(("Get CTS To Self failed\n"));
+ return;
+ }
+
+ WLAN_OS_REPORT(("CtsToSelf = %s (%d)\n",
+ mib.aData.CTSToSelfEnable?"Enable":"Disable",
+ mib.aData.CTSToSelfEnable));
+ WLAN_OS_REPORT(("CTS to self: [0 - Disable, 1 - Enable]\n"));
+}
+
+static void mibDbgSetMaxRxLifetime(TI_HANDLE hTWD, void* pParam)
+{
+ TI_STATUS status = TI_OK;
+ TMib mib;
+
+ if (pParam == NULL)
+ {
+ WLAN_OS_REPORT(("Set Maximum Rx Life Time failed: No Parameter received\n"));
+ return;
+ }
+
+ /* init */
+ mib.aMib = MIB_dot11MaxReceiveLifetime;
+ mib.aData.MaxReceiveLifeTime = *(TI_UINT32*)pParam;
+
+ status = TWD_WriteMib(hTWD, &mib);
+ if (status != TI_OK)
+ {
+ WLAN_OS_REPORT(("Set Maximum Rx Life Time failed\n"));
+ return;
+ }
+}
+
+/*
+ ***********************************************************************
+ * External functions definitions
+ ***********************************************************************
+ */
+void mibDbgPrintFunctions(void)
+{
+ WLAN_OS_REPORT(("\n MIB Dbg Functions \n"));
+ WLAN_OS_REPORT(("--------------------------------------\n"));
+
+ WLAN_OS_REPORT(("2101 - Print ARP Table\n"));
+ WLAN_OS_REPORT(("2102 - Print Group Address Table\n"));
+ WLAN_OS_REPORT(("2103 - Print Counter Table\n"));
+ WLAN_OS_REPORT(("2104 - Print Modify CTS to Self\n"));
+ WLAN_OS_REPORT(("2105 - Print Max RX Life Time\n"));
+}
+
+void MibDebugFunction(TI_HANDLE hTWD ,TI_UINT32 funcType, void* pParam)
+{
+ if (hTWD == NULL)
+ {
+ return;
+ }
+
+ switch (funcType)
+ {
+ case DBG_MIB_PRINT_HELP:
+ mibDbgPrintFunctions();
+ break;
+ case DBG_MIB_GET_ARP_TABLE:
+ mibDbgGetArpIpTable(hTWD);
+ break;
+ case DBG_MIB_GET_GROUP_ADDRESS_TABLE:
+ mibDbgGetGroupAddressTable(hTWD);
+ break;
+ case DBG_MIB_GET_COUNTER_TABLE:
+ mibDbgGetCounterTable(hTWD);
+ break;
+ case DBG_MIB_MODIFY_CTS_TO_SELF:
+ mibDbgModifyCtsToSelf(hTWD, pParam);
+ break;
+ case DBG_MIB_GET_CTS_TO_SELF:
+ mibDbgGetCtsToSelf(hTWD);
+ break;
+ case DBG_MIB_SET_MAX_RX_LIFE_TIME:
+ mibDbgSetMaxRxLifetime(hTWD, pParam);
+ break;
+ default:
+ WLAN_OS_REPORT(("MIB Debug: Invalid function type in MIB Debug function: %d\n", funcType));
+ break;
+ }
+}
diff --git a/wilink_6_1/Test/MibDbg.h b/wilink_6_1/Test/MibDbg.h
new file mode 100644
index 0000000..5cc9844
--- /dev/null
+++ b/wilink_6_1/Test/MibDbg.h
@@ -0,0 +1,66 @@
+/*
+ * MibDbg.h
+ *
+ * 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.
+ */
+
+
+#ifndef __MIB_DBG_H__
+#define __MIB_DBG_H__
+
+#include "osTIType.h"
+#include "tidef.h"
+
+/*
+ ***********************************************************************
+ * Constant definitions.
+ ***********************************************************************
+ */
+
+/* debug functions */
+#define DBG_MIB_PRINT_HELP 0
+#define DBG_MIB_GET_ARP_TABLE 1
+#define DBG_MIB_GET_GROUP_ADDRESS_TABLE 2
+#define DBG_MIB_GET_COUNTER_TABLE 3
+#define DBG_MIB_MODIFY_CTS_TO_SELF 4
+#define DBG_MIB_GET_CTS_TO_SELF 5
+#define DBG_MIB_SET_MAX_RX_LIFE_TIME 6
+
+
+
+/*
+ ***********************************************************************
+ * External functions definitions
+ ***********************************************************************
+ */
+void MibDebugFunction(TI_HANDLE hTWD ,TI_UINT32 funcType, void* pParam);
+
+
+#endif /* #define __MIB_DBG_H__ */
diff --git a/wilink_6_1/Test/PowerMgrDebug.c b/wilink_6_1/Test/PowerMgrDebug.c
new file mode 100644
index 0000000..028403e
--- /dev/null
+++ b/wilink_6_1/Test/PowerMgrDebug.c
@@ -0,0 +1,108 @@
+/*
+ * PowerMgrDebug.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 PowerMgrDebug.c
+ * \brief This is the PowerMgrDebug module implementation.
+ * \
+ * \date 13-Jun-2004
+ */
+
+/****************************************************************************
+ * *
+ * MODULE: PowerMgrDebug *
+ * PURPOSE: PowerMgrDebug Module implementation. *
+ * *
+ ****************************************************************************/
+
+#include "tidef.h"
+#include "osApi.h"
+#include "report.h"
+#include "PowerMgrDebug.h"
+#include "PowerMgr_API.h"
+#include "PowerMgr.h"
+
+
+/*****************************************************************************
+ ** Private Function prototypes **
+ *****************************************************************************/
+static void PowerMgrDebug_printAllCommands(void);
+
+
+/*****************************************************************************
+ ** Public Function prototypes **
+ *****************************************************************************/
+void powerMgrDebugFunction(TI_HANDLE thePowerMgrHandle,
+ TI_UINT32 theDebugFunction,
+ void* theParameter)
+{
+ switch (theDebugFunction)
+ {
+ case POWER_MGR_DEBUG_PRINT_ALL_COMMANDS:
+ PowerMgrDebug_printAllCommands();
+ break;
+
+ case POWER_MGR_DEBUG_START_PS:
+ PowerMgr_startPS(thePowerMgrHandle);
+ break;
+
+ case POWER_MGR_DEBUG_STOP_PS:
+ PowerMgr_stopPS(thePowerMgrHandle, TI_TRUE);
+ break;
+
+ case POWER_MGR_PRINT_OBJECTS:
+ PowerMgr_printObject(thePowerMgrHandle);
+ break;
+
+ default:
+ WLAN_OS_REPORT(("(%d) - ERROR - Invalid function type in POWER MANAGER DEBUG Function Command: %d\n",
+ __LINE__,theDebugFunction));
+ break;
+ }
+}
+
+/*****************************************************************************
+ ** Private Function prototypes **
+ *****************************************************************************/
+static void PowerMgrDebug_printAllCommands(void)
+{
+ WLAN_OS_REPORT(("\n\n"));
+ WLAN_OS_REPORT(("POWER MGR DEBUG module commands:\n"));
+ WLAN_OS_REPORT(("================================\n"));
+ WLAN_OS_REPORT(("syntax description\n"));
+ WLAN_OS_REPORT(("%d - POWER_MGR_DEBUG_PRINT_ALL_COMMANDS\n", POWER_MGR_DEBUG_PRINT_ALL_COMMANDS));
+ WLAN_OS_REPORT(("%d - POWER_MGR_DEBUG_START_PS\n", POWER_MGR_DEBUG_START_PS));
+ WLAN_OS_REPORT(("%d - POWER_MGR_DEBUG_STOP_PS\n", POWER_MGR_DEBUG_STOP_PS));
+ WLAN_OS_REPORT(("%d - POWER_MGR_PRINT_OBJECTS\n", POWER_MGR_PRINT_OBJECTS));
+ WLAN_OS_REPORT(("\n\n"));
+}
+
diff --git a/wilink_6_1/Test/PowerMgrDebug.h b/wilink_6_1/Test/PowerMgrDebug.h
new file mode 100644
index 0000000..527179c
--- /dev/null
+++ b/wilink_6_1/Test/PowerMgrDebug.h
@@ -0,0 +1,99 @@
+/*
+ * PowerMgrDebug.h
+ *
+ * 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 PowerMgrDebug.h
+ * \brief This is the Power Manager module private (internal).
+ * \
+ * \date 13-Jun-2004
+ */
+
+/****************************************************************************
+ * *
+ * MODULE: Power Manager Debug *
+ * PURPOSE: Power Manager Debug Module private *
+ * *
+ ****************************************************************************/
+
+#ifndef _POWER_MGR_DEBUG_H_
+#define _POWER_MGR_DEBUG_H_
+
+#include "tidef.h"
+
+/*****************************************************************************
+ ** Constants **
+ *****************************************************************************/
+
+
+/*****************************************************************************
+ ** Enumerations **
+ *****************************************************************************/
+
+enum
+{
+ POWER_MGR_DEBUG_PRINT_ALL_COMMANDS,
+ POWER_MGR_DEBUG_START_PS,
+ POWER_MGR_DEBUG_STOP_PS,
+ POWER_MGR_PRINT_OBJECTS,
+ POWER_MGR_DEBUG_MAX_COMMANDS
+};
+
+/*****************************************************************************
+ ** Typedefs **
+ *****************************************************************************/
+
+
+/*****************************************************************************
+ ** Structures **
+ *****************************************************************************/
+
+
+/*****************************************************************************
+ ** External data definitions **
+ *****************************************************************************/
+
+
+/*****************************************************************************
+ ** External functions definitions **
+ *****************************************************************************/
+
+
+/*****************************************************************************
+ ** Public Function prototypes **
+ *****************************************************************************/
+
+void powerMgrDebugFunction(TI_HANDLE thePowerMgrHandle,
+ TI_UINT32 theDebugFunction,
+ void* theParameter);
+
+#endif /* _POWER_MGR_DEBUG_H_ */
+
diff --git a/wilink_6_1/Test/RxDbg.c b/wilink_6_1/Test/RxDbg.c
new file mode 100644
index 0000000..b1b5c7e
--- /dev/null
+++ b/wilink_6_1/Test/RxDbg.c
@@ -0,0 +1,40 @@
+/*
+ * RxDbg.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.
+ */
+
+
+/***************************************************************************/
+/* */
+/* MODULE: */
+/* PURPOSE: */
+/* */
+/***************************************************************************/
diff --git a/wilink_6_1/Test/ScanMngrDbg.c b/wilink_6_1/Test/ScanMngrDbg.c
new file mode 100644
index 0000000..ddf1b13
--- /dev/null
+++ b/wilink_6_1/Test/ScanMngrDbg.c
@@ -0,0 +1,166 @@
+/*
+ * ScanMngrDbg.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 ScanMngrDbg.c
+ * \brief This file include the scan manager debug module implementation
+ * \
+ * \date 29-March-2005
+ */
+
+#include "tidef.h"
+#include "report.h"
+#include "paramOut.h"
+#include "scanMngr.h"
+#include "ScanMngrDbg.h"
+#include "siteMgrApi.h"
+#include "DataCtrl_Api.h"
+
+
+/**
+ * \\n
+ * \date 29-March-2005\n
+ * \brief Main scan manager debug function
+ *
+ * Function Scope \e Public.\n
+ * \param hScanMngr - handle to the scan manager object.\n
+ * \param funcType - the specific debug function.\n
+ * \param pParam - parameters for the debug function.\n
+ * \param hSiteMgr - handle to th esite manager object.\n
+ * \param hCtrlData - handle to the data ctrl object.\n
+ */
+void scanMngrDebugFunction( TI_HANDLE hScanMngr, TI_UINT32 funcType, void *pParam, TI_HANDLE hSiteMgr, TI_HANDLE hCtrlData )
+{
+ switch (funcType)
+ {
+ case DBG_SCAN_MNGR_PRINT_HELP:
+ printScanMngrDbgFunctions();
+ break;
+
+ case DBG_SCAN_MNGR_START_CONT_SCAN:
+ startContScan( hScanMngr, hSiteMgr, hCtrlData );
+ break;
+
+ case DBG_SCAN_MNGR_STOP_CONT_SCAN:
+ scanMngr_stopContScan( hScanMngr );
+ break;
+
+ case DBG_SCAN_MNGR_START_IMMED_SCAN:
+ scanMngr_startImmediateScan( hScanMngr, (1 == *((TI_INT32*)pParam) ? TI_TRUE : TI_FALSE) );
+ break;
+
+ case DBG_SCAN_MNGR_STOP_IMMED_SCAN:
+ scanMngr_stopImmediateScan( hScanMngr );
+ break;
+
+ case DBG_SCAN_MNGR_PRINT_TRACK_LIST:
+ scanMngrDebugPrintBSSList( hScanMngr );
+ break;
+
+ case DBG_SCAN_MNGR_PRINT_STATS:
+ scanMngr_statsPrint( hScanMngr );
+ break;
+
+ case DBG_SCAN_MNGR_RESET_STATS:
+ scanMngr_statsReset( hScanMngr );
+ break;
+
+ case DBG_SCAN_MNGR_PIRNT_NEIGHBOR_APS:
+ scanMngrDebugPrintNeighborAPList( hScanMngr );
+ break;
+
+ case DBG_SCAN_MNGR_PRINT_POLICY:
+ scanMngrTracePrintScanPolicy( &(((scanMngr_t*)hScanMngr)->scanPolicy) );
+ break;
+
+ case DBG_SCAN_MNGR_PRINT_OBJECT:
+ scanMngrDebugPrintObject( hScanMngr );
+ break;
+
+ default:
+ WLAN_OS_REPORT(("Invalid function type in scan manager debug function: %d\n", funcType));
+ break;
+ }
+}
+
+/**
+ * \\n
+ * \date 29-March-2005\n
+ * \brief Prints scan manager debug menu
+ *
+ * Function Scope \e Public.\n
+ */
+void printScanMngrDbgFunctions(void)
+{
+ WLAN_OS_REPORT((" Scan Manager Debug Functions \n"));
+ WLAN_OS_REPORT(("---------------------------------------\n"));
+ WLAN_OS_REPORT(("1500 - Print the scan manager Debug Help\n"));
+ WLAN_OS_REPORT(("1501 - Start continuous scan\n"));
+ WLAN_OS_REPORT(("1502 - Stop continuous scan\n"));
+ WLAN_OS_REPORT(("1503 - Start immediate scan\n"));
+ WLAN_OS_REPORT(("1504 - Stop immediate scan\n"));
+ WLAN_OS_REPORT(("1505 - Print tracking list\n"));
+ WLAN_OS_REPORT(("1506 - Print statistics\n"));
+ WLAN_OS_REPORT(("1507 - Reset statistics\n"));
+ WLAN_OS_REPORT(("1508 - Print neighbor APs list\n"));
+ WLAN_OS_REPORT(("1509 - Print Scan Policy\n"));
+ WLAN_OS_REPORT(("1510 - Print scan manager object\n"));
+}
+
+/**
+ * \\n
+ * \date 29-March-2005\n
+ * \brief Starts continuous scan process.\n
+ *
+ * Function Scope \e Public.\n
+ * \param hScanMngr - handle to the scan manager object.\n
+ * \param hSiteMgr - handle to the site manager object.\n\
+ * \param hCtrlData - handle to the data ctrl object.\n
+ */
+void startContScan( TI_HANDLE hScanMngr, TI_HANDLE hSiteMgr, TI_HANDLE hCtrlData )
+{
+ paramInfo_t param;
+ ERadioBand radioBand;
+
+ /* get current band */
+ param.paramType = SITE_MGR_RADIO_BAND_PARAM;
+ siteMgr_getParam( hSiteMgr, &param );
+ radioBand = param.content.siteMgrRadioBand;
+
+ /* get current BSSID */
+ param.paramType = CTRL_DATA_CURRENT_BSSID_PARAM;
+ ctrlData_getParam( hCtrlData, &param );
+
+ /* start continuous scan */
+ scanMngr_startContScan( hScanMngr, &(param.content.ctrlDataCurrentBSSID), radioBand );
+}
+
diff --git a/wilink_6_1/Test/ScanMngrDbg.h b/wilink_6_1/Test/ScanMngrDbg.h
new file mode 100644
index 0000000..df8ca99
--- /dev/null
+++ b/wilink_6_1/Test/ScanMngrDbg.h
@@ -0,0 +1,127 @@
+/*
+ * ScanMngrDbg.h
+ *
+ * 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 ScanMngrDbg.h
+ * \brief This file include private definitions for the scan manager debug module.
+ * \
+ * \date 29-March-2005
+ */
+
+#ifndef __SCANMNGRDBG_H__
+#define __SCANMNGRDBG_H__
+
+/*
+ ***********************************************************************
+ * Constant definitions.
+ ***********************************************************************
+ */
+
+/* debug functions */
+#define DBG_SCAN_MNGR_PRINT_HELP 0
+#define DBG_SCAN_MNGR_START_CONT_SCAN 1
+#define DBG_SCAN_MNGR_STOP_CONT_SCAN 2
+#define DBG_SCAN_MNGR_START_IMMED_SCAN 3
+#define DBG_SCAN_MNGR_STOP_IMMED_SCAN 4
+#define DBG_SCAN_MNGR_PRINT_TRACK_LIST 5
+#define DBG_SCAN_MNGR_PRINT_STATS 6
+#define DBG_SCAN_MNGR_RESET_STATS 7
+#define DBG_SCAN_MNGR_PIRNT_NEIGHBOR_APS 8
+#define DBG_SCAN_MNGR_PRINT_POLICY 9
+#define DBG_SCAN_MNGR_PRINT_OBJECT 10
+
+/*
+ ***********************************************************************
+ * Enums.
+ ***********************************************************************
+ */
+
+/*
+ ***********************************************************************
+ * Typedefs.
+ ***********************************************************************
+ */
+
+/*
+ ***********************************************************************
+ * Structure definitions.
+ ***********************************************************************
+ */
+
+/*
+ ***********************************************************************
+ * External data definitions.
+ ***********************************************************************
+ */
+
+/*
+ ***********************************************************************
+ * External functions definitions
+ ***********************************************************************
+ */
+
+/**
+ * \\n
+ * \date 29-March-2005\n
+ * \brief Main scan manager debug function
+ *
+ * Function Scope \e Public.\n
+ * \param hScanMngr - handle to the scan manager object.\n
+ * \param funcType - the specific debug function.\n
+ * \param pParam - parameters for the debug function.\n
+ * \param hSiteMgr - handle to th esite manager object.\n
+ * \param hCtrlData - handle to the data ctrl object.\n
+ */
+void scanMngrDebugFunction( TI_HANDLE hScanMngr, TI_UINT32 funcType, void *pParam, TI_HANDLE hSiteMgr, TI_HANDLE hCtrlData );
+
+/**
+ * \\n
+ * \date 29-March-2005\n
+ * \brief Prints scan manager debug menu
+ *
+ * Function Scope \e Public.\n
+ */
+void printScanMngrDbgFunctions(void);
+
+/**
+ * \\n
+ * \date 29-March-2005\n
+ * \brief Starts continuous scan process.\n
+ *
+ * Function Scope \e Public.\n
+ * \param hScanMngr - handle to the scan manager object.\n
+ * \param hSiteMgr - handle to the site manager object.\n\
+ * \param hCtrlData - handle to the data ctrl object.\n
+ */
+void startContScan( TI_HANDLE hScanMngr, TI_HANDLE hSiteMgr, TI_HANDLE hCtrlData );
+
+#endif /* __SCANMNGRDBG_H__ */
diff --git a/wilink_6_1/Test/SoftGeminiDbg.c b/wilink_6_1/Test/SoftGeminiDbg.c
new file mode 100644
index 0000000..6123ec9
--- /dev/null
+++ b/wilink_6_1/Test/SoftGeminiDbg.c
@@ -0,0 +1,111 @@
+/*
+ * SoftGeminiDbg.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 ScanCncnDbg.c
+ * \brief This file include the soft gemini debug module implementation
+ * \
+ * \date 14-Dec-2005
+ */
+
+#include "SoftGeminiApi.h"
+#include "SoftGeminiDbg.h"
+#include "report.h"
+#include "osApi.h"
+
+
+/**
+ * \\n
+ * \date 14-Dec-2005\n
+ * \brief Main soft gemini debug function
+ *
+ * Function Scope \e Public.\n
+ * \param hSoftGemini - handle to the soft gemini object.\n
+ * \param funcType - the specific debug function.\n
+ * \param pParam - parameters for the debug function.\n
+ */
+void SoftGeminiDebugFunction( TI_HANDLE hSoftGemini,TI_UINT32 funcType, void *pParam )
+{
+ switch (funcType)
+ {
+ case DBG_SG_PRINT_HELP:
+ printSoftGeminiDbgFunctions();
+ break;
+
+ case DBG_SG_PRINT_PARAMS:
+ printSoftGeminiParams(hSoftGemini);
+ break;
+
+ case DBG_SG_SENSE_MODE:
+ SoftGemini_SenseIndicationCB(hSoftGemini,(char*) pParam,1);
+ break;
+
+ case DBG_SG_PROTECTIVE_MODE:
+ SoftGemini_ProtectiveIndicationCB(hSoftGemini,(char*) pParam,1);
+ break;
+
+ default:
+ WLAN_OS_REPORT(("Invalid function type in soft gemini debug function: %d\n", funcType));
+ break;
+ }
+}
+
+/**
+ * \\n
+ * \date 14-Dec-2005\n
+ * \brief Prints soft gemini debug menu
+ *
+ * Function Scope \e Public.\n
+ */
+void printSoftGeminiDbgFunctions(void)
+{
+ WLAN_OS_REPORT((" Scan Concentrator Debug Functions \n"));
+ WLAN_OS_REPORT(("---------------------------------------\n"));
+ WLAN_OS_REPORT(("1800 - Print the soft gemini Debug Help\n"));
+ WLAN_OS_REPORT(("1801 - Print soft gemini parameters \n"));
+ WLAN_OS_REPORT(("1802 - Trigger Sense Mode (enable - 1) \n"));
+ WLAN_OS_REPORT(("1803 - Trigger Protective Mode (ON - 1)\n"));
+
+}
+
+/**
+ * \\n
+ * \date 14-Dec-2005\n
+ * \brief Performs a driver scan from within an app scan.\n
+ *
+ * Function Scope \e Public.\n
+ * \param hSoftGemini - handle to the soft gemini object.\n
+ */
+void printSoftGeminiParams( TI_HANDLE hSoftGemini )
+{
+ SoftGemini_printParams(hSoftGemini);
+}
diff --git a/wilink_6_1/Test/SoftGeminiDbg.h b/wilink_6_1/Test/SoftGeminiDbg.h
new file mode 100644
index 0000000..9f4559c
--- /dev/null
+++ b/wilink_6_1/Test/SoftGeminiDbg.h
@@ -0,0 +1,117 @@
+/*
+ * SoftGeminiDbg.h
+ *
+ * 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 SoftGeminiDbg.h
+ * \brief This file include private definitions for the soft Gemini debug module.
+ * \
+ * \date 30-Dec-2004
+ */
+
+#ifndef __SOFT_GEMINI_DBG_H__
+#define __SOFT_GEMINI_DBG_H__
+
+/*
+ ***********************************************************************
+ * Constant definitions.
+ ***********************************************************************
+ */
+
+/* debug functions */
+#define DBG_SG_PRINT_HELP 0
+#define DBG_SG_PRINT_PARAMS 1
+#define DBG_SG_SENSE_MODE 2
+#define DBG_SG_PROTECTIVE_MODE 3
+
+/*
+ ***********************************************************************
+ * Enums.
+ ***********************************************************************
+ */
+
+/*
+ ***********************************************************************
+ * Typedefs.
+ ***********************************************************************
+ */
+
+/*
+ ***********************************************************************
+ * Structure definitions.
+ ***********************************************************************
+ */
+
+/*
+ ***********************************************************************
+ * External data definitions.
+ ***********************************************************************
+ */
+
+/*
+ ***********************************************************************
+ * External functions definitions
+ ***********************************************************************
+ */
+
+/**
+ * \\n
+ * \date 14-Feb-2005\n
+ * \brief Main soft Geminirdebug function
+ *
+ * Function Scope \e Public.\n
+ * \param hSoftGemini - handle to the scan concentrator object.\n
+ * \param funcType - the specific debug function.\n
+ * \param pParam - parameters for the debug function.\n
+ */
+void SoftGeminiDebugFunction( TI_HANDLE hSoftGemini, TI_UINT32 funcType, void *pParam );
+
+/**
+ * \\n
+ * \date 14-Feb-2005\n
+ * \brief Prints scan concentrator debug menu
+ *
+ * Function Scope \e Public.\n
+ */
+void printSoftGeminiDbgFunctions(void);
+
+/**
+ * \\n
+ * \date 14-Feb-2005\n
+ * \brief Prints SoftGemini params.\n
+ *
+ * Function Scope \e Public.\n
+ * \param hSoftGemini - handle to the SoftGemini object.\n
+ */
+void printSoftGeminiParams( TI_HANDLE hSoftGemini );
+
+
+#endif /* __SOFT_GEMINI_DBG_H__ */
diff --git a/wilink_6_1/Test/TWD_Debug.c b/wilink_6_1/Test/TWD_Debug.c
new file mode 100644
index 0000000..63a9358
--- /dev/null
+++ b/wilink_6_1/Test/TWD_Debug.c
@@ -0,0 +1,995 @@
+/*
+ * TWD_Debug.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.
+ */
+
+#include "tidef.h"
+#include "TWDriver.h"
+#include "rxXfer_api.h"
+#include "report.h"
+#include "osApi.h"
+#include "eventMbox_api.h"
+#include "CmdQueue_api.h"
+#include "CmdMBox_api.h"
+#include "FwEvent_api.h"
+#include "fwDebug_api.h"
+#include "CmdBld.h"
+
+
+/* Phony address used by host access */
+#define BB_REGISTER_ADDR_BASE 0x820000
+
+/* Used for TWD Debug Tests */
+typedef enum
+{
+/*
+ * General
+ */
+/* 0x00 */ TWD_PRINT_HELP,
+/* 0x01 */ TWD_PRINT_SYS_INFO,
+/* 0x02 */ TWD_SET_GENERIC_ADDR,
+/* 0x03 */ TWD_READ_MEM,
+/* 0x04 */ TWD_WRITE_MEM,
+
+/* 0x05 */ TWD_PRINT_ISTART,
+
+/* 0x06 */ TWD_PRINT_MBOX_QUEUE_INFO,
+/* 0x07 */ TWD_PRINT_MBOX_PRINT_CMD,
+/* 0x08 */ TWD_MAILBOX_HISTORY_PRINT,
+
+/* 0x09 */ TWD_MAC_REG,
+/* 0x0A */ TWD_SET_ARM_CLOCK,
+/* 0x0B */ TWD_SET_MAC_CLOCK,
+
+/*
+ * Rx
+ */
+/* 0x0C */ TWD_PRINT_RX_INFO,
+/* 0x0D */ TWD_CLEAR_RX_INFO,
+
+/*
+ * Acx
+ */
+/* 0x0E */ TWD_PRINT_ACX_MAP,
+/* 0x0F */ TWD_PRINT_ACX_STAT,
+
+/*
+ * General Debug
+ */
+/* 0x10 */ TWD_PWR_SV_DBG,
+
+/* 0x11 */ TWD_PRINT_LIST_REGS_THROG_MBOX,
+/* 0x12 */ TWD_PRINT_LIST_MEM_THROG_MBOX,
+/* 0x13 */ TWD_SET_MAC_REGISTER_THROG_MBOX,
+/* 0x14 */ TWD_SET_PHY_REGISTER_THROG_MBOX,
+/* 0x15 */ TWD_SET_MEMORY_THROG_MBOX,
+
+/*
+ * Recover Debug
+ */
+/* 0x16 */ TWD_CHECK_HW,
+/* 0x17 */ TWD_PRINT_HW_STATUS,
+
+/*
+ * Event MailBox
+ */
+/* 0x18 */ TWD_PRINT_EVENT_MBOX_INFO,
+/* 0x19 */ TWD_PRINT_EVENT_MBOX_MASK,
+/* 0x1A */ TWD_PRINT_EVENT_MBOX_UNMASK,
+
+/*
+ * Other
+ */
+TWD_PRINT_FW_EVENT_INFO,
+TWD_PRINT_TW_IF_INFO,
+TWD_PRINT_MBOX_INFO,
+TWD_FORCE_TEMPLATES_RATES,
+
+ TWD_DEBUG_TEST_MAX = 0xFF /* mast be last!!! */
+
+} TWD_DebugTest_e;
+
+
+/* Used for Memory or Registers reading/writing*/
+typedef enum
+{
+ TNETW_INTERNAL_RAM,
+ TNETW_MAC_REGISTERS,
+ TNETW_PHY_REGISTERS
+
+} readWrite_MemoryType_e;
+
+static void TWD_PrintMemRegsCB (TI_HANDLE hTWD, TI_UINT32 cmdCbStatus)
+{
+ TTwd *pTWD = (TTwd *)hTWD;
+ int i;
+ TI_UINT8 *pBuf;
+ TI_UINT32 result;
+
+ if (cmdCbStatus != TI_OK)
+ {
+ WLAN_OS_REPORT(("Command complete error \n\n"));
+ return;
+ }
+
+ result = (((TI_UINT32)pTWD->tPrintRegsBuf.addr) & 0xFFFF0000);
+
+ switch (result)
+ {
+ case REGISTERS_BASE:
+ WLAN_OS_REPORT(("MAC REGS (Base=0x%08x) = 0x%08x\n",
+ ((TI_UINT32)pTWD->tPrintRegsBuf.addr)&0xFFFF,
+ *(TI_UINT32*)(pTWD->tPrintRegsBuf.value)));
+ break;
+
+ case BB_REGISTER_ADDR_BASE:
+ WLAN_OS_REPORT(("PHY REGS (Base=0x%08x) = 0x%08x\n",
+ ((TI_UINT32)pTWD->tPrintRegsBuf.addr)&0xFFFF,
+ *(TI_UINT32*)(pTWD->tPrintRegsBuf.value)));
+ break;
+
+ default: /* Memory*/
+ for (i=0, pBuf = pTWD->tPrintRegsBuf.value; i < 256; i += 16, pBuf += 16)
+ {
+ WLAN_OS_REPORT(("PrintBuf: 0x%08x: 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x\n",
+ pTWD->tPrintRegsBuf.addr+i,
+ pBuf[0], pBuf[1], pBuf[2], pBuf[3], pBuf[4], pBuf[5], pBuf[6], pBuf[7],
+ pBuf[8], pBuf[9], pBuf[10], pBuf[11], pBuf[12], pBuf[13], pBuf[14], pBuf[15]));
+ }
+ break;
+ }
+}
+
+
+static void TWD_PrintMemRegs (TI_HANDLE hTWD, TI_UINT32 address, TI_UINT32 len, readWrite_MemoryType_e memType)
+{
+ TTwd *pTWD = (TTwd *)hTWD;
+ ReadWriteCommand_t AcxCmd_ReadMemory;
+ ReadWriteCommand_t* pCmd = &AcxCmd_ReadMemory;
+
+ os_memoryZero (pTWD->hOs, (void *)pCmd, sizeof (*pCmd));
+
+ switch (memType)
+ {
+ case TNETW_INTERNAL_RAM:
+ pCmd->addr = (TI_UINT32)ENDIAN_HANDLE_LONG (address);
+ pCmd->size = ENDIAN_HANDLE_LONG (len);
+ break;
+
+ case TNETW_MAC_REGISTERS:
+ pCmd->addr = (TI_UINT32)ENDIAN_HANDLE_LONG (((address&0xFFFF) | REGISTERS_BASE));
+ pCmd->size = 4;
+ break;
+
+ case TNETW_PHY_REGISTERS:
+ pCmd->addr = (TI_UINT32)ENDIAN_HANDLE_LONG (((address&0xFFFF) | BB_REGISTER_ADDR_BASE));
+ pCmd->size = 4;
+ break;
+
+ default:
+ WLAN_OS_REPORT(("Wrong memory type %d\n\n", memType));
+ return;
+ }
+
+ os_memoryZero (pTWD->hOs, (void *)&pTWD->tPrintRegsBuf, sizeof(pTWD->tPrintRegsBuf));
+
+ cmdQueue_SendCommand (pTWD->hCmdQueue,
+ CMD_READ_MEMORY,
+ (char *)pCmd,
+ sizeof(*pCmd),
+ (void *)TWD_PrintMemRegsCB,
+ hTWD,
+ &pTWD->tPrintRegsBuf);
+}
+
+static TI_STATUS TWD_PrintMemoryMapCb (TI_HANDLE hTWD, TI_STATUS status, void *pData)
+{
+#ifdef REPORT_LOG
+ TTwd *pTWD = (TTwd *)hTWD;
+ MemoryMap_t *pMemMap = &pTWD->MemMap;
+
+ /* Print the memory map */
+ WLAN_OS_REPORT (("TWD_PrintMemoryMap:\n"));
+ WLAN_OS_REPORT (("\tCode (0x%08x, 0x%08x)\n\tWep (0x%08x, 0x%08x)\n\tTmpl (0x%08x, 0x%08x)\n "
+ "\tQueue (0x%08x, 0x%08x)\n\tPool (0x%08x, 0x%08x)\n\tTraceBuffer (A = 0x%08x, B = 0x%08x)\n",
+ pMemMap->codeStart,
+ pMemMap->codeEnd,
+ pMemMap->wepDefaultKeyStart,
+ pMemMap->wepDefaultKeyEnd,
+ pMemMap->packetTemplateStart,
+ pMemMap->packetTemplateEnd,
+ pMemMap->queueMemoryStart,
+ pMemMap->queueMemoryEnd,
+ pMemMap->packetMemoryPoolStart,
+ pMemMap->packetMemoryPoolEnd,
+ pMemMap->debugBuffer1Start,
+ pMemMap->debugBuffer2Start));
+#endif
+
+ return TI_OK;
+}
+
+
+/****************************************************************************
+ * TWD_PrintMemoryMap ()
+ ****************************************************************************
+ * DESCRIPTION: Print some of the MemoryMap information element fields
+ *
+ * INPUTS:
+ * HwMboxConfig_T* pHwMboxConfig pointer to the acx mailbox
+ *
+ * OUTPUT: None
+ *
+ * RETURNS: None
+ ****************************************************************************/
+static void TWD_PrintMemoryMap (TI_HANDLE hTWD)
+{
+ TTwd *pTWD = (TTwd *)hTWD;
+
+ TWD_ItrMemoryMap (pTWD, &pTWD->MemMap, (void *)TWD_PrintMemoryMapCb, hTWD);
+}
+
+
+/****************************************************************************
+ * TWD_StatisticsReadCB ()
+ ****************************************************************************
+ * DESCRIPTION: Interrogate Statistics from the wlan hardware
+ *
+ * INPUTS: None
+ *
+ * OUTPUT: None
+ *
+ * RETURNS: TI_OK or TI_NOK
+ ****************************************************************************/
+static TI_STATUS TWD_StatisticsReadCB (TI_HANDLE hTWD, TI_UINT16 MboxStatus, ACXStatistics_t* pElem)
+{
+ if (MboxStatus != TI_OK)
+ {
+ return TI_NOK;
+ }
+
+ /*
+ * Handle FW statistics endianess
+ * ==============================
+ */
+
+ /* Ring */
+ pElem->ringStat.numOfTxProcs = ENDIAN_HANDLE_LONG(pElem->ringStat.numOfTxProcs);
+ pElem->ringStat.numOfPreparedDescs = ENDIAN_HANDLE_LONG(pElem->ringStat.numOfPreparedDescs);
+ pElem->ringStat.numOfTxXfr = ENDIAN_HANDLE_LONG(pElem->ringStat.numOfTxXfr);
+ pElem->ringStat.numOfTxDma = ENDIAN_HANDLE_LONG(pElem->ringStat.numOfTxDma);
+ pElem->ringStat.numOfTxCmplt = ENDIAN_HANDLE_LONG(pElem->ringStat.numOfTxCmplt);
+ pElem->ringStat.numOfRxProcs = ENDIAN_HANDLE_LONG(pElem->ringStat.numOfRxProcs);
+ pElem->ringStat.numOfRxData = ENDIAN_HANDLE_LONG(pElem->ringStat.numOfRxData);
+
+ /* Debug */
+ pElem->debug.debug1 = ENDIAN_HANDLE_LONG(pElem->debug.debug1);
+ pElem->debug.debug2 = ENDIAN_HANDLE_LONG(pElem->debug.debug2);
+ pElem->debug.debug3 = ENDIAN_HANDLE_LONG(pElem->debug.debug3);
+ pElem->debug.debug4 = ENDIAN_HANDLE_LONG(pElem->debug.debug4);
+ pElem->debug.debug5 = ENDIAN_HANDLE_LONG(pElem->debug.debug5);
+ pElem->debug.debug6 = ENDIAN_HANDLE_LONG(pElem->debug.debug6);
+
+ /* Isr */
+ pElem->isr.IRQs = ENDIAN_HANDLE_LONG(pElem->isr.IRQs);
+
+ /* Rx */
+ pElem->rx.RxOutOfMem = ENDIAN_HANDLE_LONG(pElem->rx.RxOutOfMem );
+ pElem->rx.RxHdrOverflow = ENDIAN_HANDLE_LONG(pElem->rx.RxHdrOverflow );
+ pElem->rx.RxHWStuck = ENDIAN_HANDLE_LONG(pElem->rx.RxHWStuck );
+ pElem->rx.RxDroppedFrame = ENDIAN_HANDLE_LONG(pElem->rx.RxDroppedFrame );
+ pElem->rx.RxCompleteDroppedFrame = ENDIAN_HANDLE_LONG(pElem->rx.RxCompleteDroppedFrame);
+ pElem->rx.RxAllocFrame = ENDIAN_HANDLE_LONG(pElem->rx.RxAllocFrame );
+ pElem->rx.RxDoneQueue = ENDIAN_HANDLE_LONG(pElem->rx.RxDoneQueue );
+ pElem->rx.RxDone = ENDIAN_HANDLE_LONG(pElem->rx.RxDone );
+ pElem->rx.RxDefrag = ENDIAN_HANDLE_LONG(pElem->rx.RxDefrag );
+ pElem->rx.RxDefragEnd = ENDIAN_HANDLE_LONG(pElem->rx.RxDefragEnd );
+ pElem->rx.RxMic = ENDIAN_HANDLE_LONG(pElem->rx.RxMic );
+ pElem->rx.RxMicEnd = ENDIAN_HANDLE_LONG(pElem->rx.RxMicEnd );
+ pElem->rx.RxXfr = ENDIAN_HANDLE_LONG(pElem->rx.RxXfr );
+ pElem->rx.RxXfrEnd = ENDIAN_HANDLE_LONG(pElem->rx.RxXfrEnd );
+ pElem->rx.RxCmplt = ENDIAN_HANDLE_LONG(pElem->rx.RxCmplt );
+ pElem->rx.RxPreCmplt = ENDIAN_HANDLE_LONG(pElem->rx.RxPreCmplt );
+ pElem->rx.RxCmpltTask = ENDIAN_HANDLE_LONG(pElem->rx.RxCmpltTask );
+ pElem->rx.RxPhyHdr = ENDIAN_HANDLE_LONG(pElem->rx.RxPhyHdr );
+ pElem->rx.RxTimeout = ENDIAN_HANDLE_LONG(pElem->rx.RxTimeout );
+
+ /* Tx */
+ pElem->tx.numOfTxTemplatePrepared = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxTemplatePrepared);
+ pElem->tx.numOfTxDataPrepared = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxDataPrepared);
+ pElem->tx.numOfTxTemplateProgrammed = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxTemplateProgrammed);
+ pElem->tx.numOfTxDataProgrammed = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxDataProgrammed);
+ pElem->tx.numOfTxBurstProgrammed = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxBurstProgrammed);
+ pElem->tx.numOfTxStarts = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxStarts);
+ pElem->tx.numOfTxImmResp = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxImmResp);
+ pElem->tx.numOfTxStartTempaltes = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxStartTempaltes);
+ pElem->tx.numOfTxStartIntTemplate = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxStartIntTemplate);
+ pElem->tx.numOfTxStartFwGen = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxStartFwGen);
+ pElem->tx.numOfTxStartData = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxStartData);
+ pElem->tx.numOfTxStartNullFrame = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxStartNullFrame);
+ pElem->tx.numOfTxExch = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxExch);
+ pElem->tx.numOfTxRetryTemplate = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxRetryTemplate);
+ pElem->tx.numOfTxRetryData = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxRetryData);
+ pElem->tx.numOfTxExchPending = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxExchPending);
+ pElem->tx.numOfTxExchExpiry = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxExchExpiry);
+ pElem->tx.numOfTxExchMismatch = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxExchMismatch);
+ pElem->tx.numOfTxDoneTemplate = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxDoneTemplate);
+ pElem->tx.numOfTxDoneData = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxDoneData);
+ pElem->tx.numOfTxDoneIntTemplate = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxDoneIntTemplate);
+ pElem->tx.numOfTxPreXfr = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxPreXfr);
+ pElem->tx.numOfTxXfr = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxXfr);
+ pElem->tx.numOfTxXfrOutOfMem = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxXfrOutOfMem);
+ pElem->tx.numOfTxDmaProgrammed = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxDmaProgrammed);
+ pElem->tx.numOfTxDmaDone = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxDmaDone);
+
+ /* Dma */
+ pElem->dma.RxDMAErrors = ENDIAN_HANDLE_LONG(pElem->dma.RxDMAErrors);
+ pElem->dma.TxDMAErrors = ENDIAN_HANDLE_LONG(pElem->dma.TxDMAErrors);
+
+ /* Wep */
+ pElem->wep.WepAddrKeyCount = ENDIAN_HANDLE_LONG(pElem->wep.WepAddrKeyCount);
+ pElem->wep.WepDefaultKeyCount = ENDIAN_HANDLE_LONG(pElem->wep.WepDefaultKeyCount);
+ pElem->wep.WepKeyNotFound = ENDIAN_HANDLE_LONG(pElem->wep.WepKeyNotFound);
+ pElem->wep.WepDecryptFail = ENDIAN_HANDLE_LONG(pElem->wep.WepDecryptFail);
+
+ /* AES */
+ pElem->aes.AesEncryptFail = ENDIAN_HANDLE_LONG(pElem->aes.AesEncryptFail);
+ pElem->aes.AesDecryptFail = ENDIAN_HANDLE_LONG(pElem->aes.AesDecryptFail);
+ pElem->aes.AesEncryptPackets = ENDIAN_HANDLE_LONG(pElem->aes.AesEncryptPackets);
+ pElem->aes.AesDecryptPackets = ENDIAN_HANDLE_LONG(pElem->aes.AesDecryptPackets);
+ pElem->aes.AesEncryptInterrupt = ENDIAN_HANDLE_LONG(pElem->aes.AesEncryptInterrupt);
+ pElem->aes.AesDecryptInterrupt = ENDIAN_HANDLE_LONG(pElem->aes.AesDecryptInterrupt);
+
+ /* Events */
+ pElem->event.calibration = ENDIAN_HANDLE_LONG(pElem->event.calibration);
+ pElem->event.rxMismatch = ENDIAN_HANDLE_LONG(pElem->event.rxMismatch);
+ pElem->event.rxMemEmpty = ENDIAN_HANDLE_LONG(pElem->event.rxMemEmpty);
+
+ /* PS */
+ pElem->pwr.MissingBcnsCnt = ENDIAN_HANDLE_LONG(pElem->pwr.MissingBcnsCnt);
+ pElem->pwr.RcvdBeaconsCnt = ENDIAN_HANDLE_LONG(pElem->pwr.RcvdBeaconsCnt);
+ pElem->pwr.ConnectionOutOfSync = ENDIAN_HANDLE_LONG(pElem->pwr.ConnectionOutOfSync);
+ pElem->pwr.ContMissBcnsSpread[0] = ENDIAN_HANDLE_LONG(pElem->pwr.ContMissBcnsSpread[0]);
+ pElem->pwr.ContMissBcnsSpread[1] = ENDIAN_HANDLE_LONG(pElem->pwr.ContMissBcnsSpread[1]);
+ pElem->pwr.ContMissBcnsSpread[2] = ENDIAN_HANDLE_LONG(pElem->pwr.ContMissBcnsSpread[2]);
+ pElem->pwr.ContMissBcnsSpread[3] = ENDIAN_HANDLE_LONG(pElem->pwr.ContMissBcnsSpread[3]);
+ pElem->pwr.ContMissBcnsSpread[4] = ENDIAN_HANDLE_LONG(pElem->pwr.ContMissBcnsSpread[4]);
+ pElem->pwr.ContMissBcnsSpread[5] = ENDIAN_HANDLE_LONG(pElem->pwr.ContMissBcnsSpread[5]);
+ pElem->pwr.ContMissBcnsSpread[6] = ENDIAN_HANDLE_LONG(pElem->pwr.ContMissBcnsSpread[6]);
+ pElem->pwr.ContMissBcnsSpread[7] = ENDIAN_HANDLE_LONG(pElem->pwr.ContMissBcnsSpread[7]);
+ pElem->pwr.ContMissBcnsSpread[8] = ENDIAN_HANDLE_LONG(pElem->pwr.ContMissBcnsSpread[8]);
+ pElem->pwr.ContMissBcnsSpread[9] = ENDIAN_HANDLE_LONG(pElem->pwr.ContMissBcnsSpread[9]);
+
+ pElem->ps.psPollTimeOuts = ENDIAN_HANDLE_LONG(pElem->ps.psPollTimeOuts);
+ pElem->ps.upsdTimeOuts = ENDIAN_HANDLE_LONG(pElem->ps.upsdTimeOuts);
+ pElem->ps.upsdMaxAPturn = ENDIAN_HANDLE_LONG(pElem->ps.upsdMaxAPturn);
+ pElem->ps.psPollMaxAPturn = ENDIAN_HANDLE_LONG(pElem->ps.psPollMaxAPturn);
+ pElem->ps.psPollUtilization = ENDIAN_HANDLE_LONG(pElem->ps.psPollUtilization);
+ pElem->ps.upsdUtilization = ENDIAN_HANDLE_LONG(pElem->ps.upsdUtilization);
+
+ pElem->rxFilter.arpFilter = ENDIAN_HANDLE_LONG(pElem->rxFilter.arpFilter);
+ pElem->rxFilter.beaconFilter = ENDIAN_HANDLE_LONG(pElem->rxFilter.beaconFilter);
+ pElem->rxFilter.dataFilter = ENDIAN_HANDLE_LONG(pElem->rxFilter.dataFilter);
+ pElem->rxFilter.dupFilter = ENDIAN_HANDLE_LONG(pElem->rxFilter.dupFilter);
+ pElem->rxFilter.MCFilter = ENDIAN_HANDLE_LONG(pElem->rxFilter.MCFilter);
+ pElem->rxFilter.ibssFilter = ENDIAN_HANDLE_LONG(pElem->rxFilter.ibssFilter);
+
+ pElem->radioCal.calStateFail = ENDIAN_HANDLE_LONG(pElem->radioCal.calStateFail);
+ pElem->radioCal.initCalTotal = ENDIAN_HANDLE_LONG(pElem->radioCal.initCalTotal);
+ pElem->radioCal.initRadioBandsFail = ENDIAN_HANDLE_LONG(pElem->radioCal.initRadioBandsFail);
+ pElem->radioCal.initRxIqMmFail = ENDIAN_HANDLE_LONG(pElem->radioCal.initRxIqMmFail);
+ pElem->radioCal.initSetParams = ENDIAN_HANDLE_LONG(pElem->radioCal.initSetParams);
+ pElem->radioCal.initTxClpcFail = ENDIAN_HANDLE_LONG(pElem->radioCal.initTxClpcFail);
+ pElem->radioCal.tuneCalTotal = ENDIAN_HANDLE_LONG(pElem->radioCal.tuneCalTotal);
+ pElem->radioCal.tuneDrpwChanTune = ENDIAN_HANDLE_LONG(pElem->radioCal.tuneDrpwChanTune);
+ pElem->radioCal.tuneDrpwLnaTank = ENDIAN_HANDLE_LONG(pElem->radioCal.tuneDrpwLnaTank);
+ pElem->radioCal.tuneDrpwPdBufFail = ENDIAN_HANDLE_LONG(pElem->radioCal.tuneDrpwPdBufFail);
+ pElem->radioCal.tuneDrpwRTrimFail = ENDIAN_HANDLE_LONG(pElem->radioCal.tuneDrpwRTrimFail);
+ pElem->radioCal.tuneDrpwRxDac = ENDIAN_HANDLE_LONG(pElem->radioCal.tuneDrpwRxDac);
+ pElem->radioCal.tuneDrpwRxIf2Gain = ENDIAN_HANDLE_LONG(pElem->radioCal.tuneDrpwRxIf2Gain);
+ pElem->radioCal.tuneDrpwRxTxLpf = ENDIAN_HANDLE_LONG(pElem->radioCal.tuneDrpwRxTxLpf);
+ pElem->radioCal.tuneDrpwTaCal = ENDIAN_HANDLE_LONG(pElem->radioCal.tuneDrpwTaCal);
+ pElem->radioCal.tuneDrpwTxMixFreqFail = ENDIAN_HANDLE_LONG(pElem->radioCal.tuneDrpwTxMixFreqFail);
+ pElem->radioCal.tuneRxAnaDcFail = ENDIAN_HANDLE_LONG(pElem->radioCal.tuneRxAnaDcFail);
+ pElem->radioCal.tuneRxIqMmFail = ENDIAN_HANDLE_LONG(pElem->radioCal.tuneRxIqMmFail);
+ pElem->radioCal.tuneTxClpcFail = ENDIAN_HANDLE_LONG(pElem->radioCal.tuneTxClpcFail);
+ pElem->radioCal.tuneTxIqMmFail = ENDIAN_HANDLE_LONG(pElem->radioCal.tuneTxIqMmFail);
+ pElem->radioCal.tuneTxLOLeakFail = ENDIAN_HANDLE_LONG(pElem->radioCal.tuneTxLOLeakFail);
+ pElem->radioCal.tuneTxPdetFail = ENDIAN_HANDLE_LONG(pElem->radioCal.tuneTxPdetFail);
+ pElem->radioCal.tuneTxPPAFail = ENDIAN_HANDLE_LONG(pElem->radioCal.tuneTxPPAFail);
+
+
+ /*
+ * Print FW statistics
+ * ===================
+ */
+
+ /* Ring */
+ WLAN_OS_REPORT(("------ Ring statistics -------------------\n"));
+ WLAN_OS_REPORT(("numOfTxProcs = %d\n", pElem->ringStat.numOfTxProcs));
+ WLAN_OS_REPORT(("numOfPreparedDescs = %d\n", pElem->ringStat.numOfPreparedDescs));
+ WLAN_OS_REPORT(("numOfTxXfr = %d\n", pElem->ringStat.numOfTxXfr));
+ WLAN_OS_REPORT(("numOfTxDma = %d\n", pElem->ringStat.numOfTxDma));
+ WLAN_OS_REPORT(("numOfTxCmplt = %d\n", pElem->ringStat.numOfTxCmplt));
+ WLAN_OS_REPORT(("numOfRxProcs = %d\n", pElem->ringStat.numOfRxProcs));
+ WLAN_OS_REPORT(("numOfRxData = %d\n", pElem->ringStat.numOfRxData));
+
+ /* Debug */
+ WLAN_OS_REPORT(("------ Debug statistics -------------------\n"));
+ WLAN_OS_REPORT(("debug1 = %d\n", pElem->debug.debug1));
+ WLAN_OS_REPORT(("debug2 = %d\n", pElem->debug.debug2));
+ WLAN_OS_REPORT(("debug3 = %d\n", pElem->debug.debug3));
+ WLAN_OS_REPORT(("debug4 = %d\n", pElem->debug.debug4));
+ WLAN_OS_REPORT(("debug5 = %d\n", pElem->debug.debug5));
+ WLAN_OS_REPORT(("debug6 = %d\n", pElem->debug.debug6));
+
+ /* Isr */
+ WLAN_OS_REPORT(("------ Isr statistics -------------------\n"));
+ WLAN_OS_REPORT(("IRQs = %d\n", pElem->isr.IRQs));
+
+ /* Rx */
+ WLAN_OS_REPORT(("------ Rx statistics -------------------\n"));
+ WLAN_OS_REPORT(("RxOutOfMem = %d\n", pElem->rx.RxOutOfMem ));
+ WLAN_OS_REPORT(("RxHdrOverflow = %d\n", pElem->rx.RxHdrOverflow ));
+ WLAN_OS_REPORT(("RxHWStuck = %d\n", pElem->rx.RxHWStuck ));
+ WLAN_OS_REPORT(("RxDroppedFrame = %d\n", pElem->rx.RxDroppedFrame ));
+ WLAN_OS_REPORT(("RxCompleteDroppedFrame = %d\n", pElem->rx.RxCompleteDroppedFrame));
+ WLAN_OS_REPORT(("RxAllocFrame = %d\n", pElem->rx.RxAllocFrame ));
+ WLAN_OS_REPORT(("RxDoneQueue = %d\n", pElem->rx.RxDoneQueue ));
+ WLAN_OS_REPORT(("RxDone = %d\n", pElem->rx.RxDone ));
+ WLAN_OS_REPORT(("RxDefrag = %d\n", pElem->rx.RxDefrag ));
+ WLAN_OS_REPORT(("RxDefragEnd = %d\n", pElem->rx.RxDefragEnd ));
+ WLAN_OS_REPORT(("RxMic = %d\n", pElem->rx.RxMic ));
+ WLAN_OS_REPORT(("RxMicEnd = %d\n", pElem->rx.RxMicEnd ));
+ WLAN_OS_REPORT(("RxXfr = %d\n", pElem->rx.RxXfr ));
+ WLAN_OS_REPORT(("RxXfrEnd = %d\n", pElem->rx.RxXfrEnd ));
+ WLAN_OS_REPORT(("RxCmplt = %d\n", pElem->rx.RxCmplt ));
+ WLAN_OS_REPORT(("RxPreCmplt = %d\n", pElem->rx.RxPreCmplt ));
+ WLAN_OS_REPORT(("RxCmpltTask = %d\n", pElem->rx.RxCmpltTask ));
+ WLAN_OS_REPORT(("RxPhyHdr = %d\n", pElem->rx.RxPhyHdr ));
+ WLAN_OS_REPORT(("RxTimeout = %d\n", pElem->rx.RxTimeout ));
+
+ WLAN_OS_REPORT(("------ RxFilters statistics --------------\n"));
+ WLAN_OS_REPORT(("arpFilter = %d\n", pElem->rxFilter.arpFilter));
+ WLAN_OS_REPORT(("beaconFilter = %d\n", pElem->rxFilter.beaconFilter));
+ WLAN_OS_REPORT(("dataFilter = %d\n", pElem->rxFilter.dataFilter));
+ WLAN_OS_REPORT(("dupFilter = %d\n", pElem->rxFilter.dupFilter));
+ WLAN_OS_REPORT(("MCFilter = %d\n", pElem->rxFilter.MCFilter));
+ WLAN_OS_REPORT(("ibssFilter = %d\n", pElem->rxFilter.ibssFilter));
+
+ /* Tx */
+ WLAN_OS_REPORT(("------ Tx statistics -------------------\n"));
+ WLAN_OS_REPORT(("numOfTxTemplatePrepared = %d\n", pElem->tx.numOfTxTemplatePrepared));
+ WLAN_OS_REPORT(("numOfTxDataPrepared = %d\n", pElem->tx.numOfTxDataPrepared));
+ WLAN_OS_REPORT(("numOfTxTemplateProgrammed = %d\n", pElem->tx.numOfTxTemplateProgrammed));
+ WLAN_OS_REPORT(("numOfTxDataProgrammed = %d\n", pElem->tx.numOfTxDataProgrammed));
+ WLAN_OS_REPORT(("numOfTxBurstProgrammed = %d\n", pElem->tx.numOfTxBurstProgrammed));
+ WLAN_OS_REPORT(("numOfTxStarts = %d\n", pElem->tx.numOfTxStarts));
+ WLAN_OS_REPORT(("numOfTxImmResp = %d\n", pElem->tx.numOfTxImmResp));
+ WLAN_OS_REPORT(("numOfTxStartTempaltes = %d\n", pElem->tx.numOfTxStartTempaltes));
+ WLAN_OS_REPORT(("numOfTxStartIntTemplate = %d\n", pElem->tx.numOfTxStartIntTemplate));
+ WLAN_OS_REPORT(("numOfTxStartFwGen = %d\n", pElem->tx.numOfTxStartFwGen));
+ WLAN_OS_REPORT(("numOfTxStartData = %d\n", pElem->tx.numOfTxStartData));
+ WLAN_OS_REPORT(("numOfTxStartNullFrame = %d\n", pElem->tx.numOfTxStartNullFrame));
+ WLAN_OS_REPORT(("numOfTxExch = %d\n", pElem->tx.numOfTxExch));
+ WLAN_OS_REPORT(("numOfTxRetryTemplate = %d\n", pElem->tx.numOfTxRetryTemplate));
+ WLAN_OS_REPORT(("numOfTxRetryData = %d\n", pElem->tx.numOfTxRetryData));
+ WLAN_OS_REPORT(("numOfTxExchPending = %d\n", pElem->tx.numOfTxExchPending));
+ WLAN_OS_REPORT(("numOfTxExchExpiry = %d\n", pElem->tx.numOfTxExchExpiry));
+ WLAN_OS_REPORT(("numOfTxExchMismatch = %d\n", pElem->tx.numOfTxExchMismatch));
+ WLAN_OS_REPORT(("numOfTxDoneTemplate = %d\n", pElem->tx.numOfTxDoneTemplate));
+ WLAN_OS_REPORT(("numOfTxDoneData = %d\n", pElem->tx.numOfTxDoneData));
+ WLAN_OS_REPORT(("numOfTxDoneIntTemplate = %d\n", pElem->tx.numOfTxDoneIntTemplate));
+ WLAN_OS_REPORT(("numOfTxPreXfr = %d\n", pElem->tx.numOfTxPreXfr));
+ WLAN_OS_REPORT(("numOfTxXfr = %d\n", pElem->tx.numOfTxXfr));
+ WLAN_OS_REPORT(("numOfTxXfrOutOfMem = %d\n", pElem->tx.numOfTxXfrOutOfMem));
+ WLAN_OS_REPORT(("numOfTxDmaProgrammed = %d\n", pElem->tx.numOfTxDmaProgrammed));
+ WLAN_OS_REPORT(("numOfTxDmaDone = %d\n", pElem->tx.numOfTxDmaDone));
+
+ /* Dma */
+ WLAN_OS_REPORT(("------ Dma statistics -------------------\n"));
+ WLAN_OS_REPORT(("RxDMAErrors = %d\n", pElem->dma.RxDMAErrors));
+ WLAN_OS_REPORT(("TxDMAErrors = %d\n", pElem->dma.TxDMAErrors));
+
+ /* Wep */
+ WLAN_OS_REPORT(("------ Wep statistics -------------------\n"));
+ WLAN_OS_REPORT(("WepAddrKeyCount = %d\n", pElem->wep.WepAddrKeyCount));
+ WLAN_OS_REPORT(("WepDefaultKeyCount= %d\n", pElem->wep.WepDefaultKeyCount));
+ WLAN_OS_REPORT(("WepKeyNotFound = %d\n", pElem->wep.WepKeyNotFound));
+ WLAN_OS_REPORT(("WepDecryptFail = %d\n", pElem->wep.WepDecryptFail));
+
+ /* AES */
+ WLAN_OS_REPORT(("------------ AES Statistics --------------\n"));
+ WLAN_OS_REPORT(("AesEncryptFail = %d\n", pElem->aes.AesEncryptFail));
+ WLAN_OS_REPORT(("AesDecryptFail = %d\n", pElem->aes.AesDecryptFail));
+ WLAN_OS_REPORT(("AesEncryptPackets = %d\n", pElem->aes.AesEncryptPackets));
+ WLAN_OS_REPORT(("AesDecryptPackets = %d\n", pElem->aes.AesDecryptPackets));
+ WLAN_OS_REPORT(("AesEncryptInterrupt = %d\n", pElem->aes.AesEncryptInterrupt));
+ WLAN_OS_REPORT(("AesDecryptInterrupt = %d\n", pElem->aes.AesDecryptInterrupt));
+
+ /* Events */
+ WLAN_OS_REPORT(("------ Events -------------------\n"));
+ WLAN_OS_REPORT(("Calibration = %d\n", pElem->event.calibration));
+ WLAN_OS_REPORT(("rxMismatch = %d\n", pElem->event.rxMismatch));
+ WLAN_OS_REPORT(("rxMemEmpty = %d\n", pElem->event.rxMemEmpty));
+
+ /* PsPoll/Upsd */
+ WLAN_OS_REPORT(("----------- PsPoll / Upsd -----------\n"));
+ WLAN_OS_REPORT(("psPollTimeOuts = %d\n",pElem->ps.psPollTimeOuts));
+ WLAN_OS_REPORT(("upsdTimeOuts = %d\n",pElem->ps.upsdTimeOuts));
+ WLAN_OS_REPORT(("upsdMaxAPturn = %d\n",pElem->ps.upsdMaxAPturn));
+ WLAN_OS_REPORT(("psPollMaxAPturn = %d\n",pElem->ps.psPollMaxAPturn));
+ WLAN_OS_REPORT(("psPollUtilization = %d\n",pElem->ps.psPollUtilization));
+ WLAN_OS_REPORT(("upsdUtilization = %d\n",pElem->ps.upsdUtilization));
+
+
+
+ /* Calibration */
+ WLAN_OS_REPORT(("----------- Calibrations -------------\n"));
+ WLAN_OS_REPORT(("calStateFail = %d\n", pElem->radioCal.calStateFail));
+ WLAN_OS_REPORT(("initCalTotal = %d\n", pElem->radioCal.initCalTotal));
+ WLAN_OS_REPORT(("initRadioBandsFail = %d\n", pElem->radioCal.initRadioBandsFail));
+ WLAN_OS_REPORT(("initRxIqMmFail = %d\n", pElem->radioCal.initRxIqMmFail));
+ WLAN_OS_REPORT(("initSetParams = %d\n", pElem->radioCal.initSetParams));
+ WLAN_OS_REPORT(("initTxClpcFail = %d\n", pElem->radioCal.initTxClpcFail));
+ WLAN_OS_REPORT(("tuneCalTotal = %d\n", pElem->radioCal.tuneCalTotal));
+ WLAN_OS_REPORT(("tuneDrpwChanTune = %d\n", pElem->radioCal.tuneDrpwChanTune));
+ WLAN_OS_REPORT(("tuneDrpwLnaTank = %d\n", pElem->radioCal.tuneDrpwLnaTank));
+ WLAN_OS_REPORT(("tuneDrpwPdBufFail = %d\n", pElem->radioCal.tuneDrpwPdBufFail));
+ WLAN_OS_REPORT(("tuneDrpwRTrimFail = %d\n", pElem->radioCal.tuneDrpwRTrimFail));
+ WLAN_OS_REPORT(("tuneDrpwRxDac = %d\n", pElem->radioCal.tuneDrpwRxDac));
+ WLAN_OS_REPORT(("tuneDrpwRxIf2Gain = %d\n", pElem->radioCal.tuneDrpwRxIf2Gain));
+ WLAN_OS_REPORT(("tuneDrpwRxTxLpf = %d\n", pElem->radioCal.tuneDrpwRxTxLpf));
+ WLAN_OS_REPORT(("tuneDrpwTaCal = %d\n", pElem->radioCal.tuneDrpwTaCal));
+ WLAN_OS_REPORT(("tuneDrpwTxMixFreqFail = %d\n", pElem->radioCal.tuneDrpwTxMixFreqFail));
+ WLAN_OS_REPORT(("tuneRxAnaDcFail = %d\n", pElem->radioCal.tuneRxAnaDcFail));
+ WLAN_OS_REPORT(("tuneRxIqMmFail = %d\n", pElem->radioCal.tuneRxIqMmFail));
+ WLAN_OS_REPORT(("tuneTxClpcFail = %d\n", pElem->radioCal.tuneTxClpcFail));
+ WLAN_OS_REPORT(("tuneTxIqMmFail = %d\n", pElem->radioCal.tuneTxIqMmFail));
+ WLAN_OS_REPORT(("tuneTxLOLeakFail = %d\n", pElem->radioCal.tuneTxLOLeakFail));
+ WLAN_OS_REPORT(("tuneTxPdetFail = %d\n", pElem->radioCal.tuneTxPdetFail));
+ WLAN_OS_REPORT(("tuneTxPPAFail = %d\n", pElem->radioCal.tuneTxPPAFail));
+
+
+
+ /* Power Save Counters */
+ WLAN_OS_REPORT(("------ Power management ----------\n"));
+ if(pElem->pwr.RcvdBeaconsCnt != 0)
+ {
+ WLAN_OS_REPORT(("MissingBcnsCnt = %d (percentage <= %d) \n",
+ pElem->pwr.MissingBcnsCnt,
+ ((pElem->pwr.MissingBcnsCnt * 100) / (pElem->pwr.RcvdBeaconsCnt + pElem->pwr.MissingBcnsCnt)) ));
+ }
+ else
+ {
+ WLAN_OS_REPORT(("MissingBcnsCnt = %d (percentage = 0) \n", pElem->pwr.MissingBcnsCnt));
+ }
+ WLAN_OS_REPORT(("RcvdBeaconsCnt = %d\n", pElem->pwr.RcvdBeaconsCnt));
+ WLAN_OS_REPORT(("ConnectionOutOfSync = %d\n\n", pElem->pwr.ConnectionOutOfSync));
+ WLAN_OS_REPORT(("Single Missed Beacon = %d\n", (pElem->pwr.ContMissBcnsSpread[0] & 0xFFFF)));
+ WLAN_OS_REPORT(("2 Continuous Missed Beacons = %d\n", (pElem->pwr.ContMissBcnsSpread[1] & 0xFFFF)));
+ WLAN_OS_REPORT(("3 Continuous Missed Beacons = %d\n", (pElem->pwr.ContMissBcnsSpread[2] & 0xFFFF)));
+ WLAN_OS_REPORT(("4 Continuous Missed Beacons = %d\n", (pElem->pwr.ContMissBcnsSpread[3] & 0xFFFF)));
+ WLAN_OS_REPORT(("5 Continuous Missed Beacons = %d\n", (pElem->pwr.ContMissBcnsSpread[4] & 0xFFFF)));
+ WLAN_OS_REPORT(("6 Continuous Missed Beacons = %d\n", (pElem->pwr.ContMissBcnsSpread[5] & 0xFFFF)));
+ WLAN_OS_REPORT(("7 Continuous Missed Beacons = %d\n", (pElem->pwr.ContMissBcnsSpread[6] & 0xFFFF)));
+ WLAN_OS_REPORT(("8 Continuous Missed Beacons = %d\n", (pElem->pwr.ContMissBcnsSpread[7] & 0xFFFF)));
+ WLAN_OS_REPORT(("9 Continuous Missed Beacons = %d\n", (pElem->pwr.ContMissBcnsSpread[8] & 0xFFFF)));
+ WLAN_OS_REPORT((">=10 Continuous Missed Beacons = %d\n\n", (pElem->pwr.ContMissBcnsSpread[9] & 0xFFFF)));
+
+ WLAN_OS_REPORT(("RcvdAwakeBeaconsCnt = %d\n", pElem->pwr.RcvdAwakeBeaconsCnt));
+ WLAN_OS_REPORT(("Single Missed Beacon [Awake] = %d\n", (pElem->pwr.ContMissBcnsSpread[0] >> 16)));
+ WLAN_OS_REPORT(("2 Continuous Missed Beacons [Awake] = %d\n", (pElem->pwr.ContMissBcnsSpread[1] >> 16)));
+ WLAN_OS_REPORT(("3 Continuous Missed Beacons [Awake] = %d\n", (pElem->pwr.ContMissBcnsSpread[2] >> 16)));
+ WLAN_OS_REPORT(("4 Continuous Missed Beacons [Awake] = %d\n", (pElem->pwr.ContMissBcnsSpread[3] >> 16)));
+ WLAN_OS_REPORT(("5 Continuous Missed Beacons [Awake] = %d\n", (pElem->pwr.ContMissBcnsSpread[4] >> 16)));
+ WLAN_OS_REPORT(("6 Continuous Missed Beacons [Awake] = %d\n", (pElem->pwr.ContMissBcnsSpread[5] >> 16)));
+ WLAN_OS_REPORT(("7 Continuous Missed Beacons [Awake] = %d\n", (pElem->pwr.ContMissBcnsSpread[6] >> 16)));
+ WLAN_OS_REPORT(("8 Continuous Missed Beacons [Awake] = %d\n", (pElem->pwr.ContMissBcnsSpread[7] >> 16)));
+ WLAN_OS_REPORT(("9 Continuous Missed Beacons [Awake] = %d\n", (pElem->pwr.ContMissBcnsSpread[8] >> 16)));
+ WLAN_OS_REPORT((">=10 Continuous Missed Beacons [Awake] = %d\n", (pElem->pwr.ContMissBcnsSpread[9] >> 16)));
+
+ return TI_OK;
+}
+
+TI_STATUS TWD_Debug (TI_HANDLE hTWD, TI_UINT32 funcType, void *pParam)
+{
+ TTwd *pTWD = (TTwd *)hTWD;
+ TI_UINT32 GenericVal;
+ TFwDebugParams* pMemDebug = (TFwDebugParams*)pParam;
+
+ static TI_UINT32 GenericAddr;
+#ifdef REPORT_LOG
+ static int iStart[100]; /* Note: it is not used properly anyway */
+#endif
+ /* check paramemters validity */
+ if (pMemDebug == NULL)
+ {
+ WLAN_OS_REPORT(("TWD_Debug: Error - pParam is NULL\n"));
+ return TI_NOK;
+ }
+
+ switch (funcType)
+ {
+ case TWD_PRINT_SYS_INFO:
+ WLAN_OS_REPORT(("PLATFORM = TNETW125x\n"));
+ WLAN_OS_REPORT(("ACCESS MODE = SLAVE\n"));
+ break;
+
+ case TWD_SET_GENERIC_ADDR:
+ /* check paramemters validity */
+ if (pParam == NULL)
+ {
+ WLAN_OS_REPORT(("TWD_Debug, TWD_SET_GENERIC_ADDR Error: No Perameter received\n"));
+ return TI_NOK;
+ }
+ GenericAddr = *(TI_UINT32 *)pParam;
+ break;
+
+ case TWD_READ_MEM:
+ WLAN_OS_REPORT(("TWD_Debug, TWD_READ_MEM, Addr: 0x%X\n", pMemDebug->addr));
+
+ /* check paramemters validity */
+ if (pMemDebug == NULL)
+ {
+ WLAN_OS_REPORT(("TWD_Debug, TWD_READ_MEM Error: No Perameters received\n"));
+ return TI_NOK;
+ }
+
+ /* validate length */
+ *(TI_UINT32*)&pMemDebug->length = 4;
+
+ /* If Address in valid Memory area and there is enough space for Length to R/W */
+ if (TWD_isValidMemoryAddr(hTWD, pMemDebug) == TI_TRUE)
+ {
+ WLAN_OS_REPORT(("TWD_Debug, TWD_READ_MEM: Reading Valid memory Address\n"));
+
+ /* Init buf before reading */
+ os_memorySet(pTWD->hOs, (void*)pMemDebug->UBuf.buf8, 0, 4);
+ if ( TWD_readMem (hTWD, pMemDebug, NULL, NULL) != TI_OK )
+ {
+ WLAN_OS_REPORT(("TWD_Debug, read memory failed\n"));
+ return TI_NOK;
+ }
+ }
+
+ else if (TWD_isValidRegAddr(hTWD, pMemDebug) == TI_TRUE)
+ {
+ WLAN_OS_REPORT(("TWD_Debug, TWD_READ_MEM: Reading Valid register Address\n"));
+
+ /* Init buf before reading */
+ *(TI_UINT32*)&pMemDebug->UBuf.buf32 = 0;
+
+ if ( TWD_readMem (hTWD, pMemDebug, NULL, NULL) != TI_OK )
+ {
+ WLAN_OS_REPORT(("TWD_Debug, read register failed\n"));
+ return TI_NOK;
+ }
+
+ }
+
+ /* address Not in valid Area */
+ else
+ {
+ WLAN_OS_REPORT(("TWD_Debug, TWD_READ_MEM Address is not Valid\n"));
+ return TI_NOK;
+ }
+
+ /* print read memory */
+ {
+
+ WLAN_OS_REPORT(("Read from MEM Addr 0x%x the following values:\n", ((TFwDebugParams*)pMemDebug)->addr));
+
+ WLAN_OS_REPORT(("0x%X ",((TFwDebugParams*)pMemDebug)->UBuf.buf32[0]));
+ WLAN_OS_REPORT(("\n"));
+ }
+
+ break;
+
+ case TWD_WRITE_MEM:
+ WLAN_OS_REPORT(("TWD_Debug, TWD_WRITE_MEM, Addr: 0x%X\n", pMemDebug->addr));
+
+ /* check paramemters validity */
+ if (pMemDebug == NULL)
+ {
+ WLAN_OS_REPORT(("TWD_Debug, TWD_WRITE_MEM Error: No Perameters received\n"));
+ return TI_NOK;
+ }
+
+ /* validate length */
+ *(TI_UINT32*)&pMemDebug->length = 4;
+
+ /* If Address in valid Memory area and there is enough space for Length to R/W */
+ if (TWD_isValidMemoryAddr(hTWD, pMemDebug) == TI_TRUE)
+ {
+ WLAN_OS_REPORT(("TWD_Debug, TWD_WRITE_MEM: Writing Valid memory Address\n"));
+
+
+ return ( TWD_writeMem (hTWD, pMemDebug, NULL, NULL) );
+ }
+
+ else if (TWD_isValidRegAddr(hTWD, pMemDebug) == TI_TRUE)
+ {
+
+ WLAN_OS_REPORT(("TWD_Debug, TWD_WRITE_MEM: Writing Valid register Address\n"));
+
+ return ( TWD_writeMem (hTWD, pMemDebug, NULL, NULL) );
+ }
+ /* address Not in valid Area */
+
+ else
+ {
+ WLAN_OS_REPORT(("TWD_Debug, TWD_WRITE_MEM Address is not Valid\n"));
+ return TI_NOK;
+ }
+
+ break;
+
+ /* HAL Control functions */
+
+ case TWD_PRINT_MBOX_QUEUE_INFO:
+ cmdQueue_Print (pTWD->hCmdQueue);
+ break;
+
+ case TWD_PRINT_MBOX_PRINT_CMD:
+ /* check paramemters validity */
+ if (pParam == NULL)
+ {
+ WLAN_OS_REPORT(("TWD_Debug, TWD_PRINT_MBOX_PRINT_CMD Error: No Perameter received\n"));
+ return TI_NOK;
+ }
+ cmdQueue_PrintHistory (pTWD->hCmdQueue, *(int *)pParam);
+ break;
+
+ case TWD_PRINT_EVENT_MBOX_INFO:
+ eventMbox_Print (pTWD->hEventMbox);
+ break;
+
+ case TWD_PRINT_EVENT_MBOX_MASK:
+ /* check paramemters validity */
+ if (pParam == NULL)
+ {
+ WLAN_OS_REPORT(("TWD_Debug, TWD_PRINT_EVENT_MBOX_MASK Error: No Perameter received\n"));
+ return TI_NOK;
+ }
+ if ( eventMbox_MaskEvent (pTWD->hEventMbox, *(int *)pParam, NULL, NULL) == TI_NOK )
+ {
+ WLAN_OS_REPORT(("TWD_Debug, TWD_PRINT_EVENT_MBOX_MASK Error: eventMbox_EvMask failed\n"));
+ return(TI_NOK);
+ }
+ break;
+
+ case TWD_PRINT_EVENT_MBOX_UNMASK:
+ /* check paramemters validity */
+ if (pParam == NULL)
+ {
+ WLAN_OS_REPORT(("TWD_Debug, TWD_PRINT_EVENT_MBOX_UNMASK Error: No Perameter received\n"));
+ return TI_NOK;
+ }
+ if ( eventMbox_UnMaskEvent (pTWD->hEventMbox, *(int *)pParam, NULL, NULL) == TI_NOK )
+ {
+ WLAN_OS_REPORT(("TWD_Debug, TWD_PRINT_EVENT_MBOX_UNMASK Error: eventMbox_EvUnMask failed\n"));
+ return(TI_NOK);
+ }
+ break;
+
+ case TWD_PRINT_ISTART:
+ {
+ int i;
+ for (i=0; i<20; i+=4)
+ {
+ WLAN_OS_REPORT(("%4d: %08d %08d %08d %08d\n",
+ i, iStart[i+0], iStart[i+1], iStart[i+2], iStart[i+3]));
+ }
+ }
+ break;
+
+ case TWD_PRINT_LIST_REGS_THROG_MBOX:
+ {
+ int i;
+ TI_UINT32 RegAddr;
+
+ RegAddr = *(TI_UINT32 *)pParam;
+ WLAN_OS_REPORT (("PrintListRegsThroughMbox ---------------------\n"));
+
+ for (i = 0; i < 8; i++, RegAddr += 16)
+ {
+ TWD_PrintMemRegs (hTWD, RegAddr + 0, 4, TNETW_MAC_REGISTERS);
+ TWD_PrintMemRegs (hTWD, RegAddr + 4, 4, TNETW_MAC_REGISTERS);
+ TWD_PrintMemRegs (hTWD, RegAddr + 8, 4, TNETW_MAC_REGISTERS);
+ TWD_PrintMemRegs (hTWD, RegAddr + 12, 4, TNETW_MAC_REGISTERS);
+ }
+ }
+ break;
+
+ case TWD_PRINT_LIST_MEM_THROG_MBOX:
+ /* check paramemters validity */
+ if (pParam == NULL)
+ {
+ WLAN_OS_REPORT(("TWD_Debug, TWD_PRINT_LIST_MEM_THROG_MBOX Error: No Perameter received\n"));
+ return TI_NOK;
+ }
+ TWD_PrintMemRegs (hTWD, *(TI_UINT32*)pParam, 256, TNETW_INTERNAL_RAM);
+ break;
+
+ case TWD_SET_MAC_CLOCK:
+ /* check paramemters validity */
+ if (pParam == NULL)
+ {
+ WLAN_OS_REPORT(("TWD_Debug, TWD_SET_MAC_CLOCK Error: No Perameter received\n"));
+ return TI_NOK;
+ }
+
+ GenericVal = *(TI_UINT32*)pParam;
+ TWD_CfgMacClock (hTWD, GenericVal);
+ break;
+
+#if defined(TNETW1150)
+ case TWD_SET_ARM_CLOCK:
+ /* check paramemters validity */
+ if (pParam == NULL)
+ {
+ WLAN_OS_REPORT(("TWD_Debug, TWD_SET_ARM_CLOCK Error: No Perameter received\n"));
+ return TI_NOK;
+ }
+
+ GenericVal = *(TI_UINT32*)pParam;
+ TWD_ArmClockSet (hTWD, GenericVal);
+ break;
+#endif
+
+ /*
+ * Rx functions
+ */
+#ifdef TI_DBG
+ case TWD_PRINT_RX_INFO:
+ rxXfer_PrintStats (pTWD->hRxXfer);
+ break;
+
+ case TWD_CLEAR_RX_INFO:
+ rxXfer_ClearStats (pTWD->hRxXfer);
+ break;
+
+#endif /* TI_DBG */
+
+ /*
+ * Acx functions
+ */
+ case TWD_PRINT_ACX_MAP:
+ TWD_PrintMemoryMap (hTWD);
+ break;
+
+ case TWD_PRINT_ACX_STAT:
+ TWD_ItrStatistics (hTWD, (void*)TWD_StatisticsReadCB, hTWD, (void *)&pTWD->acxStatistic);
+ break;
+
+ /*
+ * General functions
+ */
+ case TWD_PRINT_HELP:
+
+ WLAN_OS_REPORT(("Registers: \n"));
+ WLAN_OS_REPORT((" %02d - TWD_PRINT_SYS_INFO \n\n", TWD_PRINT_SYS_INFO));
+ WLAN_OS_REPORT((" %02d - TWD_SET_GENERIC_ADDR \n", TWD_SET_GENERIC_ADDR));
+ WLAN_OS_REPORT((" %02d - TWD_READ_REG_OR_4_BYTES_MEM <addr (reg base=0x300000, mem base=0x40000)>\n", TWD_READ_MEM));
+ WLAN_OS_REPORT((" %02d - TWD_WRITE_REG_OR_4_BYTES_MEM <addr (reg base=0x300000, mem base=0x40000)> <val (chars<=4)>\n", TWD_WRITE_MEM));
+
+ WLAN_OS_REPORT(("Control: \n"));
+ WLAN_OS_REPORT((" %02d - TWD_PRINT_MBOX_QUEUE_INFO \n",TWD_PRINT_MBOX_QUEUE_INFO));
+ WLAN_OS_REPORT((" %02d - TWD_PRINT_MBOX_QUEUE_PRINT_CMD \n",TWD_PRINT_MBOX_PRINT_CMD));
+ WLAN_OS_REPORT((" %02d - TWD_MAILBOX_HISTORY_PRINT \n", TWD_MAILBOX_HISTORY_PRINT));
+ WLAN_OS_REPORT((" %02d - TWD_MAC_REG \n", TWD_MAC_REG));
+ WLAN_OS_REPORT((" %02d - TWD_SET_ARM_CLOCK \n", TWD_SET_ARM_CLOCK));
+ WLAN_OS_REPORT((" %02d - TWD_SET_MAC_CLOCK \n", TWD_SET_MAC_CLOCK));
+
+ WLAN_OS_REPORT(("Rx: \n"));
+ WLAN_OS_REPORT((" %02d - TWD_PRINT_RX_INFO \n", TWD_PRINT_RX_INFO));
+ WLAN_OS_REPORT((" %02d - TWD_CLEAR_RX_INFO \n", TWD_CLEAR_RX_INFO));
+
+ WLAN_OS_REPORT(("ACX: \n"));
+ WLAN_OS_REPORT((" %02d - TWD_PRINT_ACX_MAP \n", TWD_PRINT_ACX_MAP));
+ WLAN_OS_REPORT((" %02d - TWD_PRINT_ACX_STAT \n", TWD_PRINT_ACX_STAT));
+
+ WLAN_OS_REPORT(("General: \n"));
+ WLAN_OS_REPORT((" %02d - TWD_PRINT_LIST_REGS_THROG_MBOX \n", TWD_PRINT_LIST_REGS_THROG_MBOX));
+ WLAN_OS_REPORT((" %02d - TWD_PRINT_LIST_MEM_THROG_MBOX \n", TWD_PRINT_LIST_MEM_THROG_MBOX));
+
+ WLAN_OS_REPORT(("Recovery: \n"));
+ WLAN_OS_REPORT((" %02d - TWD_CHECK_HW \n", TWD_CHECK_HW));
+ WLAN_OS_REPORT((" %02d - TWD_PRINT_HW_STATUS \n", TWD_PRINT_HW_STATUS));
+
+ WLAN_OS_REPORT(("Event Mail Box: \n"));
+ WLAN_OS_REPORT((" %02d - PRINT EVENT MBOX INFO \n", TWD_PRINT_EVENT_MBOX_INFO));
+ WLAN_OS_REPORT((" %02d - PRINT EVENT MBOX MASK \n", TWD_PRINT_EVENT_MBOX_MASK));
+ WLAN_OS_REPORT((" %02d - PRINT EVENT MBOX UNMASK \n",TWD_PRINT_EVENT_MBOX_UNMASK));
+
+ WLAN_OS_REPORT(("Other: \n"));
+ WLAN_OS_REPORT((" %02d - TWD_PRINT_FW_EVENT_INFO \n", TWD_PRINT_FW_EVENT_INFO));
+ WLAN_OS_REPORT((" %02d - TWD_PRINT_TW_IF_INFO \n", TWD_PRINT_TW_IF_INFO));
+ WLAN_OS_REPORT((" %02d - TWD_PRINT_MBOX_INFO \n", TWD_PRINT_MBOX_INFO));
+ WLAN_OS_REPORT((" %02d - TWD_FORCE_TEMPLATES_RATES \n", TWD_FORCE_TEMPLATES_RATES));
+ break;
+
+ case TWD_PRINT_FW_EVENT_INFO:
+ fwEvent_PrintStat(pTWD->hFwEvent);
+ break;
+ case TWD_PRINT_TW_IF_INFO:
+ twIf_PrintQueues(pTWD->hTwIf);
+ break;
+ case TWD_PRINT_MBOX_INFO:
+ cmdMbox_PrintInfo(pTWD->hCmdMbox);
+ break;
+
+ /*
+ * Recovery functions
+ */
+ case TWD_CHECK_HW:
+ {
+ int Stt;
+
+ Stt = TWD_CmdHealthCheck (hTWD);
+ WLAN_OS_REPORT(("CheckHwStatus=%d \n", Stt));
+ }
+ break;
+
+ case TWD_MAILBOX_HISTORY_PRINT:
+ WLAN_OS_REPORT (("PrintMailBoxHistory called \n"));
+#ifdef TI_DBG
+ /* check paramemters validity */
+ if (pParam == NULL)
+ {
+ WLAN_OS_REPORT(("TWD_Debug, TWD_MAILBOX_HISTORY_PRINT Error: No Perameter received\n"));
+ return TI_NOK;
+ }
+
+ cmdQueue_PrintHistory (pTWD->hCmdQueue, *(int *)pParam);
+#endif
+ break;
+
+ case TWD_FORCE_TEMPLATES_RATES:
+ if (pParam == NULL)
+ {
+ WLAN_OS_REPORT(("TWD_Debug, TWD_FORCE_TEMPLATES_RATES Error: No Perameter received\n"));
+ return TI_NOK;
+ }
+ cmdBld_DbgForceTemplatesRates (pTWD->hCmdBld, *(TI_UINT32 *)pParam);
+ break;
+
+
+ default:
+ WLAN_OS_REPORT (("Invalid function type=%d\n\n", funcType));
+ break;
+
+ } /* switch (funcType) */
+
+ return TI_OK;
+}
+
diff --git a/wilink_6_1/Test/TwIfDebug.c b/wilink_6_1/Test/TwIfDebug.c
new file mode 100644
index 0000000..057dcfb
--- /dev/null
+++ b/wilink_6_1/Test/TwIfDebug.c
@@ -0,0 +1,107 @@
+/*
+ * TwIfDebug.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 TwIfDebug.c
+ * \brief TwIf debug commands
+ *
+ * TwIf debug commands
+ *
+ * \see TwIf.c, TwIf.h
+ */
+
+#include "tidef.h"
+#include "report.h"
+#include "TwIf.h"
+#include "TwIfDebug.h"
+#include "TWDriverInternal.h"
+
+
+static void printTwIfDbgFunctions (void);
+
+
+/**
+ * \fn twifDebugFunction
+ * \brief Main TwIf debug function
+ *
+ * Main TwIf debug function
+ *
+ * \param hTwIf - handle to the TWIF object
+ * \param uFuncType - the specific debug function
+ * \param pParam - parameters for the debug function
+ * \return None
+ */
+void twifDebugFunction (TI_HANDLE hTWD, TI_UINT32 uFuncType, void *pParam)
+{
+ TTwd *pTWD = (TTwd *)hTWD;
+ TI_HANDLE hTwIf = pTWD->hTwIf;
+
+ switch (uFuncType)
+ {
+ case DBG_TWIF_PRINT_HELP:
+ printTwIfDbgFunctions();
+ break;
+
+ case DBG_TWIF_PRINT_INFO:
+ twIf_PrintModuleInfo (hTwIf);
+ break;
+
+ default:
+ WLAN_OS_REPORT(("Invalid function type in TWIF debug function: %d\n", uFuncType));
+ break;
+ }
+}
+
+
+/**
+ * \fn printTwIfDbgFunctions
+ * \brief Print the TwIf debug menu
+ *
+ * Print the TwIf debug menu
+ *
+ * \return None
+ */
+static void printTwIfDbgFunctions (void)
+{
+ WLAN_OS_REPORT((" TwIf Debug Functions \n"));
+ WLAN_OS_REPORT(("--------------------------\n"));
+ WLAN_OS_REPORT(("2300 - Print the TwIf Debug Help\n"));
+ WLAN_OS_REPORT(("2301 - Print the TwIf Information\n"));
+}
+
+
+
+
+
+
+
diff --git a/wilink_6_1/Test/TwIfDebug.h b/wilink_6_1/Test/TwIfDebug.h
new file mode 100644
index 0000000..260880f
--- /dev/null
+++ b/wilink_6_1/Test/TwIfDebug.h
@@ -0,0 +1,67 @@
+/*
+ * TwIfDebug.h
+ *
+ * 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 TwIfDebug.h
+ * \brief TwIf testing module API definitions
+ *
+ * \see TwIf.c, TwIf.h
+ */
+
+
+#ifndef __TWIF_DBG_H__
+#define __TWIF_DBG_H__
+
+
+/************************************************************************
+ * Defines
+ ************************************************************************/
+/* debug functions */
+#define DBG_TWIF_PRINT_HELP 0
+#define DBG_TWIF_PRINT_INFO 1
+
+
+/************************************************************************
+ * Types
+ ************************************************************************/
+
+
+/************************************************************************
+ * Functions
+ ************************************************************************/
+void twifDebugFunction (TI_HANDLE hTWD, TI_UINT32 uFuncType, void *pParam);
+
+
+
+#endif /* __TWIF_DBG_H__ */
+
diff --git a/wilink_6_1/Test/TxDbg.c b/wilink_6_1/Test/TxDbg.c
new file mode 100644
index 0000000..66546d7
--- /dev/null
+++ b/wilink_6_1/Test/TxDbg.c
@@ -0,0 +1,208 @@
+/*
+ * TxDbg.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.
+ */
+
+
+/***************************************************************************/
+/* */
+/* MODULE: */
+/* PURPOSE: */
+/* */
+/***************************************************************************/
+#include "tidef.h"
+#include "DataCtrl_Api.h"
+#include "dataCtrlDbg.h"
+#include "osApi.h"
+#include "report.h"
+#include "siteMgrApi.h"
+#include "TWDriver.h"
+#include "txCtrl.h"
+
+void printTxRxDbgFunctions(void);
+
+
+
+/*************************************************************************
+ * rxTxDebugFunction *
+ *************************************************************************
+DESCRIPTION: Call the requested Tx or Rx debug print function.
+************************************************************************/
+
+void rxTxDebugFunction(TI_HANDLE hRxTxHandle, TI_UINT32 funcType, void *pParam)
+{
+ txCtrl_t *pTxCtrl = (txCtrl_t *)hRxTxHandle; /* Relevant only for some of the cases below! */
+
+ switch ((ERxTxDbgFunc)funcType)
+ {
+ case TX_RX_DBG_FUNCTIONS:
+ printTxRxDbgFunctions();
+ break;
+
+ /*
+ * TX DEBUG FUNCTIONS:
+ * ===================
+ */
+ case PRINT_TX_CTRL_INFO:
+ txCtrlParams_printInfo (hRxTxHandle);
+ break;
+
+ case PRINT_TX_CTRL_COUNTERS:
+ txCtrlParams_printDebugCounters (hRxTxHandle);
+ break;
+
+ case PRINT_TX_DATA_QUEUE_INFO:
+ txDataQ_PrintModuleParams (pTxCtrl->hTxDataQ);
+ break;
+
+ case PRINT_TX_DATA_QUEUE_COUNTERS:
+ txDataQ_PrintQueueStatistics (pTxCtrl->hTxDataQ);
+ break;
+
+ case PRINT_TX_MGMT_QUEUE_INFO:
+ txMgmtQ_PrintModuleParams (pTxCtrl->hTxMgmtQ);
+ break;
+
+ case PRINT_TX_MGMT_QUEUE_COUNTERS:
+ txMgmtQ_PrintQueueStatistics (pTxCtrl->hTxMgmtQ);
+ break;
+
+ case PRINT_TX_CTRL_BLK_INFO:
+ TWD_PrintTxInfo (pTxCtrl->hTWD, TWD_PRINT_TX_CTRL_BLK_TBL);
+ break;
+
+ case PRINT_TX_HW_QUEUE_INFO:
+ TWD_PrintTxInfo (pTxCtrl->hTWD, TWD_PRINT_TX_HW_QUEUE_INFO);
+ break;
+
+ case PRINT_TX_XFER_INFO:
+ TWD_PrintTxInfo (pTxCtrl->hTWD, TWD_PRINT_TX_XFER_INFO);
+ break;
+
+ case PRINT_TX_RESULT_INFO:
+ TWD_PrintTxInfo (pTxCtrl->hTWD, TWD_PRINT_TX_RESULT_INFO);
+ break;
+
+ case PRINT_TX_DATA_CLSFR_TABLE:
+ txDataClsfr_PrintClsfrTable (pTxCtrl->hTxDataQ);
+ break;
+
+
+ case RESET_TX_CTRL_COUNTERS:
+ txCtrlParams_resetDbgCounters (hRxTxHandle);
+ break;
+
+ case RESET_TX_DATA_QUEUE_COUNTERS:
+ txDataQ_ResetQueueStatistics (pTxCtrl->hTxDataQ);
+ break;
+
+ case RESET_TX_DATA_CLSFR_TABLE:
+ {
+ EClsfrType myLocalType;
+
+ /* Setting again the current classifier type clears the table */
+ txDataClsfr_GetClsfrType (pTxCtrl->hTxDataQ, &myLocalType);
+ txDataClsfr_SetClsfrType (pTxCtrl->hTxDataQ, myLocalType);
+ }
+ break;
+
+ case RESET_TX_MGMT_QUEUE_COUNTERS:
+ txMgmtQ_ResetQueueStatistics (pTxCtrl->hTxMgmtQ);
+ break;
+
+
+ /*
+ * RX DEBUG FUNCTIONS:
+ * ===================
+ */
+ case PRINT_RX_BLOCK:
+ WLAN_OS_REPORT(("RX DBG - Print Rx Block \n\n"));
+ rxData_printRxBlock(hRxTxHandle);
+ break;
+
+ case PRINT_RX_COUNTERS:
+ WLAN_OS_REPORT(("RX DBG - Print Rx counters \n\n"));
+ rxData_printRxCounters(hRxTxHandle);
+ break;
+
+ case RESET_RX_COUNTERS:
+ WLAN_OS_REPORT(("RX DBG - Reset Rx counters \n\n"));
+ rxData_resetCounters(hRxTxHandle);
+ rxData_resetDbgCounters(hRxTxHandle);
+ break;
+
+ case PRINT_RX_THROUGHPUT_START:
+ rxData_startRxThroughputTimer (hRxTxHandle);
+ break;
+
+ case PRINT_RX_THROUGHPUT_STOP:
+ rxData_stopRxThroughputTimer (hRxTxHandle);
+ break;
+
+ default:
+ WLAN_OS_REPORT(("Invalid function type in Debug Tx Function Command: %d\n\n", funcType));
+ break;
+ }
+}
+
+
+void printTxRxDbgFunctions(void)
+{
+ WLAN_OS_REPORT(("\n Tx Dbg Functions \n"));
+ WLAN_OS_REPORT(("--------------------------------------\n"));
+
+ WLAN_OS_REPORT(("301 - Print TxCtrl info.\n"));
+ WLAN_OS_REPORT(("302 - Print TxCtrl Statistics.\n"));
+ WLAN_OS_REPORT(("303 - Print TxDataQueue info.\n"));
+ WLAN_OS_REPORT(("304 - Print TxDataQueue Statistics.\n"));
+ WLAN_OS_REPORT(("305 - Print TxMgmtQueue info.\n"));
+ WLAN_OS_REPORT(("306 - Print TxMgmtQueue Statistics.\n"));
+ WLAN_OS_REPORT(("307 - Print Tx control-block table.\n"));
+ WLAN_OS_REPORT(("308 - Print Tx HW queue info.\n"));
+ WLAN_OS_REPORT(("309 - Print Tx Xfer info.\n"));
+ WLAN_OS_REPORT(("310 - Print Tx result info.\n"));
+ WLAN_OS_REPORT(("311 - Print TxDataClsfr Classifier Table.\n"));
+
+ WLAN_OS_REPORT(("320 - Reset TxCtrl Statistics.\n"));
+ WLAN_OS_REPORT(("321 - Reset TxDataQueue Statistics.\n"));
+ WLAN_OS_REPORT(("322 - Reset TxDataClsfr Classifier Table.\n"));
+ WLAN_OS_REPORT(("323 - Reset TxMgmtQueue Statistics.\n"));
+
+ WLAN_OS_REPORT(("\n Rx Dbg Functions \n"));
+ WLAN_OS_REPORT(("--------------------------------------\n"));
+ WLAN_OS_REPORT(("350 - Print Rx block.\n"));
+ WLAN_OS_REPORT(("351 - Print Rx counters.\n"));
+ WLAN_OS_REPORT(("352 - Reset Rx counters.\n"));
+ WLAN_OS_REPORT(("353 - Start Rx throughput timer.\n"));
+ WLAN_OS_REPORT(("354 - Stop Rx throughput timer.\n"));
+}
+
+
diff --git a/wilink_6_1/Test/connDebug.c b/wilink_6_1/Test/connDebug.c
new file mode 100644
index 0000000..9136c4e
--- /dev/null
+++ b/wilink_6_1/Test/connDebug.c
@@ -0,0 +1,118 @@
+/*
+ * connDebug.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 reportReplvl.c
+ * \brief Report level implementation
+ *
+ * \see reportReplvl.h
+ */
+
+/***************************************************************************/
+/* */
+/* MODULE: reportReplvl.c */
+/* PURPOSE: Report level implementation */
+/* */
+/***************************************************************************/
+#include "tidef.h"
+#include "osApi.h"
+#include "paramOut.h"
+#include "connDebug.h"
+#include "conn.h"
+#include "connApi.h"
+#include "report.h"
+
+#ifdef REPORT_LOG
+void printConnDbgFunctions(void);
+#endif
+
+void connDebugSetParam(TI_HANDLE hConn, TI_UINT32 paramType, TI_UINT32 *value)
+{
+#ifdef REPORT_LOG
+ conn_t *pConn = (conn_t *)hConn;
+
+ switch (paramType)
+ {
+ default:
+ WLAN_OS_REPORT(("Invalid param type in Set Debug Connection command: %d, curr state %d\n\n", value, pConn->state));
+ break;
+ }
+#endif
+}
+
+void connDebugGetParam(TI_HANDLE hConn, TI_UINT32 paramType, TI_UINT32 *value)
+{
+#ifdef REPORT_LOG
+ conn_t *pConn = (conn_t *)hConn;
+
+ switch (paramType)
+ {
+ default:
+ WLAN_OS_REPORT(("Invalid param type in Get Debug Connection command: %d, curr state %d\n\n", value, pConn->state));
+ break;
+ }
+#endif
+}
+
+void connDebugFunction(TI_HANDLE hConn,
+ TI_UINT32 funcType,
+ void *pParam)
+{
+#ifdef REPORT_LOG
+ conn_t *pConn = (conn_t *)hConn;
+
+ switch (funcType)
+ {
+ case CONN_PRINT_TEST_FUNCTIONS:
+ printConnDbgFunctions();
+ break;
+
+ case CONN_PRINT_TEST:
+ WLAN_OS_REPORT(("Connection Print Test, param = %d , curr state %d\n\n", *((TI_UINT32 *)pParam), pConn->state));
+ break;
+
+ default:
+ WLAN_OS_REPORT(("Invalid function type in Debug Connection Function Command: %d\n\n", funcType));
+ break;
+ }
+#endif
+}
+
+void printConnDbgFunctions(void)
+{
+#ifdef REPORT_LOG
+ WLAN_OS_REPORT((" Conn Dbg Functions \n"));
+ WLAN_OS_REPORT(("----------------------\n"));
+
+ WLAN_OS_REPORT(("601 - Connection Print Test.\n"));
+#endif
+}
diff --git a/wilink_6_1/Test/connDebug.h b/wilink_6_1/Test/connDebug.h
new file mode 100644
index 0000000..c239ac7
--- /dev/null
+++ b/wilink_6_1/Test/connDebug.h
@@ -0,0 +1,50 @@
+/*
+ * connDebug.h
+ *
+ * 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.
+ */
+
+#ifndef __CONN_DEBUG_H__
+#define __CONN_DEBUG_H__
+
+#include "tidef.h"
+#include "paramOut.h"
+
+#define CONN_PRINT_TEST_FUNCTIONS 0
+#define CONN_PRINT_TEST 1
+
+void connDebugSetParam(TI_HANDLE hConn, TI_UINT32 paramType, TI_UINT32 *value);
+void connDebugGetParam(TI_HANDLE hConn, TI_UINT32 paramType, TI_UINT32 *value);
+void connDebugFunction(TI_HANDLE hConn,
+ TI_UINT32 funcType,
+ void *pParam);
+
+#endif /* __CONN_DEBUG_H__ */
+
diff --git a/wilink_6_1/Test/ctrlDbg.c b/wilink_6_1/Test/ctrlDbg.c
new file mode 100644
index 0000000..6a2953a
--- /dev/null
+++ b/wilink_6_1/Test/ctrlDbg.c
@@ -0,0 +1,111 @@
+/*
+ * ctrlDbg.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.
+ */
+
+
+/***************************************************************************/
+/* */
+/* MODULE: */
+/* PURPOSE: */
+/* */
+/***************************************************************************/
+#include "tidef.h"
+#include "Ctrl.h"
+#include "DataCtrl_Api.h"
+#include "dataCtrlDbg.h"
+#include "osApi.h"
+#include "report.h"
+#include "TWDriver.h"
+#include "paramOut.h"
+
+void printCtrlDbgFunctions(void);
+
+
+/*************************************************************************
+ * *
+ *************************************************************************
+DESCRIPTION:
+
+INPUT:
+
+OUTPUT:
+
+RETURN:
+
+************************************************************************/
+void ctrlDebugFunction(TI_HANDLE hCtrlData, TI_UINT32 funcType, void *pParam)
+{
+ ctrlData_t *pCtrlData = (ctrlData_t *)hCtrlData;
+ paramInfo_t paramInfo;
+
+ switch ((ECtrlDbgFunc)funcType)
+ {
+ case CTRL_PRINT_DBG_FUNCTIONS:
+ printCtrlDbgFunctions();
+ break;
+
+ case CTRL_PRINT_CTRL_BLOCK:
+ WLAN_OS_REPORT(("CTRL DBG - Print Ctrl Block \n\n"));
+ ctrlData_printCtrlBlock(pCtrlData);
+ break;
+
+ case CTRL_PRINT_TX_PARAMETERS:
+ WLAN_OS_REPORT(("CTRL DBG - Print tx paramters \n\n"));
+ ctrlData_printTxParameters(pCtrlData);
+ break;
+
+ case CTRL_SET_CTS_TO_SELF:
+ WLAN_OS_REPORT(("CTRL DBG - Set CtsToSelf = %s\n",((*(TI_UINT8*)pParam > 0) ? "TI_TRUE" : "TI_FALSE")));
+ paramInfo.paramType = CTRL_DATA_CURRENT_PROTECTION_STATUS_PARAM;
+ paramInfo.content.ctrlDataProtectionEnabled = ((*(TI_UINT8*)pParam > 0) ? 1 : 0);
+ ctrlData_setParam(pCtrlData,&paramInfo);
+ break;
+
+ default:
+ WLAN_OS_REPORT(("Invalid function type in Debug Ctrl Function Command: %d\n\n", funcType));
+ break;
+ }
+}
+
+
+void printCtrlDbgFunctions(void)
+{
+ WLAN_OS_REPORT((" Ctrl Dbg Functions \n"));
+ WLAN_OS_REPORT(("------------------------\n"));
+ WLAN_OS_REPORT(("400 - Print this menu.\n"));
+ WLAN_OS_REPORT(("401 - Print Ctrl Block.\n"));
+ WLAN_OS_REPORT(("402 - Print Tx parameters.\n"));
+ WLAN_OS_REPORT(("403 - Set CtsToSelf.\n"));
+}
+
+
+
diff --git a/wilink_6_1/Test/dataCtrlDbg.h b/wilink_6_1/Test/dataCtrlDbg.h
new file mode 100644
index 0000000..2814755
--- /dev/null
+++ b/wilink_6_1/Test/dataCtrlDbg.h
@@ -0,0 +1,86 @@
+/*
+ * dataCtrlDbg.h
+ *
+ * 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.
+ */
+
+#ifndef __DATA_CTRL_DBG_H__
+#define __DATA_CTRL_DBG_H__
+
+
+/* RX/TX debug functions */
+typedef enum
+{
+/* Tx debug functions */
+/* 0 */ TX_RX_DBG_FUNCTIONS,
+/* 1 */ PRINT_TX_CTRL_INFO,
+/* 2 */ PRINT_TX_CTRL_COUNTERS,
+/* 3 */ PRINT_TX_DATA_QUEUE_INFO,
+/* 4 */ PRINT_TX_DATA_QUEUE_COUNTERS,
+/* 5 */ PRINT_TX_MGMT_QUEUE_INFO,
+/* 6 */ PRINT_TX_MGMT_QUEUE_COUNTERS,
+/* 7 */ PRINT_TX_CTRL_BLK_INFO,
+/* 8 */ PRINT_TX_HW_QUEUE_INFO,
+/* 9 */ PRINT_TX_XFER_INFO,
+/* 10 */ PRINT_TX_RESULT_INFO,
+/* 11 */ PRINT_TX_DATA_CLSFR_TABLE,
+/* 20 */ RESET_TX_CTRL_COUNTERS = 20,
+/* 21 */ RESET_TX_DATA_QUEUE_COUNTERS,
+/* 22 */ RESET_TX_DATA_CLSFR_TABLE,
+/* 23 */ RESET_TX_MGMT_QUEUE_COUNTERS,
+
+/* Rx debug functions */
+/* 50 */ PRINT_RX_BLOCK = 50,
+/* 51 */ PRINT_RX_COUNTERS,
+/* 52 */ RESET_RX_COUNTERS,
+/* 53 */ PRINT_RX_THROUGHPUT_START,
+/* 54 */ PRINT_RX_THROUGHPUT_STOP
+
+} ERxTxDbgFunc;
+
+
+/* debg functions */
+typedef enum
+{
+/* 0 */ CTRL_PRINT_DBG_FUNCTIONS,
+/* 1 */ CTRL_PRINT_CTRL_BLOCK,
+/* 2 */ CTRL_PRINT_TX_PARAMETERS,
+/* 3 */ CTRL_SET_CTS_TO_SELF
+
+} ECtrlDbgFunc;
+
+
+void rxTxDebugFunction (TI_HANDLE hRxTxHandle, TI_UINT32 funcType, void *pParam);
+void ctrlDebugFunction (TI_HANDLE hCtrlData, TI_UINT32 funcType, void *pParam);
+
+
+#endif /* __DATA_CTRL_DBG_H__*/
+
+
diff --git a/wilink_6_1/Test/debug.c b/wilink_6_1/Test/debug.c
new file mode 100644
index 0000000..9a06a82
--- /dev/null
+++ b/wilink_6_1/Test/debug.c
@@ -0,0 +1,347 @@
+/*
+ * debug.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 reportReplvl.c
+ * \brief Report level implementation
+ *
+ * \see reportReplvl.h
+ */
+
+/***************************************************************************/
+/* */
+/* MODULE: reportReplvl.c */
+/* PURPOSE: Report level implementation */
+/* */
+/***************************************************************************/
+#include "tidef.h"
+#include "debug.h"
+#include "connDebug.h"
+#include "siteMgrDebug.h"
+#include "dataCtrlDbg.h"
+#include "rsnDbg.h"
+#include "osApi.h"
+#include "report.h"
+#include "context.h"
+#include "timer.h"
+#include "qosMngrDbg.h"
+#include "PowerMgrDebug.h"
+#include "roamingMgrDebug.h"
+#include "scanCncnDbg.h"
+#include "ScanMngrDbg.h"
+#include "scrDbg.h"
+#include "SoftGeminiDbg.h"
+#include "HealthMonitorDbg.h"
+#include "smeDebug.h"
+#include "DrvMainModules.h"
+#include "TWDriver.h"
+#include "fwdriverdebug.h"
+#include "MibDbg.h"
+#include "TwIfDebug.h"
+#include "tracebuf_api.h"
+
+/* Following are the modules numbers */
+typedef enum
+{
+ GENERAL_DEBUG = 0,
+ TEST_ASSOC_MODULE_PARAM = 1,
+ TEST_UTILS_MODULE_PARAM = 2,
+ TEST_RX_TX_DATA_MODULE_PARAM = 3,
+ TEST_CTRL_DATA_MODULE_PARAM = 4,
+ TEST_SITE_MGR_MODULE_PARAM = 5,
+ TEST_CONN_MODULE_PARAM = 6,
+ TEST_RSN_MODULE_PARAM = 7,
+ TEST_TWD_MODULE_PARAM = 8,
+ TEST_QOS_MNGR_MODULE_PARAM = 10,
+ TEST_MEASUREMENT_MODULE_PARAM = 11,
+ TEST_POWER_MGR_MODULE_PARAM = 12,
+ TEST_HAL_CTRL_BUFFER_PARAM = 13,
+ TEST_SCAN_CNCN_MODULE_PARAM = 14,
+ TEST_SCAN_MNGR_MODULE_PARAM = 15,
+ TEST_ROAMING_MNGR_PARAM = 16,
+ TEST_SCR_PARAM = 17,
+ TEST_SG_PARAM = 18,
+ TEST_SME_PARAM = 19,
+ TEST_HEALTH_MONITOR_PARAM = 20,
+ TEST_MIB_DEBUG_PARAM = 21,
+ TEST_FW_DEBUG_PARAM = 22,
+ TEST_TWIF_DEBUG_PARAM = 23,
+ /*
+ last module - DO NOT TOUCH!
+ */
+ NUMBER_OF_TEST_MODULES
+
+} testModuleParam_e;
+
+#define MAX_PARAM_TYPE (NUMBER_OF_TEST_MODULES - 1)
+
+/* Utils debug functions */
+#define DBG_UTILS_PRINT_HELP 0
+#define DBG_UTILS_PRINT_CONTEXT_INFO 1
+#define DBG_UTILS_PRINT_TIMER_MODULE_INFO 2
+#define DBG_UTILS_PRINT_TRACE_BUFFER 3
+/* General Parameters Structure */
+typedef struct
+{
+ TI_UINT32 paramType;
+ TI_UINT32 value;
+} testParam_t;
+
+extern void measurementDebugFunction(TI_HANDLE hMeasurementMgr, TI_HANDLE hSwitchChannel, TI_HANDLE hRegulatoryDomain, TI_UINT32 funcType, void *pParam);
+static void printMenue(void);
+static void utilsDebugFunction (TStadHandlesList *pStadHandles, TI_UINT32 funcType, void *pParam);
+static void printUtilsDbgFunctions (void);
+
+
+/******************************************************************
+* FUNCTIONS IMPLEMENTATION *
+*******************************************************************/
+
+/**
+ * \fn debugFunction
+ * \brief The debug functions dispatcher
+ *
+ * Decode from the debug functionNumber the relevant module and call its debug
+ * function with the provided parameters.
+ * The functionNumber parameter is composed as follows:
+ * Module Number = functionNumber / 100
+ * Specific Functionc = functionNumber % 100
+ *
+ * \note
+ * \param pStadHandles - Pointer to the STAD modules handles
+ * \param functionNumber - The module and function numbers composed in a decimal number
+ * \param pParam - The function parameters (optional).
+ * \return
+ * \sa
+ */
+TI_STATUS debugFunction(TStadHandlesList *pStadHandles, TI_UINT32 functionNumber, void *pParam)
+{
+ TI_UINT32 moduleNumber;
+
+ moduleNumber = functionNumber / 100;
+
+ if (moduleNumber > MAX_PARAM_TYPE)
+ return PARAM_MODULE_NUMBER_INVALID;
+
+ switch (moduleNumber)
+ {
+ case GENERAL_DEBUG:
+ printMenue();
+ break;
+
+ case TEST_ASSOC_MODULE_PARAM:
+ break;
+
+ case TEST_UTILS_MODULE_PARAM:
+ utilsDebugFunction (pStadHandles, functionNumber % 100, pParam);
+ break;
+
+ case TEST_RX_TX_DATA_MODULE_PARAM:
+ if( functionNumber < 350)
+ rxTxDebugFunction(pStadHandles->hTxCtrl, functionNumber % 100, pParam);
+ else
+ rxTxDebugFunction(pStadHandles->hRxData, functionNumber % 100, pParam);
+ break;
+
+ case TEST_CTRL_DATA_MODULE_PARAM:
+ ctrlDebugFunction(pStadHandles->hCtrlData, functionNumber % 100, pParam);
+ break;
+
+ case TEST_SITE_MGR_MODULE_PARAM:
+ siteMgrDebugFunction(pStadHandles->hSiteMgr, pStadHandles, functionNumber % 100, pParam);
+ break;
+
+ case TEST_CONN_MODULE_PARAM:
+ connDebugFunction(pStadHandles->hConn, functionNumber % 100, pParam);
+ break;
+
+ case TEST_RSN_MODULE_PARAM:
+ rsnDebugFunction(pStadHandles->hRsn, functionNumber % 100, pParam);
+ break;
+
+ case TEST_TWD_MODULE_PARAM:
+ TWD_Debug (pStadHandles->hTWD, functionNumber % 100, pParam);
+ break;
+
+ case TEST_QOS_MNGR_MODULE_PARAM:
+ qosMngrDebugFunction(pStadHandles->hQosMngr, functionNumber % 100, pParam);
+ break;
+
+ case TEST_MEASUREMENT_MODULE_PARAM:
+ measurementDebugFunction (pStadHandles->hMeasurementMgr,
+ pStadHandles->hSwitchChannel,
+ pStadHandles->hRegulatoryDomain,
+ functionNumber % 100,
+ pParam);
+ break;
+
+ case TEST_POWER_MGR_MODULE_PARAM:
+ powerMgrDebugFunction(pStadHandles->hPowerMgr,
+ functionNumber % 100,
+ pParam);
+ break;
+
+ case TEST_SCAN_CNCN_MODULE_PARAM:
+ scanConcentratorDebugFunction( pStadHandles->hScanCncn, pStadHandles->hTWD ,functionNumber % 100, pParam );
+ break;
+
+ case TEST_SCAN_MNGR_MODULE_PARAM:
+ scanMngrDebugFunction( pStadHandles->hScanMngr, functionNumber % 100, pParam, pStadHandles->hSiteMgr, pStadHandles->hCtrlData );
+ break;
+
+ case TEST_ROAMING_MNGR_PARAM:
+ roamingMgrDebugFunction(pStadHandles->hRoamingMngr, functionNumber % 100, pParam);
+ break;
+
+ case TEST_SCR_PARAM:
+ scrDebugFunction( pStadHandles->hSCR, functionNumber % 100, pParam );
+ break;
+
+ case TEST_SG_PARAM:
+ SoftGeminiDebugFunction( pStadHandles->hSoftGemini, functionNumber % 100, pParam );
+ break;
+
+ case TEST_SME_PARAM:
+ smeDebugFunction( pStadHandles->hSme, functionNumber % 100, pParam );
+ break;
+
+ case TEST_HEALTH_MONITOR_PARAM:
+ healthMonitorDebugFunction (pStadHandles, functionNumber % 100, pParam);
+ break;
+
+ case TEST_MIB_DEBUG_PARAM:
+ MibDebugFunction(pStadHandles->hTWD, functionNumber % 100, pParam);
+ break;
+
+ case TEST_FW_DEBUG_PARAM:
+ FWDebugFunction(pStadHandles->hDrvMain,
+ pStadHandles->hOs,
+ pStadHandles->hTWD,
+ pStadHandles->hMlmeSm,
+ pStadHandles->hTxMgmtQ,
+ pStadHandles->hTxCtrl,
+ functionNumber % 100,
+ pParam/*yael , packetNum*/);
+ break;
+
+ case TEST_TWIF_DEBUG_PARAM:
+ twifDebugFunction (pStadHandles->hTWD, functionNumber % 100, pParam);
+ break;
+
+ default:
+ WLAN_OS_REPORT(("Invalid debug function module number: %d\n\n", moduleNumber));
+ break;
+ }
+
+ return TI_OK;
+}
+
+static void printMenue(void)
+{
+ WLAN_OS_REPORT((" Debug main menu (p <num>)\n"));
+ WLAN_OS_REPORT(("-----------------------------\n"));
+
+ WLAN_OS_REPORT(("Association 100\n"));
+ WLAN_OS_REPORT(("Utils 200\n"));
+ WLAN_OS_REPORT(("Tx 300\n"));
+ WLAN_OS_REPORT(("Rx 350\n"));
+ WLAN_OS_REPORT(("Ctrl 400\n"));
+ WLAN_OS_REPORT(("SiteMgr 500\n"));
+ WLAN_OS_REPORT(("Connection 600\n"));
+ WLAN_OS_REPORT(("Rsn 700\n"));
+ WLAN_OS_REPORT(("Hal Ctrl 800\n"));
+ WLAN_OS_REPORT(("QOS 1000\n"));
+ WLAN_OS_REPORT(("Measurement 1100\n"));
+ WLAN_OS_REPORT(("PowerMgr 1200\n"));
+ WLAN_OS_REPORT(("HAL Ctrl Buffer 1300\n"));
+ WLAN_OS_REPORT(("Scan concentrator 1400\n"));
+ WLAN_OS_REPORT(("Scan Manager 1500\n"));
+ WLAN_OS_REPORT(("Roaming Manager 1600\n"));
+ WLAN_OS_REPORT(("SCR 1700\n"));
+ WLAN_OS_REPORT(("Soft Gemini 1800\n"));
+ WLAN_OS_REPORT(("SME 1900\n"));
+ WLAN_OS_REPORT(("Health Monitor 2000\n"));
+ WLAN_OS_REPORT(("MIB 2100\n"));
+ WLAN_OS_REPORT(("FW Debug 2200\n"));
+ WLAN_OS_REPORT(("TwIf 2300\n"));
+}
+
+
+/**
+ * \fn utilsDebugFunction
+ * \brief Utils debug function
+ *
+ * \param pDrvMain - handle to the DrvMain object.\n
+ * \param funcType - the specific debug function.\n
+ * \param pParam - parameters for the debug function.\n
+ */
+static void utilsDebugFunction (TStadHandlesList *pStadHandles, TI_UINT32 funcType, void *pParam)
+{
+ switch (funcType)
+ {
+ case DBG_UTILS_PRINT_HELP:
+ printUtilsDbgFunctions ();
+ break;
+
+ case DBG_UTILS_PRINT_CONTEXT_INFO:
+ context_Print (pStadHandles->hContext);
+ break;
+
+ case DBG_UTILS_PRINT_TIMER_MODULE_INFO:
+ tmr_PrintModule (pStadHandles->hTimer);
+ break;
+
+ case DBG_UTILS_PRINT_TRACE_BUFFER:
+/* tb_printf(); */
+ break;
+
+ default:
+ WLAN_OS_REPORT(("utilsDebugFunction(): Invalid function type: %d\n", funcType));
+ break;
+ }
+}
+
+/**
+ * \fn printUtilsDbgFunctions
+ * \brief Prints Utils debug menu
+ *
+ */
+static void printUtilsDbgFunctions (void)
+{
+ WLAN_OS_REPORT((" Utils Debug Functions \n"));
+ WLAN_OS_REPORT(("---------------------------\n"));
+ WLAN_OS_REPORT(("200 - Print the Utils Debug Help\n"));
+ WLAN_OS_REPORT(("201 - Print Context module info\n"));
+ WLAN_OS_REPORT(("202 - Print Timer module info\n"));
+ WLAN_OS_REPORT(("203 - Print the trace buffer\n"));
+}
+
diff --git a/wilink_6_1/Test/debug.h b/wilink_6_1/Test/debug.h
new file mode 100644
index 0000000..b104aca
--- /dev/null
+++ b/wilink_6_1/Test/debug.h
@@ -0,0 +1,52 @@
+/*
+ * debug.h
+ *
+ * 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 debug.h
+ * \brief debug module header file.
+ *
+ * \see debug.c
+ */
+
+#ifndef __DEBUG_H__
+#define __DEBUG_H__
+
+#include "tidef.h"
+#include "commonTypes.h"
+#include "DrvMainModules.h"
+
+
+TI_STATUS debugFunction (TStadHandlesList *pStadHandles, TI_UINT32 functionNumber, void *hParam);
+
+
+#endif /* __DEBUG_H__ */
diff --git a/wilink_6_1/Test/fwdriverdebug.c b/wilink_6_1/Test/fwdriverdebug.c
new file mode 100644
index 0000000..c7f1ba3
--- /dev/null
+++ b/wilink_6_1/Test/fwdriverdebug.c
@@ -0,0 +1,398 @@
+/*
+ * fwdriverdebug.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.
+ */
+
+
+/***************************************************************************/
+/* */
+/* MODULE: FW_debug.c */
+/* PURPOSE: FW debug implementation */
+/* */
+/***************************************************************************/
+#include "tidef.h"
+#include "DrvMain.h"
+#include "CmdQueue_api.h"
+#include "debug.h"
+#include "connDebug.h"
+#include "siteMgrDebug.h"
+#include "dataCtrlDbg.h"
+#include "rsnDbg.h"
+#include "osApi.h"
+#include "report.h"
+#include "qosMngrDbg.h"
+#include "PowerMgrDebug.h"
+#include "roamingMgrDebug.h"
+#include "scanCncnDbg.h"
+#include "ScanMngrDbg.h"
+#include "scrDbg.h"
+#include "SoftGeminiDbg.h"
+#include "HealthMonitorDbg.h"
+#include "smeDebug.h"
+#include "TWDriver.h"
+#include "CmdBld.h"
+#include "commonTypes.h"
+#include "siteHash.h"
+#include "txCtrl.h"
+#include "802_11Defs.h"
+#include "fwdriverdebug.h"
+#include "mlmeBuilder.h"
+#include "Ethernet.h"
+
+static TI_HANDLE dTimer;
+static TI_HANDLE tmp_hMlme;
+static TI_HANDLE tmp_hTWD;
+static TI_HANDLE tmp_hTxCtrl;
+static TI_BOOL SendFlag = 0;
+static TI_BOOL bSendDataPkt;
+static volatile TI_UINT32 numOfPackets;
+static volatile TI_UINT8 infinitLoopFl = 0;
+static TI_UINT32 packetsNum;
+static TI_UINT32 packetLength;
+
+typedef TI_STATUS (*TCmdCfgFuncB) (TI_HANDLE);
+
+extern TI_STATUS cmdBld_CmdJoinBss (TI_HANDLE hCmdBld, TJoinBss *pJoinBssParams, void *fCb, TI_HANDLE hCb);
+void sendMgmtPacket (TI_HANDLE hOs);
+void sendDataPacket (TI_HANDLE hOs);
+
+void FWDebugFunction(TI_HANDLE hDrvMain,
+ TI_HANDLE hOs,
+ TI_HANDLE hTWD,
+ TI_HANDLE hMlme,
+ TI_HANDLE hTxMgmtQ,
+ TI_HANDLE hTxCtrl,
+ unsigned long funcType,
+ void *pParam)
+{
+ tmp_hMlme = hMlme;
+ tmp_hTWD = hTWD;
+ tmp_hTxCtrl = hTxCtrl;
+
+ switch (funcType)
+ {
+ case DBG_FW_PRINT_HELP:
+ printFWDbgFunctions();
+ break;
+ case DBG_FW_SEND_GENERAL_TEST_CMD:
+ FW_debugSendGeneralTestCmd(hTWD, pParam);
+ break;
+ case DBG_FW_IBSS_CONNECTION:
+ FW_DebugSendJoinCommand(hTWD, hTxMgmtQ);
+ break;
+ case DBG_FW_SEND_MGMT_PACKET:
+ bSendDataPkt = TI_FALSE;
+ FW_DebugSendPacket(hDrvMain, hOs, hTxMgmtQ, pParam);
+ break;
+ case DBG_FW_SEND_DATA_PACKET:
+ bSendDataPkt = TI_TRUE;
+ FW_DebugSendPacket(hDrvMain, hOs, hTxMgmtQ, pParam);
+ break;
+ case DBG_FW_START_LOOPBACK:
+ FW_DebugStartLoopBack (hDrvMain, hTWD);
+ break;
+ case DBG_FW_STOP_LOOPBACK:
+ FW_DebugStopLoopBack (hDrvMain, hTWD);
+ break;
+ case DBG_FW_INFINIT_SEND:
+ FW_DebugInfinitSendPacket (hDrvMain, hTWD);
+ break;
+
+ case DBG_FW_GENERAL:
+ FW_DebugGeneral (hTWD, pParam);
+ break;
+ default:
+ break;
+
+
+ }
+}
+
+void printFWDbgFunctions(void)
+{
+ WLAN_OS_REPORT((" FW Debug Functions \n"));
+ WLAN_OS_REPORT(("---------------------------------------------------\n"));
+ WLAN_OS_REPORT(("2200 - Print the FW Debug Help \n"));
+ WLAN_OS_REPORT(("2201 - Send General Test Command \n"));
+ WLAN_OS_REPORT(("2202 - create IBSS connection \n"));
+ WLAN_OS_REPORT(("2203[n] - Send n<=999 Packets \n"));
+ WLAN_OS_REPORT(("2205 - Start LoopBack \n"));
+ WLAN_OS_REPORT(("2206 - Stop LoopBack \n"));
+}
+
+
+void FW_debugSendGeneralTestCmd(TI_HANDLE hTWD, void *pParam)
+{
+ TTwd *pTWD = (TTwd *)hTWD;
+ FWDebugTestCmdParamter_t Cfg;
+ unsigned char Len;
+ Len = *(unsigned char *)pParam;
+
+ os_memoryCopy(pTWD->hOs, Cfg.buf,(unsigned long*)pParam + sizeof(TI_UINT8),Len * 4 );
+
+ Cfg.len = Len;
+
+ /* Set information element header */
+ Cfg.EleHdr.id = CMD_TEST;
+ Cfg.EleHdr.len = sizeof(Cfg) - sizeof(EleHdrStruct);
+
+ cmdQueue_SendCommand (pTWD->hCmdQueue, CMD_CONFIGURE, (void*)&Cfg, sizeof(Cfg), NULL, NULL, NULL);
+}
+
+void FW_DebugSendJoinCommand(TI_HANDLE hTWD, TI_HANDLE hTxMgmtQ)
+{
+ TTwd *pTWD = (TTwd *)hTWD;
+ TCmdBld *pCmdBld = (TCmdBld *)(pTWD->hCmdBld);
+ TI_STATUS res;
+ TJoinBss JoinBss;
+ char ssid[10];
+ unsigned char Bssid[6] = {0x0,0x12,0x43,0xad,0xe5,0x10};
+
+ os_memoryCopy(pTWD->hOs,ssid,"ronit",5);
+
+ JoinBss.basicRateSet = DRV_RATE_2M;
+ JoinBss.radioBand = RADIO_BAND_2_4_GHZ;
+ JoinBss.pBSSID = Bssid;
+
+ JoinBss.bssType = BSS_INDEPENDENT;
+ JoinBss.pSSID =ssid;
+ JoinBss.ssidLength = 5;
+ JoinBss.channel = 1;
+ JoinBss.beaconInterval = 100;
+ JoinBss.dtimInterval = 2;
+
+ pCmdBld->hReport = pTWD->hReport;
+ pCmdBld->tDb.bss.BssId[0] = 0x0;
+ pCmdBld->tDb.bss.BssId[1] = 0x12;
+ pCmdBld->tDb.bss.BssId[2] = 0x43;
+ pCmdBld->tDb.bss.BssId[3] = 0xad;
+ pCmdBld->tDb.bss.BssId[4] = 0xe5;
+ pCmdBld->tDb.bss.BssId[5] = 0x10;
+ pCmdBld->tDb.bss.RadioChannel = 1;
+
+ txMgmtQ_SetConnState(hTxMgmtQ,TX_CONN_STATE_MGMT);
+
+ res = cmdBld_CmdJoinBss (pCmdBld,
+ &JoinBss,
+ NULL,//cmdBld_ConfigSeq,
+ NULL);//pTWD->hCmdBld
+
+ if (res)
+ {
+ os_printf("\n failed to make IBSS connection\n");
+ }
+
+ os_printf("\n res = %d\n", res);
+
+ txMgmtQ_SetConnState(hTxMgmtQ, TX_CONN_STATE_MGMT);
+
+}
+
+
+void sendDataPacket (TI_HANDLE hOs)
+{
+ TI_UINT32 i;
+ TTxCtrlBlk * pPktCtrlBlk;
+ TI_UINT8 * pPktBuf;
+ TEthernetHeader tEthHeader;
+ char SrcBssid[6] = {0x88,0x88,0x88,0x88,0x88,0x88};
+ char DesBssid[6] = {0x22,0x22,0x22,0x22,0x22,0x22};
+
+ /* Allocate a TxCtrlBlk for the Tx packet and save timestamp, length and packet handle */
+ pPktCtrlBlk = TWD_txCtrlBlk_Alloc (tmp_hTWD);
+ pPktCtrlBlk->tTxDescriptor.startTime = os_timeStampMs (hOs);
+ pPktCtrlBlk->tTxDescriptor.length = (TI_UINT16)packetLength + ETHERNET_HDR_LEN;
+ pPktCtrlBlk->tTxDescriptor.tid = 0;
+ pPktCtrlBlk->tTxPktParams.uPktType = TX_PKT_TYPE_ETHER;
+
+ /* Allocate buffer with headroom for getting the IP header in a 4-byte aligned address */
+ pPktBuf = txCtrl_AllocPacketBuffer (tmp_hTxCtrl, pPktCtrlBlk, packetLength + ETHERNET_HDR_LEN + 2);
+
+ /* Prepare Ethernet header */
+ tEthHeader.type = HTOWLANS(ETHERTYPE_IP);
+ MAC_COPY (tEthHeader.src, SrcBssid);
+ MAC_COPY (tEthHeader.dst, DesBssid);
+ os_memoryCopy (hOs, pPktBuf + 2, &tEthHeader, ETHERNET_HDR_LEN);
+
+ /* Build BDL */
+ BUILD_TX_TWO_BUF_PKT_BDL (pPktCtrlBlk,
+ pPktBuf + 2,
+ ETHERNET_HDR_LEN,
+ pPktBuf + 2 + ETHERNET_HDR_LEN,
+ packetLength)
+
+ /* Fill data buffer with incremented numbers */
+ for (i = 0; i < packetLength; i++)
+ {
+ *(pPktBuf + 2 + ETHERNET_HDR_LEN + i) = i;
+ }
+
+ /* Send Ether packet to TxCtrl */
+ txCtrl_XmitData (tmp_hTxCtrl, pPktCtrlBlk);
+}
+
+
+
+void sendMgmtPacket(TI_HANDLE hOs)
+{
+ static TI_UINT8 aMsg[2000];
+ TI_UINT32 i;
+ dot11MgmtSubType_e eMsgType = DE_AUTH;
+
+ for (i = 0; i < packetLength; i++)
+ {
+ aMsg[i] = i;
+ }
+
+ mlmeBuilder_sendFrame(tmp_hMlme, eMsgType, aMsg, packetLength, 0);
+
+ numOfPackets++;
+ if ((infinitLoopFl == 0) && (numOfPackets > packetsNum))
+ {
+ os_timerStop(hOs, dTimer);
+ os_printf("\n *********** Last Packet was sent **********");
+ os_timerDestroy(hOs, dTimer);
+ }
+ else
+ {
+ os_timerStart(hOs, dTimer, 1000);
+ }
+}
+
+void FW_DebugSendPacket(TI_HANDLE hDrvMain ,TI_HANDLE hOs, TI_HANDLE hTxMgmtQ, void *pParam)
+{
+ void *fSendPkt;
+
+ if ( pParam == NULL )
+ {
+ os_printf("\nFW_DebugSendPacket Error: received NULL parameter\n");
+ return;
+ }
+
+ /* Open Tx path for all packet types */
+ txMgmtQ_SetConnState (hTxMgmtQ, TX_CONN_STATE_MGMT);
+ txMgmtQ_SetConnState (hTxMgmtQ, TX_CONN_STATE_EAPOL);
+ txMgmtQ_SetConnState (hTxMgmtQ, TX_CONN_STATE_OPEN);
+
+ infinitLoopFl = 0;
+ numOfPackets = 1;
+ packetsNum = 1;
+ packetLength = *(TI_UINT32*)pParam;
+ os_printf("\nFW_DebugSendPacket: packetsNum = %d, packetLength = %d\n",packetsNum, packetLength);
+ fSendPkt = bSendDataPkt ? sendDataPacket : sendMgmtPacket;
+ dTimer = os_timerCreate(hOs, fSendPkt, hDrvMain);
+ os_timerStart(hOs, dTimer, 1000);
+
+ SendFlag = TI_TRUE;
+}
+
+void FW_DebugInfinitSendPacket(TI_HANDLE hDrvMain ,TI_HANDLE hOs)
+{
+ infinitLoopFl = 1;
+ numOfPackets = 1;
+
+ dTimer = os_timerCreate(hOs, sendMgmtPacket, hDrvMain);
+ os_timerStart(hOs, dTimer, 1000);
+ SendFlag = TI_TRUE;
+}
+
+void FW_DebugStartLoopBack (TI_HANDLE hDrvMain, TI_HANDLE hTWD)
+{
+ TTwd *pTWD = (TTwd *)hTWD;
+ TTestCmd Plt;
+
+ Plt.testCmdId = TEST_CMD_LOOPBACK_START;
+ os_printf("\n send loopback start command");
+ cmdQueue_SendCommand (pTWD->hCmdQueue, CMD_TEST, (char*)&Plt, sizeof(Plt), NULL, NULL, NULL);
+}
+
+
+void FW_DebugStopLoopBack (TI_HANDLE hDrvMain, TI_HANDLE hTWD)
+{
+ TTwd *pTWD = (TTwd *)hTWD;
+ TTestCmd Plt;
+
+ Plt.testCmdId = TEST_CMD_LOOPBACK_STOP;
+ os_printf("\n send loopback stop command");
+ cmdQueue_SendCommand (pTWD->hCmdQueue, CMD_TEST, (char*)&Plt, sizeof(Plt), NULL, NULL, NULL);
+}
+
+
+void FW_DebugGeneral(TI_HANDLE hTWD, void *pParam)
+{
+ TTwd *pTWD = (TTwd *)hTWD;
+ TI_UINT32 size = *((TI_UINT32*) pParam) + sizeof(TI_UINT32);
+
+ cmdQueue_SendCommand (pTWD->hCmdQueue, CMD_DEBUG, (char*)pParam, size, NULL, NULL, NULL);
+}
+
+
+/*
+void FW_ComparePacket (char *buf)
+ {
+ char *ptemp;
+ int i;
+
+ if (SendFlag)
+ {
+ ptemp = CompBuf;
+ os_printf("\n print before compare save buf");
+ os_printf("\n");
+ for (i=0;i<Len;i++) {
+ os_printf(" 0x%02x ",*ptemp++);
+ if (i %5 == 0) { os_printf("\n");
+ }
+
+ }
+
+ os_printf("\n print before compare recived packet");
+ ptemp = buf;
+ os_printf("\n");
+ for (i=0;i<Len;i++) {
+ os_printf(" 0x%02x ",*ptemp++);
+ if (i %5 == 0) {
+ }
+
+ }
+
+
+ if(memcmp(CompBuf,buf,Len))
+ os_printf("\n LoopBack Packet failed");
+ else
+ os_printf("\n LoopBack Packet success");
+
+ SendFlag = TI_FALSE;
+ }
+
+ }
+*/
+
+
diff --git a/wilink_6_1/Test/fwdriverdebug.h b/wilink_6_1/Test/fwdriverdebug.h
new file mode 100644
index 0000000..ceca6f4
--- /dev/null
+++ b/wilink_6_1/Test/fwdriverdebug.h
@@ -0,0 +1,127 @@
+/*
+ * fwdriverdebug.h
+ *
+ * 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 FW_debug.h
+ * \brief This file include private definitions for the FW debug module.
+ */
+
+#ifndef __FW_DEBUG_H__
+#define __FW_DEBUG_H__
+
+
+#include "tidef.h"
+#include "public_infoele.h"
+#include "TWDriver.h"
+#include "TWDriverInternal.h"
+
+/*
+ ***********************************************************************
+ * Constant definitions.
+ ***********************************************************************
+ */
+
+/* debug functions */
+#define DBG_FW_PRINT_HELP 0
+#define DBG_FW_SEND_GENERAL_TEST_CMD 1
+#define DBG_FW_IBSS_CONNECTION 2
+#define DBG_FW_SEND_MGMT_PACKET 3
+#define DBG_FW_SEND_DATA_PACKET 4
+#define DBG_FW_START_LOOPBACK 5
+#define DBG_FW_STOP_LOOPBACK 6
+#define DBG_FW_INFINIT_SEND 7
+#define DBG_FW_GENERAL 10
+
+/*
+ ***********************************************************************
+ * Enums.
+ ***********************************************************************
+ */
+
+/*
+ ***********************************************************************
+ * Typedefs.
+ ***********************************************************************
+ */
+
+/*
+ ***********************************************************************
+ * Structure definitions.
+ ***********************************************************************
+ */
+ typedef struct {
+ INFO_ELE_HDR
+ unsigned char len;
+ unsigned long buf[20];
+ }FWDebugTestCmdParamter_t;
+
+ typedef struct {
+ INFO_ELE_HDR
+ TTestCmd Plt;
+ }FWDebugPLT_t;
+
+/*
+ ***********************************************************************
+ * External data definitions.
+ ***********************************************************************
+ */
+
+/*
+ ***********************************************************************
+ * External functions definitions
+ ***********************************************************************
+ */
+
+void FWDebugFunction(TI_HANDLE hDrvMain,
+ TI_HANDLE hOs,
+ TI_HANDLE hTWD,
+ TI_HANDLE hMlme,
+ TI_HANDLE hTxMgmtQ,
+ TI_HANDLE hTxCtrl,
+ unsigned long funcType,
+ void *pParam
+ /*yael unsigned long packetNum*/);
+void FW_debugSendGeneralTestCmd(TI_HANDLE hTWD, void *pParam);
+void FW_DebugSendJoinCommand(TI_HANDLE hTWD, TI_HANDLE hTxMgmtQ);
+void FW_DebugSendPacket(TI_HANDLE hDrvMain ,TI_HANDLE hOs, TI_HANDLE hTxMgmtQ, void* pParam);
+void FW_DebugInfinitSendPacket(TI_HANDLE hDrvMain ,TI_HANDLE hOs);
+void FW_DebugStartLoopBack (TI_HANDLE hDrvMain, TI_HANDLE hTWD);
+void FW_DebugStopLoopBack (TI_HANDLE hDrvMain, TI_HANDLE hTWD);
+void FW_ComparePacket (char *buf);
+void printFWDbgFunctions(void);
+void FW_DebugGeneral(TI_HANDLE hTWD, void *pParam);
+
+
+
+#endif
+
diff --git a/wilink_6_1/Test/measurementDbg.c b/wilink_6_1/Test/measurementDbg.c
new file mode 100644
index 0000000..9e0566b
--- /dev/null
+++ b/wilink_6_1/Test/measurementDbg.c
@@ -0,0 +1,499 @@
+/*
+ * 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;
+#ifdef REPORT_LOG
+ siteMgr_t *pSiteMgr = (siteMgr_t *) pMeasurementMgr->hSiteMgr;
+#endif
+#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)
+{
+#ifdef REPORT_LOG
+ TMediumOccupancy *pMediumOccupancy = (TMediumOccupancy*)(CB_buf+4);
+
+ WLAN_OS_REPORT(("MediumUsage = %d\nPeriod = %d\n",
+ pMediumOccupancy->MediumUsage/1000, pMediumOccupancy->Period/1000));
+#endif
+}
+
+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));
+
+
+}
+
diff --git a/wilink_6_1/Test/measurementDbg.h b/wilink_6_1/Test/measurementDbg.h
new file mode 100644
index 0000000..ff26c07
--- /dev/null
+++ b/wilink_6_1/Test/measurementDbg.h
@@ -0,0 +1,75 @@
+/*
+ * measurementDbg.h
+ *
+ * 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.
+ */
+
+
+#ifndef __MEASUREMENT_DBG_H__
+#define __MEASUREMENT_DBG_H__
+
+/* definitions for ctrl dbg */
+
+#define DBG_MEASUREMENT_PRINT_HELP 0
+#define DBG_MEASUREMENT_PRINT_STATUS 1
+#define DBG_MEASUREMENT_CHANNEL_LOAD_START 2
+#define DBG_MEASUREMENT_CHANNEL_LOAD_STOP 3
+#define DBG_MEASUREMENT_SEND_FRAME_REQUEST 4
+#define DBG_MEASUREMENT_START_NOISE_HIST 5
+#define DBG_MEASUREMENT_STOP_NOISE_HIST 6
+#define DBG_MEASUREMENT_GET_NOISE_HIST_RESULTS 7
+#define DBG_MEASUREMENT_SEND_CHANNEL_LOAD_FRAME 8
+#define DBG_MEASUREMENT_SEND_BEACON_TABLE_FRAME 9
+#define DBG_MEASUREMENT_SEND_NOISE_HIST_1_FRAME 10
+#define DBG_MEASUREMENT_SEND_NOISE_HIST_2_FRAME 11
+#define DBG_MEASUREMENT_SET_TRAFFIC_THRSLD 12
+#define DBG_SC_PRINT_STATUS 30
+#define DBG_SC_SET_SWITCH_CHANNEL_NUM 31
+#define DBG_SC_SET_SWITCH_CHANNEL_TBTT 32
+#define DBG_SC_SET_SWITCH_CHANNEL_MODE 33
+#define DBG_SC_SET_CHANNEL_AS_VALID 34
+#define DBG_SC_SET_CHANNEL_AS_INVALID 35
+#define DBG_SC_SWITCH_CHANNEL_CMD 36
+#define DBG_SC_CANCEL_SWITCH_CHANNEL_CMD 37
+
+#define DBG_REG_DOMAIN_PRINT_VALID_CHANNELS 50
+
+
+
+
+void measurementDebugFunction(TI_HANDLE hMeasurementMgr, TI_HANDLE hSwitchChannel, TI_HANDLE hRegulatoryDomain, TI_UINT32 funcType, void *pParam);
+
+void measurement_channelLoadCallBackDbg(TI_HANDLE hMeasurementMgr, TI_STATUS status,
+ TI_UINT8* CB_buf);
+
+void measurement_noiseHistCallBackDbg(TI_HANDLE hMeasurementMgr, TI_STATUS status,
+ TI_UINT8* CB_buf);
+
+#endif /* __MEASUREMENT_DBG_H__*/
diff --git a/wilink_6_1/Test/qosMngrDbg.c b/wilink_6_1/Test/qosMngrDbg.c
new file mode 100644
index 0000000..9ac4b17
--- /dev/null
+++ b/wilink_6_1/Test/qosMngrDbg.c
@@ -0,0 +1,165 @@
+/*
+ * qosMngrDbg.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.
+ */
+
+
+/***************************************************************************/
+/* */
+/* MODULE: */
+/* PURPOSE: */
+/* */
+/***************************************************************************/
+#include "tidef.h"
+#include "osApi.h"
+#include "qosMngr.h"
+#include "report.h"
+#include "paramOut.h"
+#include "qosMngrDbg.h"
+
+void printQosMngrParams(TI_HANDLE hQosMngr);
+void printQosDbgFunction(TI_HANDLE hQosMngr);
+
+
+void qosMngrDebugFunction(TI_HANDLE hQosMngr, TI_UINT32 funcType, void *pParam)
+{
+ switch (funcType)
+ {
+ case DBG_QOS_MNGR_PRINT_HELP:
+ printQosDbgFunction(hQosMngr);
+ break;
+
+ case DBG_QOS_MNGR_PRINT_PARAMS:
+ printQosMngrParams(hQosMngr);
+ break;
+
+ default:
+ WLAN_OS_REPORT(("\nInvalid function type in QOS MNGR Function Command: %d\n", funcType));
+ break;
+ }
+
+
+}
+void printQosDbgFunction(TI_HANDLE hQosMngr)
+{
+ WLAN_OS_REPORT(("\n qosMngr Debug Functions \n"));
+ WLAN_OS_REPORT(("-----------------------------\n"));
+
+ WLAN_OS_REPORT(("1000 - Print the QOS MNGR Debug Help\n"));
+
+ WLAN_OS_REPORT(("1001 - print QOS parameters\n"));
+
+}
+
+void printQosMngrParams(TI_HANDLE hQosMngr)
+{
+ qosMngr_t *pQosMngr = (qosMngr_t *)hQosMngr;
+ EQosProtocol protocol = QOS_NONE;
+
+ WLAN_OS_REPORT(("QOS Parameters :\n"));
+
+ switch(pQosMngr->activeProtocol){
+ case QOS_WME:
+ WLAN_OS_REPORT(("QOS protocol = QOS_WME\n"));
+ protocol = QOS_WME;
+
+ break;
+ case QOS_NONE:
+ WLAN_OS_REPORT(("QOS protocol = NONE\n"));
+ break;
+
+ default:
+ break;
+
+ }
+ if(protocol != QOS_NONE)
+ {
+ WLAN_OS_REPORT(("PS POLL Modes:\n"));
+ WLAN_OS_REPORT(("PS_POLL: 0\n"));
+ WLAN_OS_REPORT(("UPSD : 1\n"));
+ WLAN_OS_REPORT(("Ps None: 2\n"));
+ }
+
+ if(pQosMngr->desiredPsMode == PS_SCHEME_UPSD_TRIGGER)
+ WLAN_OS_REPORT(("Desired Power Save Mode = UPSD\n"));
+ else
+ WLAN_OS_REPORT(("Desired Power Save Mode = Legacy\n"));
+
+ if(pQosMngr->currentPsMode == PS_SCHEME_UPSD_TRIGGER)
+ WLAN_OS_REPORT(("Current Power Save Mode = UPSD\n"));
+ else
+ WLAN_OS_REPORT(("Current Power Save Mode = Legacy\n"));
+
+ WLAN_OS_REPORT(("BK Parameters:\n"));
+ WLAN_OS_REPORT(("aifsn :%d\n",pQosMngr->acParams[QOS_AC_BK].acQosParams.aifsn));
+ WLAN_OS_REPORT(("cwMin :%d\n",pQosMngr->acParams[QOS_AC_BK].acQosParams.cwMin));
+ WLAN_OS_REPORT(("cwMax :%d\n",pQosMngr->acParams[QOS_AC_BK].acQosParams.cwMax));
+ WLAN_OS_REPORT(("txopLimit :%d\n",pQosMngr->acParams[QOS_AC_BK].acQosParams.txopLimit));
+ if(protocol == QOS_WME)
+ {
+ WLAN_OS_REPORT(("Desired PsMode :%d\n",pQosMngr->acParams[QOS_AC_BK].desiredWmeAcPsMode));
+ WLAN_OS_REPORT(("Current PsMode :%d\n",pQosMngr->acParams[QOS_AC_BK].currentWmeAcPsMode));
+ }
+
+ WLAN_OS_REPORT(("BE Parameters:\n"));
+ WLAN_OS_REPORT(("aifsn :%d\n",pQosMngr->acParams[QOS_AC_BE].acQosParams.aifsn));
+ WLAN_OS_REPORT(("cwMin :%d\n",pQosMngr->acParams[QOS_AC_BE].acQosParams.cwMin));
+ WLAN_OS_REPORT(("cwMax :%d\n",pQosMngr->acParams[QOS_AC_BE].acQosParams.cwMax));
+ WLAN_OS_REPORT(("txopLimit :%d\n",pQosMngr->acParams[QOS_AC_BE].acQosParams.txopLimit));
+ if(protocol == QOS_WME)
+ {
+ WLAN_OS_REPORT(("Desired PsMode :%d\n",pQosMngr->acParams[QOS_AC_BE].desiredWmeAcPsMode));
+ WLAN_OS_REPORT(("Current PsMode :%d\n",pQosMngr->acParams[QOS_AC_BE].currentWmeAcPsMode));
+ }
+
+ WLAN_OS_REPORT(("VI Parameters:\n"));
+ WLAN_OS_REPORT(("aifsn :%d\n",pQosMngr->acParams[QOS_AC_VI].acQosParams.aifsn));
+ WLAN_OS_REPORT(("cwMin :%d\n",pQosMngr->acParams[QOS_AC_VI].acQosParams.cwMin));
+ WLAN_OS_REPORT(("cwMax :%d\n",pQosMngr->acParams[QOS_AC_VI].acQosParams.cwMax));
+ WLAN_OS_REPORT(("txopLimit :%d\n",pQosMngr->acParams[QOS_AC_VI].acQosParams.txopLimit));
+ if(protocol == QOS_WME)
+ {
+ WLAN_OS_REPORT(("Desired PsMode :%d\n",pQosMngr->acParams[QOS_AC_VI].desiredWmeAcPsMode));
+ WLAN_OS_REPORT(("Current PsMode :%d\n",pQosMngr->acParams[QOS_AC_VI].currentWmeAcPsMode));
+ }
+
+ WLAN_OS_REPORT(("VO Parameters:\n"));
+ WLAN_OS_REPORT(("aifsn :%d\n",pQosMngr->acParams[QOS_AC_VO].acQosParams.aifsn));
+ WLAN_OS_REPORT(("cwMin :%d\n",pQosMngr->acParams[QOS_AC_VO].acQosParams.cwMin));
+ WLAN_OS_REPORT(("cwMax :%d\n",pQosMngr->acParams[QOS_AC_VO].acQosParams.cwMax));
+ WLAN_OS_REPORT(("txopLimit :%d\n",pQosMngr->acParams[QOS_AC_VO].acQosParams.txopLimit));
+ if(protocol == QOS_WME)
+ {
+ WLAN_OS_REPORT(("Desired PsMode :%d\n",pQosMngr->acParams[QOS_AC_VO].desiredWmeAcPsMode));
+ WLAN_OS_REPORT(("Current PsMode :%d\n",pQosMngr->acParams[QOS_AC_VO].currentWmeAcPsMode));
+ }
+}
+
diff --git a/wilink_6_1/Test/qosMngrDbg.h b/wilink_6_1/Test/qosMngrDbg.h
new file mode 100644
index 0000000..bce1c03
--- /dev/null
+++ b/wilink_6_1/Test/qosMngrDbg.h
@@ -0,0 +1,45 @@
+/*
+ * qosMngrDbg.h
+ *
+ * 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.
+ */
+
+#ifndef __QOSMNGR_DBG_H__
+#define __QOSMNGR_DBG_H__
+
+/* definitions for ctrl dbg */
+#define DBG_QOS_MNGR_PRINT_HELP 0
+#define DBG_QOS_MNGR_PRINT_PARAMS 1
+
+void qosMngrDebugFunction(TI_HANDLE hQosMngr, TI_UINT32 funcType, void *pParam);
+
+
+#endif /* __XCCMNGR_DBG_H__*/
+
diff --git a/wilink_6_1/Test/roamingMgrDebug.c b/wilink_6_1/Test/roamingMgrDebug.c
new file mode 100644
index 0000000..959ac59
--- /dev/null
+++ b/wilink_6_1/Test/roamingMgrDebug.c
@@ -0,0 +1,361 @@
+/*
+ * roamingMgrDebug.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 reportReplvl.c
+ * \brief Report level implementation
+ *
+ * \see reportReplvl.h
+ */
+
+/***************************************************************************/
+/* */
+/* MODULE: reportReplvl.c */
+/* PURPOSE: Report level implementation */
+/* */
+/***************************************************************************/
+#include "tidef.h"
+#include "report.h"
+#include "paramOut.h"
+#include "roamingMgrDebug.h"
+#include "roamingMngrApi.h"
+#include "apConnApi.h"
+
+
+void printRoamingMgrHelpMenu(void);
+void PrintBssListGotAfterImemediateScan(TI_HANDLE hScanMgr);
+
+
+/* Function implementation */
+void roamingMgrDebugFunction(TI_HANDLE hRoamingMngr,
+ TI_UINT32 funcType,
+ void *pParam)
+{
+ paramInfo_t param;
+
+
+ switch (funcType)
+ {
+ case ROAMING_MGR_DEBUG_HELP_MENU:
+ printRoamingMgrHelpMenu();
+ break;
+
+ case PRINT_ROAMING_STATISTICS:
+ param.paramType = ROAMING_MNGR_PRINT_STATISTICS;
+ roamingMngr_getParam(hRoamingMngr, &param);
+ break;
+
+ case RESET_ROAMING_STATISTICS:
+ param.paramType = ROAMING_MNGR_RESET_STATISTICS;
+ roamingMngr_getParam(hRoamingMngr, &param);
+ break;
+
+ case PRINT_ROAMING_CURRENT_STATUS:
+ param.paramType = ROAMING_MNGR_PRINT_CURRENT_STATUS;
+ roamingMngr_getParam(hRoamingMngr, &param);
+ break;
+
+ case PRINT_ROAMING_CANDIDATE_TABLE:
+ param.paramType = ROAMING_MNGR_PRINT_CANDIDATE_TABLE;
+ roamingMngr_getParam(hRoamingMngr, &param);
+ break;
+
+ case TRIGGER_ROAMING_LOW_QUALITY_EVENT:
+ param.paramType = ROAMING_MNGR_TRIGGER_EVENT;
+ param.content.roamingTriggerType = ROAMING_TRIGGER_LOW_QUALITY;
+ roamingMngr_setParam(hRoamingMngr, &param);
+ break;
+
+ case TRIGGER_ROAMING_BSS_LOSS_EVENT:
+ param.paramType = ROAMING_MNGR_TRIGGER_EVENT;
+ param.content.roamingTriggerType = ROAMING_TRIGGER_BSS_LOSS;
+ roamingMngr_setParam(hRoamingMngr, &param);
+ break;
+
+ case TRIGGER_ROAMING_SWITCH_CHANNEL_EVENT:
+ param.paramType = ROAMING_MNGR_TRIGGER_EVENT;
+ param.content.roamingTriggerType = ROAMING_TRIGGER_SWITCH_CHANNEL;
+ roamingMngr_setParam(hRoamingMngr, &param);
+ break;
+
+ case TRIGGER_ROAMING_AP_DISCONNECT_EVENT:
+ param.paramType = ROAMING_MNGR_TRIGGER_EVENT;
+ param.content.roamingTriggerType = ROAMING_TRIGGER_AP_DISCONNECT;
+ roamingMngr_setParam(hRoamingMngr, &param);
+ break;
+
+ case TRIGGER_ROAMING_CONNECT_EVENT:
+ param.paramType = ROAMING_MNGR_CONN_STATUS;
+ param.content.roamingConnStatus = CONN_STATUS_CONNECTED;
+ roamingMngr_setParam(hRoamingMngr, &param);
+ break;
+
+ case TRIGGER_ROAMING_NOT_CONNECTED_EVENT:
+ param.paramType = ROAMING_MNGR_CONN_STATUS;
+ param.content.roamingConnStatus = CONN_STATUS_NOT_CONNECTED;
+ roamingMngr_setParam(hRoamingMngr, &param);
+ break;
+
+ case TRIGGER_ROAMING_HANDOVER_SUCCESS_EVENT:
+ param.paramType = ROAMING_MNGR_CONN_STATUS;
+ param.content.roamingConnStatus = CONN_STATUS_HANDOVER_SUCCESS;
+ roamingMngr_setParam(hRoamingMngr, &param);
+ break;
+
+ case TRIGGER_ROAMING_HANDOVER_FAILURE_EVENT:
+ param.paramType = ROAMING_MNGR_CONN_STATUS;
+ param.content.roamingConnStatus = CONN_STATUS_HANDOVER_FAILURE;
+ roamingMngr_setParam(hRoamingMngr, &param);
+ break;
+
+ case ROAMING_REGISTER_BSS_LOSS_EVENT: /* 1613 */
+ roamingMngr_setBssLossThreshold(hRoamingMngr, 10, 1);
+ break;
+ case ROAMING_START_IMMEDIATE_SCAN: /* 1614 */
+ {
+ int i=0,j =0;
+ channelList_t channels;
+ channels.numOfChannels = 14;
+
+
+ for ( i = 0; i < channels.numOfChannels; i++ )
+ {
+ for ( j = 0; j < 6; j++ )
+ {
+ channels.channelEntry[i].normalChannelEntry.bssId[j] = 0xff;
+ }
+
+ channels.channelEntry[i].normalChannelEntry.earlyTerminationEvent = SCAN_ET_COND_DISABLE;
+ channels.channelEntry[i].normalChannelEntry.ETMaxNumOfAPframes = 0;
+ channels.channelEntry[i].normalChannelEntry.maxChannelDwellTime = 60000;
+ channels.channelEntry[i].normalChannelEntry.minChannelDwellTime = 30000;
+ channels.channelEntry[i].normalChannelEntry.txPowerDbm = DEF_TX_POWER;
+ channels.channelEntry[i].normalChannelEntry.channel = i + 1;
+ }
+
+ /* upon this call the scanMngr_reportImmediateScanResults() should be invoked and the BssList should be printed */
+ roamingMngr_startImmediateScan(hRoamingMngr, &channels);
+ }
+
+ break;
+ case ROAMING_CONNECT: /* 1615 */
+ {
+ TargetAp_t targetAP;
+ bssList_t *bssList;
+ roamingMngr_t *pRoamingMngr = (roamingMngr_t*)hRoamingMngr;
+
+ bssList = scanMngr_getBSSList(((roamingMngr_t*)hRoamingMngr)->hScanMngr);
+
+ WLAN_OS_REPORT(("Roaming connect: BSS LIST num of entries=%d \n", bssList->numOfEntries));
+ PrintBssListGotAfterImemediateScan(((roamingMngr_t*)hRoamingMngr)->hScanMngr);
+
+ /* The values below must be configured in manual mode */
+ targetAP.connRequest.requestType = AP_CONNECT_FULL_TO_AP;
+ targetAP.connRequest.dataBufLength = 0;
+ targetAP.transitionMethod = ReAssoc;
+
+ os_memoryCopy(((roamingMngr_t*)hRoamingMngr)->hOs, &(targetAP.newAP), &(bssList->BSSList[0]), sizeof(bssEntry_t));
+
+ /* test if no buffer is present */
+ targetAP.newAP.bufferLength =0;
+ targetAP.newAP.pBuffer = 0;
+ /* ----------------------------- */
+
+ os_memoryCopy(pRoamingMngr->hOs, &(pRoamingMngr->targetAP), &targetAP , sizeof(TargetAp_t));
+
+ roamingMngr_connect(hRoamingMngr, &(pRoamingMngr->targetAP));
+ }
+
+ break;
+
+ case ROAMING_START_CONT_SCAN_BY_APP: /* 1616 */
+ {
+ roamingMngr_t *pRoamingMngr = (roamingMngr_t*)hRoamingMngr;
+ int i=0,j =0;
+ channelList_t channels;
+ channels.numOfChannels = 14;
+
+ for ( i = 0; i < channels.numOfChannels; i++ )
+ {
+ for ( j = 0; j < 6; j++ )
+ {
+ channels.channelEntry[i].normalChannelEntry.bssId[j] = 0xff;
+ }
+
+ channels.channelEntry[i].normalChannelEntry.earlyTerminationEvent = SCAN_ET_COND_DISABLE;
+ channels.channelEntry[i].normalChannelEntry.ETMaxNumOfAPframes = 0;
+ channels.channelEntry[i].normalChannelEntry.maxChannelDwellTime = 60000;
+ channels.channelEntry[i].normalChannelEntry.minChannelDwellTime = 30000;
+ channels.channelEntry[i].normalChannelEntry.txPowerDbm = DEF_TX_POWER;
+ channels.channelEntry[i].normalChannelEntry.channel = i + 1;
+ }
+
+ scanMngr_startContinuousScanByApp(pRoamingMngr->hScanMngr, &channels);
+ }
+
+ break;
+
+ case ROAMING_STOP_CONT_SCAN_BY_APP:
+ {
+ roamingMngr_t *pRoamingMngr = (roamingMngr_t*)hRoamingMngr;
+ scanMngr_stopContinuousScanByApp(pRoamingMngr->hScanMngr);
+ }
+ break;
+
+
+ case RAOMING_SET_DEFAULT_SCAN_POLICY: /* 1618 */
+ {
+ int i=0;
+ roamingMngr_t *pRoamingMngr = (roamingMngr_t*)hRoamingMngr;
+ TScanPolicy scanPolicy;
+ param.paramType = SCAN_MNGR_SET_CONFIGURATION;
+ param.content.pScanPolicy = &scanPolicy;
+
+ // init default scan policy
+ scanPolicy.normalScanInterval = 10000;
+ scanPolicy.deterioratingScanInterval = 5000;
+ scanPolicy.maxTrackFailures = 3;
+ scanPolicy.BSSListSize = 4;
+ scanPolicy.BSSNumberToStartDiscovery = 1;
+ scanPolicy.numOfBands = 1;
+ scanPolicy.bandScanPolicy[ 0 ].band = RADIO_BAND_2_4_GHZ;
+ scanPolicy.bandScanPolicy[ 0 ].rxRSSIThreshold = -80;
+ scanPolicy.bandScanPolicy[ 0 ].numOfChannles = 14;
+ scanPolicy.bandScanPolicy[ 0 ].numOfChannlesForDiscovery = 3;
+
+ for ( i = 0; i < 14; i++ )
+ {
+ scanPolicy.bandScanPolicy[ 0 ].channelList[ i ] = i + 1;
+ }
+
+ scanPolicy.bandScanPolicy[ 0 ].trackingMethod.scanType = SCAN_TYPE_NORMAL_ACTIVE;
+ scanPolicy.bandScanPolicy[ 0 ].trackingMethod.method.basicMethodParams.earlyTerminationEvent = SCAN_ET_COND_DISABLE;
+ scanPolicy.bandScanPolicy[ 0 ].trackingMethod.method.basicMethodParams.ETMaxNumberOfApFrames = 0;
+ scanPolicy.bandScanPolicy[ 0 ].trackingMethod.method.basicMethodParams.maxChannelDwellTime = 30000;
+ scanPolicy.bandScanPolicy[ 0 ].trackingMethod.method.basicMethodParams.minChannelDwellTime = 15000;
+ scanPolicy.bandScanPolicy[ 0 ].trackingMethod.method.basicMethodParams.probReqParams.bitrate = RATE_MASK_UNSPECIFIED; /* Let the FW select */
+ scanPolicy.bandScanPolicy[ 0 ].trackingMethod.method.basicMethodParams.probReqParams.numOfProbeReqs = 3;
+ scanPolicy.bandScanPolicy[ 0 ].trackingMethod.method.basicMethodParams.probReqParams.txPowerDbm = DEF_TX_POWER;
+ scanPolicy.bandScanPolicy[ 0 ].discoveryMethod.scanType = SCAN_TYPE_NORMAL_ACTIVE;
+ scanPolicy.bandScanPolicy[ 0 ].discoveryMethod.method.basicMethodParams.earlyTerminationEvent = SCAN_ET_COND_DISABLE;
+ scanPolicy.bandScanPolicy[ 0 ].discoveryMethod.method.basicMethodParams.ETMaxNumberOfApFrames = 0;
+ scanPolicy.bandScanPolicy[ 0 ].discoveryMethod.method.basicMethodParams.maxChannelDwellTime = 30000;
+ scanPolicy.bandScanPolicy[ 0 ].discoveryMethod.method.basicMethodParams.minChannelDwellTime = 15000;
+ scanPolicy.bandScanPolicy[ 0 ].discoveryMethod.method.basicMethodParams.probReqParams.bitrate = RATE_MASK_UNSPECIFIED; /* Let the FW select */;
+ scanPolicy.bandScanPolicy[ 0 ].discoveryMethod.method.basicMethodParams.probReqParams.numOfProbeReqs = 3;
+ scanPolicy.bandScanPolicy[ 0 ].discoveryMethod.method.basicMethodParams.probReqParams.txPowerDbm = DEF_TX_POWER;
+ scanPolicy.bandScanPolicy[ 0 ].immediateScanMethod.scanType = SCAN_TYPE_NORMAL_ACTIVE;
+ scanPolicy.bandScanPolicy[ 0 ].immediateScanMethod.method.basicMethodParams.earlyTerminationEvent = SCAN_ET_COND_DISABLE;
+ scanPolicy.bandScanPolicy[ 0 ].immediateScanMethod.method.basicMethodParams.ETMaxNumberOfApFrames = 0;
+ scanPolicy.bandScanPolicy[ 0 ].immediateScanMethod.method.basicMethodParams.maxChannelDwellTime = 30000;
+ scanPolicy.bandScanPolicy[ 0 ].immediateScanMethod.method.basicMethodParams.minChannelDwellTime = 15000;
+ scanPolicy.bandScanPolicy[ 0 ].immediateScanMethod.method.basicMethodParams.probReqParams.bitrate = RATE_MASK_UNSPECIFIED; /* Let the FW select */;
+ scanPolicy.bandScanPolicy[ 0 ].immediateScanMethod.method.basicMethodParams.probReqParams.numOfProbeReqs = 3;
+ scanPolicy.bandScanPolicy[ 0 ].immediateScanMethod.method.basicMethodParams.probReqParams.txPowerDbm = DEF_TX_POWER;
+ /* we should noe store the scanPolicy now */
+ scanMngr_setParam(pRoamingMngr->hScanMngr, &param);
+
+
+ /* Enable roaming! */
+ param.paramType = ROAMING_MNGR_APPLICATION_CONFIGURATION;
+ param.content.roamingConfigBuffer.roamingMngrConfig.enableDisable = ROAMING_ENABLED;
+ roamingMngr_setParam(hRoamingMngr,&param);
+ }
+
+ break;
+
+ case ROAMING_PRINT_MANUAL_MODE: /* 1617 */
+ WLAN_OS_REPORT(("\n ROAMING MANUAL MODE IS: %d \n",((roamingMngr_t*)hRoamingMngr)->RoamingOperationalMode));
+ break;
+
+ default:
+ WLAN_OS_REPORT(("Invalid function type in Debug Function Command, funcType= %d\n\n", funcType));
+ break;
+ }
+}
+
+
+void printRoamingMgrHelpMenu(void)
+{
+ WLAN_OS_REPORT(("\n\n Roaming Manager Debug Menu \n"));
+ WLAN_OS_REPORT(("------------------------\n"));
+
+
+ WLAN_OS_REPORT((" %02d - ROAMING_MGR_DEBUG_HELP_MENU \n", ROAMING_MGR_DEBUG_HELP_MENU));
+
+ WLAN_OS_REPORT((" %02d - PRINT_ROAMING_STATISTICS \n", PRINT_ROAMING_STATISTICS));
+ WLAN_OS_REPORT((" %02d - RESET_ROAMING_STATISTICS \n", RESET_ROAMING_STATISTICS));
+
+ WLAN_OS_REPORT((" %02d - PRINT_ROAMING_CURRENT_STATUS \n", PRINT_ROAMING_CURRENT_STATUS));
+ WLAN_OS_REPORT((" %02d - PRINT_ROAMING_CANDIDATE_TABLE \n", PRINT_ROAMING_CANDIDATE_TABLE));
+
+ WLAN_OS_REPORT((" %02d - TRIGGER_ROAMING_LOW_QUALITY_EVENT \n", TRIGGER_ROAMING_LOW_QUALITY_EVENT));
+ WLAN_OS_REPORT((" %02d - TRIGGER_ROAMING_BSS_LOSS_EVENT \n", TRIGGER_ROAMING_BSS_LOSS_EVENT));
+ WLAN_OS_REPORT((" %02d - TRIGGER_ROAMING_SWITCH_CHANNEL_EVENT \n", TRIGGER_ROAMING_SWITCH_CHANNEL_EVENT));
+ WLAN_OS_REPORT((" %02d - TRIGGER_ROAMING_AP_DISCONNECT_EVENT \n", TRIGGER_ROAMING_AP_DISCONNECT_EVENT));
+
+ WLAN_OS_REPORT((" %02d - TRIGGER_ROAMING_CONNECT_EVENT \n", TRIGGER_ROAMING_CONNECT_EVENT));
+ WLAN_OS_REPORT((" %02d - TRIGGER_ROAMING_NOT_CONNECTED_EVENT \n", TRIGGER_ROAMING_NOT_CONNECTED_EVENT));
+
+ WLAN_OS_REPORT((" %02d - TRIGGER_ROAMING_HANDOVER_SUCCESS_EVENT \n", TRIGGER_ROAMING_HANDOVER_SUCCESS_EVENT));
+ WLAN_OS_REPORT((" %02d - TRIGGER_ROAMING_HANDOVER_FAILURE_EVENT \n", TRIGGER_ROAMING_HANDOVER_FAILURE_EVENT));
+
+
+ WLAN_OS_REPORT(("\n------------------------\n"));
+}
+
+void PrintBssListGotAfterImemediateScan(TI_HANDLE hScanMgr)
+{
+ bssList_t *bssList;
+ bssEntry_t* pBssEntry;
+ int i=0;
+
+ WLAN_OS_REPORT(("------ PRINTING BSS FOUND AFTER IMMEDIATE SCAN - MANUAL MODE----------\n"));
+
+ bssList = scanMngr_getBSSList(hScanMgr);
+
+ for (i=0 ; i< bssList->numOfEntries ; i++)
+ {
+ pBssEntry = &(bssList->BSSList[i]);
+
+ WLAN_OS_REPORT( ("BSSID: %02x:%02x:%02x:%02x:%02x:%02x, band: %d\n", pBssEntry->BSSID[ 0 ],
+ pBssEntry->BSSID[ 1 ], pBssEntry->BSSID[ 2 ],
+ pBssEntry->BSSID[ 3 ], pBssEntry->BSSID[ 4 ],
+ pBssEntry->BSSID[ 5 ], pBssEntry->band));
+ WLAN_OS_REPORT( ("channel: %d, beacon interval: %d, average RSSI: %d dBm\n",
+ pBssEntry->channel, pBssEntry->beaconInterval, pBssEntry->RSSI));
+
+ }
+
+ WLAN_OS_REPORT(("-----------------------------------------------------------------------\n"));
+
+}
diff --git a/wilink_6_1/Test/roamingMgrDebug.h b/wilink_6_1/Test/roamingMgrDebug.h
new file mode 100644
index 0000000..9c8a079
--- /dev/null
+++ b/wilink_6_1/Test/roamingMgrDebug.h
@@ -0,0 +1,68 @@
+/*
+ * roamingMgrDebug.h
+ *
+ * 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.
+ */
+
+#ifndef __ROAMIN_MGR_DEBUG_H__
+#define __ROAMIN_MGR_DEBUG_H__
+
+#include "tidef.h"
+#include "paramOut.h"
+
+#define ROAMING_MGR_DEBUG_HELP_MENU 0
+#define PRINT_ROAMING_STATISTICS 1
+#define RESET_ROAMING_STATISTICS 2
+#define PRINT_ROAMING_CURRENT_STATUS 3
+#define PRINT_ROAMING_CANDIDATE_TABLE 4
+#define TRIGGER_ROAMING_LOW_QUALITY_EVENT 5
+#define TRIGGER_ROAMING_BSS_LOSS_EVENT 6
+#define TRIGGER_ROAMING_SWITCH_CHANNEL_EVENT 7
+#define TRIGGER_ROAMING_AP_DISCONNECT_EVENT 8
+#define TRIGGER_ROAMING_CONNECT_EVENT 9
+#define TRIGGER_ROAMING_NOT_CONNECTED_EVENT 10
+#define TRIGGER_ROAMING_HANDOVER_SUCCESS_EVENT 11
+#define TRIGGER_ROAMING_HANDOVER_FAILURE_EVENT 12
+
+/* Added for EMP project */
+#define ROAMING_REGISTER_BSS_LOSS_EVENT 13
+#define ROAMING_START_IMMEDIATE_SCAN 14
+#define ROAMING_CONNECT 15
+#define ROAMING_START_CONT_SCAN_BY_APP 16
+#define ROAMING_STOP_CONT_SCAN_BY_APP 17
+#define RAOMING_SET_DEFAULT_SCAN_POLICY 18
+#define ROAMING_PRINT_MANUAL_MODE 19
+
+void roamingMgrDebugFunction(TI_HANDLE hRoamingMngr,
+ TI_UINT32 funcType,
+ void *pParam);
+
+
+#endif /* __ROAMIN_MGR_DEBUG_H__ */
diff --git a/wilink_6_1/Test/rsnDbg.c b/wilink_6_1/Test/rsnDbg.c
new file mode 100644
index 0000000..3a84856
--- /dev/null
+++ b/wilink_6_1/Test/rsnDbg.c
@@ -0,0 +1,175 @@
+/*
+ * rsnDbg.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.
+ */
+
+
+/****************************************************************************/
+/* */
+/* MODULE: */
+/* PURPOSE: */
+/* */
+/****************************************************************************/
+/* #include "osTITypes.h" */
+#include "osApi.h"
+#include "rsnApi.h"
+#include "rsn.h"
+#include "report.h"
+#include "paramOut.h"
+#include "rsnDbg.h"
+#ifdef XCC_MODULE_INCLUDED
+#include "XCCMngr.h"
+#endif
+
+void printRsnDbgFunctions(void);
+void printRogueApTable(TI_HANDLE hRogueAp);
+
+static TI_UINT8 infoBuf[480];
+
+/*************************************************************************
+ * *
+ *************************************************************************
+DESCRIPTION:
+
+INPUT:
+
+OUTPUT:
+
+RETURN:
+
+************************************************************************/
+void rsnDebugFunction(TI_HANDLE hRsn, TI_UINT32 funcType, void *pParam)
+{
+ paramInfo_t param, *pRsnParam;
+ TI_UINT32 value;
+ rsnAuthEncrCapability_t rsnAuthEncrCap;
+
+ switch (funcType)
+ {
+ case DBG_RSN_PRINT_HELP:
+ printRsnDbgFunctions();
+ break;
+
+ case DBG_RSN_SET_DESIRED_AUTH:
+ WLAN_OS_REPORT(("RSN DBG - Set desired Authentication suite \n"));
+ value = *(TI_UINT32*)pParam;
+
+ param.paramType = RSN_EXT_AUTHENTICATION_MODE;
+ param.content.rsnDesiredAuthType = (EAuthSuite)value;
+
+ rsn_setParam(hRsn, &param);
+ break;
+
+ case DBG_RSN_SET_DESIRED_CIPHER:
+ WLAN_OS_REPORT(("RSN DBG - Set desired cipher suite \n"));
+ value = *(TI_UINT32*)pParam;
+
+ param.paramType = RSN_ENCRYPTION_STATUS_PARAM;
+ param.content.rsnEncryptionStatus = (ECipherSuite)value;
+
+ rsn_setParam(hRsn, &param);
+ break;
+
+
+ case DBG_RSN_GEN_MIC_FAILURE_REPORT:
+ value = *(TI_UINT32*)pParam;
+ /* generate unicast mic failure report to the OS and to the RSN module */
+ rsn_reportMicFailure(hRsn, (TI_UINT8*)&value,1);
+ break;
+
+ case DBG_RSN_GET_PARAM_802_11_CAPABILITY:
+
+ param.paramType = RSN_AUTH_ENCR_CAPABILITY;
+ param.content.pRsnAuthEncrCapability = &rsnAuthEncrCap;
+
+ /* Get 802_11 capability info */
+ rsn_getParam(hRsn, &param);
+ break;
+
+ case DBG_RSN_GET_PMKID_CACHE:
+
+ pRsnParam = (paramInfo_t *)&infoBuf;
+ pRsnParam->paramType = RSN_PMKID_LIST;
+ pRsnParam->paramLength = 480;
+
+ /* Get PMKID list */
+ rsn_getParam(hRsn, pRsnParam);
+ break;
+
+ case DBG_RSN_RESET_PMKID_CACHE:
+
+ rsn_resetPMKIDList(hRsn);
+
+ break;
+#ifdef XCC_MODULE_INCLUDED
+ case DBG_RSN_PRINT_ROGUE_AP_TABLE:
+ printRogueApTable(((XCCMngr_t*)((rsn_t*)hRsn)->hXCCMngr)->hRogueAp);
+ break;
+#endif
+
+ case DBG_RSN_SET_PORT_STATUS:
+ WLAN_OS_REPORT(("Setting PORT STATUS to open\n"));
+ rsn_setPortStatus(hRsn,TI_TRUE);
+ break;
+
+ case DBG_RSN_PRINT_PORT_STATUS:
+ {
+ TI_BOOL portStatus = TI_FALSE;
+ portStatus = rsn_getPortStatus(((rsn_t*)hRsn));
+ WLAN_OS_REPORT(("\n\nPORT is %s !!\n",(portStatus)?"OPEN":"CLOSE"));
+ }
+
+ break;
+ default:
+ WLAN_OS_REPORT(("Invalid function type in RSN Function Command: %d\n", funcType));
+ break;
+ }
+
+}
+
+
+void printRsnDbgFunctions(void)
+{
+ WLAN_OS_REPORT((" Rsn Debug Functions \n"));
+ WLAN_OS_REPORT(("-------------------------\n"));
+
+ WLAN_OS_REPORT(("702 - Set default key id \n"));
+ WLAN_OS_REPORT(("703 - Set desired Authentication suite \n"));
+ WLAN_OS_REPORT(("704 - Set desired cipher suite \n"));
+
+ WLAN_OS_REPORT(("706 - Generate MIC FAILURE report (after 2 clicks less then 1 minute - disassociate)\n"));
+ WLAN_OS_REPORT(("707 - Get 802.11 authentication/encryption capability\n"));
+ WLAN_OS_REPORT(("708 - Get PMKID cache \n"));
+ WLAN_OS_REPORT(("709 - ReSet PMKID cache \n"));
+ WLAN_OS_REPORT(("710 - Print Rogue AP table\n"));
+
+
+}
diff --git a/wilink_6_1/Test/rsnDbg.h b/wilink_6_1/Test/rsnDbg.h
new file mode 100644
index 0000000..1774436
--- /dev/null
+++ b/wilink_6_1/Test/rsnDbg.h
@@ -0,0 +1,58 @@
+/*
+ * rsnDbg.h
+ *
+ * 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.
+ */
+
+
+#ifndef __RSN_DBG_H__
+#define __RSN_DBG_H__
+
+/* definitions for ctrl dbg */
+
+#define DBG_RSN_PRINT_HELP 0
+
+#define DBG_RSN_SET_DEF_KEY_ID 2
+#define DBG_RSN_SET_DESIRED_AUTH 3
+#define DBG_RSN_SET_DESIRED_CIPHER 4
+
+#define DBG_RSN_GEN_MIC_FAILURE_REPORT 6
+#define DBG_RSN_GET_PARAM_802_11_CAPABILITY 7
+#define DBG_RSN_GET_PMKID_CACHE 8
+#define DBG_RSN_RESET_PMKID_CACHE 9
+#define DBG_RSN_PRINT_ROGUE_AP_TABLE 10
+#define DBG_RSN_SET_PORT_STATUS 11
+#define DBG_RSN_PRINT_PORT_STATUS 12
+
+void rsnDebugFunction(TI_HANDLE hRsn, TI_UINT32 funcType, void *pParam);
+
+
+#endif /* __RSN_DBG_H__*/
+
diff --git a/wilink_6_1/Test/scanCncnDbg.c b/wilink_6_1/Test/scanCncnDbg.c
new file mode 100644
index 0000000..7919b9a
--- /dev/null
+++ b/wilink_6_1/Test/scanCncnDbg.c
@@ -0,0 +1,89 @@
+/*
+ * scanCncnDbg.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 ScanCncnDbg.c
+ * \brief This file include the scan concentrator debug module implementation
+ *
+ * \see ScanCncn.h, ScanCncn.c
+ */
+
+
+#include "ScanCncn.h"
+#include "scanCncnDbg.h"
+#include "report.h"
+#include "TWDriver.h"
+
+
+/**
+ * \\n
+ * \date 14-Feb-2005\n
+ * \brief Main scan concentrator debug function
+ *
+ * Function Scope \e Public.\n
+ * \param hScanCncn - handle to the scan concentrator object.\n
+ * \param funcType - the specific debug function.\n
+ * \param pParam - parameters for the debug function.\n
+ */
+void scanConcentratorDebugFunction( TI_HANDLE hScanCncn, TI_HANDLE hTWD, TI_UINT32 funcType, void *pParam )
+{
+ switch (funcType)
+ {
+ case DBG_SCAN_CNCN_PRINT_HELP:
+ printScanConcentratorDbgFunctions();
+ break;
+
+ case DBG_SCAN_SRV_PRINT_STATUS:
+ TWD_PrintMacServDebugStatus (hTWD);
+ break;
+
+ default:
+ WLAN_OS_REPORT(("Invalid function type in scan concentrator debug function: %d\n", funcType));
+ break;
+ }
+}
+
+/**
+ * \\n
+ * \date 14-Feb-2005\n
+ * \brief Prints scan concentrator debug menu
+ *
+ * Function Scope \e Public.\n
+ */
+void printScanConcentratorDbgFunctions(void)
+{
+ WLAN_OS_REPORT((" Scan Concentrator Debug Functions \n"));
+ WLAN_OS_REPORT(("---------------------------------------\n"));
+ WLAN_OS_REPORT(("1400 - Print the scan concentrator Debug Help\n"));
+ WLAN_OS_REPORT(("1401 - Print the scan SRV status\n"));
+}
+
diff --git a/wilink_6_1/Test/scanCncnDbg.h b/wilink_6_1/Test/scanCncnDbg.h
new file mode 100644
index 0000000..28a6f7e
--- /dev/null
+++ b/wilink_6_1/Test/scanCncnDbg.h
@@ -0,0 +1,124 @@
+/*
+ * scanCncnDbg.h
+ *
+ * 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 ScanCncn.h
+ * \brief This file include private definitions for the scan concentrator debug module.
+ * \
+ * \date 30-Dec-2004
+ */
+
+#ifndef __SCANCNCNDBG_H__
+#define __SCANCNCNDBG_H__
+
+/*
+ ***********************************************************************
+ * Constant definitions.
+ ***********************************************************************
+ */
+
+/* debug functions */
+#define DBG_SCAN_CNCN_PRINT_HELP 0
+#define DBG_SCAN_SRV_PRINT_STATUS 1
+
+/*
+ ***********************************************************************
+ * Enums.
+ ***********************************************************************
+ */
+
+/*
+ ***********************************************************************
+ * Typedefs.
+ ***********************************************************************
+ */
+
+/*
+ ***********************************************************************
+ * Structure definitions.
+ ***********************************************************************
+ */
+
+/*
+ ***********************************************************************
+ * External data definitions.
+ ***********************************************************************
+ */
+
+/*
+ ***********************************************************************
+ * External functions definitions
+ ***********************************************************************
+ */
+
+/**
+ * \\n
+ * \date 14-Feb-2005\n
+ * \brief Main scan concentrator debug function
+ *
+ * Function Scope \e Public.\n
+ * \param hScanCncn - handle to the scan concentrator object.\n
+ * \param funcType - the specific debug function.\n
+ * \param pParam - parameters for the debug function.\n
+ */
+void scanConcentratorDebugFunction( TI_HANDLE hScanCncn, TI_HANDLE hScanSrv, TI_UINT32 funcType, void *pParam );
+
+/**
+ * \\n
+ * \date 14-Feb-2005\n
+ * \brief Prints scan concentrator debug menu
+ *
+ * Function Scope \e Public.\n
+ */
+void printScanConcentratorDbgFunctions(void);
+
+/**
+ * \\n
+ * \date 14-Feb-2005\n
+ * \brief Performs a driver scan from within an app scan.\n
+ *
+ * Function Scope \e Public.\n
+ * \param hScanCncn - handle to the scan concentrator object.\n
+ */
+void appDriverScan( TI_HANDLE hScanCncn );
+
+/**
+ * \\n
+ * \date 14-Feb-2005\n
+ * \brief Performs an app scan from within a driver scan.\n
+ *
+ * Function Scope \e Public.\n
+ * \param hScanCncn - handle to the scan concentrator object.\n
+ */
+void driverAppScan( TI_HANDLE hScanCncn );
+
+#endif /* __SCANCNCNDBG_H__ */
diff --git a/wilink_6_1/Test/scrDbg.c b/wilink_6_1/Test/scrDbg.c
new file mode 100644
index 0000000..6890975
--- /dev/null
+++ b/wilink_6_1/Test/scrDbg.c
@@ -0,0 +1,282 @@
+/*
+ * scrDbg.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 scrDbg.c
+ * \brief This file include the SCR debug module implementation
+ *
+ * \see scrDbg.h, scrApi.h
+ */
+
+
+#include "tidef.h"
+#include "scrDbg.h"
+#include "osApi.h"
+#include "report.h"
+
+#define MAX_DESC_LENGTH 50
+
+char clientDesc[ SCR_CID_NO_CLIENT + 1 ][ MAX_DESC_LENGTH ] =
+{
+ "SCR_CID_APP_SCAN",
+ "SCR_CID_DRIVER_FG_SCAN",
+ "SCR_CID_CONT_SCAN",
+ "SCR_CID_XCC_MEASURE",
+ "SCR_CID_BASIC_MEASURE",
+ "SCR_CID_CONNECT",
+ "SCR_CID_IMMED_SCAN",
+ "SCR_CID_SWITCH_CHAN",
+ "SCR_CID_NUM_OF_CLIENTS",
+ "SCR_CID_NO_CLIENT"
+};
+
+char requestStatusDesc[ 4 ][ MAX_DESC_LENGTH ] =
+{
+ "SCR_CRS_RUN",
+ "SCR_CRS_PEND",
+ "SCR_CRS_ABORT",
+ "SCR_CRS_FW_RESET"
+};
+
+char pendReasonDesc[ SCR_PR_NONE + 1 ][ MAX_DESC_LENGTH ] =
+{
+ "SCR_PR_OTHER_CLIENT_ABORTING",
+ "SCR_PR_OTHER_CLIENT_RUNNING",
+ "SCR_PR_DIFFERENT_GROUP_RUNNING",
+ "SCR_PR_NONE"
+};
+
+char groupDesc[ SCR_GID_NUM_OF_GROUPS ][ MAX_DESC_LENGTH ] =
+{
+ "SCR_GID_IDLE",
+ "SCR_GID_DRV_SCAN",
+ "SCR_GID_APP_SCAN",
+ "SCR_GID_CONNECT",
+ "SCR_GID_CONNECTED",
+ "SCR_GID_ROAMING"
+};
+
+char stateDesc[ SCR_CS_ABORTING + 1 ][ MAX_DESC_LENGTH ] =
+{
+ "SCR_CS_IDLE",
+ "SCR_CS_PENDING",
+ "SCR_CS_RUNNING",
+ "SCR_CS_ABORTING"
+};
+
+char modeDesc[ SCR_MID_NUM_OF_MODES][ MAX_DESC_LENGTH ] =
+{
+ "SCR_MID_NORMAL",
+ "SCR_MID_SG",
+};
+
+char resourceDesc[ SCR_RESOURCE_NUM_OF_RESOURCES ][ MAX_DESC_LENGTH ]=
+{
+ "SCR_RESOURCE_SERVING_CHANNEL",
+ "SCR_RESOURCE_PERIODIC_SCAN"
+};
+
+/**
+ * \\n
+ * \date 01-May-2005\n
+ * \brief Main SCR debug function
+ *
+ * Function Scope \e Public.\n
+ * \param hScr - handle to the SCR object.\n
+ * \param funcType - the specific debug function.\n
+ * \param pParam - parameters for the debug function.\n
+ */
+void scrDebugFunction( TI_HANDLE hScr, TI_UINT32 funcType, void *pParam )
+{
+ switch (funcType)
+ {
+ case DBG_SCR_PRINT_HELP:
+ printScrDbgFunctions();
+ break;
+
+ case DBG_SCR_CLIENT_REQUEST_SERVING_CHANNEL:
+ requestAsClient( hScr, *((EScrClientId*)pParam), SCR_RESOURCE_SERVING_CHANNEL );
+ break;
+
+ case DBG_SCR_CLIENT_RELEASE_SERVING_CHANNEL:
+ releaseAsClient( hScr, *((EScrClientId*)pParam), SCR_RESOURCE_SERVING_CHANNEL );
+ break;
+
+ case DBG_SCR_CLIENT_REQUEST_PERIODIC_SCAN:
+ requestAsClient( hScr, *((EScrClientId*)pParam), SCR_RESOURCE_PERIODIC_SCAN );
+ break;
+
+ case DBG_SCR_CLIENT_RELEASE_PERIODIC_SCAN:
+ releaseAsClient( hScr, *((EScrClientId*)pParam), SCR_RESOURCE_PERIODIC_SCAN );
+ break;
+
+ case DBG_SCR_SET_GROUP:
+ changeGroup( hScr, *((EScrGroupId*)pParam) );
+ break;
+
+ case DBG_SCR_PRINT_OBJECT:
+ printSCRObject( hScr );
+ break;
+
+ case DBG_SCR_SET_MODE:
+ changeMode(hScr, *((EScrModeId*)pParam));
+ break;
+
+ default:
+ WLAN_OS_REPORT(("Invalid function type in SCR debug function: %d\n", funcType));
+ break;
+ }
+}
+
+/**
+ * \\n
+ * \date 01-May-2005\n
+ * \brief Prints SCR debug menu
+ *
+ * Function Scope \e Public.\n
+ */
+void printScrDbgFunctions(void)
+{
+ WLAN_OS_REPORT((" SCR Debug Functions \n"));
+ WLAN_OS_REPORT(("-------------------------\n"));
+ WLAN_OS_REPORT(("1700 - Print the SCR Debug Help\n"));
+ WLAN_OS_REPORT(("1701 <client> - Request SCR as one shot scan (set client 0-7).\n"));
+ WLAN_OS_REPORT(("1702 <client> - Release SCR as one shot scan (set client 0-7).\n"));
+ WLAN_OS_REPORT(("1703 <client> - Request SCR as periodic scan (set client 0-7).\n"));
+ WLAN_OS_REPORT(("1704 <client> - Release SCR as periodic scan (set client 0-7).\n"));
+ WLAN_OS_REPORT(("1705 - Change SCR group\n"));
+ WLAN_OS_REPORT(("1706 - Print SCR object\n"));
+ WLAN_OS_REPORT(("1707 - Change SCR mode\n"));
+}
+
+/**
+ * \\n
+ * \date 29-March-2005\n
+ * \brief Request the SCR with a given client ID.\n
+ *
+ * Function Scope \e Public.\n
+ * \param hScr - handle to the SCR object.\n
+ * \param client - the client to request as.\n\
+ * \param eResource - the requested resource.\n
+ */
+void requestAsClient( TI_HANDLE hScr, EScrClientId client, EScrResourceId eResource )
+{
+ EScePendReason pendReason;
+ EScrClientRequestStatus requestStatus;
+
+ requestStatus = scr_clientRequest( hScr, client, eResource, &pendReason );
+ WLAN_OS_REPORT(("Resource %s was requested as client %s, result %s, pend reason %s\n",
+ resourceDesc[ eResource ], clientDesc[ client ], requestStatusDesc[ requestStatus ],
+ pendReasonDesc[ pendReason ]));
+}
+
+/**
+ * \\n
+ * \date 01-May-2005\n
+ * \brief Stops continuous scan process.\n
+ *
+ * Function Scope \e Public.\n
+ * \param hScr - handle to the SCR object.\n
+ * \param client - the client to release as.\n
+ * \param eResource - the released resource.\n
+ */
+void releaseAsClient( TI_HANDLE hScr, EScrClientId client, EScrResourceId eResource )
+{
+ scr_clientComplete( hScr, client, eResource );
+ WLAN_OS_REPORT(("Resource %s was released as client %s\n",
+ resourceDesc[ eResource ], clientDesc[ client ]));
+}
+
+/**
+ * \\n
+ * \date 01-May-2005\n
+ * \brief Change the SCR group.\n
+ *
+ * Function Scope \e Public.\n
+ * \param hScr - handle to the SCR object.\n
+ * \param group - the group to change to.\n
+ */
+void changeGroup( TI_HANDLE hScr, EScrGroupId group )
+{
+ scr_setGroup( hScr, group );
+ WLAN_OS_REPORT(("SCR group was changed to %s\n",
+ groupDesc[ group ]));
+}
+
+/**
+ * \\n
+ * \date 23-Nov-2005\n
+ * \brief Change the SCR mode.\n
+ *
+ * Function Scope \e Public.\n
+ * \param hScr - handle to the SCR object.\n
+ * \param mode - the mode to change to.\n
+ */
+void changeMode( TI_HANDLE hScr, EScrModeId mode )
+{
+ scr_setMode( hScr, mode );
+ WLAN_OS_REPORT(("SCR mode was changed to %s\n",
+ modeDesc[ mode ]));
+}
+/**
+ * \\n
+ * \date 15-June-2005\n
+ * \brief Prints the SCR object.\n
+ *
+ * Function Scope \e Public.\n
+ * \param hScr - handle to the SCR object.\n
+ */
+void printSCRObject( TI_HANDLE hScr )
+{
+#ifdef REPORT_LOG
+ TScr* pScr = (TScr*)hScr;
+ int i;
+
+ WLAN_OS_REPORT( ("SCR current group:%s, mode: %s, serving channel owner:%s, periodic scan owner: %s "
+ "within request:%s\n",
+ groupDesc[ pScr->currentGroup ],modeDesc[ pScr->currentMode ],
+ clientDesc[ pScr->runningClient[ SCR_RESOURCE_SERVING_CHANNEL ] ],
+ clientDesc[ pScr->runningClient[ SCR_RESOURCE_PERIODIC_SCAN ] ],
+ (TI_TRUE == pScr->statusNotficationPending ? "Yes" : "No" )) );
+
+ WLAN_OS_REPORT( ("%-22s %-15s %-15s %-15s %-15s\n", "Client", "State (SC)", "State (PS)", "Pend Reason (SC)", "Pend Reason (PS)") );
+ WLAN_OS_REPORT( ("----------------------------------------------------------------------\n"));
+ for ( i = 0; i < SCR_CID_NUM_OF_CLIENTS; i++ )
+ {
+ WLAN_OS_REPORT( ("%-22s %-15s %-15s %-15s %-15s \n",
+ clientDesc[ i ], stateDesc[ pScr->clientArray[ i ].state[ SCR_RESOURCE_SERVING_CHANNEL ] ],
+ stateDesc[ pScr->clientArray[ i ].state[ SCR_RESOURCE_PERIODIC_SCAN ] ],
+ pendReasonDesc[ pScr->clientArray[ i ].currentPendingReason[ SCR_RESOURCE_SERVING_CHANNEL ] ],
+ pendReasonDesc[ pScr->clientArray[ i ].currentPendingReason[ SCR_RESOURCE_PERIODIC_SCAN ] ]) );
+ }
+#endif
+}
diff --git a/wilink_6_1/Test/scrDbg.h b/wilink_6_1/Test/scrDbg.h
new file mode 100644
index 0000000..7835d31
--- /dev/null
+++ b/wilink_6_1/Test/scrDbg.h
@@ -0,0 +1,167 @@
+/*
+ * scrDbg.h
+ *
+ * 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 scrDbg.h
+ * \brief This file include private definitions for the SCR debug module.
+ *
+ * \see scrDbg.c, scrApi.h
+ */
+
+#ifndef __SCRDBG_H__
+#define __SCRDBG_H__
+
+#include "scr.h"
+
+/*
+ ***********************************************************************
+ * Constant definitions.
+ ***********************************************************************
+ */
+
+/* debug functions */
+#define DBG_SCR_PRINT_HELP 0
+#define DBG_SCR_CLIENT_REQUEST_SERVING_CHANNEL 1
+#define DBG_SCR_CLIENT_RELEASE_SERVING_CHANNEL 2
+#define DBG_SCR_CLIENT_REQUEST_PERIODIC_SCAN 3
+#define DBG_SCR_CLIENT_RELEASE_PERIODIC_SCAN 4
+#define DBG_SCR_SET_GROUP 5
+#define DBG_SCR_PRINT_OBJECT 6
+#define DBG_SCR_SET_MODE 7
+
+/*
+ ***********************************************************************
+ * Enums.
+ ***********************************************************************
+ */
+
+/*
+ ***********************************************************************
+ * Typedefs.
+ ***********************************************************************
+ */
+
+/*
+ ***********************************************************************
+ * Structure definitions.
+ ***********************************************************************
+ */
+
+/*
+ ***********************************************************************
+ * External data definitions.
+ ***********************************************************************
+ */
+
+/*
+ ***********************************************************************
+ * External functions definitions
+ ***********************************************************************
+ */
+
+/**
+ * \\n
+ * \date 01-May-2005\n
+ * \brief Main SCR debug function
+ *
+ * Function Scope \e Public.\n
+ * \param hScr - handle to the SCR object.\n
+ * \param funcType - the specific debug function.\n
+ * \param pParam - parameters for the debug function.\n
+ */
+void scrDebugFunction( TI_HANDLE hScanMngr, TI_UINT32 funcType, void *pParam );
+
+/**
+ * \\n
+ * \date 01-May-2005\n
+ * \brief Prints SCR debug menu
+ *
+ * Function Scope \e Public.\n
+ */
+void printScrDbgFunctions(void);
+
+/**
+ * \\n
+ * \date 29-March-2005\n
+ * \brief Request the SCR with a given client ID.\n
+ *
+ * Function Scope \e Public.\n
+ * \param hScr - handle to the SCR object.\n
+ * \param client - the client to request as.\n\
+ * \param eResource - the requested resource.\n
+ */
+void requestAsClient( TI_HANDLE hScr, EScrClientId client, EScrResourceId eResource );
+
+/**
+ * \\n
+ * \date 01-May-2005\n
+ * \brief Stops continuous scan process.\n
+ *
+ * Function Scope \e Public.\n
+ * \param hScr - handle to the SCR object.\n
+ * \param client - the client to release as.\n\
+ */
+void releaseAsClient( TI_HANDLE hScr, EScrClientId client, EScrResourceId eResource );
+
+/**
+ * \\n
+ * \date 01-May-2005\n
+ * \brief Change the SCR group.\n
+ *
+ * Function Scope \e Public.\n
+ * \param hScr - handle to the SCR object.\n
+ * \param group - the group to change to.\n
+ */
+void changeGroup( TI_HANDLE hScr, EScrGroupId group );
+
+/**
+ * \\n
+ * \date 23-Nov-2005\n
+ * \brief Change the SCR mode.\n
+ *
+ * Function Scope \e Public.\n
+ * \param hScr - handle to the SCR object.\n
+ * \param mode - the mode to change to.\n
+ */
+void changeMode( TI_HANDLE hScr, EScrModeId mode );
+
+/**
+ * \\n
+ * \date 15-June-2005\n
+ * \brief Prints the SCR object.\n
+ *
+ * Function Scope \e Public.\n
+ * \param hScr - handle to the SCR object.\n
+ */
+void printSCRObject( TI_HANDLE hScr );
+
+#endif /* __SCRDBG_H__ */
diff --git a/wilink_6_1/Test/siteMgrDebug.c b/wilink_6_1/Test/siteMgrDebug.c
new file mode 100644
index 0000000..abc2293
--- /dev/null
+++ b/wilink_6_1/Test/siteMgrDebug.c
@@ -0,0 +1,1193 @@
+/*
+ * siteMgrDebug.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 reportReplvl.c
+ * \brief Report level implementation
+ *
+ * \see reportReplvl.h
+ */
+
+/** \file siteMgrDebug.c
+ * \brief The siteMgrDebug module.
+ *
+ * \see siteMgrDebug.h
+ */
+
+#include "tidef.h"
+#include "osApi.h"
+#include "paramOut.h"
+#include "siteMgrDebug.h"
+#include "siteMgrApi.h"
+#include "siteHash.h"
+#include "report.h"
+#include "CmdDispatcher.h"
+#include "DrvMainModules.h"
+#include "sme.h"
+#include "apConn.h"
+#include "healthMonitor.h"
+#include "conn.h"
+#include "connApi.h"
+
+#ifdef XCC_MODULE_INCLUDED
+#include "XCCMngr.h"
+#endif
+
+
+static void printPrimarySite(siteMgr_t *pSiteMgr);
+
+void printSiteTable(siteMgr_t *pSiteMgr, char *desiredSsid);
+
+static void printDesiredParams(siteMgr_t *pSiteMgr, TI_HANDLE hCmdDispatch);
+
+static void printPrimarySiteDesc(siteMgr_t *pSiteMgr, OS_802_11_BSSID *pPrimarySiteDesc);
+
+static void setRateSet(TI_UINT8 maxRate, TRates *pRates);
+
+void printSiteMgrHelpMenu(void);
+
+/* Function implementation */
+void siteMgrDebugFunction (TI_HANDLE hSiteMgr,
+ TStadHandlesList *pStadHandles,
+ TI_UINT32 funcType,
+ void *pParam)
+{
+ siteMgr_t *pSiteMgr = (siteMgr_t *)hSiteMgr;
+ paramInfo_t param;
+ TSsid newDesiredSsid;
+ TI_UINT8 value;
+ TI_UINT8 i;
+ OS_802_11_BSSID primarySiteDesc;
+ TRates ratesSet;
+
+
+ newDesiredSsid.len = 5;
+ os_memoryCopy(pSiteMgr->hOs, (void *)newDesiredSsid.str, "yaeli", 5);
+
+
+ switch (funcType)
+ {
+ case SITE_MGR_DEBUG_HELP_MENU:
+ printSiteMgrHelpMenu();
+ break;
+
+ case PRIMARY_SITE_DBG:
+ printPrimarySite(pSiteMgr);
+ break;
+
+ case SITE_TABLE_DBG:
+ printSiteTable(pSiteMgr, NULL);
+ break;
+
+ case DESIRED_PARAMS_DBG:
+ printDesiredParams(pSiteMgr, pStadHandles->hCmdDispatch);
+ break;
+
+ case GET_PRIMARY_SITE_DESC_DBG:
+ param.paramType = SITE_MGR_GET_SELECTED_BSSID_INFO;
+ param.content.pSiteMgrPrimarySiteDesc = &primarySiteDesc;
+ cmdDispatch_GetParam(pStadHandles->hCmdDispatch, &param);
+ printPrimarySiteDesc(pSiteMgr, &primarySiteDesc);
+ break;
+
+ case SET_RSN_DESIRED_CIPHER_SUITE_DBG:
+ param.paramType = RSN_ENCRYPTION_STATUS_PARAM;
+ value = *((TI_UINT32 *)pParam);
+ param.content.rsnEncryptionStatus = (ECipherSuite)value;
+ cmdDispatch_SetParam(pStadHandles->hCmdDispatch, &param);
+ WLAN_OS_REPORT(("\nSetting RSN_DESIRED_CIPHER_SUITE_PARAM : %d\n", value));
+ break;
+
+ case GET_RSN_DESIRED_CIPHER_SUITE_DBG:
+ param.paramType = RSN_ENCRYPTION_STATUS_PARAM;
+ cmdDispatch_GetParam(pStadHandles->hCmdDispatch, &param);
+ WLAN_OS_REPORT(("\nGetting RSN_DESIRED_CIPHER_SUITE_PARAM: %d\n", param.content.rsnEncryptionStatus));
+ break;
+
+ case SET_RSN_DESIRED_AUTH_TYPE_DBG:
+ param.paramType = RSN_EXT_AUTHENTICATION_MODE;
+ value = *((TI_UINT32 *)pParam);
+ param.content.rsnDesiredAuthType = (EAuthSuite)value;
+ cmdDispatch_SetParam(pStadHandles->hCmdDispatch, &param);
+ if (value == RSN_AUTH_OPEN)
+ WLAN_OS_REPORT(("\nSetting RSN_DESIRED_AUTH_TYPE_PARAM: RSN_AUTH_OPEN\n"));
+ else if (value == RSN_AUTH_SHARED_KEY)
+ WLAN_OS_REPORT(("\nSetting RSN_DESIRED_AUTH_TYPE_PARAM: RSN_AUTH_SHARED_KEY\n"));
+ else if (value == RSN_AUTH_AUTO_SWITCH)
+ WLAN_OS_REPORT(("\nSetting RSN_DESIRED_AUTH_TYPE_PARAM: RSN_AUTH_AUTO_SWITCH\n"));
+ else
+ WLAN_OS_REPORT(("\nSetting RSN_DESIRED_AUTH_TYPE_PARAM: Invalid: %d\n", value));
+ break;
+
+ case GET_RSN_DESIRED_AUTH_TYPE_DBG:
+ param.paramType = RSN_EXT_AUTHENTICATION_MODE;
+ cmdDispatch_GetParam(pStadHandles->hCmdDispatch, &param);
+ if (param.content.rsnDesiredAuthType == RSN_AUTH_OPEN)
+ WLAN_OS_REPORT(("\nGetting RSN_DESIRED_AUTH_TYPE_PARAM: RSN_AUTH_OPEN\n"));
+ else if (param.content.rsnDesiredAuthType == RSN_AUTH_SHARED_KEY)
+ WLAN_OS_REPORT(("\nGetting RSN_DESIRED_AUTH_TYPE_PARAM: RSN_AUTH_SHARED_KEY\n"));
+ else if (param.content.rsnDesiredAuthType == RSN_AUTH_AUTO_SWITCH)
+ WLAN_OS_REPORT(("\nGetting RSN_DESIRED_AUTH_TYPE_PARAM: RSN_AUTH_AUTO_SWITCH\n"));
+ else
+ WLAN_OS_REPORT(("\nGetting RSN_DESIRED_AUTH_TYPE_PARAM: Invalid: %d\n", param.content.rsnDesiredAuthType));
+
+ break;
+
+ case GET_CONNECTION_STATUS_DBG:
+ param.paramType = SME_CONNECTION_STATUS_PARAM;
+ cmdDispatch_GetParam(pStadHandles->hCmdDispatch, &param);
+ if (param.content.smeSmConnectionStatus == eDot11Idle)
+ WLAN_OS_REPORT(("\nGetting SITE_MGR_CONNECTION_STATUS_PARAM: STATUS_IDLE\n"));
+ else if (param.content.smeSmConnectionStatus == eDot11Scaning)
+ WLAN_OS_REPORT(("\nGetting SITE_MGR_CONNECTION_STATUS_PARAM: STATUS_SCANNING\n"));
+ else if (param.content.smeSmConnectionStatus == eDot11Connecting)
+ WLAN_OS_REPORT(("\nGetting SITE_MGR_CONNECTION_STATUS_PARAM: STATUS_CONNECTING\n"));
+ else if (param.content.smeSmConnectionStatus == eDot11Associated)
+ WLAN_OS_REPORT(("\nGetting SITE_MGR_CONNECTION_STATUS_PARAM: STATUS_ASSOCIATED\n"));
+ else if (param.content.smeSmConnectionStatus == eDot11Disassociated)
+ WLAN_OS_REPORT(("\nGetting SITE_MGR_CONNECTION_STATUS_PARAM: STATUS_DIS_ASSOCIATED\n"));
+ else if (param.content.smeSmConnectionStatus == eDot11RadioDisabled)
+ WLAN_OS_REPORT(("\nGetting SITE_MGR_CONNECTION_STATUS_PARAM: STATUS_RADIO_DISABLED\n"));
+ else
+ WLAN_OS_REPORT(("\nGetting SITE_MGR_CONNECTION_STATUS_PARAM: STATUS_ERROR\n"));
+ break;
+
+ case SET_SUPPORTED_RATE_SET_DBG:
+ param.paramType = SITE_MGR_DESIRED_SUPPORTED_RATE_SET_PARAM;
+ value = *((TI_UINT32 *)pParam);
+ setRateSet(value, &ratesSet);
+ os_memoryCopy(pSiteMgr->hOs, &(param.content.siteMgrDesiredSupportedRateSet), &(ratesSet), sizeof(TRates));
+ WLAN_OS_REPORT(("\nSetting SET_SUPPORTED_RATE_SET_DBG\n"));
+ cmdDispatch_SetParam(pStadHandles->hCmdDispatch, &param);
+ break;
+
+ case GET_SUPPORTED_RATE_SET_DBG:
+ param.paramType = SITE_MGR_DESIRED_SUPPORTED_RATE_SET_PARAM;
+ cmdDispatch_GetParam(pStadHandles->hCmdDispatch, &param);
+ WLAN_OS_REPORT(("\nGetting SITE_MGR_DESIRED_SUPPORTED_RATE_SET_PARAM\n"));
+ if(param.content.siteMgrDesiredSupportedRateSet.len == 0)
+ WLAN_OS_REPORT(("\nNo rates defined\n"));
+ else
+ {
+ for (i = 0; i < param.content.siteMgrDesiredSupportedRateSet.len; i++)
+ WLAN_OS_REPORT(("\nRate %d is 0x%X\n", i +1, param.content.siteMgrDesiredSupportedRateSet.ratesString[i]));
+ }
+ break;
+
+ case SET_MLME_LEGACY_AUTH_TYPE_DBG:
+ param.paramType = MLME_LEGACY_TYPE_PARAM;
+ value = *((TI_UINT32 *)pParam);
+ param.content.mlmeLegacyAuthType = (legacyAuthType_e)value;
+ cmdDispatch_SetParam(pStadHandles->hCmdDispatch, &param);
+ if (value == AUTH_LEGACY_OPEN_SYSTEM)
+ WLAN_OS_REPORT(("\nSetting MLME_LEGACY_TYPE_PARAM: AUTH_LEGACY_OPEN_SYSTEM\n"));
+ else if (value == AUTH_LEGACY_SHARED_KEY)
+ WLAN_OS_REPORT(("\nSetting MLME_LEGACY_TYPE_PARAM: AUTH_LEGACY_SHARED_KEY\n"));
+ else if (value == AUTH_LEGACY_AUTO_SWITCH)
+ WLAN_OS_REPORT(("\nSetting MLME_LEGACY_TYPE_PARAM: AUTH_LEGACY_AUTO_SWITCH\n"));
+ else
+ WLAN_OS_REPORT(("\nSetting MLME_LEGACY_TYPE_PARAM: Invalid: %d\n", value));
+ break;
+
+ case GET_MLME_LEGACY_AUTH_TYPE_DBG:
+ param.paramType = MLME_LEGACY_TYPE_PARAM;
+ cmdDispatch_GetParam(pStadHandles->hCmdDispatch, &param);
+ if (param.content.mlmeLegacyAuthType == AUTH_LEGACY_OPEN_SYSTEM)
+ WLAN_OS_REPORT(("\nGetting MLME_LEGACY_TYPE_PARAM: AUTH_LEGACY_OPEN_SYSTEM\n"));
+ else if (param.content.rsnDesiredAuthType == AUTH_LEGACY_SHARED_KEY)
+ WLAN_OS_REPORT(("\nGetting MLME_LEGACY_TYPE_PARAM: AUTH_LEGACY_SHARED_KEY\n"));
+ else if (param.content.rsnDesiredAuthType == AUTH_LEGACY_AUTO_SWITCH)
+ WLAN_OS_REPORT(("\nGetting MLME_LEGACY_TYPE_PARAM: AUTH_AUTO_SWITCH\n"));
+ else
+ WLAN_OS_REPORT(("\nGetting MLME_LEGACY_TYPE_PARAM: Invalid: %d\n", param.content.rsnDesiredAuthType));
+
+ break;
+
+
+ case RADIO_STAND_BY_CHANGE_STATE:
+ WLAN_OS_REPORT(("\nChange GPIO-13 State...\n"));
+ break;
+
+
+ case PRINT_FAILURE_EVENTS:
+ {
+
+ WLAN_OS_REPORT(("\n PRINT HEALTH MONITOR LOG\n"));
+ healthMonitor_printFailureEvents (pStadHandles->hHealthMonitor);
+ apConn_printStatistics(pStadHandles->hAPConnection);
+#ifdef REPORT_LOG
+ conn_ibssPrintStatistics(pStadHandles->hConn);
+#endif
+ if (((conn_t*)pStadHandles->hConn)->currentConnType==CONNECTION_INFRA)
+ {
+ switch (((conn_t*)pStadHandles->hConn)->state)
+ {
+ case 0: WLAN_OS_REPORT((" CONN state is IDLE\n"));
+ break;
+ case 1: WLAN_OS_REPORT((" CONN state is SCR_WAIT\n"));
+ break;
+ case 2: WLAN_OS_REPORT((" CONN state is WAIT_JOIN_CMPLT\n"));
+ break;
+ case 3: WLAN_OS_REPORT((" CONN state is MLME_WAIT\n"));
+ break;
+ case 4: WLAN_OS_REPORT((" CONN state is RSN_WAIT\n"));
+ break;
+ case 5: WLAN_OS_REPORT((" CONN state is CONFIG_HW\n"));
+ break;
+ case 6: WLAN_OS_REPORT((" CONN state is CONNECTED\n"));
+ break;
+ case 7: WLAN_OS_REPORT((" CONN state is DISASSOCC\n"));
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ break;
+
+ case FORCE_HW_RESET_RECOVERY:
+ WLAN_OS_REPORT(("\n Currently not supported!\n"));
+ break;
+
+ case FORCE_SOFT_RECOVERY:
+ WLAN_OS_REPORT(("\n FORCE Full Recovery (Soft)\n"));
+ break;
+
+
+ case PERFORM_HEALTH_TEST:
+ WLAN_OS_REPORT(("\n PERFORM_HEALTH_TEST \n"));
+ healthMonitor_PerformTest(pStadHandles->hHealthMonitor, TI_FALSE);
+ break;
+
+ case PRINT_SITE_TABLE_PER_SSID:
+ printSiteTable(pSiteMgr, (char*)pParam);
+ break;
+
+ case SET_DESIRED_CHANNEL:
+ param.paramType = SITE_MGR_DESIRED_CHANNEL_PARAM;
+ param.content.siteMgrDesiredChannel = *(TI_UINT8*)pParam;
+ siteMgr_setParam(pStadHandles->hSiteMgr, &param);
+ break;
+
+ default:
+ WLAN_OS_REPORT(("Invalid function type in Debug Site Manager Function Command: %d\n\n", funcType));
+ break;
+ }
+}
+
+static void printPrimarySite(siteMgr_t *pSiteMgr)
+{
+ siteEntry_t *pSiteEntry;
+ char ssid[MAX_SSID_LEN + 1];
+
+ pSiteEntry = pSiteMgr->pSitesMgmtParams->pPrimarySite;
+
+ if (pSiteEntry == NULL)
+ {
+ WLAN_OS_REPORT(("\n\n************************ PRIMARY SITE IS NULL ****************************\n\n\n"));
+ return;
+ }
+
+ WLAN_OS_REPORT(("\n\n************************ PRIMARY SITE ****************************\n\n\n"));
+
+ WLAN_OS_REPORT(("BSSID %2X-%2X-%2X-%2X-%2X-%2X ",
+ pSiteEntry->bssid[0],
+ pSiteEntry->bssid[1],
+ pSiteEntry->bssid[2],
+ pSiteEntry->bssid[3],
+ pSiteEntry->bssid[4],
+ pSiteEntry->bssid[5]));
+
+ os_memoryCopy(pSiteMgr->hOs,ssid, (void *)pSiteEntry->ssid.str, pSiteEntry->ssid.len);
+ ssid[pSiteEntry->ssid.len] = 0;
+ WLAN_OS_REPORT(("SSID %s\n\n", ssid));
+
+ if (pSiteEntry->bssType == BSS_INFRASTRUCTURE)
+ WLAN_OS_REPORT(("BSS Type INFRASTRUCTURE\n\n"));
+ else if (pSiteEntry->bssType == BSS_INDEPENDENT)
+ WLAN_OS_REPORT(("BSS Type IBSS\n\n"));
+ else if (pSiteEntry->bssType == BSS_ANY)
+ WLAN_OS_REPORT(("BSS Type ANY\n\n"));
+ else
+ WLAN_OS_REPORT(("BSS Type INVALID\n\n"));
+
+
+ WLAN_OS_REPORT(("Channel %d\n", pSiteEntry->channel));
+
+ WLAN_OS_REPORT(("\n"));
+
+ switch (pSiteEntry->maxBasicRate)
+ {
+ case DRV_RATE_1M:
+ WLAN_OS_REPORT(("Max Basic Rate RATE_1M_BIT\n"));
+ break;
+
+ case DRV_RATE_2M:
+ WLAN_OS_REPORT(("Max Basic Rate RATE_2M_BIT\n"));
+ break;
+
+ case DRV_RATE_5_5M:
+ WLAN_OS_REPORT(("Max Basic Rate RATE_5_5M_BIT\n"));
+ break;
+
+ case DRV_RATE_11M:
+ WLAN_OS_REPORT(("Max Basic Rate RATE_11M_BIT\n"));
+ break;
+
+ case DRV_RATE_6M:
+ WLAN_OS_REPORT(("Max Basic Rate RATE_6M_BIT\n"));
+ break;
+
+ case DRV_RATE_9M:
+ WLAN_OS_REPORT(("Max Basic Rate RATE_9M_BIT\n"));
+ break;
+
+ case DRV_RATE_12M:
+ WLAN_OS_REPORT(("Max Basic Rate RATE_12M_BIT\n"));
+ break;
+
+ case DRV_RATE_18M:
+ WLAN_OS_REPORT(("Max Basic Rate RATE_18M_BIT\n"));
+ break;
+
+ case DRV_RATE_24M:
+ WLAN_OS_REPORT(("Max Basic Rate RATE_24M_BIT\n"));
+ break;
+
+ case DRV_RATE_36M:
+ WLAN_OS_REPORT(("Max Basic Rate RATE_36M_BIT\n"));
+ break;
+
+ case DRV_RATE_48M:
+ WLAN_OS_REPORT(("Max Basic Rate RATE_48M_BIT\n"));
+ break;
+
+ case DRV_RATE_54M:
+ WLAN_OS_REPORT(("Max Basic Rate RATE_54M_BIT\n"));
+ break;
+
+ default:
+ WLAN_OS_REPORT(("Max Basic Rate INVALID, 0x%X\n", pSiteEntry->maxBasicRate));
+ break;
+ }
+
+ switch (pSiteEntry->maxActiveRate)
+ {
+ case DRV_RATE_1M:
+ WLAN_OS_REPORT(("Max Active Rate RATE_1M_BIT\n"));
+ break;
+
+ case DRV_RATE_2M:
+ WLAN_OS_REPORT(("Max Active Rate RATE_2M_BIT\n"));
+ break;
+
+ case DRV_RATE_5_5M:
+ WLAN_OS_REPORT(("Max Active Rate RATE_5_5M_BIT\n"));
+ break;
+
+ case DRV_RATE_11M:
+ WLAN_OS_REPORT(("Max Active Rate RATE_11M_BIT\n"));
+ break;
+
+ case DRV_RATE_22M:
+ WLAN_OS_REPORT(("Max Active Rate RATE_22M_BIT\n"));
+ break;
+
+ case DRV_RATE_6M:
+ WLAN_OS_REPORT(("Max Active Rate RATE_6M_BIT\n"));
+ break;
+
+ case DRV_RATE_9M:
+ WLAN_OS_REPORT(("Max Active Rate RATE_9M_BIT\n"));
+ break;
+
+ case DRV_RATE_12M:
+ WLAN_OS_REPORT(("Max Active Rate RATE_12M_BIT\n"));
+ break;
+
+ case DRV_RATE_18M:
+ WLAN_OS_REPORT(("Max Active Rate RATE_18M_BIT\n"));
+ break;
+
+ case DRV_RATE_24M:
+ WLAN_OS_REPORT(("Max Active Rate RATE_24M_BIT\n"));
+ break;
+
+ case DRV_RATE_36M:
+ WLAN_OS_REPORT(("Max Active Rate RATE_36M_BIT\n"));
+ break;
+
+ case DRV_RATE_48M:
+ WLAN_OS_REPORT(("Max Active Rate RATE_48M_BIT\n"));
+ break;
+
+ case DRV_RATE_54M:
+ WLAN_OS_REPORT(("Max Active Rate RATE_54M_BIT\n"));
+ break;
+
+ default:
+ WLAN_OS_REPORT(("Max Active Rate INVALID, 0x%X\n", pSiteEntry->maxActiveRate));
+ break;
+ }
+
+ WLAN_OS_REPORT(("\n"));
+
+ if (pSiteEntry->probeModulation == DRV_MODULATION_QPSK)
+ WLAN_OS_REPORT(("Probe Modulation QPSK\n"));
+ else if (pSiteEntry->probeModulation == DRV_MODULATION_CCK)
+ WLAN_OS_REPORT(("Probe Modulation CCK\n"));
+ else if (pSiteEntry->probeModulation == DRV_MODULATION_PBCC)
+ WLAN_OS_REPORT(("Probe Modulation PBCC\n"));
+ else if (pSiteEntry->probeModulation == DRV_MODULATION_OFDM)
+ WLAN_OS_REPORT(("Probe Modulation OFDM\n"));
+ else
+ WLAN_OS_REPORT(("Probe Modulation INVALID, %d\n", pSiteEntry->probeModulation));
+
+ if (pSiteEntry->beaconModulation == DRV_MODULATION_QPSK)
+ WLAN_OS_REPORT(("Beacon Modulation QPSK\n"));
+ else if (pSiteEntry->beaconModulation == DRV_MODULATION_CCK)
+ WLAN_OS_REPORT(("Beacon Modulation CCK\n"));
+ else if (pSiteEntry->beaconModulation == DRV_MODULATION_PBCC)
+ WLAN_OS_REPORT(("Beacon Modulation PBCC\n"));
+ else if (pSiteEntry->beaconModulation == DRV_MODULATION_OFDM)
+ WLAN_OS_REPORT(("Beacon Modulation OFDM\n"));
+ else
+ WLAN_OS_REPORT(("Beacon Modulation INVALID, %d\n", pSiteEntry->beaconModulation));
+
+ WLAN_OS_REPORT(("\n"));
+
+ if (pSiteEntry->privacy == TI_TRUE)
+ WLAN_OS_REPORT(("Privacy On\n\n"));
+ else
+ WLAN_OS_REPORT(("Privacy Off\n\n"));
+
+ if (pSiteEntry->currentPreambleType == PREAMBLE_SHORT)
+ WLAN_OS_REPORT(("Cap Preamble Type Short\n"));
+ else if (pSiteEntry->currentPreambleType == PREAMBLE_LONG)
+ WLAN_OS_REPORT(("Cap Preamble Type Long\n"));
+ else
+ WLAN_OS_REPORT(("Preamble INVALID, %d\n", pSiteEntry->currentPreambleType));
+
+
+ if(pSiteEntry->barkerPreambleType == PREAMBLE_UNSPECIFIED)
+ WLAN_OS_REPORT(("Barker preamble Type Unspecified\n"));
+ else if(pSiteEntry->barkerPreambleType == PREAMBLE_SHORT)
+ WLAN_OS_REPORT(("Barker_Preamble Type Short\n"));
+ else
+ WLAN_OS_REPORT(("Barker_Preamble Type Long\n"));
+
+ if(pSiteEntry->currentSlotTime == PHY_SLOT_TIME_SHORT)
+ WLAN_OS_REPORT(("Slot time type Short\n"));
+ else
+ WLAN_OS_REPORT(("Slot time type Long\n"));
+
+
+ WLAN_OS_REPORT(("\n"));
+
+ WLAN_OS_REPORT(("Beacon interval %d\n", pSiteEntry->beaconInterval));
+
+ WLAN_OS_REPORT(("Local Time Stamp %d\n", pSiteEntry->localTimeStamp));
+
+ WLAN_OS_REPORT(("rssi %d\n", pSiteEntry->rssi));
+
+ WLAN_OS_REPORT(("\n"));
+
+ WLAN_OS_REPORT(("Fail status %d\n", pSiteEntry->failStatus));
+
+ WLAN_OS_REPORT(("\n---------------------------------------------------------------\n\n", NULL));
+
+}
+
+void printSiteTable(siteMgr_t *pSiteMgr, char *desiredSsid)
+{
+ TI_UINT8 i, numOfSites = 0;
+ siteEntry_t *pSiteEntry;
+ char ssid[MAX_SSID_LEN + 1];
+ siteTablesParams_t *pCurrentSiteTable = pSiteMgr->pSitesMgmtParams->pCurrentSiteTable;
+ TI_UINT8 tableIndex=2;
+
+ WLAN_OS_REPORT(("\n\n************************ SITE TABLE ****************************\n\n\n"));
+
+
+
+ do
+ {
+ tableIndex--;
+ for (i = 0; i < pCurrentSiteTable->maxNumOfSites; i++)
+ {
+ pSiteEntry = &(pCurrentSiteTable->siteTable[i]);
+
+ if (pSiteEntry->siteType == SITE_NULL)
+ continue;
+
+ os_memoryCopy(pSiteMgr->hOs ,ssid, (void *)pCurrentSiteTable->siteTable[i].ssid.str, pCurrentSiteTable->siteTable[i].ssid.len);
+ ssid[pCurrentSiteTable->siteTable[i].ssid.len] = 0;
+
+ if (desiredSsid != NULL)
+ {
+ int desiredSsidLength = 0;
+ char * tmp = desiredSsid;
+
+ while (tmp != '\0')
+ {
+ desiredSsidLength++;
+ tmp++;
+ }
+
+ if (os_memoryCompare(pSiteMgr->hOs, (TI_UINT8 *)ssid, (TI_UINT8 *)desiredSsid, desiredSsidLength))
+ continue;
+ }
+
+ WLAN_OS_REPORT(("SSID %s\n\n", ssid));
+
+
+
+ if (pSiteEntry->siteType == SITE_PRIMARY)
+ WLAN_OS_REPORT( (" ENTRY PRIMARY %d \n", numOfSites));
+ else
+ WLAN_OS_REPORT( (" ENTRY %d\n", i));
+
+ WLAN_OS_REPORT(("BSSID %2X-%2X-%2X-%2X-%2X-%2X \n",
+ pCurrentSiteTable->siteTable[i].bssid[0],
+ pCurrentSiteTable->siteTable[i].bssid[1],
+ pCurrentSiteTable->siteTable[i].bssid[2],
+ pCurrentSiteTable->siteTable[i].bssid[3],
+ pCurrentSiteTable->siteTable[i].bssid[4],
+ pCurrentSiteTable->siteTable[i].bssid[5]));
+
+
+ if (pCurrentSiteTable->siteTable[i].bssType == BSS_INFRASTRUCTURE)
+ WLAN_OS_REPORT(("BSS Type INFRASTRUCTURE\n\n"));
+ else if (pCurrentSiteTable->siteTable[i].bssType == BSS_INDEPENDENT)
+ WLAN_OS_REPORT(("BSS Type IBSS\n\n"));
+ else if (pCurrentSiteTable->siteTable[i].bssType == BSS_ANY)
+ WLAN_OS_REPORT(("BSS Type ANY\n\n"));
+ else
+ WLAN_OS_REPORT(("BSS Type INVALID\n\n"));
+
+
+ WLAN_OS_REPORT(("Channel %d\n", pCurrentSiteTable->siteTable[i].channel));
+
+ WLAN_OS_REPORT(("\n"));
+
+ switch (pCurrentSiteTable->siteTable[i].maxBasicRate)
+ {
+ case DRV_RATE_1M:
+ WLAN_OS_REPORT(("Max Basic Rate RATE_1M_BIT\n"));
+ break;
+
+ case DRV_RATE_2M:
+ WLAN_OS_REPORT(("Max Basic Rate RATE_2M_BIT\n"));
+ break;
+
+ case DRV_RATE_5_5M:
+ WLAN_OS_REPORT(("Max Basic Rate RATE_5_5M_BIT\n"));
+ break;
+
+ case DRV_RATE_11M:
+ WLAN_OS_REPORT(("Max Basic Rate RATE_11M_BIT\n"));
+ break;
+
+ case DRV_RATE_6M:
+ WLAN_OS_REPORT(("Max Basic Rate RATE_6M_BIT\n"));
+ break;
+
+ case DRV_RATE_9M:
+ WLAN_OS_REPORT(("Max Basic Rate RATE_9M_BIT\n"));
+ break;
+
+ case DRV_RATE_12M:
+ WLAN_OS_REPORT(("Max Basic Rate RATE_12M_BIT\n"));
+ break;
+
+ case DRV_RATE_18M:
+ WLAN_OS_REPORT(("Max Basic Rate RATE_18M_BIT\n"));
+ break;
+
+ case DRV_RATE_24M:
+ WLAN_OS_REPORT(("Max Basic Rate RATE_24M_BIT\n"));
+ break;
+
+ case DRV_RATE_36M:
+ WLAN_OS_REPORT(("Max Basic Rate RATE_36M_BIT\n"));
+ break;
+
+ case DRV_RATE_48M:
+ WLAN_OS_REPORT(("Max Basic Rate RATE_48M_BIT\n"));
+ break;
+
+ case DRV_RATE_54M:
+ WLAN_OS_REPORT(("Max Basic Rate RATE_54M_BIT\n"));
+ break;
+
+ default:
+ WLAN_OS_REPORT(("Max Basic Rate INVALID, 0x%X\n", pCurrentSiteTable->siteTable[i].maxBasicRate));
+ break;
+ }
+
+ switch (pCurrentSiteTable->siteTable[i].maxActiveRate)
+ {
+ case DRV_RATE_1M:
+ WLAN_OS_REPORT(("Max Active Rate RATE_1M_BIT\n"));
+ break;
+
+ case DRV_RATE_2M:
+ WLAN_OS_REPORT(("Max Active Rate RATE_2M_BIT\n"));
+ break;
+
+ case DRV_RATE_5_5M:
+ WLAN_OS_REPORT(("Max Active Rate RATE_5_5M_BIT\n"));
+ break;
+
+ case DRV_RATE_11M:
+ WLAN_OS_REPORT(("Max Active Rate RATE_11M_BIT\n"));
+ break;
+
+ case DRV_RATE_22M:
+ WLAN_OS_REPORT(("Max Active Rate RATE_22M_BIT\n"));
+ break;
+
+ case DRV_RATE_6M:
+ WLAN_OS_REPORT(("Max Active Rate RATE_6M_BIT\n"));
+ break;
+
+ case DRV_RATE_9M:
+ WLAN_OS_REPORT(("Max Active Rate RATE_9M_BIT\n"));
+ break;
+
+ case DRV_RATE_12M:
+ WLAN_OS_REPORT(("Max Active Rate RATE_12M_BIT\n"));
+ break;
+
+ case DRV_RATE_18M:
+ WLAN_OS_REPORT(("Max Active Rate RATE_18M_BIT\n"));
+ break;
+
+ case DRV_RATE_24M:
+ WLAN_OS_REPORT(("Max Active Rate RATE_24M_BIT\n"));
+ break;
+
+ case DRV_RATE_36M:
+ WLAN_OS_REPORT(("Max Active Rate RATE_36M_BIT\n"));
+ break;
+
+ case DRV_RATE_48M:
+ WLAN_OS_REPORT(("Max Active Rate RATE_48M_BIT\n"));
+ break;
+
+ case DRV_RATE_54M:
+ WLAN_OS_REPORT(("Max Active Rate RATE_54M_BIT\n"));
+ break;
+
+ default:
+ WLAN_OS_REPORT(("Max Active Rate INVALID, 0x%X\n", pCurrentSiteTable->siteTable[i].maxActiveRate));
+ break;
+ }
+
+ WLAN_OS_REPORT(("\n"));
+
+ if (pCurrentSiteTable->siteTable[i].probeModulation == DRV_MODULATION_QPSK)
+ WLAN_OS_REPORT(("Probe Modulation QPSK\n"));
+ else if (pCurrentSiteTable->siteTable[i].probeModulation == DRV_MODULATION_CCK)
+ WLAN_OS_REPORT(("Probe Modulation CCK\n"));
+ else if (pCurrentSiteTable->siteTable[i].probeModulation == DRV_MODULATION_PBCC)
+ WLAN_OS_REPORT(("Probe Modulation PBCC\n"));
+ else
+ WLAN_OS_REPORT(("Probe Modulation INVALID, %d\n", pCurrentSiteTable->siteTable[i].probeModulation));
+
+ if (pCurrentSiteTable->siteTable[i].beaconModulation == DRV_MODULATION_QPSK)
+ WLAN_OS_REPORT(("Beacon Modulation QPSK\n"));
+ else if (pCurrentSiteTable->siteTable[i].beaconModulation == DRV_MODULATION_CCK)
+ WLAN_OS_REPORT(("Beacon Modulation CCK\n"));
+ else if (pCurrentSiteTable->siteTable[i].beaconModulation == DRV_MODULATION_PBCC)
+ WLAN_OS_REPORT(("Beacon Modulation PBCC\n"));
+ else
+ WLAN_OS_REPORT(("Beacon Modulation INVALID, %d\n", pCurrentSiteTable->siteTable[i].beaconModulation));
+
+ WLAN_OS_REPORT(("\n"));
+
+ if (pCurrentSiteTable->siteTable[i].privacy == TI_TRUE)
+ WLAN_OS_REPORT(("Privacy On\n"));
+ else
+ WLAN_OS_REPORT(("Privacy Off\n"));
+
+ if (pCurrentSiteTable->siteTable[i].currentPreambleType == PREAMBLE_SHORT)
+ WLAN_OS_REPORT(("Preamble Type Short\n"));
+ else if (pCurrentSiteTable->siteTable[i].currentPreambleType == PREAMBLE_LONG)
+ WLAN_OS_REPORT(("Preamble Type Long\n"));
+ else
+ WLAN_OS_REPORT(("Preamble INVALID, %d\n", pCurrentSiteTable->siteTable[i].currentPreambleType));
+
+
+ WLAN_OS_REPORT(("\n"));
+
+ WLAN_OS_REPORT(("Beacon interval %d\n", pCurrentSiteTable->siteTable[i].beaconInterval));
+
+ WLAN_OS_REPORT(("Local Time Stamp %d\n", pCurrentSiteTable->siteTable[i].localTimeStamp));
+
+ WLAN_OS_REPORT(("rssi %d\n", pCurrentSiteTable->siteTable[i].rssi));
+
+ WLAN_OS_REPORT(("\n"));
+
+ WLAN_OS_REPORT(("Fail status %d\n", pCurrentSiteTable->siteTable[i].failStatus));
+
+ WLAN_OS_REPORT(("ATIM Window %d\n", pCurrentSiteTable->siteTable[i].atimWindow));
+
+ WLAN_OS_REPORT(("\n---------------------------------------------------------------\n\n", NULL));
+
+ numOfSites++;
+ }
+
+ WLAN_OS_REPORT(("\n Number Of Sites: %d\n", numOfSites));
+ WLAN_OS_REPORT(("\n---------------------------------------------------------------\n", NULL));
+
+ if ((pSiteMgr->pDesiredParams->siteMgrDesiredDot11Mode == DOT11_DUAL_MODE) && (tableIndex==1))
+ { /* change site table */
+ if (pCurrentSiteTable == &pSiteMgr->pSitesMgmtParams->dot11BG_sitesTables)
+ {
+ WLAN_OS_REPORT(("\n dot11A_sitesTables \n"));
+
+ pCurrentSiteTable = (siteTablesParams_t *)&pSiteMgr->pSitesMgmtParams->dot11A_sitesTables;
+ }
+ else
+ {
+ WLAN_OS_REPORT(("\n dot11BG_sitesTables \n"));
+
+ pCurrentSiteTable = &pSiteMgr->pSitesMgmtParams->dot11BG_sitesTables;
+ }
+ }
+
+ } while (tableIndex>0);
+}
+
+static void printDesiredParams(siteMgr_t *pSiteMgr, TI_HANDLE hCmdDispatch)
+{
+ paramInfo_t param;
+
+ WLAN_OS_REPORT(("\n\n*****************************************", NULL));
+ WLAN_OS_REPORT(("*****************************************\n\n", NULL));
+
+ WLAN_OS_REPORT(("Channel %d\n", pSiteMgr->pDesiredParams->siteMgrDesiredChannel));
+
+ WLAN_OS_REPORT(("\n*****************************************\n\n", NULL));
+
+ switch (pSiteMgr->pDesiredParams->siteMgrDesiredRatePair.maxBasic)
+ {
+ case DRV_RATE_1M:
+ WLAN_OS_REPORT(("Max Basic Rate RATE_1M_BIT\n"));
+ break;
+
+ case DRV_RATE_2M:
+ WLAN_OS_REPORT(("Max Basic Rate RATE_2M_BIT\n"));
+ break;
+
+ case DRV_RATE_5_5M:
+ WLAN_OS_REPORT(("Max Basic Rate RATE_5_5M_BIT\n"));
+ break;
+
+ case DRV_RATE_11M:
+ WLAN_OS_REPORT(("Max Basic Rate RATE_11M_BIT\n"));
+ break;
+
+ case DRV_RATE_22M:
+ WLAN_OS_REPORT(("Max Basic Rate RATE_22M_BIT\n"));
+ break;
+
+ case DRV_RATE_6M:
+ WLAN_OS_REPORT(("Max Basic Rate RATE_6M_BIT\n"));
+ break;
+
+ case DRV_RATE_9M:
+ WLAN_OS_REPORT(("Max Basic Rate RATE_9M_BIT\n"));
+ break;
+
+ case DRV_RATE_12M:
+ WLAN_OS_REPORT(("Max Basic Rate RATE_12M_BIT\n"));
+ break;
+
+ case DRV_RATE_18M:
+ WLAN_OS_REPORT(("Max Basic Rate RATE_18M_BIT\n"));
+ break;
+
+ case DRV_RATE_24M:
+ WLAN_OS_REPORT(("Max Basic Rate RATE_24M_BIT\n"));
+ break;
+
+ case DRV_RATE_36M:
+ WLAN_OS_REPORT(("Max Basic Rate RATE_36M_BIT\n"));
+ break;
+
+ case DRV_RATE_48M:
+ WLAN_OS_REPORT(("Max Basic Rate RATE_48M_BIT\n"));
+ break;
+
+ case DRV_RATE_54M:
+ WLAN_OS_REPORT(("Max Basic Rate RATE_54M_BIT\n"));
+ break;
+
+ default:
+ WLAN_OS_REPORT(("Invalid basic rate value 0x%X\n", pSiteMgr->pDesiredParams->siteMgrDesiredRatePair.maxBasic));
+ break;
+ }
+
+ switch (pSiteMgr->pDesiredParams->siteMgrDesiredRatePair.maxActive)
+ {
+ case DRV_RATE_1M:
+ WLAN_OS_REPORT(("Max Active Rate RATE_1M_BIT\n"));
+ break;
+
+ case DRV_RATE_2M:
+ WLAN_OS_REPORT(("Max Active Rate RATE_2M_BIT\n"));
+ break;
+
+ case DRV_RATE_5_5M:
+ WLAN_OS_REPORT(("Max Active Rate RATE_5_5M_BIT\n"));
+ break;
+
+ case DRV_RATE_11M:
+ WLAN_OS_REPORT(("Max Active Rate RATE_11M_BIT\n"));
+ break;
+
+ case DRV_RATE_22M:
+ WLAN_OS_REPORT(("Max Active Rate RATE_22M_BIT\n"));
+ break;
+
+ case DRV_RATE_6M:
+ WLAN_OS_REPORT(("Max Active Rate RATE_6M_BIT\n"));
+ break;
+
+ case DRV_RATE_9M:
+ WLAN_OS_REPORT(("Max Active Rate RATE_9M_BIT\n"));
+ break;
+
+ case DRV_RATE_12M:
+ WLAN_OS_REPORT(("Max Active Rate RATE_12M_BIT\n"));
+ break;
+
+ case DRV_RATE_18M:
+ WLAN_OS_REPORT(("Max Active Rate RATE_18M_BIT\n"));
+ break;
+
+ case DRV_RATE_24M:
+ WLAN_OS_REPORT(("Max Active Rate RATE_24M_BIT\n"));
+ break;
+
+ case DRV_RATE_36M:
+ WLAN_OS_REPORT(("Max Active Rate RATE_36M_BIT\n"));
+ break;
+
+ case DRV_RATE_48M:
+ WLAN_OS_REPORT(("Max Active Rate RATE_48M_BIT\n"));
+ break;
+
+ case DRV_RATE_54M:
+ WLAN_OS_REPORT(("Max Active Rate RATE_54M_BIT\n"));
+ break;
+
+ default:
+ WLAN_OS_REPORT(("Invalid basic rate value 0x%X\n", pSiteMgr->pDesiredParams->siteMgrDesiredRatePair.maxActive));
+ break;
+ }
+
+ if (pSiteMgr->pDesiredParams->siteMgrDesiredModulationType == DRV_MODULATION_QPSK)
+ WLAN_OS_REPORT(("Modulation Type QPSK\n"));
+ else if (pSiteMgr->pDesiredParams->siteMgrDesiredModulationType == DRV_MODULATION_CCK)
+ WLAN_OS_REPORT(("Modulation Type CCK\n"));
+ else if (pSiteMgr->pDesiredParams->siteMgrDesiredModulationType == DRV_MODULATION_PBCC)
+ WLAN_OS_REPORT(("Modulation Type PBCC\n"));
+ else if (pSiteMgr->pDesiredParams->siteMgrDesiredModulationType == DRV_MODULATION_OFDM)
+ WLAN_OS_REPORT(("Modulation Type OFDM\n"));
+ else
+ WLAN_OS_REPORT(("Invalid Modulation Type %d\n", pSiteMgr->pDesiredParams->siteMgrDesiredModulationType));
+
+
+ WLAN_OS_REPORT(("\n*****************************************\n\n", NULL));
+
+ param.paramType = RSN_EXT_AUTHENTICATION_MODE;
+ cmdDispatch_GetParam(hCmdDispatch, &param);
+ if (param.content.rsnDesiredAuthType == RSN_AUTH_OPEN)
+ WLAN_OS_REPORT(("Authentication Type Open System\n"));
+ else if (param.content.rsnDesiredAuthType == RSN_AUTH_SHARED_KEY)
+ WLAN_OS_REPORT(("Authentication Type Shared Key\n"));
+ else
+ WLAN_OS_REPORT(("Authentication Type Invalid: %d\n", param.content.rsnDesiredAuthType));
+
+ param.paramType = RSN_ENCRYPTION_STATUS_PARAM;
+ cmdDispatch_GetParam(hCmdDispatch, &param);
+ if (param.content.rsnEncryptionStatus == TWD_CIPHER_NONE)
+ WLAN_OS_REPORT(("WEP Off\n"));
+ else if (param.content.rsnEncryptionStatus == TWD_CIPHER_WEP)
+ WLAN_OS_REPORT(("WEP On\n"));
+ else
+ WLAN_OS_REPORT(("WEP Invalid: %d\n", param.content.rsnEncryptionStatus));
+
+ WLAN_OS_REPORT(("\n"));
+
+
+ WLAN_OS_REPORT(("\n*****************************************\n\n", NULL));
+ if(pSiteMgr->pDesiredParams->siteMgrDesiredDot11Mode == DOT11_B_MODE)
+ WLAN_OS_REPORT(("Desired dot11mode 11b\n"));
+ else if(pSiteMgr->pDesiredParams->siteMgrDesiredDot11Mode == DOT11_G_MODE)
+ WLAN_OS_REPORT(("Desired dot11mode 11g\n"));
+ else if(pSiteMgr->pDesiredParams->siteMgrDesiredDot11Mode == DOT11_A_MODE)
+ WLAN_OS_REPORT(("Desired dot11mode 11a\n"));
+ else if(pSiteMgr->pDesiredParams->siteMgrDesiredDot11Mode == DOT11_DUAL_MODE)
+ WLAN_OS_REPORT(("Desired dot11mode dual 11a/g\n"));
+ else
+ WLAN_OS_REPORT(("Desired dot11mode INVALID\n"));
+
+ WLAN_OS_REPORT(("\n*****************************************\n\n", NULL));
+ if(pSiteMgr->pDesiredParams->siteMgrDesiredSlotTime == PHY_SLOT_TIME_SHORT)
+ WLAN_OS_REPORT(("Desired slot time short\n"));
+ else if(pSiteMgr->pDesiredParams->siteMgrDesiredSlotTime == PHY_SLOT_TIME_LONG)
+ WLAN_OS_REPORT(("Desired slot time long\n"));
+ else
+ WLAN_OS_REPORT(("Desired slot time INVALID\n"));
+
+
+ WLAN_OS_REPORT(("\n*****************************************\n\n", NULL));
+ if (pSiteMgr->pDesiredParams->siteMgrDesiredPreambleType == PREAMBLE_SHORT)
+ WLAN_OS_REPORT(("Desired Preamble Short\n"));
+ else if (pSiteMgr->pDesiredParams->siteMgrDesiredPreambleType == PREAMBLE_LONG)
+ WLAN_OS_REPORT(("Desired Preamble Long\n"));
+ else
+ WLAN_OS_REPORT(("Invalid Desired Preamble %d\n", pSiteMgr->pDesiredParams->siteMgrDesiredPreambleType));
+
+ WLAN_OS_REPORT(("Beacon interval %d\n", pSiteMgr->pDesiredParams->siteMgrDesiredBeaconInterval));
+
+ WLAN_OS_REPORT(("\n*****************************************", NULL));
+ WLAN_OS_REPORT(("*****************************************\n\n", NULL));
+
+}
+
+
+
+static void printPrimarySiteDesc(siteMgr_t *pSiteMgr, OS_802_11_BSSID *pPrimarySiteDesc)
+{
+ TI_UINT8 rateIndex, maxNumOfRates;
+ char ssid[MAX_SSID_LEN + 1];
+
+
+ WLAN_OS_REPORT(("\n^^^^^^^^^^^^^^^ PRIMARY SITE DESCRIPTION ^^^^^^^^^^^^^^^^^^^\n\n"));
+
+
+ /* MacAddress */
+ WLAN_OS_REPORT(("BSSID 0x%X-0x%X-0x%X-0x%X-0x%X-0x%X\n", pPrimarySiteDesc->MacAddress[0],
+ pPrimarySiteDesc->MacAddress[1],
+ pPrimarySiteDesc->MacAddress[2],
+ pPrimarySiteDesc->MacAddress[3],
+ pPrimarySiteDesc->MacAddress[4],
+ pPrimarySiteDesc->MacAddress[5]));
+
+ /* Capabilities */
+ WLAN_OS_REPORT(("Capabilities 0x%X\n", pPrimarySiteDesc->Capabilities));
+
+ /* SSID */
+ os_memoryCopy(pSiteMgr->hOs, ssid, (void *)pPrimarySiteDesc->Ssid.Ssid, pPrimarySiteDesc->Ssid.SsidLength);
+ ssid[pPrimarySiteDesc->Ssid.SsidLength] = 0;
+ WLAN_OS_REPORT(("SSID %s\n", ssid));
+
+ /* privacy */
+ if (pPrimarySiteDesc->Privacy == TI_TRUE)
+ WLAN_OS_REPORT(("Privacy ON\n"));
+ else
+ WLAN_OS_REPORT(("Privacy OFF\n"));
+
+ /* RSSI */
+ WLAN_OS_REPORT(("RSSI %d\n", ((pPrimarySiteDesc->Rssi)>>16)));
+
+ if (pPrimarySiteDesc->InfrastructureMode == os802_11IBSS)
+ WLAN_OS_REPORT(("BSS Type IBSS\n"));
+ else
+ WLAN_OS_REPORT(("BSS Type INFRASTRUCTURE\n"));
+
+
+ maxNumOfRates = sizeof(pPrimarySiteDesc->SupportedRates) / sizeof(pPrimarySiteDesc->SupportedRates[0]);
+ /* SupportedRates */
+ for (rateIndex = 0; rateIndex < maxNumOfRates; rateIndex++)
+ {
+ if (pPrimarySiteDesc->SupportedRates[rateIndex] != 0)
+ WLAN_OS_REPORT(("Rate 0x%X\n", pPrimarySiteDesc->SupportedRates[rateIndex]));
+ }
+
+ WLAN_OS_REPORT(("\n---------------------------------------------------------------\n\n", NULL));
+
+}
+
+static void setRateSet(TI_UINT8 maxRate, TRates *pRates)
+{
+ TI_UINT8 i = 0;
+
+ switch (maxRate)
+ {
+
+ case DRV_RATE_54M:
+ pRates->ratesString[i] = 108;
+ i++;
+
+ case DRV_RATE_48M:
+ pRates->ratesString[i] = 96;
+ i++;
+
+ case DRV_RATE_36M:
+ pRates->ratesString[i] = 72;
+ i++;
+
+ case DRV_RATE_24M:
+ pRates->ratesString[i] = 48;
+ i++;
+
+ case DRV_RATE_18M:
+ pRates->ratesString[i] = 36;
+ i++;
+
+ case DRV_RATE_12M:
+ pRates->ratesString[i] = 24;
+ i++;
+
+ case DRV_RATE_9M:
+ pRates->ratesString[i] = 18;
+ i++;
+
+ case DRV_RATE_6M:
+ pRates->ratesString[i] = 12;
+ i++;
+
+ case DRV_RATE_22M:
+ pRates->ratesString[i] = 44;
+ i++;
+
+ case DRV_RATE_11M:
+ pRates->ratesString[i] = 22;
+ pRates->ratesString[i] |= 0x80;
+ i++;
+
+ case DRV_RATE_5_5M:
+ pRates->ratesString[i] = 11;
+ pRates->ratesString[i] |= 0x80;
+ i++;
+
+ case DRV_RATE_2M:
+ pRates->ratesString[i] = 4;
+ pRates->ratesString[i] |= 0x80;
+ i++;
+
+ case DRV_RATE_1M:
+ pRates->ratesString[i] = 2;
+ pRates->ratesString[i] |= 0x80;
+ i++;
+ break;
+
+ default:
+ WLAN_OS_REPORT(("Set Rate Set, invalid max rate %d\n", maxRate));
+ pRates->len = 0;
+ }
+
+ pRates->len = i;
+
+}
+
+void printSiteMgrHelpMenu(void)
+{
+ WLAN_OS_REPORT(("\n\n Site Manager Debug Menu \n"));
+ WLAN_OS_REPORT(("------------------------\n"));
+
+ WLAN_OS_REPORT(("500 - Help.\n"));
+ WLAN_OS_REPORT(("501 - Primary Site Parameters.\n"));
+ WLAN_OS_REPORT(("502 - Sites List.\n"));
+ WLAN_OS_REPORT(("503 - Desired Parameters.\n"));
+ WLAN_OS_REPORT(("507 - Set Power save Mode.\n"));
+ WLAN_OS_REPORT(("508 - Get Power save Mode.\n"));
+ WLAN_OS_REPORT(("511 - Set Default Key Id.\n"));
+ WLAN_OS_REPORT(("512 - Get Default Key Id.\n"));
+ WLAN_OS_REPORT(("513 - Set Key.\n"));
+ WLAN_OS_REPORT(("514 - Get Key.\n"));
+ WLAN_OS_REPORT(("515 - Set Cypher Suite.\n"));
+ WLAN_OS_REPORT(("516 - Get Cypher Suite.\n"));
+ WLAN_OS_REPORT(("517 - Set Auth Mode.\n"));
+ WLAN_OS_REPORT(("518 - Get Auth Mode.\n"));
+ WLAN_OS_REPORT(("519 - Get Primary Site Description.\n"));
+ WLAN_OS_REPORT(("520 - Get Connection Status.\n"));
+ WLAN_OS_REPORT(("522 - Get Current Tx Rate.\n"));
+ WLAN_OS_REPORT(("525 - Set Supported Rate Set.\n"));
+ WLAN_OS_REPORT(("526 - Get Supported Rate Set.\n"));
+ WLAN_OS_REPORT(("527 - Set Auth type.\n"));
+ WLAN_OS_REPORT(("528 - Get Auth type.\n"));
+
+ WLAN_OS_REPORT((" %03d - RADIO_STAND_BY_CHANGE_STATE \n", RADIO_STAND_BY_CHANGE_STATE));
+ WLAN_OS_REPORT((" %03d - CONNECT_TO_BSSID \n", CONNECT_TO_BSSID));
+
+ WLAN_OS_REPORT((" %03d - SET_START_CLI_SCAN_PARAM \n", SET_START_CLI_SCAN_PARAM));
+ WLAN_OS_REPORT((" %03d - SET_STOP_CLI_SCAN_PARAM \n", SET_STOP_CLI_SCAN_PARAM));
+
+ WLAN_OS_REPORT((" %03d - SET_BROADCAST_BACKGROUND_SCAN_PARAM \n", SET_BROADCAST_BACKGROUND_SCAN_PARAM));
+ WLAN_OS_REPORT((" %03d - ENABLE_PERIODIC_BROADCAST_BBACKGROUND_SCAN_PARAM \n", ENABLE_PERIODIC_BROADCAST_BACKGROUND_SCAN_PARAM));
+ WLAN_OS_REPORT((" %03d - DISABLE_PERIODIC_BROADCAST_BACKGROUND_SCAN_PARAM \n", DISABLE_PERIODIC_BROADCAST_BACKGROUND_SCAN_PARAM));
+
+ WLAN_OS_REPORT((" %03d - SET_UNICAST_BACKGROUND_SCAN_PARAM \n", SET_UNICAST_BACKGROUND_SCAN_PARAM));
+ WLAN_OS_REPORT((" %03d - ENABLE_PERIODIC_UNICAST_BACKGROUND_SCAN_PARAM \n", ENABLE_PERIODIC_UNICAST_BACKGROUND_SCAN_PARAM));
+ WLAN_OS_REPORT((" %03d - DISABLE_PERIODIC_UNICAST_BACKGROUND_SCAN_PARAM \n", DISABLE_PERIODIC_UNICAST_BACKGROUND_SCAN_PARAM));
+
+ WLAN_OS_REPORT((" %03d - SET_FOREGROUND_SCAN_PARAM \n", SET_FOREGROUND_SCAN_PARAM));
+ WLAN_OS_REPORT((" %03d - ENABLE_PERIODIC_FOREGROUND_SCAN_PARAM \n", ENABLE_PERIODIC_FOREGROUND_SCAN_PARAM));
+ WLAN_OS_REPORT((" %03d - DISABLE_PERIODIC_FOREGROUND_SCAN_PARAM \n", DISABLE_PERIODIC_FOREGROUND_SCAN_PARAM));
+
+ WLAN_OS_REPORT((" %03d - SET_CHANNEL_NUMBER \n", SET_CHANNEL_NUMBER));
+ WLAN_OS_REPORT((" %03d - SET_RSSI_GAP_THRSH \n", SET_RSSI_GAP_THRSH));
+ WLAN_OS_REPORT((" %03d - SET_FAST_SCAN_TIMEOUT \n", SET_FAST_SCAN_TIMEOUT));
+ WLAN_OS_REPORT((" %03d - SET_INTERNAL_ROAMING_ENABLE \n", SET_INTERNAL_ROAMING_ENABLE));
+
+ WLAN_OS_REPORT((" %03d - PERFORM_HEALTH_TEST \n", PERFORM_HEALTH_TEST));
+ WLAN_OS_REPORT((" %03d - PRINT_FAILURE_EVENTS \n", PRINT_FAILURE_EVENTS));
+ WLAN_OS_REPORT((" %03d - FORCE_HW_RESET_RECOVERY \n", FORCE_HW_RESET_RECOVERY));
+ WLAN_OS_REPORT((" %03d - FORCE_SOFT_RECOVERY \n", FORCE_SOFT_RECOVERY));
+
+ WLAN_OS_REPORT((" %03d - RESET_ROAMING_EVENTS \n", RESET_ROAMING_EVENTS));
+ WLAN_OS_REPORT((" %03d - SET_DESIRED_CONS_TX_ERRORS_THREH\n", SET_DESIRED_CONS_TX_ERRORS_THREH));
+
+ WLAN_OS_REPORT((" %03d - GET_CURRENT_ROAMING_STATUS \n", GET_CURRENT_ROAMING_STATUS));
+
+
+ WLAN_OS_REPORT((" %03d - TOGGLE_LNA_ON \n", TEST_TOGGLE_LNA_ON));
+ WLAN_OS_REPORT((" %03d - TOGGLE_LNA_OFF \n", TEST_TOGGLE_LNA_OFF));
+
+ WLAN_OS_REPORT((" %03d - PRINT_SITE_TABLE_PER_SSID\n", PRINT_SITE_TABLE_PER_SSID));
+
+ WLAN_OS_REPORT((" %03d - SET_DESIRED_CHANNEL\n", SET_DESIRED_CHANNEL));
+
+ WLAN_OS_REPORT((" %03d - START_PRE_AUTH\n", START_PRE_AUTH));
+
+ WLAN_OS_REPORT(("\n------------------------\n"));
+}
+
+
+
diff --git a/wilink_6_1/Test/siteMgrDebug.h b/wilink_6_1/Test/siteMgrDebug.h
new file mode 100644
index 0000000..41c3ea3
--- /dev/null
+++ b/wilink_6_1/Test/siteMgrDebug.h
@@ -0,0 +1,120 @@
+/*
+ * siteMgrDebug.h
+ *
+ * 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.
+ */
+
+#ifndef __SITE_MGR_DEBUG_H__
+#define __SITE_MGR_DEBUG_H__
+
+#include "tidef.h"
+#include "paramOut.h"
+#include "DrvMainModules.h"
+
+#define SITE_MGR_DEBUG_HELP_MENU 0
+#define PRIMARY_SITE_DBG 1
+#define SITE_TABLE_DBG 2
+#define DESIRED_PARAMS_DBG 3
+
+
+#define SET_RSN_DESIRED_CIPHER_SUITE_DBG 15
+#define GET_RSN_DESIRED_CIPHER_SUITE_DBG 16
+#define SET_RSN_DESIRED_AUTH_TYPE_DBG 17
+#define GET_RSN_DESIRED_AUTH_TYPE_DBG 18
+#define GET_PRIMARY_SITE_DESC_DBG 19
+#define GET_CONNECTION_STATUS_DBG 20
+#define GET_CURRENT_TX_RATE_DBG 22
+#define SET_SUPPORTED_RATE_SET_DBG 25
+#define GET_SUPPORTED_RATE_SET_DBG 26
+#define SET_MLME_LEGACY_AUTH_TYPE_DBG 27
+#define GET_MLME_LEGACY_AUTH_TYPE_DBG 28
+#define RADIO_STAND_BY_CHANGE_STATE 31
+#define CONNECT_TO_BSSID 34
+
+
+#define SET_START_CLI_SCAN_PARAM 35
+#define SET_STOP_CLI_SCAN_PARAM 36
+
+#define SET_BROADCAST_BACKGROUND_SCAN_PARAM 37
+#define ENABLE_PERIODIC_BROADCAST_BACKGROUND_SCAN_PARAM 38
+#define DISABLE_PERIODIC_BROADCAST_BACKGROUND_SCAN_PARAM 39
+
+#define SET_UNICAST_BACKGROUND_SCAN_PARAM 40
+#define ENABLE_PERIODIC_UNICAST_BACKGROUND_SCAN_PARAM 41
+#define DISABLE_PERIODIC_UNICAST_BACKGROUND_SCAN_PARAM 42
+
+#define SET_FOREGROUND_SCAN_PARAM 43
+#define ENABLE_PERIODIC_FOREGROUND_SCAN_PARAM 44
+#define DISABLE_PERIODIC_FOREGROUND_SCAN_PARAM 45
+
+#define SET_CHANNEL_NUMBER 46
+#define SET_RSSI_GAP_THRSH 47
+#define SET_FAST_SCAN_TIMEOUT 48
+#define SET_INTERNAL_ROAMING_ENABLE 49
+
+#define PERFORM_HEALTH_TEST 50
+#define PRINT_FAILURE_EVENTS 51
+#define FORCE_HW_RESET_RECOVERY 52
+#define FORCE_SOFT_RECOVERY 53
+
+
+#define RESET_ROAMING_EVENTS 55
+#define SET_DESIRED_CONS_TX_ERRORS_THREH 56
+#define GET_CURRENT_ROAMING_STATUS 57
+#define SET_DESIRED_CHANNEL 58
+
+
+#define TEST_TOGGLE_LNA_ON 60
+#define TEST_TOGGLE_LNA_OFF 61
+
+
+#define TEST_TOGGLE_LNA_ON 60
+#define TEST_TOGGLE_LNA_OFF 61
+
+#define PRINT_SITE_TABLE_PER_SSID 70
+
+#define ROAM_TEST1 81
+#define ROAM_TEST2 82
+#define ROAM_TEST3 83
+#define ROAM_TEST4 84
+#define ROAM_TEST5 85
+#define ROAM_TEST6 86
+#define ROAM_TEST7 87
+
+
+#define START_PRE_AUTH 100
+
+
+void siteMgrDebugFunction (TI_HANDLE hSiteMgr,
+ TStadHandlesList *pStadHandles,
+ TI_UINT32 funcType,
+ void *pParam);
+
+#endif /* __SITE_MGR_DEBUG_H__ */
diff --git a/wilink_6_1/Test/smeDebug.c b/wilink_6_1/Test/smeDebug.c
new file mode 100644
index 0000000..4133c17
--- /dev/null
+++ b/wilink_6_1/Test/smeDebug.c
@@ -0,0 +1,297 @@
+/*
+ * smeDebug.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 smeDbg.c
+ * \brief This file include the SME debug module implementation
+ * \
+ * \date 13-February-2006
+ */
+
+#include "smePrivate.h"
+#include "smeDebug.h"
+#include "report.h"
+
+void printSmeDbgFunctions (void);
+void sme_dbgPrintObject (TI_HANDLE hSme);
+void sme_printStats (TI_HANDLE hSme);
+void sme_resetStats(TI_HANDLE hSme);
+void sme_printBssidList(TI_HANDLE hSme);
+
+#define CHAN_FREQ_TABLE_SIZE (sizeof(ChanFreq) / sizeof(struct CHAN_FREQ))
+
+struct CHAN_FREQ {
+ unsigned char chan;
+ unsigned long freq;
+} ChanFreq[] = {
+ {1,2412000}, {2,2417000}, {3,2422000}, {4,2427000},
+ {5,2432000}, {6,2437000}, {7,2442000}, {8,2447000},
+ {9,2452000},
+ {10,2457000}, {11,2462000}, {12,2467000}, {13,2472000},
+ {14,2484000}, {36,5180000}, {40,5200000}, {44,5220000},
+ {48,5240000}, {52,5260000}, {56,5280000}, {60,5300000},
+ {64,5320000},
+ {100,5500000}, {104,5520000}, {108,5540000}, {112,5560000},
+ {116,5580000}, {120,5600000}, {124,5620000}, {128,5640000},
+ {132,5660000}, {136,5680000}, {140,5700000}, {149,5745000},
+ {153,5765000}, {157,5785000}, {161,5805000} };
+
+TI_UINT32 scanResultTable_CalculateBssidListSize (TI_HANDLE hScanResultTable, TI_BOOL bAllVarIes);
+TI_STATUS scanResultTable_GetBssidList (TI_HANDLE hScanResultTable,
+ OS_802_11_BSSID_LIST_EX *pBssidList,
+ TI_UINT32 *pLength,
+ TI_BOOL bAllVarIes);
+
+/**
+ * \fn smeDebugFunction
+ * \brief Main SME debug function
+ *
+ * Main SME debug function
+ *
+ * \param hSme - handle to the SME object
+ * \param funcType - the specific debug function
+ * \param pParam - parameters for the debug function
+ * \return None
+ */
+void smeDebugFunction (TI_HANDLE hSme, TI_UINT32 funcType, void *pParam)
+{
+ switch (funcType)
+ {
+ case DBG_SME_PRINT_HELP:
+ printSmeDbgFunctions();
+ break;
+
+ case DBG_SME_PRINT_OBJECT:
+ sme_dbgPrintObject( hSme );
+ break;
+
+ case DBG_SME_PRINT_STATS:
+ sme_printStats( hSme );
+ break;
+
+ case DBG_SME_CLEAR_STATS:
+ sme_resetStats( hSme );
+ break;
+
+ case DBG_SME_BSSID_LIST:
+ sme_printBssidList( hSme );
+ break;
+
+ default:
+ WLAN_OS_REPORT(("Invalid function type in SME debug function: %d\n", funcType));
+ break;
+ }
+}
+
+int sme_strlen(char *s)
+{
+ int x=0;
+ while (*s++)
+ x++;
+ return(x);
+}
+
+
+char* sme_strcpy(char *s1,char *s2)
+{
+ while (*s2)
+ {
+ *s1++ = *s2++;
+ }
+ *s1 = '\0';
+
+ return s1;
+}
+
+
+int sme_memcmp(char* s1, char* s2, int n)
+{
+ while(n-- > 0 && *s1 == *s2)
+ s1++, s2++;
+
+ return( n < 0 ? 0 : *s1 - *s2 );
+}
+
+
+
+
+/**
+ * \fn printSmeDbgFunctions
+ * \brief Print the SME debug menu
+ *
+ * Print the SME debug menu
+ *
+ * \param hSme - handle to the SME object
+ * \return None
+ */
+void printSmeDbgFunctions(void)
+{
+ WLAN_OS_REPORT((" SME Debug Functions \n"));
+ WLAN_OS_REPORT(("-------------------------\n"));
+ WLAN_OS_REPORT(("1900 - Print the SME Debug Help\n"));
+ WLAN_OS_REPORT(("1901 - Print the SME object\n"));
+ WLAN_OS_REPORT(("1902 - Print the SME statistics\n"));
+ WLAN_OS_REPORT(("1903 - Reset the SME statistics\n"));
+ WLAN_OS_REPORT(("1904 - Print BSSID list\n"));
+}
+
+#ifdef REPORT_LOG
+static TI_UINT8 Freq2Chan(TI_UINT32 freq)
+{
+ TI_UINT32 i;
+
+ for(i=0; i<CHAN_FREQ_TABLE_SIZE; i++)
+ if(ChanFreq[i].freq == freq)
+ return ChanFreq[i].chan;
+
+ return 0;
+}
+#endif
+
+static void PrintBssidList(OS_802_11_BSSID_LIST_EX* bssidList, TI_UINT32 IsFullPrint, TMacAddr CurrentBssid)
+{
+ TI_UINT32 i;
+ TI_INT8 connectionTypeStr[50];
+ POS_802_11_BSSID_EX pBssid = &bssidList->Bssid[0];
+
+ WLAN_OS_REPORT(("BssId List: Num=%u\n", bssidList->NumberOfItems));
+ WLAN_OS_REPORT((" MAC Privacy Rssi Mode Channel SSID\n"));
+ for(i=0; i<bssidList->NumberOfItems; i++)
+ {
+ switch (pBssid->InfrastructureMode)
+ {
+ case os802_11IBSS:
+ sme_strcpy (connectionTypeStr, "Adhoc");
+ break;
+ case os802_11Infrastructure:
+ sme_strcpy (connectionTypeStr, "Infra");
+ break;
+ case os802_11AutoUnknown:
+ sme_strcpy (connectionTypeStr, "Auto");
+ break;
+ default:
+ sme_strcpy (connectionTypeStr, " --- ");
+ break;
+ }
+ WLAN_OS_REPORT(("%s%02x.%02x.%02x.%02x.%02x.%02x %3u %4d %s %6d %s\n",
+ (!sme_memcmp(CurrentBssid, pBssid->MacAddress, MAC_ADDR_LEN))?"*":" ",
+ pBssid->MacAddress[0],
+ pBssid->MacAddress[1],
+ pBssid->MacAddress[2],
+ pBssid->MacAddress[3],
+ pBssid->MacAddress[4],
+ pBssid->MacAddress[5],
+ pBssid->Privacy,
+ pBssid->Rssi,
+ connectionTypeStr,
+ Freq2Chan(pBssid->Configuration.Union.channel),
+ (pBssid->Ssid.Ssid[0] == '\0')?(TI_INT8*)"****":((TI_INT8*)pBssid->Ssid.Ssid) ));
+
+ if (IsFullPrint)
+ {
+ WLAN_OS_REPORT((" BeaconInterval %d\n", pBssid->Configuration.BeaconPeriod));
+ WLAN_OS_REPORT((" Capabilities 0x%x\n", pBssid->Capabilities));
+ }
+#ifdef _WINDOWS /*temp fix until bringing the dual OS fix*/
+ pBssid = (POS_802_11_BSSID_EX)((TI_INT8*)pBssid + (pBssid->Length ? pBssid->Length : sizeof(OS_802_11_BSSID_EX)));
+#else /*for Linux*/
+ pBssid = &bssidList->Bssid[i+1];
+#endif
+ }
+}
+
+void sme_printBssidList(TI_HANDLE hSme)
+{
+ TSme* sme = (TSme*) hSme;
+ TI_UINT32 length;
+ TI_UINT8* blist;
+ TMacAddr temp_bssid = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
+
+ length = scanResultTable_CalculateBssidListSize (sme->hScanResultTable, TI_FALSE);
+
+ blist = os_memoryAlloc(NULL, length);
+
+ if(!blist)
+ {
+ WLAN_OS_REPORT(("ERROR. sme_printBssidList(): Cannot allocate memory!! length = %d\n", length));
+ return;
+ }
+
+ scanResultTable_GetBssidList (sme->hScanResultTable, (POS_802_11_BSSID_LIST_EX)blist, &length, TI_FALSE);
+
+ PrintBssidList((OS_802_11_BSSID_LIST_EX*)blist, 0, temp_bssid);
+
+ os_memoryFree(NULL, blist, length);
+}
+
+/**
+ * \fn sme_dbgPrintObject
+ * \brief Print the SME object
+ *
+ * Print the SME object
+ *
+ * \param hSme - handle to the SME object
+ * \return None
+ */
+void sme_dbgPrintObject (TI_HANDLE hSme)
+{
+ WLAN_OS_REPORT(("Not yet implemented!\n"));
+}
+
+/**
+ * \fn sme_printStats
+ * \brief Print the SME statistics
+ *
+ * Print the SME statistics
+ *
+ * \param hSme - handle to the SME object
+ * \return None
+ */
+void sme_printStats (TI_HANDLE hSme)
+{
+ WLAN_OS_REPORT(("Not yet implemented!\n"));
+}
+
+/**
+ * \fn sme_resetStats
+ * \brief Reset the SME statistics
+ *
+ * Reset the SME statistics
+ *
+ * \param hSme - handle to the SME object
+ * \return None
+ */
+void sme_resetStats(TI_HANDLE hSme)
+{
+ WLAN_OS_REPORT(("Not yet implemented!\n"));
+}
+
diff --git a/wilink_6_1/Test/smeDebug.h b/wilink_6_1/Test/smeDebug.h
new file mode 100644
index 0000000..91ef623
--- /dev/null
+++ b/wilink_6_1/Test/smeDebug.h
@@ -0,0 +1,110 @@
+/*
+ * smeDebug.h
+ *
+ * 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 smeDebug.h
+ * \brief This file include private definitions for the SME debug module.
+ * \
+ * \date 13-february-2006
+ */
+
+#ifndef __SMEDBG_H__
+#define __SMEDBG_H__
+
+#include "sme.h"
+
+/*
+ ***********************************************************************
+ * Constant definitions.
+ ***********************************************************************
+ */
+
+/* debug functions */
+#define DBG_SME_PRINT_HELP 0
+#define DBG_SME_PRINT_OBJECT 1
+#define DBG_SME_PRINT_STATS 2
+#define DBG_SME_CLEAR_STATS 3
+#define DBG_SME_BSSID_LIST 4
+
+/*
+ ***********************************************************************
+ * Enums.
+ ***********************************************************************
+ */
+
+/*
+ ***********************************************************************
+ * Typedefs.
+ ***********************************************************************
+ */
+
+/*
+ ***********************************************************************
+ * Structure definitions.
+ ***********************************************************************
+ */
+
+/*
+ ***********************************************************************
+ * External data definitions.
+ ***********************************************************************
+ */
+
+/*
+ ***********************************************************************
+ * External functions definitions
+ ***********************************************************************
+ */
+
+/**
+ * \\n
+ * \date 13-February-2006\n
+ * \brief Main SME debug function
+ *
+ * Function Scope \e Public.\n
+ * \param hSmeSm - handle to the SME SM object.\n
+ * \param funcType - the specific debug function.\n
+ * \param pParam - parameters for the debug function.\n
+ */
+void smeDebugFunction( TI_HANDLE hSmeSm, TI_UINT32 funcType, void *pParam );
+
+/**
+ * \\n
+ * \date 13-February-2006\n
+ * \brief Prints SME debug menu
+ *
+ * Function Scope \e Public.\n
+ */
+void printSmeDbgFunctions(void);
+
+#endif /* __SMEDBG_H__ */
+