1 /* 2 * siteMgrDebug.c 3 * 4 * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: 10 * 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 16 * distribution. 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. 20 * 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. 32 */ 33 34 /** \file reportReplvl.c 35 * \brief Report level implementation 36 * 37 * \see reportReplvl.h 38 */ 39 40 /** \file siteMgrDebug.c 41 * \brief The siteMgrDebug module. 42 * 43 * \see siteMgrDebug.h 44 */ 45 46 #include "tidef.h" 47 #include "osApi.h" 48 #include "paramOut.h" 49 #include "siteMgrDebug.h" 50 #include "siteMgrApi.h" 51 #include "siteHash.h" 52 #include "report.h" 53 #include "CmdDispatcher.h" 54 #include "DrvMainModules.h" 55 #include "sme.h" 56 #include "apConn.h" 57 #include "healthMonitor.h" 58 #include "conn.h" 59 #include "connApi.h" 60 61 #ifdef XCC_MODULE_INCLUDED 62 #include "XCCMngr.h" 63 #endif 64 65 66 static void printPrimarySite(siteMgr_t *pSiteMgr); 67 68 void printSiteTable(siteMgr_t *pSiteMgr, char *desiredSsid); 69 70 static void printDesiredParams(siteMgr_t *pSiteMgr, TI_HANDLE hCmdDispatch); 71 72 static void printPrimarySiteDesc(siteMgr_t *pSiteMgr, OS_802_11_BSSID *pPrimarySiteDesc); 73 74 static void setRateSet(TI_UINT8 maxRate, TRates *pRates); 75 76 void printSiteMgrHelpMenu(void); 77 78 /* Function implementation */ 79 void siteMgrDebugFunction (TI_HANDLE hSiteMgr, 80 TStadHandlesList *pStadHandles, 81 TI_UINT32 funcType, 82 void *pParam) 83 { 84 siteMgr_t *pSiteMgr = (siteMgr_t *)hSiteMgr; 85 paramInfo_t param; 86 TSsid newDesiredSsid; 87 TI_UINT8 value; 88 TI_UINT8 i; 89 OS_802_11_BSSID primarySiteDesc; 90 TRates ratesSet; 91 92 93 newDesiredSsid.len = 5; 94 os_memoryCopy(pSiteMgr->hOs, (void *)newDesiredSsid.str, "yaeli", 5); 95 96 97 switch (funcType) 98 { 99 case SITE_MGR_DEBUG_HELP_MENU: 100 printSiteMgrHelpMenu(); 101 break; 102 103 case PRIMARY_SITE_DBG: 104 printPrimarySite(pSiteMgr); 105 break; 106 107 case SITE_TABLE_DBG: 108 printSiteTable(pSiteMgr, NULL); 109 break; 110 111 case DESIRED_PARAMS_DBG: 112 printDesiredParams(pSiteMgr, pStadHandles->hCmdDispatch); 113 break; 114 115 case GET_PRIMARY_SITE_DESC_DBG: 116 param.paramType = SITE_MGR_GET_SELECTED_BSSID_INFO; 117 param.content.pSiteMgrPrimarySiteDesc = &primarySiteDesc; 118 cmdDispatch_GetParam(pStadHandles->hCmdDispatch, ¶m); 119 printPrimarySiteDesc(pSiteMgr, &primarySiteDesc); 120 break; 121 122 case SET_RSN_DESIRED_CIPHER_SUITE_DBG: 123 param.paramType = RSN_ENCRYPTION_STATUS_PARAM; 124 value = *((TI_UINT32 *)pParam); 125 param.content.rsnEncryptionStatus = (ECipherSuite)value; 126 cmdDispatch_SetParam(pStadHandles->hCmdDispatch, ¶m); 127 WLAN_OS_REPORT(("\nSetting RSN_DESIRED_CIPHER_SUITE_PARAM : %d\n", value)); 128 break; 129 130 case GET_RSN_DESIRED_CIPHER_SUITE_DBG: 131 param.paramType = RSN_ENCRYPTION_STATUS_PARAM; 132 cmdDispatch_GetParam(pStadHandles->hCmdDispatch, ¶m); 133 WLAN_OS_REPORT(("\nGetting RSN_DESIRED_CIPHER_SUITE_PARAM: %d\n", param.content.rsnEncryptionStatus)); 134 break; 135 136 case SET_RSN_DESIRED_AUTH_TYPE_DBG: 137 param.paramType = RSN_EXT_AUTHENTICATION_MODE; 138 value = *((TI_UINT32 *)pParam); 139 param.content.rsnDesiredAuthType = (EAuthSuite)value; 140 cmdDispatch_SetParam(pStadHandles->hCmdDispatch, ¶m); 141 if (value == RSN_AUTH_OPEN) 142 WLAN_OS_REPORT(("\nSetting RSN_DESIRED_AUTH_TYPE_PARAM: RSN_AUTH_OPEN\n")); 143 else if (value == RSN_AUTH_SHARED_KEY) 144 WLAN_OS_REPORT(("\nSetting RSN_DESIRED_AUTH_TYPE_PARAM: RSN_AUTH_SHARED_KEY\n")); 145 else if (value == RSN_AUTH_AUTO_SWITCH) 146 WLAN_OS_REPORT(("\nSetting RSN_DESIRED_AUTH_TYPE_PARAM: RSN_AUTH_AUTO_SWITCH\n")); 147 else 148 WLAN_OS_REPORT(("\nSetting RSN_DESIRED_AUTH_TYPE_PARAM: Invalid: %d\n", value)); 149 break; 150 151 case GET_RSN_DESIRED_AUTH_TYPE_DBG: 152 param.paramType = RSN_EXT_AUTHENTICATION_MODE; 153 cmdDispatch_GetParam(pStadHandles->hCmdDispatch, ¶m); 154 if (param.content.rsnDesiredAuthType == RSN_AUTH_OPEN) 155 WLAN_OS_REPORT(("\nGetting RSN_DESIRED_AUTH_TYPE_PARAM: RSN_AUTH_OPEN\n")); 156 else if (param.content.rsnDesiredAuthType == RSN_AUTH_SHARED_KEY) 157 WLAN_OS_REPORT(("\nGetting RSN_DESIRED_AUTH_TYPE_PARAM: RSN_AUTH_SHARED_KEY\n")); 158 else if (param.content.rsnDesiredAuthType == RSN_AUTH_AUTO_SWITCH) 159 WLAN_OS_REPORT(("\nGetting RSN_DESIRED_AUTH_TYPE_PARAM: RSN_AUTH_AUTO_SWITCH\n")); 160 else 161 WLAN_OS_REPORT(("\nGetting RSN_DESIRED_AUTH_TYPE_PARAM: Invalid: %d\n", param.content.rsnDesiredAuthType)); 162 163 break; 164 165 case GET_CONNECTION_STATUS_DBG: 166 param.paramType = SME_CONNECTION_STATUS_PARAM; 167 cmdDispatch_GetParam(pStadHandles->hCmdDispatch, ¶m); 168 if (param.content.smeSmConnectionStatus == eDot11Idle) 169 WLAN_OS_REPORT(("\nGetting SITE_MGR_CONNECTION_STATUS_PARAM: STATUS_IDLE\n")); 170 else if (param.content.smeSmConnectionStatus == eDot11Scaning) 171 WLAN_OS_REPORT(("\nGetting SITE_MGR_CONNECTION_STATUS_PARAM: STATUS_SCANNING\n")); 172 else if (param.content.smeSmConnectionStatus == eDot11Connecting) 173 WLAN_OS_REPORT(("\nGetting SITE_MGR_CONNECTION_STATUS_PARAM: STATUS_CONNECTING\n")); 174 else if (param.content.smeSmConnectionStatus == eDot11Associated) 175 WLAN_OS_REPORT(("\nGetting SITE_MGR_CONNECTION_STATUS_PARAM: STATUS_ASSOCIATED\n")); 176 else if (param.content.smeSmConnectionStatus == eDot11Disassociated) 177 WLAN_OS_REPORT(("\nGetting SITE_MGR_CONNECTION_STATUS_PARAM: STATUS_DIS_ASSOCIATED\n")); 178 else if (param.content.smeSmConnectionStatus == eDot11RadioDisabled) 179 WLAN_OS_REPORT(("\nGetting SITE_MGR_CONNECTION_STATUS_PARAM: STATUS_RADIO_DISABLED\n")); 180 else 181 WLAN_OS_REPORT(("\nGetting SITE_MGR_CONNECTION_STATUS_PARAM: STATUS_ERROR\n")); 182 break; 183 184 case SET_SUPPORTED_RATE_SET_DBG: 185 param.paramType = SITE_MGR_DESIRED_SUPPORTED_RATE_SET_PARAM; 186 value = *((TI_UINT32 *)pParam); 187 setRateSet(value, &ratesSet); 188 os_memoryCopy(pSiteMgr->hOs, &(param.content.siteMgrDesiredSupportedRateSet), &(ratesSet), sizeof(TRates)); 189 WLAN_OS_REPORT(("\nSetting SET_SUPPORTED_RATE_SET_DBG\n")); 190 cmdDispatch_SetParam(pStadHandles->hCmdDispatch, ¶m); 191 break; 192 193 case GET_SUPPORTED_RATE_SET_DBG: 194 param.paramType = SITE_MGR_DESIRED_SUPPORTED_RATE_SET_PARAM; 195 cmdDispatch_GetParam(pStadHandles->hCmdDispatch, ¶m); 196 WLAN_OS_REPORT(("\nGetting SITE_MGR_DESIRED_SUPPORTED_RATE_SET_PARAM\n")); 197 if(param.content.siteMgrDesiredSupportedRateSet.len == 0) 198 WLAN_OS_REPORT(("\nNo rates defined\n")); 199 else 200 { 201 for (i = 0; i < param.content.siteMgrDesiredSupportedRateSet.len; i++) 202 WLAN_OS_REPORT(("\nRate %d is 0x%X\n", i +1, param.content.siteMgrDesiredSupportedRateSet.ratesString[i])); 203 } 204 break; 205 206 case SET_MLME_LEGACY_AUTH_TYPE_DBG: 207 param.paramType = MLME_LEGACY_TYPE_PARAM; 208 value = *((TI_UINT32 *)pParam); 209 param.content.mlmeLegacyAuthType = (legacyAuthType_e)value; 210 cmdDispatch_SetParam(pStadHandles->hCmdDispatch, ¶m); 211 if (value == AUTH_LEGACY_OPEN_SYSTEM) 212 WLAN_OS_REPORT(("\nSetting MLME_LEGACY_TYPE_PARAM: AUTH_LEGACY_OPEN_SYSTEM\n")); 213 else if (value == AUTH_LEGACY_SHARED_KEY) 214 WLAN_OS_REPORT(("\nSetting MLME_LEGACY_TYPE_PARAM: AUTH_LEGACY_SHARED_KEY\n")); 215 else if (value == AUTH_LEGACY_AUTO_SWITCH) 216 WLAN_OS_REPORT(("\nSetting MLME_LEGACY_TYPE_PARAM: AUTH_LEGACY_AUTO_SWITCH\n")); 217 else 218 WLAN_OS_REPORT(("\nSetting MLME_LEGACY_TYPE_PARAM: Invalid: %d\n", value)); 219 break; 220 221 case GET_MLME_LEGACY_AUTH_TYPE_DBG: 222 param.paramType = MLME_LEGACY_TYPE_PARAM; 223 cmdDispatch_GetParam(pStadHandles->hCmdDispatch, ¶m); 224 if (param.content.mlmeLegacyAuthType == AUTH_LEGACY_OPEN_SYSTEM) 225 WLAN_OS_REPORT(("\nGetting MLME_LEGACY_TYPE_PARAM: AUTH_LEGACY_OPEN_SYSTEM\n")); 226 else if (param.content.rsnDesiredAuthType == AUTH_LEGACY_SHARED_KEY) 227 WLAN_OS_REPORT(("\nGetting MLME_LEGACY_TYPE_PARAM: AUTH_LEGACY_SHARED_KEY\n")); 228 else if (param.content.rsnDesiredAuthType == AUTH_LEGACY_AUTO_SWITCH) 229 WLAN_OS_REPORT(("\nGetting MLME_LEGACY_TYPE_PARAM: AUTH_AUTO_SWITCH\n")); 230 else 231 WLAN_OS_REPORT(("\nGetting MLME_LEGACY_TYPE_PARAM: Invalid: %d\n", param.content.rsnDesiredAuthType)); 232 233 break; 234 235 236 case RADIO_STAND_BY_CHANGE_STATE: 237 WLAN_OS_REPORT(("\nChange GPIO-13 State...\n")); 238 break; 239 240 241 case PRINT_FAILURE_EVENTS: 242 { 243 244 WLAN_OS_REPORT(("\n PRINT HEALTH MONITOR LOG\n")); 245 healthMonitor_printFailureEvents (pStadHandles->hHealthMonitor); 246 apConn_printStatistics(pStadHandles->hAPConnection); 247 #ifdef REPORT_LOG 248 conn_ibssPrintStatistics(pStadHandles->hConn); 249 #endif 250 if (((conn_t*)pStadHandles->hConn)->currentConnType==CONNECTION_INFRA) 251 { 252 switch (((conn_t*)pStadHandles->hConn)->state) 253 { 254 case 0: WLAN_OS_REPORT((" CONN state is IDLE\n")); 255 break; 256 case 1: WLAN_OS_REPORT((" CONN state is SCR_WAIT\n")); 257 break; 258 case 2: WLAN_OS_REPORT((" CONN state is WAIT_JOIN_CMPLT\n")); 259 break; 260 case 3: WLAN_OS_REPORT((" CONN state is MLME_WAIT\n")); 261 break; 262 case 4: WLAN_OS_REPORT((" CONN state is RSN_WAIT\n")); 263 break; 264 case 5: WLAN_OS_REPORT((" CONN state is CONFIG_HW\n")); 265 break; 266 case 6: WLAN_OS_REPORT((" CONN state is CONNECTED\n")); 267 break; 268 case 7: WLAN_OS_REPORT((" CONN state is DISASSOCC\n")); 269 break; 270 default: 271 break; 272 } 273 } 274 } 275 break; 276 277 case FORCE_HW_RESET_RECOVERY: 278 WLAN_OS_REPORT(("\n Currently not supported!\n")); 279 break; 280 281 case FORCE_SOFT_RECOVERY: 282 WLAN_OS_REPORT(("\n FORCE Full Recovery (Soft)\n")); 283 break; 284 285 286 case PERFORM_HEALTH_TEST: 287 WLAN_OS_REPORT(("\n PERFORM_HEALTH_TEST \n")); 288 healthMonitor_PerformTest(pStadHandles->hHealthMonitor, TI_FALSE); 289 break; 290 291 case PRINT_SITE_TABLE_PER_SSID: 292 printSiteTable(pSiteMgr, (char*)pParam); 293 break; 294 295 case SET_DESIRED_CHANNEL: 296 param.paramType = SITE_MGR_DESIRED_CHANNEL_PARAM; 297 param.content.siteMgrDesiredChannel = *(TI_UINT8*)pParam; 298 siteMgr_setParam(pStadHandles->hSiteMgr, ¶m); 299 break; 300 301 default: 302 WLAN_OS_REPORT(("Invalid function type in Debug Site Manager Function Command: %d\n\n", funcType)); 303 break; 304 } 305 } 306 307 static void printPrimarySite(siteMgr_t *pSiteMgr) 308 { 309 siteEntry_t *pSiteEntry; 310 char ssid[MAX_SSID_LEN + 1]; 311 312 pSiteEntry = pSiteMgr->pSitesMgmtParams->pPrimarySite; 313 314 if (pSiteEntry == NULL) 315 { 316 WLAN_OS_REPORT(("\n\n************************ PRIMARY SITE IS NULL ****************************\n\n\n")); 317 return; 318 } 319 320 WLAN_OS_REPORT(("\n\n************************ PRIMARY SITE ****************************\n\n\n")); 321 322 WLAN_OS_REPORT(("BSSID %2X-%2X-%2X-%2X-%2X-%2X ", 323 pSiteEntry->bssid[0], 324 pSiteEntry->bssid[1], 325 pSiteEntry->bssid[2], 326 pSiteEntry->bssid[3], 327 pSiteEntry->bssid[4], 328 pSiteEntry->bssid[5])); 329 330 os_memoryCopy(pSiteMgr->hOs,ssid, (void *)pSiteEntry->ssid.str, pSiteEntry->ssid.len); 331 ssid[pSiteEntry->ssid.len] = 0; 332 WLAN_OS_REPORT(("SSID %s\n\n", ssid)); 333 334 if (pSiteEntry->bssType == BSS_INFRASTRUCTURE) 335 WLAN_OS_REPORT(("BSS Type INFRASTRUCTURE\n\n")); 336 else if (pSiteEntry->bssType == BSS_INDEPENDENT) 337 WLAN_OS_REPORT(("BSS Type IBSS\n\n")); 338 else if (pSiteEntry->bssType == BSS_ANY) 339 WLAN_OS_REPORT(("BSS Type ANY\n\n")); 340 else 341 WLAN_OS_REPORT(("BSS Type INVALID\n\n")); 342 343 344 WLAN_OS_REPORT(("Channel %d\n", pSiteEntry->channel)); 345 346 WLAN_OS_REPORT(("\n")); 347 348 switch (pSiteEntry->maxBasicRate) 349 { 350 case DRV_RATE_1M: 351 WLAN_OS_REPORT(("Max Basic Rate RATE_1M_BIT\n")); 352 break; 353 354 case DRV_RATE_2M: 355 WLAN_OS_REPORT(("Max Basic Rate RATE_2M_BIT\n")); 356 break; 357 358 case DRV_RATE_5_5M: 359 WLAN_OS_REPORT(("Max Basic Rate RATE_5_5M_BIT\n")); 360 break; 361 362 case DRV_RATE_11M: 363 WLAN_OS_REPORT(("Max Basic Rate RATE_11M_BIT\n")); 364 break; 365 366 case DRV_RATE_6M: 367 WLAN_OS_REPORT(("Max Basic Rate RATE_6M_BIT\n")); 368 break; 369 370 case DRV_RATE_9M: 371 WLAN_OS_REPORT(("Max Basic Rate RATE_9M_BIT\n")); 372 break; 373 374 case DRV_RATE_12M: 375 WLAN_OS_REPORT(("Max Basic Rate RATE_12M_BIT\n")); 376 break; 377 378 case DRV_RATE_18M: 379 WLAN_OS_REPORT(("Max Basic Rate RATE_18M_BIT\n")); 380 break; 381 382 case DRV_RATE_24M: 383 WLAN_OS_REPORT(("Max Basic Rate RATE_24M_BIT\n")); 384 break; 385 386 case DRV_RATE_36M: 387 WLAN_OS_REPORT(("Max Basic Rate RATE_36M_BIT\n")); 388 break; 389 390 case DRV_RATE_48M: 391 WLAN_OS_REPORT(("Max Basic Rate RATE_48M_BIT\n")); 392 break; 393 394 case DRV_RATE_54M: 395 WLAN_OS_REPORT(("Max Basic Rate RATE_54M_BIT\n")); 396 break; 397 398 default: 399 WLAN_OS_REPORT(("Max Basic Rate INVALID, 0x%X\n", pSiteEntry->maxBasicRate)); 400 break; 401 } 402 403 switch (pSiteEntry->maxActiveRate) 404 { 405 case DRV_RATE_1M: 406 WLAN_OS_REPORT(("Max Active Rate RATE_1M_BIT\n")); 407 break; 408 409 case DRV_RATE_2M: 410 WLAN_OS_REPORT(("Max Active Rate RATE_2M_BIT\n")); 411 break; 412 413 case DRV_RATE_5_5M: 414 WLAN_OS_REPORT(("Max Active Rate RATE_5_5M_BIT\n")); 415 break; 416 417 case DRV_RATE_11M: 418 WLAN_OS_REPORT(("Max Active Rate RATE_11M_BIT\n")); 419 break; 420 421 case DRV_RATE_22M: 422 WLAN_OS_REPORT(("Max Active Rate RATE_22M_BIT\n")); 423 break; 424 425 case DRV_RATE_6M: 426 WLAN_OS_REPORT(("Max Active Rate RATE_6M_BIT\n")); 427 break; 428 429 case DRV_RATE_9M: 430 WLAN_OS_REPORT(("Max Active Rate RATE_9M_BIT\n")); 431 break; 432 433 case DRV_RATE_12M: 434 WLAN_OS_REPORT(("Max Active Rate RATE_12M_BIT\n")); 435 break; 436 437 case DRV_RATE_18M: 438 WLAN_OS_REPORT(("Max Active Rate RATE_18M_BIT\n")); 439 break; 440 441 case DRV_RATE_24M: 442 WLAN_OS_REPORT(("Max Active Rate RATE_24M_BIT\n")); 443 break; 444 445 case DRV_RATE_36M: 446 WLAN_OS_REPORT(("Max Active Rate RATE_36M_BIT\n")); 447 break; 448 449 case DRV_RATE_48M: 450 WLAN_OS_REPORT(("Max Active Rate RATE_48M_BIT\n")); 451 break; 452 453 case DRV_RATE_54M: 454 WLAN_OS_REPORT(("Max Active Rate RATE_54M_BIT\n")); 455 break; 456 457 default: 458 WLAN_OS_REPORT(("Max Active Rate INVALID, 0x%X\n", pSiteEntry->maxActiveRate)); 459 break; 460 } 461 462 WLAN_OS_REPORT(("\n")); 463 464 if (pSiteEntry->probeModulation == DRV_MODULATION_QPSK) 465 WLAN_OS_REPORT(("Probe Modulation QPSK\n")); 466 else if (pSiteEntry->probeModulation == DRV_MODULATION_CCK) 467 WLAN_OS_REPORT(("Probe Modulation CCK\n")); 468 else if (pSiteEntry->probeModulation == DRV_MODULATION_PBCC) 469 WLAN_OS_REPORT(("Probe Modulation PBCC\n")); 470 else if (pSiteEntry->probeModulation == DRV_MODULATION_OFDM) 471 WLAN_OS_REPORT(("Probe Modulation OFDM\n")); 472 else 473 WLAN_OS_REPORT(("Probe Modulation INVALID, %d\n", pSiteEntry->probeModulation)); 474 475 if (pSiteEntry->beaconModulation == DRV_MODULATION_QPSK) 476 WLAN_OS_REPORT(("Beacon Modulation QPSK\n")); 477 else if (pSiteEntry->beaconModulation == DRV_MODULATION_CCK) 478 WLAN_OS_REPORT(("Beacon Modulation CCK\n")); 479 else if (pSiteEntry->beaconModulation == DRV_MODULATION_PBCC) 480 WLAN_OS_REPORT(("Beacon Modulation PBCC\n")); 481 else if (pSiteEntry->beaconModulation == DRV_MODULATION_OFDM) 482 WLAN_OS_REPORT(("Beacon Modulation OFDM\n")); 483 else 484 WLAN_OS_REPORT(("Beacon Modulation INVALID, %d\n", pSiteEntry->beaconModulation)); 485 486 WLAN_OS_REPORT(("\n")); 487 488 if (pSiteEntry->privacy == TI_TRUE) 489 WLAN_OS_REPORT(("Privacy On\n\n")); 490 else 491 WLAN_OS_REPORT(("Privacy Off\n\n")); 492 493 if (pSiteEntry->currentPreambleType == PREAMBLE_SHORT) 494 WLAN_OS_REPORT(("Cap Preamble Type Short\n")); 495 else if (pSiteEntry->currentPreambleType == PREAMBLE_LONG) 496 WLAN_OS_REPORT(("Cap Preamble Type Long\n")); 497 else 498 WLAN_OS_REPORT(("Preamble INVALID, %d\n", pSiteEntry->currentPreambleType)); 499 500 501 if(pSiteEntry->barkerPreambleType == PREAMBLE_UNSPECIFIED) 502 WLAN_OS_REPORT(("Barker preamble Type Unspecified\n")); 503 else if(pSiteEntry->barkerPreambleType == PREAMBLE_SHORT) 504 WLAN_OS_REPORT(("Barker_Preamble Type Short\n")); 505 else 506 WLAN_OS_REPORT(("Barker_Preamble Type Long\n")); 507 508 if(pSiteEntry->currentSlotTime == PHY_SLOT_TIME_SHORT) 509 WLAN_OS_REPORT(("Slot time type Short\n")); 510 else 511 WLAN_OS_REPORT(("Slot time type Long\n")); 512 513 514 WLAN_OS_REPORT(("\n")); 515 516 WLAN_OS_REPORT(("Beacon interval %d\n", pSiteEntry->beaconInterval)); 517 518 WLAN_OS_REPORT(("Local Time Stamp %d\n", pSiteEntry->localTimeStamp)); 519 520 WLAN_OS_REPORT(("rssi %d\n", pSiteEntry->rssi)); 521 522 WLAN_OS_REPORT(("\n")); 523 524 WLAN_OS_REPORT(("Fail status %d\n", pSiteEntry->failStatus)); 525 526 WLAN_OS_REPORT(("\n---------------------------------------------------------------\n\n", NULL)); 527 528 } 529 530 void printSiteTable(siteMgr_t *pSiteMgr, char *desiredSsid) 531 { 532 TI_UINT8 i, numOfSites = 0; 533 siteEntry_t *pSiteEntry; 534 char ssid[MAX_SSID_LEN + 1]; 535 siteTablesParams_t *pCurrentSiteTable = pSiteMgr->pSitesMgmtParams->pCurrentSiteTable; 536 TI_UINT8 tableIndex=2; 537 538 WLAN_OS_REPORT(("\n\n************************ SITE TABLE ****************************\n\n\n")); 539 540 541 542 do 543 { 544 tableIndex--; 545 for (i = 0; i < pCurrentSiteTable->maxNumOfSites; i++) 546 { 547 pSiteEntry = &(pCurrentSiteTable->siteTable[i]); 548 549 if (pSiteEntry->siteType == SITE_NULL) 550 continue; 551 552 os_memoryCopy(pSiteMgr->hOs ,ssid, (void *)pCurrentSiteTable->siteTable[i].ssid.str, pCurrentSiteTable->siteTable[i].ssid.len); 553 ssid[pCurrentSiteTable->siteTable[i].ssid.len] = 0; 554 555 if (desiredSsid != NULL) 556 { 557 int desiredSsidLength = 0; 558 char * tmp = desiredSsid; 559 560 while (tmp != '\0') 561 { 562 desiredSsidLength++; 563 tmp++; 564 } 565 566 if (os_memoryCompare(pSiteMgr->hOs, (TI_UINT8 *)ssid, (TI_UINT8 *)desiredSsid, desiredSsidLength)) 567 continue; 568 } 569 570 WLAN_OS_REPORT(("SSID %s\n\n", ssid)); 571 572 573 574 if (pSiteEntry->siteType == SITE_PRIMARY) 575 WLAN_OS_REPORT( (" ENTRY PRIMARY %d \n", numOfSites)); 576 else 577 WLAN_OS_REPORT( (" ENTRY %d\n", i)); 578 579 WLAN_OS_REPORT(("BSSID %2X-%2X-%2X-%2X-%2X-%2X \n", 580 pCurrentSiteTable->siteTable[i].bssid[0], 581 pCurrentSiteTable->siteTable[i].bssid[1], 582 pCurrentSiteTable->siteTable[i].bssid[2], 583 pCurrentSiteTable->siteTable[i].bssid[3], 584 pCurrentSiteTable->siteTable[i].bssid[4], 585 pCurrentSiteTable->siteTable[i].bssid[5])); 586 587 588 if (pCurrentSiteTable->siteTable[i].bssType == BSS_INFRASTRUCTURE) 589 WLAN_OS_REPORT(("BSS Type INFRASTRUCTURE\n\n")); 590 else if (pCurrentSiteTable->siteTable[i].bssType == BSS_INDEPENDENT) 591 WLAN_OS_REPORT(("BSS Type IBSS\n\n")); 592 else if (pCurrentSiteTable->siteTable[i].bssType == BSS_ANY) 593 WLAN_OS_REPORT(("BSS Type ANY\n\n")); 594 else 595 WLAN_OS_REPORT(("BSS Type INVALID\n\n")); 596 597 598 WLAN_OS_REPORT(("Channel %d\n", pCurrentSiteTable->siteTable[i].channel)); 599 600 WLAN_OS_REPORT(("\n")); 601 602 switch (pCurrentSiteTable->siteTable[i].maxBasicRate) 603 { 604 case DRV_RATE_1M: 605 WLAN_OS_REPORT(("Max Basic Rate RATE_1M_BIT\n")); 606 break; 607 608 case DRV_RATE_2M: 609 WLAN_OS_REPORT(("Max Basic Rate RATE_2M_BIT\n")); 610 break; 611 612 case DRV_RATE_5_5M: 613 WLAN_OS_REPORT(("Max Basic Rate RATE_5_5M_BIT\n")); 614 break; 615 616 case DRV_RATE_11M: 617 WLAN_OS_REPORT(("Max Basic Rate RATE_11M_BIT\n")); 618 break; 619 620 case DRV_RATE_6M: 621 WLAN_OS_REPORT(("Max Basic Rate RATE_6M_BIT\n")); 622 break; 623 624 case DRV_RATE_9M: 625 WLAN_OS_REPORT(("Max Basic Rate RATE_9M_BIT\n")); 626 break; 627 628 case DRV_RATE_12M: 629 WLAN_OS_REPORT(("Max Basic Rate RATE_12M_BIT\n")); 630 break; 631 632 case DRV_RATE_18M: 633 WLAN_OS_REPORT(("Max Basic Rate RATE_18M_BIT\n")); 634 break; 635 636 case DRV_RATE_24M: 637 WLAN_OS_REPORT(("Max Basic Rate RATE_24M_BIT\n")); 638 break; 639 640 case DRV_RATE_36M: 641 WLAN_OS_REPORT(("Max Basic Rate RATE_36M_BIT\n")); 642 break; 643 644 case DRV_RATE_48M: 645 WLAN_OS_REPORT(("Max Basic Rate RATE_48M_BIT\n")); 646 break; 647 648 case DRV_RATE_54M: 649 WLAN_OS_REPORT(("Max Basic Rate RATE_54M_BIT\n")); 650 break; 651 652 default: 653 WLAN_OS_REPORT(("Max Basic Rate INVALID, 0x%X\n", pCurrentSiteTable->siteTable[i].maxBasicRate)); 654 break; 655 } 656 657 switch (pCurrentSiteTable->siteTable[i].maxActiveRate) 658 { 659 case DRV_RATE_1M: 660 WLAN_OS_REPORT(("Max Active Rate RATE_1M_BIT\n")); 661 break; 662 663 case DRV_RATE_2M: 664 WLAN_OS_REPORT(("Max Active Rate RATE_2M_BIT\n")); 665 break; 666 667 case DRV_RATE_5_5M: 668 WLAN_OS_REPORT(("Max Active Rate RATE_5_5M_BIT\n")); 669 break; 670 671 case DRV_RATE_11M: 672 WLAN_OS_REPORT(("Max Active Rate RATE_11M_BIT\n")); 673 break; 674 675 case DRV_RATE_22M: 676 WLAN_OS_REPORT(("Max Active Rate RATE_22M_BIT\n")); 677 break; 678 679 case DRV_RATE_6M: 680 WLAN_OS_REPORT(("Max Active Rate RATE_6M_BIT\n")); 681 break; 682 683 case DRV_RATE_9M: 684 WLAN_OS_REPORT(("Max Active Rate RATE_9M_BIT\n")); 685 break; 686 687 case DRV_RATE_12M: 688 WLAN_OS_REPORT(("Max Active Rate RATE_12M_BIT\n")); 689 break; 690 691 case DRV_RATE_18M: 692 WLAN_OS_REPORT(("Max Active Rate RATE_18M_BIT\n")); 693 break; 694 695 case DRV_RATE_24M: 696 WLAN_OS_REPORT(("Max Active Rate RATE_24M_BIT\n")); 697 break; 698 699 case DRV_RATE_36M: 700 WLAN_OS_REPORT(("Max Active Rate RATE_36M_BIT\n")); 701 break; 702 703 case DRV_RATE_48M: 704 WLAN_OS_REPORT(("Max Active Rate RATE_48M_BIT\n")); 705 break; 706 707 case DRV_RATE_54M: 708 WLAN_OS_REPORT(("Max Active Rate RATE_54M_BIT\n")); 709 break; 710 711 default: 712 WLAN_OS_REPORT(("Max Active Rate INVALID, 0x%X\n", pCurrentSiteTable->siteTable[i].maxActiveRate)); 713 break; 714 } 715 716 WLAN_OS_REPORT(("\n")); 717 718 if (pCurrentSiteTable->siteTable[i].probeModulation == DRV_MODULATION_QPSK) 719 WLAN_OS_REPORT(("Probe Modulation QPSK\n")); 720 else if (pCurrentSiteTable->siteTable[i].probeModulation == DRV_MODULATION_CCK) 721 WLAN_OS_REPORT(("Probe Modulation CCK\n")); 722 else if (pCurrentSiteTable->siteTable[i].probeModulation == DRV_MODULATION_PBCC) 723 WLAN_OS_REPORT(("Probe Modulation PBCC\n")); 724 else 725 WLAN_OS_REPORT(("Probe Modulation INVALID, %d\n", pCurrentSiteTable->siteTable[i].probeModulation)); 726 727 if (pCurrentSiteTable->siteTable[i].beaconModulation == DRV_MODULATION_QPSK) 728 WLAN_OS_REPORT(("Beacon Modulation QPSK\n")); 729 else if (pCurrentSiteTable->siteTable[i].beaconModulation == DRV_MODULATION_CCK) 730 WLAN_OS_REPORT(("Beacon Modulation CCK\n")); 731 else if (pCurrentSiteTable->siteTable[i].beaconModulation == DRV_MODULATION_PBCC) 732 WLAN_OS_REPORT(("Beacon Modulation PBCC\n")); 733 else 734 WLAN_OS_REPORT(("Beacon Modulation INVALID, %d\n", pCurrentSiteTable->siteTable[i].beaconModulation)); 735 736 WLAN_OS_REPORT(("\n")); 737 738 if (pCurrentSiteTable->siteTable[i].privacy == TI_TRUE) 739 WLAN_OS_REPORT(("Privacy On\n")); 740 else 741 WLAN_OS_REPORT(("Privacy Off\n")); 742 743 if (pCurrentSiteTable->siteTable[i].currentPreambleType == PREAMBLE_SHORT) 744 WLAN_OS_REPORT(("Preamble Type Short\n")); 745 else if (pCurrentSiteTable->siteTable[i].currentPreambleType == PREAMBLE_LONG) 746 WLAN_OS_REPORT(("Preamble Type Long\n")); 747 else 748 WLAN_OS_REPORT(("Preamble INVALID, %d\n", pCurrentSiteTable->siteTable[i].currentPreambleType)); 749 750 751 WLAN_OS_REPORT(("\n")); 752 753 WLAN_OS_REPORT(("Beacon interval %d\n", pCurrentSiteTable->siteTable[i].beaconInterval)); 754 755 WLAN_OS_REPORT(("Local Time Stamp %d\n", pCurrentSiteTable->siteTable[i].localTimeStamp)); 756 757 WLAN_OS_REPORT(("rssi %d\n", pCurrentSiteTable->siteTable[i].rssi)); 758 759 WLAN_OS_REPORT(("\n")); 760 761 WLAN_OS_REPORT(("Fail status %d\n", pCurrentSiteTable->siteTable[i].failStatus)); 762 763 WLAN_OS_REPORT(("ATIM Window %d\n", pCurrentSiteTable->siteTable[i].atimWindow)); 764 765 WLAN_OS_REPORT(("\n---------------------------------------------------------------\n\n", NULL)); 766 767 numOfSites++; 768 } 769 770 WLAN_OS_REPORT(("\n Number Of Sites: %d\n", numOfSites)); 771 WLAN_OS_REPORT(("\n---------------------------------------------------------------\n", NULL)); 772 773 if ((pSiteMgr->pDesiredParams->siteMgrDesiredDot11Mode == DOT11_DUAL_MODE) && (tableIndex==1)) 774 { /* change site table */ 775 if (pCurrentSiteTable == &pSiteMgr->pSitesMgmtParams->dot11BG_sitesTables) 776 { 777 WLAN_OS_REPORT(("\n dot11A_sitesTables \n")); 778 779 pCurrentSiteTable = (siteTablesParams_t *)&pSiteMgr->pSitesMgmtParams->dot11A_sitesTables; 780 } 781 else 782 { 783 WLAN_OS_REPORT(("\n dot11BG_sitesTables \n")); 784 785 pCurrentSiteTable = &pSiteMgr->pSitesMgmtParams->dot11BG_sitesTables; 786 } 787 } 788 789 } while (tableIndex>0); 790 } 791 792 static void printDesiredParams(siteMgr_t *pSiteMgr, TI_HANDLE hCmdDispatch) 793 { 794 paramInfo_t param; 795 796 WLAN_OS_REPORT(("\n\n*****************************************", NULL)); 797 WLAN_OS_REPORT(("*****************************************\n\n", NULL)); 798 799 WLAN_OS_REPORT(("Channel %d\n", pSiteMgr->pDesiredParams->siteMgrDesiredChannel)); 800 801 WLAN_OS_REPORT(("\n*****************************************\n\n", NULL)); 802 803 switch (pSiteMgr->pDesiredParams->siteMgrDesiredRatePair.maxBasic) 804 { 805 case DRV_RATE_1M: 806 WLAN_OS_REPORT(("Max Basic Rate RATE_1M_BIT\n")); 807 break; 808 809 case DRV_RATE_2M: 810 WLAN_OS_REPORT(("Max Basic Rate RATE_2M_BIT\n")); 811 break; 812 813 case DRV_RATE_5_5M: 814 WLAN_OS_REPORT(("Max Basic Rate RATE_5_5M_BIT\n")); 815 break; 816 817 case DRV_RATE_11M: 818 WLAN_OS_REPORT(("Max Basic Rate RATE_11M_BIT\n")); 819 break; 820 821 case DRV_RATE_22M: 822 WLAN_OS_REPORT(("Max Basic Rate RATE_22M_BIT\n")); 823 break; 824 825 case DRV_RATE_6M: 826 WLAN_OS_REPORT(("Max Basic Rate RATE_6M_BIT\n")); 827 break; 828 829 case DRV_RATE_9M: 830 WLAN_OS_REPORT(("Max Basic Rate RATE_9M_BIT\n")); 831 break; 832 833 case DRV_RATE_12M: 834 WLAN_OS_REPORT(("Max Basic Rate RATE_12M_BIT\n")); 835 break; 836 837 case DRV_RATE_18M: 838 WLAN_OS_REPORT(("Max Basic Rate RATE_18M_BIT\n")); 839 break; 840 841 case DRV_RATE_24M: 842 WLAN_OS_REPORT(("Max Basic Rate RATE_24M_BIT\n")); 843 break; 844 845 case DRV_RATE_36M: 846 WLAN_OS_REPORT(("Max Basic Rate RATE_36M_BIT\n")); 847 break; 848 849 case DRV_RATE_48M: 850 WLAN_OS_REPORT(("Max Basic Rate RATE_48M_BIT\n")); 851 break; 852 853 case DRV_RATE_54M: 854 WLAN_OS_REPORT(("Max Basic Rate RATE_54M_BIT\n")); 855 break; 856 857 default: 858 WLAN_OS_REPORT(("Invalid basic rate value 0x%X\n", pSiteMgr->pDesiredParams->siteMgrDesiredRatePair.maxBasic)); 859 break; 860 } 861 862 switch (pSiteMgr->pDesiredParams->siteMgrDesiredRatePair.maxActive) 863 { 864 case DRV_RATE_1M: 865 WLAN_OS_REPORT(("Max Active Rate RATE_1M_BIT\n")); 866 break; 867 868 case DRV_RATE_2M: 869 WLAN_OS_REPORT(("Max Active Rate RATE_2M_BIT\n")); 870 break; 871 872 case DRV_RATE_5_5M: 873 WLAN_OS_REPORT(("Max Active Rate RATE_5_5M_BIT\n")); 874 break; 875 876 case DRV_RATE_11M: 877 WLAN_OS_REPORT(("Max Active Rate RATE_11M_BIT\n")); 878 break; 879 880 case DRV_RATE_22M: 881 WLAN_OS_REPORT(("Max Active Rate RATE_22M_BIT\n")); 882 break; 883 884 case DRV_RATE_6M: 885 WLAN_OS_REPORT(("Max Active Rate RATE_6M_BIT\n")); 886 break; 887 888 case DRV_RATE_9M: 889 WLAN_OS_REPORT(("Max Active Rate RATE_9M_BIT\n")); 890 break; 891 892 case DRV_RATE_12M: 893 WLAN_OS_REPORT(("Max Active Rate RATE_12M_BIT\n")); 894 break; 895 896 case DRV_RATE_18M: 897 WLAN_OS_REPORT(("Max Active Rate RATE_18M_BIT\n")); 898 break; 899 900 case DRV_RATE_24M: 901 WLAN_OS_REPORT(("Max Active Rate RATE_24M_BIT\n")); 902 break; 903 904 case DRV_RATE_36M: 905 WLAN_OS_REPORT(("Max Active Rate RATE_36M_BIT\n")); 906 break; 907 908 case DRV_RATE_48M: 909 WLAN_OS_REPORT(("Max Active Rate RATE_48M_BIT\n")); 910 break; 911 912 case DRV_RATE_54M: 913 WLAN_OS_REPORT(("Max Active Rate RATE_54M_BIT\n")); 914 break; 915 916 default: 917 WLAN_OS_REPORT(("Invalid basic rate value 0x%X\n", pSiteMgr->pDesiredParams->siteMgrDesiredRatePair.maxActive)); 918 break; 919 } 920 921 if (pSiteMgr->pDesiredParams->siteMgrDesiredModulationType == DRV_MODULATION_QPSK) 922 WLAN_OS_REPORT(("Modulation Type QPSK\n")); 923 else if (pSiteMgr->pDesiredParams->siteMgrDesiredModulationType == DRV_MODULATION_CCK) 924 WLAN_OS_REPORT(("Modulation Type CCK\n")); 925 else if (pSiteMgr->pDesiredParams->siteMgrDesiredModulationType == DRV_MODULATION_PBCC) 926 WLAN_OS_REPORT(("Modulation Type PBCC\n")); 927 else if (pSiteMgr->pDesiredParams->siteMgrDesiredModulationType == DRV_MODULATION_OFDM) 928 WLAN_OS_REPORT(("Modulation Type OFDM\n")); 929 else 930 WLAN_OS_REPORT(("Invalid Modulation Type %d\n", pSiteMgr->pDesiredParams->siteMgrDesiredModulationType)); 931 932 933 WLAN_OS_REPORT(("\n*****************************************\n\n", NULL)); 934 935 param.paramType = RSN_EXT_AUTHENTICATION_MODE; 936 cmdDispatch_GetParam(hCmdDispatch, ¶m); 937 if (param.content.rsnDesiredAuthType == RSN_AUTH_OPEN) 938 WLAN_OS_REPORT(("Authentication Type Open System\n")); 939 else if (param.content.rsnDesiredAuthType == RSN_AUTH_SHARED_KEY) 940 WLAN_OS_REPORT(("Authentication Type Shared Key\n")); 941 else 942 WLAN_OS_REPORT(("Authentication Type Invalid: %d\n", param.content.rsnDesiredAuthType)); 943 944 param.paramType = RSN_ENCRYPTION_STATUS_PARAM; 945 cmdDispatch_GetParam(hCmdDispatch, ¶m); 946 if (param.content.rsnEncryptionStatus == TWD_CIPHER_NONE) 947 WLAN_OS_REPORT(("WEP Off\n")); 948 else if (param.content.rsnEncryptionStatus == TWD_CIPHER_WEP) 949 WLAN_OS_REPORT(("WEP On\n")); 950 else 951 WLAN_OS_REPORT(("WEP Invalid: %d\n", param.content.rsnEncryptionStatus)); 952 953 WLAN_OS_REPORT(("\n")); 954 955 956 WLAN_OS_REPORT(("\n*****************************************\n\n", NULL)); 957 if(pSiteMgr->pDesiredParams->siteMgrDesiredDot11Mode == DOT11_B_MODE) 958 WLAN_OS_REPORT(("Desired dot11mode 11b\n")); 959 else if(pSiteMgr->pDesiredParams->siteMgrDesiredDot11Mode == DOT11_G_MODE) 960 WLAN_OS_REPORT(("Desired dot11mode 11g\n")); 961 else if(pSiteMgr->pDesiredParams->siteMgrDesiredDot11Mode == DOT11_A_MODE) 962 WLAN_OS_REPORT(("Desired dot11mode 11a\n")); 963 else if(pSiteMgr->pDesiredParams->siteMgrDesiredDot11Mode == DOT11_DUAL_MODE) 964 WLAN_OS_REPORT(("Desired dot11mode dual 11a/g\n")); 965 else 966 WLAN_OS_REPORT(("Desired dot11mode INVALID\n")); 967 968 WLAN_OS_REPORT(("\n*****************************************\n\n", NULL)); 969 if(pSiteMgr->pDesiredParams->siteMgrDesiredSlotTime == PHY_SLOT_TIME_SHORT) 970 WLAN_OS_REPORT(("Desired slot time short\n")); 971 else if(pSiteMgr->pDesiredParams->siteMgrDesiredSlotTime == PHY_SLOT_TIME_LONG) 972 WLAN_OS_REPORT(("Desired slot time long\n")); 973 else 974 WLAN_OS_REPORT(("Desired slot time INVALID\n")); 975 976 977 WLAN_OS_REPORT(("\n*****************************************\n\n", NULL)); 978 if (pSiteMgr->pDesiredParams->siteMgrDesiredPreambleType == PREAMBLE_SHORT) 979 WLAN_OS_REPORT(("Desired Preamble Short\n")); 980 else if (pSiteMgr->pDesiredParams->siteMgrDesiredPreambleType == PREAMBLE_LONG) 981 WLAN_OS_REPORT(("Desired Preamble Long\n")); 982 else 983 WLAN_OS_REPORT(("Invalid Desired Preamble %d\n", pSiteMgr->pDesiredParams->siteMgrDesiredPreambleType)); 984 985 WLAN_OS_REPORT(("Beacon interval %d\n", pSiteMgr->pDesiredParams->siteMgrDesiredBeaconInterval)); 986 987 WLAN_OS_REPORT(("\n*****************************************", NULL)); 988 WLAN_OS_REPORT(("*****************************************\n\n", NULL)); 989 990 } 991 992 993 994 static void printPrimarySiteDesc(siteMgr_t *pSiteMgr, OS_802_11_BSSID *pPrimarySiteDesc) 995 { 996 TI_UINT8 rateIndex, maxNumOfRates; 997 char ssid[MAX_SSID_LEN + 1]; 998 999 1000 WLAN_OS_REPORT(("\n^^^^^^^^^^^^^^^ PRIMARY SITE DESCRIPTION ^^^^^^^^^^^^^^^^^^^\n\n")); 1001 1002 1003 /* MacAddress */ 1004 WLAN_OS_REPORT(("BSSID 0x%X-0x%X-0x%X-0x%X-0x%X-0x%X\n", pPrimarySiteDesc->MacAddress[0], 1005 pPrimarySiteDesc->MacAddress[1], 1006 pPrimarySiteDesc->MacAddress[2], 1007 pPrimarySiteDesc->MacAddress[3], 1008 pPrimarySiteDesc->MacAddress[4], 1009 pPrimarySiteDesc->MacAddress[5])); 1010 1011 /* Capabilities */ 1012 WLAN_OS_REPORT(("Capabilities 0x%X\n", pPrimarySiteDesc->Capabilities)); 1013 1014 /* SSID */ 1015 os_memoryCopy(pSiteMgr->hOs, ssid, (void *)pPrimarySiteDesc->Ssid.Ssid, pPrimarySiteDesc->Ssid.SsidLength); 1016 ssid[pPrimarySiteDesc->Ssid.SsidLength] = 0; 1017 WLAN_OS_REPORT(("SSID %s\n", ssid)); 1018 1019 /* privacy */ 1020 if (pPrimarySiteDesc->Privacy == TI_TRUE) 1021 WLAN_OS_REPORT(("Privacy ON\n")); 1022 else 1023 WLAN_OS_REPORT(("Privacy OFF\n")); 1024 1025 /* RSSI */ 1026 WLAN_OS_REPORT(("RSSI %d\n", ((pPrimarySiteDesc->Rssi)>>16))); 1027 1028 if (pPrimarySiteDesc->InfrastructureMode == os802_11IBSS) 1029 WLAN_OS_REPORT(("BSS Type IBSS\n")); 1030 else 1031 WLAN_OS_REPORT(("BSS Type INFRASTRUCTURE\n")); 1032 1033 1034 maxNumOfRates = sizeof(pPrimarySiteDesc->SupportedRates) / sizeof(pPrimarySiteDesc->SupportedRates[0]); 1035 /* SupportedRates */ 1036 for (rateIndex = 0; rateIndex < maxNumOfRates; rateIndex++) 1037 { 1038 if (pPrimarySiteDesc->SupportedRates[rateIndex] != 0) 1039 WLAN_OS_REPORT(("Rate 0x%X\n", pPrimarySiteDesc->SupportedRates[rateIndex])); 1040 } 1041 1042 WLAN_OS_REPORT(("\n---------------------------------------------------------------\n\n", NULL)); 1043 1044 } 1045 1046 static void setRateSet(TI_UINT8 maxRate, TRates *pRates) 1047 { 1048 TI_UINT8 i = 0; 1049 1050 switch (maxRate) 1051 { 1052 1053 case DRV_RATE_54M: 1054 pRates->ratesString[i] = 108; 1055 i++; 1056 1057 case DRV_RATE_48M: 1058 pRates->ratesString[i] = 96; 1059 i++; 1060 1061 case DRV_RATE_36M: 1062 pRates->ratesString[i] = 72; 1063 i++; 1064 1065 case DRV_RATE_24M: 1066 pRates->ratesString[i] = 48; 1067 i++; 1068 1069 case DRV_RATE_18M: 1070 pRates->ratesString[i] = 36; 1071 i++; 1072 1073 case DRV_RATE_12M: 1074 pRates->ratesString[i] = 24; 1075 i++; 1076 1077 case DRV_RATE_9M: 1078 pRates->ratesString[i] = 18; 1079 i++; 1080 1081 case DRV_RATE_6M: 1082 pRates->ratesString[i] = 12; 1083 i++; 1084 1085 case DRV_RATE_22M: 1086 pRates->ratesString[i] = 44; 1087 i++; 1088 1089 case DRV_RATE_11M: 1090 pRates->ratesString[i] = 22; 1091 pRates->ratesString[i] |= 0x80; 1092 i++; 1093 1094 case DRV_RATE_5_5M: 1095 pRates->ratesString[i] = 11; 1096 pRates->ratesString[i] |= 0x80; 1097 i++; 1098 1099 case DRV_RATE_2M: 1100 pRates->ratesString[i] = 4; 1101 pRates->ratesString[i] |= 0x80; 1102 i++; 1103 1104 case DRV_RATE_1M: 1105 pRates->ratesString[i] = 2; 1106 pRates->ratesString[i] |= 0x80; 1107 i++; 1108 break; 1109 1110 default: 1111 WLAN_OS_REPORT(("Set Rate Set, invalid max rate %d\n", maxRate)); 1112 pRates->len = 0; 1113 } 1114 1115 pRates->len = i; 1116 1117 } 1118 1119 void printSiteMgrHelpMenu(void) 1120 { 1121 WLAN_OS_REPORT(("\n\n Site Manager Debug Menu \n")); 1122 WLAN_OS_REPORT(("------------------------\n")); 1123 1124 WLAN_OS_REPORT(("500 - Help.\n")); 1125 WLAN_OS_REPORT(("501 - Primary Site Parameters.\n")); 1126 WLAN_OS_REPORT(("502 - Sites List.\n")); 1127 WLAN_OS_REPORT(("503 - Desired Parameters.\n")); 1128 WLAN_OS_REPORT(("507 - Set Power save Mode.\n")); 1129 WLAN_OS_REPORT(("508 - Get Power save Mode.\n")); 1130 WLAN_OS_REPORT(("511 - Set Default Key Id.\n")); 1131 WLAN_OS_REPORT(("512 - Get Default Key Id.\n")); 1132 WLAN_OS_REPORT(("513 - Set Key.\n")); 1133 WLAN_OS_REPORT(("514 - Get Key.\n")); 1134 WLAN_OS_REPORT(("515 - Set Cypher Suite.\n")); 1135 WLAN_OS_REPORT(("516 - Get Cypher Suite.\n")); 1136 WLAN_OS_REPORT(("517 - Set Auth Mode.\n")); 1137 WLAN_OS_REPORT(("518 - Get Auth Mode.\n")); 1138 WLAN_OS_REPORT(("519 - Get Primary Site Description.\n")); 1139 WLAN_OS_REPORT(("520 - Get Connection Status.\n")); 1140 WLAN_OS_REPORT(("522 - Get Current Tx Rate.\n")); 1141 WLAN_OS_REPORT(("525 - Set Supported Rate Set.\n")); 1142 WLAN_OS_REPORT(("526 - Get Supported Rate Set.\n")); 1143 WLAN_OS_REPORT(("527 - Set Auth type.\n")); 1144 WLAN_OS_REPORT(("528 - Get Auth type.\n")); 1145 1146 WLAN_OS_REPORT((" %03d - RADIO_STAND_BY_CHANGE_STATE \n", RADIO_STAND_BY_CHANGE_STATE)); 1147 WLAN_OS_REPORT((" %03d - CONNECT_TO_BSSID \n", CONNECT_TO_BSSID)); 1148 1149 WLAN_OS_REPORT((" %03d - SET_START_CLI_SCAN_PARAM \n", SET_START_CLI_SCAN_PARAM)); 1150 WLAN_OS_REPORT((" %03d - SET_STOP_CLI_SCAN_PARAM \n", SET_STOP_CLI_SCAN_PARAM)); 1151 1152 WLAN_OS_REPORT((" %03d - SET_BROADCAST_BACKGROUND_SCAN_PARAM \n", SET_BROADCAST_BACKGROUND_SCAN_PARAM)); 1153 WLAN_OS_REPORT((" %03d - ENABLE_PERIODIC_BROADCAST_BBACKGROUND_SCAN_PARAM \n", ENABLE_PERIODIC_BROADCAST_BACKGROUND_SCAN_PARAM)); 1154 WLAN_OS_REPORT((" %03d - DISABLE_PERIODIC_BROADCAST_BACKGROUND_SCAN_PARAM \n", DISABLE_PERIODIC_BROADCAST_BACKGROUND_SCAN_PARAM)); 1155 1156 WLAN_OS_REPORT((" %03d - SET_UNICAST_BACKGROUND_SCAN_PARAM \n", SET_UNICAST_BACKGROUND_SCAN_PARAM)); 1157 WLAN_OS_REPORT((" %03d - ENABLE_PERIODIC_UNICAST_BACKGROUND_SCAN_PARAM \n", ENABLE_PERIODIC_UNICAST_BACKGROUND_SCAN_PARAM)); 1158 WLAN_OS_REPORT((" %03d - DISABLE_PERIODIC_UNICAST_BACKGROUND_SCAN_PARAM \n", DISABLE_PERIODIC_UNICAST_BACKGROUND_SCAN_PARAM)); 1159 1160 WLAN_OS_REPORT((" %03d - SET_FOREGROUND_SCAN_PARAM \n", SET_FOREGROUND_SCAN_PARAM)); 1161 WLAN_OS_REPORT((" %03d - ENABLE_PERIODIC_FOREGROUND_SCAN_PARAM \n", ENABLE_PERIODIC_FOREGROUND_SCAN_PARAM)); 1162 WLAN_OS_REPORT((" %03d - DISABLE_PERIODIC_FOREGROUND_SCAN_PARAM \n", DISABLE_PERIODIC_FOREGROUND_SCAN_PARAM)); 1163 1164 WLAN_OS_REPORT((" %03d - SET_CHANNEL_NUMBER \n", SET_CHANNEL_NUMBER)); 1165 WLAN_OS_REPORT((" %03d - SET_RSSI_GAP_THRSH \n", SET_RSSI_GAP_THRSH)); 1166 WLAN_OS_REPORT((" %03d - SET_FAST_SCAN_TIMEOUT \n", SET_FAST_SCAN_TIMEOUT)); 1167 WLAN_OS_REPORT((" %03d - SET_INTERNAL_ROAMING_ENABLE \n", SET_INTERNAL_ROAMING_ENABLE)); 1168 1169 WLAN_OS_REPORT((" %03d - PERFORM_HEALTH_TEST \n", PERFORM_HEALTH_TEST)); 1170 WLAN_OS_REPORT((" %03d - PRINT_FAILURE_EVENTS \n", PRINT_FAILURE_EVENTS)); 1171 WLAN_OS_REPORT((" %03d - FORCE_HW_RESET_RECOVERY \n", FORCE_HW_RESET_RECOVERY)); 1172 WLAN_OS_REPORT((" %03d - FORCE_SOFT_RECOVERY \n", FORCE_SOFT_RECOVERY)); 1173 1174 WLAN_OS_REPORT((" %03d - RESET_ROAMING_EVENTS \n", RESET_ROAMING_EVENTS)); 1175 WLAN_OS_REPORT((" %03d - SET_DESIRED_CONS_TX_ERRORS_THREH\n", SET_DESIRED_CONS_TX_ERRORS_THREH)); 1176 1177 WLAN_OS_REPORT((" %03d - GET_CURRENT_ROAMING_STATUS \n", GET_CURRENT_ROAMING_STATUS)); 1178 1179 1180 WLAN_OS_REPORT((" %03d - TOGGLE_LNA_ON \n", TEST_TOGGLE_LNA_ON)); 1181 WLAN_OS_REPORT((" %03d - TOGGLE_LNA_OFF \n", TEST_TOGGLE_LNA_OFF)); 1182 1183 WLAN_OS_REPORT((" %03d - PRINT_SITE_TABLE_PER_SSID\n", PRINT_SITE_TABLE_PER_SSID)); 1184 1185 WLAN_OS_REPORT((" %03d - SET_DESIRED_CHANNEL\n", SET_DESIRED_CHANNEL)); 1186 1187 WLAN_OS_REPORT((" %03d - START_PRE_AUTH\n", START_PRE_AUTH)); 1188 1189 WLAN_OS_REPORT(("\n------------------------\n")); 1190 } 1191 1192 1193 1194