1 /* 2 * scanResultTable.h 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 34 /** \file scanResultTable.h 35 * \brief declarations for a table holding scan results, by BSSID 36 * 37 * \see scanResultTable.c 38 */ 39 40 41 #ifndef __SCAN_RESULT_TABLE_H__ 42 #define __SCAN_RESULT_TABLE_H__ 43 44 #include "osTIType.h" 45 #include "tidef.h" 46 #include "ScanCncn.h" 47 #include "DrvMainModules.h" 48 49 /* site types */ 50 typedef enum 51 { 52 SITE_PRIMARY = 0, 53 SITE_SELF = 1, 54 SITE_REGULAR = 2, 55 SITE_NULL = 3 56 } siteType_e; 57 58 typedef struct 59 { 60 /* The following fields are used for entry management at the SiteMng */ 61 TI_UINT8 index; 62 siteType_e siteType; 63 TI_UINT32 localTimeStamp; 64 /* end of fields are used for entry management at the SiteMng */ 65 66 TI_BOOL bConsideredForSelect; 67 ERadioBand eBand; 68 TI_UINT8 tsfTimeStamp[ TIME_STAMP_LEN ]; 69 70 /* The following fields are used for the selection */ 71 TI_BOOL probeRecv; 72 TI_BOOL beaconRecv; 73 TMacAddr bssid; 74 TSsid ssid; 75 ScanBssType_e bssType; 76 rateMask_t rateMask; 77 ERate maxBasicRate; 78 ERate maxActiveRate; 79 EModulationType beaconModulation; 80 EModulationType probeModulation; 81 EPreamble currentPreambleType; 82 EPreamble preambleAssRspCap; 83 EPreamble barkerPreambleType; 84 ESlotTime currentSlotTime; 85 ESlotTime newSlotTime; 86 TI_BOOL useProtection; 87 TI_BOOL NonErpPresent; 88 TI_UINT8 channel; 89 TI_BOOL privacy; 90 TI_BOOL agility; 91 TI_UINT16 capabilities; 92 TI_UINT16 beaconInterval; 93 TI_UINT8 dtimPeriod; 94 TI_INT8 snr; 95 ERate rxRate; 96 TI_INT32 rssi; 97 98 /* HT capabilites */ 99 Tdot11HtCapabilitiesUnparse tHtCapabilities; 100 /* HT information */ 101 TI_BOOL bHtInfoUpdate; 102 Tdot11HtInformationUnparse tHtInformation; 103 104 /* QOS */ 105 TI_BOOL WMESupported; 106 dot11_ACParameters_t WMEParameters; 107 TI_UINT8 lastWMEParameterCnt; 108 109 /* Power Constraint */ 110 TI_UINT8 powerConstraint; 111 112 /* AP Tx Power obtained from TPC Report */ 113 TI_UINT8 APTxPower; 114 115 /* UPSD */ 116 TI_BOOL APSDSupport; 117 118 /* WiFi Simple Config */ 119 TIWLN_SIMPLE_CONFIG_MODE WSCSiteMode; /* indicates the current WiFi Simple Config mode of the specific site*/ 120 121 TI_UINT16 atimWindow; 122 dot11_RSN_t pRsnIe[MAX_RSN_IE]; 123 TI_UINT8 rsnIeLen; 124 125 /* 80211h beacon - Switch Channel IE included */ 126 TI_BOOL bChannelSwitchAnnoncIEFound; 127 128 TI_UINT8 pUnknownIe[MAX_BEACON_BODY_LENGTH]; 129 TI_UINT16 unknownIeLen; 130 131 mgmtStatus_e failStatus; 132 TI_BOOL prioritySite; 133 TI_UINT8 probeRespBuffer[ MAX_BEACON_BODY_LENGTH ]; 134 TI_UINT16 probeRespLength; 135 TI_UINT8 beaconBuffer[ MAX_BEACON_BODY_LENGTH ]; 136 TI_UINT16 beaconLength; 137 138 } TSiteEntry; 139 140 141 typedef enum 142 { 143 SCAN_RESULT_TABLE_DONT_CLEAR, 144 SCAN_RESULT_TABLE_CLEAR 145 146 } EScanResultTableClear; 147 148 TI_HANDLE scanResultTable_Create (TI_HANDLE hOS, TI_UINT32 uEntriesNumber); 149 void scanResultTable_Init (TI_HANDLE hScanResultTable, TStadHandlesList *pStadHandles, EScanResultTableClear eClearTable); 150 void scanResultTable_Destroy (TI_HANDLE hScanResultTable); 151 TI_STATUS scanResultTable_UpdateEntry (TI_HANDLE hScanResultTable, TMacAddr *pBssid, TScanFrameInfo* pFrame); 152 void scanResultTable_SetStableState (TI_HANDLE hScanResultTable); 153 TSiteEntry *scanResultTable_GetFirst (TI_HANDLE hScanResultTable); 154 TSiteEntry *scanResultTable_GetNext (TI_HANDLE hScanResultTable); 155 TSiteEntry *scanResultTable_GetBySsidBssidPair (TI_HANDLE hScanResultTable, TSsid *pSsid, TMacAddr *pBssid); 156 TI_UINT32 scanResultTable_CalculateBssidListSize (TI_HANDLE hScanResultTable, TI_BOOL bAllVarIes); 157 TI_UINT32 scanResultTable_GetNumOfBSSIDInTheList (TI_HANDLE hScanResultTable); 158 TI_STATUS scanResultTable_GetBssidList (TI_HANDLE hScanResultTable, OS_802_11_BSSID_LIST_EX *pBssidList, 159 TI_UINT32 *pLength, TI_BOOL bAllVarIes); 160 TI_STATUS scanResultTable_GetBssidSupportedRatesList (TI_HANDLE hScanResultTable, OS_802_11_N_RATES *pRateList, TI_UINT32 *pLength); 161 162 void scanResultTable_PerformAging(TI_HANDLE hScanResultTable); 163 void scanResultTable_SetSraThreshold(TI_HANDLE hScanResultTable, TI_UINT32 uSraThreshold); 164 #endif /* __SCAN_RESULT_TABLE_H__ */ 165 166