4 * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
11 * * Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * * Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in
15 * the documentation and/or other materials provided with the
17 * * Neither the name Texas Instruments nor the names of its
18 * contributors may be used to endorse or promote products derived
19 * from this software without specific prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 /****************************************************************************/
40 /****************************************************************************/
41 /* #include "osTITypes.h" */
48 #ifdef XCC_MODULE_INCLUDED
52 void printRsnDbgFunctions(void);
53 void printRogueApTable(TI_HANDLE hRogueAp);
55 static TI_UINT8 infoBuf[480];
57 /*************************************************************************
59 *************************************************************************
68 ************************************************************************/
69 void rsnDebugFunction(TI_HANDLE hRsn, TI_UINT32 funcType, void *pParam)
71 paramInfo_t param, *pRsnParam;
73 rsnAuthEncrCapability_t rsnAuthEncrCap;
77 case DBG_RSN_PRINT_HELP:
78 printRsnDbgFunctions();
81 case DBG_RSN_SET_DESIRED_AUTH:
82 WLAN_OS_REPORT(("RSN DBG - Set desired Authentication suite \n"));
83 value = *(TI_UINT32*)pParam;
85 param.paramType = RSN_EXT_AUTHENTICATION_MODE;
86 param.content.rsnDesiredAuthType = (EAuthSuite)value;
88 rsn_setParam(hRsn, ¶m);
91 case DBG_RSN_SET_DESIRED_CIPHER:
92 WLAN_OS_REPORT(("RSN DBG - Set desired cipher suite \n"));
93 value = *(TI_UINT32*)pParam;
95 param.paramType = RSN_ENCRYPTION_STATUS_PARAM;
96 param.content.rsnEncryptionStatus = (ECipherSuite)value;
98 rsn_setParam(hRsn, ¶m);
102 case DBG_RSN_GEN_MIC_FAILURE_REPORT:
103 value = *(TI_UINT32*)pParam;
104 /* generate unicast mic failure report to the OS and to the RSN module */
105 rsn_reportMicFailure(hRsn, (TI_UINT8*)&value,1);
108 case DBG_RSN_GET_PARAM_802_11_CAPABILITY:
110 param.paramType = RSN_AUTH_ENCR_CAPABILITY;
111 param.content.pRsnAuthEncrCapability = &rsnAuthEncrCap;
113 /* Get 802_11 capability info */
114 rsn_getParam(hRsn, ¶m);
117 case DBG_RSN_GET_PMKID_CACHE:
119 pRsnParam = (paramInfo_t *)&infoBuf;
120 pRsnParam->paramType = RSN_PMKID_LIST;
121 pRsnParam->paramLength = 480;
124 rsn_getParam(hRsn, pRsnParam);
127 case DBG_RSN_RESET_PMKID_CACHE:
129 rsn_resetPMKIDList(hRsn);
132 #ifdef XCC_MODULE_INCLUDED
133 case DBG_RSN_PRINT_ROGUE_AP_TABLE:
134 printRogueApTable(((XCCMngr_t*)((rsn_t*)hRsn)->hXCCMngr)->hRogueAp);
138 case DBG_RSN_SET_PORT_STATUS:
139 WLAN_OS_REPORT(("Setting PORT STATUS to open\n"));
140 rsn_setPortStatus(hRsn,TI_TRUE);
143 case DBG_RSN_PRINT_PORT_STATUS:
145 TI_BOOL portStatus = TI_FALSE;
146 portStatus = rsn_getPortStatus(((rsn_t*)hRsn));
147 WLAN_OS_REPORT(("\n\nPORT is %s !!\n",(portStatus)?"OPEN":"CLOSE"));
152 WLAN_OS_REPORT(("Invalid function type in RSN Function Command: %d\n", funcType));
159 void printRsnDbgFunctions(void)
161 WLAN_OS_REPORT((" Rsn Debug Functions \n"));
162 WLAN_OS_REPORT(("-------------------------\n"));
164 WLAN_OS_REPORT(("702 - Set default key id \n"));
165 WLAN_OS_REPORT(("703 - Set desired Authentication suite \n"));
166 WLAN_OS_REPORT(("704 - Set desired cipher suite \n"));
168 WLAN_OS_REPORT(("706 - Generate MIC FAILURE report (after 2 clicks less then 1 minute - disassociate)\n"));
169 WLAN_OS_REPORT(("707 - Get 802.11 authentication/encryption capability\n"));
170 WLAN_OS_REPORT(("708 - Get PMKID cache \n"));
171 WLAN_OS_REPORT(("709 - ReSet PMKID cache \n"));
172 WLAN_OS_REPORT(("710 - Print Rogue AP table\n"));