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 scanCncnApp_GetParam * \brief Parses and executes a get param command * * Parses and executes a get param command (get BSSID list) * * \param hScanCncn - handle to the scan concentrator object * \param pParam - the param to get * \return operation status (OK / NOK / PARAM_NOT_SUPPORTED) * \sa scanCncnApp_SetParam */ TI_STATUS scanCncnApp_GetParam (TI_HANDLE hScanCncn, paramInfo_t *pParam) { TScanCncn *pScanCncn = (TScanCncn*)hScanCncn; TRACE1(pScanCncn->hReport, REPORT_SEVERITY_INFORMATION , "scanCncnApp_GetParam: received request of type %d\n", pParam->paramType); switch (pParam->paramType) { case SCAN_CNCN_BSSID_LIST_SIZE_PARAM: /* retrieves the size to allocate for the app scan result taBle BBSID list (see next code) */ pParam->paramLength = sizeof(TI_UINT32); pParam->content.uBssidListSize = scanResultTable_CalculateBssidListSize (pScanCncn->hScanResultTable, TI_FALSE); break; case SCAN_CNCN_BSSID_LIST_PARAM: /* retrieve the app scan result table */ return scanResultTable_GetBssidList (pScanCncn->hScanResultTable, pParam->content.pBssidList, &pParam->paramLength, TI_FALSE); break; default: TRACE1(pScanCncn->hReport, REPORT_SEVERITY_ERROR , "scanCncnApp_GetParam: unrecognized param type :%d\n", pParam->paramType); return PARAM_NOT_SUPPORTED; } return TI_OK; }
/** * \fn scanCncnApp_GetParam * \brief Parses and executes a get param command * * Parses and executes a get param command (get BSSID list) * * \param hScanCncn - handle to the scan concentrator object * \param pParam - the param to get * \return operation status (OK / NOK / PARAM_NOT_SUPPORTED) * \sa scanCncnApp_SetParam */ TI_STATUS scanCncnApp_GetParam (TI_HANDLE hScanCncn, paramInfo_t *pParam) { TScanCncn *pScanCncn = (TScanCncn*)hScanCncn; TRACE1(pScanCncn->hReport, REPORT_SEVERITY_INFORMATION , "scanCncnApp_GetParam: received request of type %d\n", pParam->paramType); switch (pParam->paramType) { case SCAN_CNCN_NUM_BSSID_IN_LIST_PARAM: /* retrieve the number of BSSID's in the scan result table*/ pParam->paramLength = sizeof(TI_UINT32); pParam->content.uNumBssidInList = scanResultTable_GetNumOfBSSIDInTheList (pScanCncn->hScanResultTable); break; case SCAN_CNCN_BSSID_LIST_SIZE_PARAM: /* retrieves the size to allocate for the app scan result taBle BBSID list (see next code) */ pParam->paramLength = sizeof(TI_UINT32); pParam->content.uBssidListSize = scanResultTable_CalculateBssidListSize (pScanCncn->hScanResultTable, TI_TRUE); break; case SCAN_CNCN_BSSID_LIST_PARAM: /* retrieve the app scan result table */ return scanResultTable_GetBssidList (pScanCncn->hScanResultTable, pParam->content.pBssidList, &pParam->paramLength, TI_TRUE); case SCAN_CNCN_BSSID_RATE_LIST_PARAM: /* retrieve supported rates list equivalent to the supported rates list in the scan result table, but is extended to include 11n rates as well*/ return scanResultTable_GetBssidSupportedRatesList (pScanCncn->hScanResultTable, pParam->content.pRateList, &pParam->paramLength); default: TRACE1(pScanCncn->hReport, REPORT_SEVERITY_ERROR , "scanCncnApp_GetParam: unrecognized param type :%d\n", pParam->paramType); return PARAM_NOT_SUPPORTED; } return TI_OK; }