1 /* 2 * scanResultTable.h 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 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 mgmtStatus_e failStatus; 126 TI_BOOL prioritySite; 127 TI_UINT8 probeRespBuffer[ MAX_BEACON_BODY_LENGTH ]; 128 TI_UINT16 probeRespLength; 129 TI_UINT8 beaconBuffer[ MAX_BEACON_BODY_LENGTH ]; 130 TI_UINT16 beaconLength; 131 132 } TSiteEntry; 133 134 135 136 137 TI_HANDLE scanResultTable_Create (TI_HANDLE hOS); 138 void scanResultTable_Init (TI_HANDLE hScanResultTable, TStadHandlesList *pStadHandles); 139 void scanResultTable_Destroy (TI_HANDLE hScanResultTable); 140 TI_STATUS scanResultTable_UpdateEntry (TI_HANDLE hScanResultTable, TMacAddr *pBssid, TScanFrameInfo* pFrame); 141 void scanResultTable_SetStableState (TI_HANDLE hScanResultTable); 142 TSiteEntry *scanResultTable_GetFirst (TI_HANDLE hScanResultTable); 143 TSiteEntry *scanResultTable_GetNext (TI_HANDLE hScanResultTable); 144 TSiteEntry *scanResultTable_GetBySsidBssidPair (TI_HANDLE hScanResultTable, TSsid *pSsid, TMacAddr *pBssid); 145 TI_UINT32 scanResultTable_CalculateBssidListSize (TI_HANDLE hScanResultTable, TI_BOOL bAllVarIes); 146 TI_STATUS scanResultTable_GetBssidList (TI_HANDLE hScanResultTable, OS_802_11_BSSID_LIST_EX *pBssidList, 147 TI_UINT32 *pLength, TI_BOOL bAllVarIes); 148 149 #endif /* __SCAN_RESULT_TABLE_H__ */ 150 151