PageRenderTime 51ms CodeModel.GetById 16ms RepoModel.GetById 1ms app.codeStats 0ms

/source/mydroid/hardware/ti/wlan/wlan/wl1283/Test/siteMgrDebug.c

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