1981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/* 2981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * siteHash.h 3981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * 4981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved. 5981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * All rights reserved. 6981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * 7981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * Redistribution and use in source and binary forms, with or without 8981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * modification, are permitted provided that the following conditions 9981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * are met: 10981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * 11981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * * Redistributions of source code must retain the above copyright 12981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * notice, this list of conditions and the following disclaimer. 13981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * * Redistributions in binary form must reproduce the above copyright 14981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * notice, this list of conditions and the following disclaimer in 15981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * the documentation and/or other materials provided with the 16981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * distribution. 17981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * * Neither the name Texas Instruments nor the names of its 18981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * contributors may be used to endorse or promote products derived 19981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * from this software without specific prior written permission. 20981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * 21981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt */ 33981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt 34981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/** \file siteHash.h 35981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * \brief Hash & site table internal header file 36981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * 37981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * \see siteHash.c 38981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt */ 39981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt 40981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/***************************************************************************/ 41981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/* */ 42981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/* MODULE: siteHash.h */ 43981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/* PURPOSE: Hash & site table internal header file */ 44981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/* */ 45981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/***************************************************************************/ 46981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt#ifndef __SITE_MGR_H__ 47981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt#define __SITE_MGR_H__ 48981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt 49981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt#include "tidef.h" 50981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt#include "paramOut.h" 51981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt#include "802_11Defs.h" 52981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt#include "DataCtrl_Api.h" 53981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt#include "scanResultTable.h" 54981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt 55981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt#define MIN_TX_SESSION_COUNT 1 56981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt#define MAX_TX_SESSION_COUNT 7 57981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt 58981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/* A site entry contains all the site attribute received in beacon and probes 59981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt and data used to manage the site table and hash table */ 60981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidttypedef TSiteEntry siteEntry_t; 61981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt 62981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidttypedef struct 63981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt{ 64981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt TI_UINT8 numOfSites; 65981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt TI_UINT8 maxNumOfSites; 66981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt siteEntry_t siteTable[MAX_SITES_BG_BAND]; 67981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt}siteTablesParams_t; 68981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt 69981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/* This struct is seperated from the above struct (siteTablesParams_t) for memory optimizations */ 70981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidttypedef struct 71981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt{ 72981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt TI_UINT8 numOfSites; 73981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt TI_UINT8 maxNumOfSites; 74981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt siteEntry_t siteTable[MAX_SITES_A_BAND]; 75981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt}siteTablesParamsBandA_t; 76981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt 77981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/* Ths following structure is used to manage the sites */ 78981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidttypedef struct 79981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt{ 80981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt siteTablesParamsBandA_t dot11A_sitesTables; 81981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt siteTablesParams_t dot11BG_sitesTables; 82981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt siteTablesParams_t *pCurrentSiteTable; 83981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt siteEntry_t *pPrimarySite; 84981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt siteEntry_t *pPrevPrimarySite; 85981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt} sitesMgmtParams_t; 86981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt 87981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt 88981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/* Site manager handle */ 89981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidttypedef struct 90981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt{ 91981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt siteMgrInitParams_t *pDesiredParams; 92981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt sitesMgmtParams_t *pSitesMgmtParams; 93981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt 94981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt TI_HANDLE hConn; 95981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt TI_HANDLE hSmeSm; 96981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt TI_HANDLE hCtrlData; 97981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt TI_HANDLE hRxData; 98981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt TI_HANDLE hTxCtrl; 99981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt TI_HANDLE hRsn; 100981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt TI_HANDLE hAuth; 101981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt TI_HANDLE hAssoc; 102981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt TI_HANDLE hRegulatoryDomain; 103981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt TI_HANDLE hMeasurementMgr; 104981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt TI_HANDLE hTWD; 105981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt TI_HANDLE hMlmeSm; 106981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt TI_HANDLE hReport; 107981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt TI_HANDLE hOs; 108981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt TI_HANDLE hXCCMngr; 109981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt TI_HANDLE hApConn; 110981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt TI_HANDLE hCurrBss; 111981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt TI_HANDLE hQosMngr; 112981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt TI_HANDLE hPowerMgr; 113981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt TI_HANDLE hEvHandler; 114981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt TI_HANDLE hScr; 115981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt TI_HANDLE hStaCap; 116981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt 117981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt TI_UINT32 beaconSentCount; 118981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt TI_UINT32 rxPacketsCount; 119981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt TI_UINT32 txPacketsCount; 120981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt TI_UINT16 txSessionCount; /* Current Tx-Session index as configured to FW in last Join command. */ 121981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt 122981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt EModulationType chosenModulation; 123981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt EModulationType currentDataModulation; 124981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt EDot11Mode siteMgrOperationalMode; 125981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt ERadioBand radioBand; 126981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt ERadioBand prevRadioBand; 127981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt 128981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt TMacAddr ibssBssid; 129981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt TI_BOOL bPostponedDisconnectInProgress; 130981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt TI_BOOL isAgingEnable; 131981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt 132981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt /* TX Power Adjust */ 133981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt TI_UINT32 siteMgrTxPowerCheckTime; 134981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt TI_BOOL siteMgrTxPowerEnabled; 135981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt 136981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt TBeaconFilterInitParams beaconFilterParams; /*contains the desired state*/ 137981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt 138981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt 139981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt /*HW Request from Power Ctrl */ 140981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt TI_UINT32 DriverTestId; 141981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt 142981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt /* Wifi Simple Config */ 143981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt TIWLN_SIMPLE_CONFIG_MODE siteMgrWSCCurrMode; /* indicates the current WiFi Simple Config mode */ 144981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt char siteMgrWSCProbeReqParams[DOT11_WSC_PROBE_REQ_MAX_LENGTH]; /* Contains the params to be used in the ProbeReq - WSC IE */ 145981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt 146981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt TI_UINT8 includeWSCinProbeReq; 147981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt} siteMgr_t; 148981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt 149981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt 150981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt 151981801b95b81e6d1c7a2085967406e86af0f08fcDmitry ShmidtsiteEntry_t *findAndInsertSiteEntry(siteMgr_t *pSiteMgr, 152981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt TMacAddr *bssid, 153981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt ERadioBand band); 154981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt 155981801b95b81e6d1c7a2085967406e86af0f08fcDmitry ShmidtsiteEntry_t *findSiteEntry(siteMgr_t *pSiteMgr, 156981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt TMacAddr *bssid); 157981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt 158981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidtvoid removeSiteEntry(siteMgr_t *pSiteMgr, siteTablesParams_t *pCurrSiteTblParams, 159981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt siteEntry_t *hashPtr); 160981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt 161981801b95b81e6d1c7a2085967406e86af0f08fcDmitry ShmidtTI_STATUS removeEldestSite(siteMgr_t *pSiteMgr); 162981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt 163981801b95b81e6d1c7a2085967406e86af0f08fcDmitry ShmidtTI_STATUS buildProbeReqTemplate(siteMgr_t *pSiteMgr, TSetTemplate *pTemplate, TSsid *pSsid, ERadioBand radioBand); 164981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt 165981801b95b81e6d1c7a2085967406e86af0f08fcDmitry ShmidtTI_STATUS buildProbeRspTemplate(siteMgr_t *pSiteMgr, TSetTemplate *pTemplate); 166981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt 167981801b95b81e6d1c7a2085967406e86af0f08fcDmitry ShmidtTI_STATUS buildNullTemplate(siteMgr_t *pSiteMgr, TSetTemplate *pTemplate); 168981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt 169981801b95b81e6d1c7a2085967406e86af0f08fcDmitry ShmidtTI_STATUS buildDisconnTemplate(siteMgr_t *pSiteMgr, TSetTemplate *pTemplate); 170981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt 171981801b95b81e6d1c7a2085967406e86af0f08fcDmitry ShmidtTI_STATUS buildPsPollTemplate(siteMgr_t *pSiteMgr, TSetTemplate *pTemplate); 172981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt 173981801b95b81e6d1c7a2085967406e86af0f08fcDmitry ShmidtTI_STATUS buildQosNullDataTemplate(siteMgr_t *pSiteMgr, TSetTemplate *pTemplate, TI_UINT8 userPriority); 174981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt 175981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidtvoid setDefaultProbeReqTemplate (TI_HANDLE hSiteMgr); 176981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt 177981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt#endif /* __SITE_MGR_H__ */ 178