4 * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
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
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.
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.
35 * \brief Hash & site table internal header file
40 /***************************************************************************/
42 /* MODULE: siteHash.h */
43 /* PURPOSE: Hash & site table internal header file */
45 /***************************************************************************/
46 #ifndef __SITE_MGR_H__
47 #define __SITE_MGR_H__
51 #include "802_11Defs.h"
52 #include "DataCtrl_Api.h"
53 #include "scanResultTable.h"
55 #define MIN_TX_SESSION_COUNT 1
56 #define MAX_TX_SESSION_COUNT 7
58 /* A site entry contains all the site attribute received in beacon and probes
59 and data used to manage the site table and hash table */
60 typedef TSiteEntry siteEntry_t;
65 TI_UINT8 maxNumOfSites;
66 siteEntry_t siteTable[MAX_SITES_BG_BAND];
69 /* This struct is seperated from the above struct (siteTablesParams_t) for memory optimizations */
73 TI_UINT8 maxNumOfSites;
74 siteEntry_t siteTable[MAX_SITES_A_BAND];
75 }siteTablesParamsBandA_t;
77 /* Ths following structure is used to manage the sites */
80 siteTablesParamsBandA_t dot11A_sitesTables;
81 siteTablesParams_t dot11BG_sitesTables;
82 siteTablesParams_t *pCurrentSiteTable;
83 siteEntry_t *pPrimarySite;
84 siteEntry_t *pPrevPrimarySite;
88 /* Site manager handle */
91 siteMgrInitParams_t *pDesiredParams;
92 sitesMgmtParams_t *pSitesMgmtParams;
102 TI_HANDLE hRegulatoryDomain;
103 TI_HANDLE hMeasurementMgr;
113 TI_HANDLE hEvHandler;
117 TI_UINT32 beaconSentCount;
118 TI_UINT32 rxPacketsCount;
119 TI_UINT32 txPacketsCount;
120 TI_UINT16 txSessionCount; /* Current Tx-Session index as configured to FW in last Join command. */
122 EModulationType chosenModulation;
123 EModulationType currentDataModulation;
124 EDot11Mode siteMgrOperationalMode;
125 ERadioBand radioBand;
126 ERadioBand prevRadioBand;
129 TI_BOOL bPostponedDisconnectInProgress;
130 TI_BOOL isAgingEnable;
132 /* TX Power Adjust */
133 TI_UINT32 siteMgrTxPowerCheckTime;
134 TI_BOOL siteMgrTxPowerEnabled;
136 TBeaconFilterInitParams beaconFilterParams; /*contains the desired state*/
139 /*HW Request from Power Ctrl */
140 TI_UINT32 DriverTestId;
142 /* Wifi Simple Config */
143 TIWLN_SIMPLE_CONFIG_MODE siteMgrWSCCurrMode; /* indicates the current WiFi Simple Config mode */
144 TI_UINT32 uWscIeSize; /* Simple Config IE actual size (the part after the OUI) */
145 char siteMgrWSCProbeReqParams[DOT11_WSC_PROBE_REQ_MAX_LENGTH]; /* Contains the params to be used in the ProbeReq - WSC IE */
147 TI_UINT8 includeWSCinProbeReq;
152 siteEntry_t *findAndInsertSiteEntry(siteMgr_t *pSiteMgr,
156 siteEntry_t *findSiteEntry(siteMgr_t *pSiteMgr,
159 void removeSiteEntry(siteMgr_t *pSiteMgr, siteTablesParams_t *pCurrSiteTblParams,
160 siteEntry_t *hashPtr);
162 TI_STATUS removeEldestSite(siteMgr_t *pSiteMgr);
164 TI_STATUS buildProbeReqTemplate(siteMgr_t *pSiteMgr, TSetTemplate *pTemplate, TSsid *pSsid, ERadioBand radioBand);
166 TI_STATUS buildProbeRspTemplate(siteMgr_t *pSiteMgr, TSetTemplate *pTemplate);
168 TI_STATUS buildNullTemplate(siteMgr_t *pSiteMgr, TSetTemplate *pTemplate);
170 TI_STATUS buildArpRspTemplate(siteMgr_t *pSiteMgr, TSetTemplate *pTemplate, TIpAddr staIp);
172 TI_STATUS buildDisconnTemplate(siteMgr_t *pSiteMgr, TSetTemplate *pTemplate);
174 TI_STATUS buildPsPollTemplate(siteMgr_t *pSiteMgr, TSetTemplate *pTemplate);
176 TI_STATUS buildQosNullDataTemplate(siteMgr_t *pSiteMgr, TSetTemplate *pTemplate, TI_UINT8 userPriority);
178 void setDefaultProbeReqTemplate (TI_HANDLE hSiteMgr);
180 #endif /* __SITE_MGR_H__ */