1/*
2 * siteMgrApi.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 siteMgrApi.h
35 *  \brief site manager module API
36 *
37 *  \see siteMgr.c
38 */
39
40/***************************************************************************/
41/*                                                                                                  */
42/*    MODULE:   siteMgrApi.h                                                                */
43/*    PURPOSE:  site manager module API                                         */
44/*                                                                                                  */
45/***************************************************************************/
46#ifndef __SITE_MGR_API_H__
47#define __SITE_MGR_API_H__
48
49#include "tidef.h"
50#include "paramOut.h"
51#include "802_11Defs.h"
52#include "mlmeApi.h"
53#include "siteHash.h"
54#include "ScanCncn.h"
55#include "bssTypes.h"
56#include "DrvMainModules.h"
57#include "scanResultTable.h"
58
59
60#define SPECIAL_BG_CHANNEL              14
61
62/* Rx quality triggers indexes */
63typedef enum
64{
65    TRIGGER_EVENT_LOW_RSSI   = 0,
66    TRIGGER_EVENT_LOW_SNR    = 1,
67    TRIGGER_EVENT_HIGH_TX_PW = 2,
68    TRIGGER_EVENT_LOW_TX_PW  = 3,
69    TRIGGER_EVENT_BG_SCAN    = 4,
70    TRIGGER_EVENT_USER_0     = 5,
71    TRIGGER_EVENT_USER_1     = 6,
72    TRIGGER_EVENT_MAX        = 7
73
74}ETriggerEventIndex;
75
76
77typedef enum
78{
79    /* SiteMgr section */
80    SITE_MGR_POWER_CONSTRAINT_PARAM     = 0x01,
81    SITE_MGR_BEACON_INTERVAL_PARAM      = 0x02,
82    SITE_MGR_SITE_CAPABILITY_PARAM      = 0x05,
83    SITE_MGR_RGSTRY_BASIC_RATE_SET_MASK = 0x08,
84    SITE_MGR_BEACON_RECV                = 0x09,
85    SITE_MGR_DTIM_PERIOD_PARAM          = 0x0A,
86
87    /* Previous Primary Site */
88    SITE_MGR_PREV_SITE_BSSID_PARAM      = 0x0B,
89    SITE_MGR_PREV_SITE_SSID_PARAM       = 0x0C,
90    SITE_MGR_PREV_SITE_CHANNEL_PARAM    = 0x0D,
91    SITE_MGR_DESIRED_RSSI_GAP_THR_PARAM = 0x0E,
92    SITE_MGR_PRIORITY_PARAM             = 0x0F
93
94} ESiteMgrParam;
95
96
97/* Site manager interface functions prototypes */
98
99TI_HANDLE siteMgr_create(TI_HANDLE hOs);
100
101void      siteMgr_init (TStadHandlesList *pStadHandles);
102
103TI_STATUS siteMgr_SetDefaults (TI_HANDLE       hSiteMgr,
104                               siteMgrInitParams_t     *pSiteMgrInitParams);
105
106TI_STATUS siteMgr_unLoad(TI_HANDLE hSiteMgr);
107
108TI_STATUS siteMgr_setParam(TI_HANDLE        hSiteMgr,
109                        paramInfo_t     *pParam);
110
111TI_STATUS siteMgr_getParamWSC(TI_HANDLE hSiteMgr, TIWLN_SIMPLE_CONFIG_MODE *wscParam);
112TI_STATUS siteMgr_getParam(TI_HANDLE        hSiteMgr,
113                        paramInfo_t     *pParam);
114
115TI_STATUS siteMgr_join(TI_HANDLE    hSiteMgr);
116
117TI_STATUS siteMgr_removeSelfSite(TI_HANDLE  hSiteMgr);
118
119TI_STATUS siteMgr_disSelectSite(TI_HANDLE   hSiteMgr);
120
121TI_STATUS systemConfig(siteMgr_t *pSiteMgr);
122
123TI_STATUS siteMgr_start(TI_HANDLE   hSiteMgr);
124
125TI_STATUS siteMgr_stop(TI_HANDLE    hSiteMgr);
126
127TI_STATUS siteMgr_resetSiteTable(TI_HANDLE  hSiteMgr, siteTablesParams_t*   pSiteTableParams);
128
129TI_STATUS siteMgr_updatePrimarySiteFailStatus(TI_HANDLE hSiteMgr,
130                                           TI_BOOL bRemoveSite);
131
132TI_BOOL siteMgr_isCurrentBand24(TI_HANDLE  hSiteMgr);
133
134TI_BOOL siteMgr_isThereCountryIEforCurrentBand(TI_HANDLE   hSiteMgr);
135
136TI_STATUS pbccAlgorithm(TI_HANDLE hSiteMgr);
137
138TI_STATUS siteMgr_assocReport(TI_HANDLE hSiteMgr, TI_UINT16 capabilities, TI_BOOL bCiscoAP);
139
140void siteMgr_setCurrentTable(TI_HANDLE hSiteMgr, ERadioBand radioBand);
141
142void siteMgr_updateRates(TI_HANDLE hSiteMgr, TI_BOOL dot11a, TI_BOOL updateToOS);
143
144void siteMgr_bandParamsConfig(TI_HANDLE hSiteMgr, TI_BOOL updateToOS);
145
146void siteMgr_ConfigRate(TI_HANDLE hSiteMgr);
147
148TI_STATUS siteMgr_getWMEParamsSite(TI_HANDLE hSiteMgr, dot11_ACParameters_t **pWME_ACParameters_t);
149
150TI_STATUS siteMgr_setWMEParamsSite(TI_HANDLE hSiteMgr,dot11_WME_PARAM_t *pDot11_WME_PARAM);
151
152void siteMgr_resetChannelList(TI_HANDLE hSiteMgr);
153
154void siteMgr_IsERP_Needed(TI_HANDLE hSiteMgr,TI_BOOL *useProtection,TI_BOOL *NonErpPresent,TI_BOOL *barkerPreambleType);
155
156TI_STATUS siteMgr_updateNewApList (TI_HANDLE hSiteMgr);
157
158TI_STATUS siteMgr_CopyToPrimarySite (TI_HANDLE hSiteMgr, TSiteEntry *pCandidate);
159
160TI_STATUS siteMgr_overwritePrimarySite(TI_HANDLE hSiteMgr, bssEntry_t *newAP, TI_BOOL requiredToStorePrevSite);
161
162void siteMgr_changeBandParams (TI_HANDLE hSiteMgr, ERadioBand radioBand);
163
164TI_BOOL siteMgr_SelectRateMatch (TI_HANDLE hSiteMgr, TSiteEntry *pCurrentSite);
165
166siteEntry_t *addSelfSite(TI_HANDLE hSiteMgr);
167
168TI_STATUS siteMgr_updateSite(TI_HANDLE			hSiteMgr,
169						  TMacAddr		*bssid,
170						  mlmeFrameInfo_t	*pFrameInfo,
171						  TI_UINT8				rxChannel,
172                          ERadioBand       band,
173						  TI_BOOL				measuring);
174
175TI_STATUS siteMgr_IbssMerge(TI_HANDLE       hSiteMgr,
176                          TMacAddr      	our_bssid,
177						  TMacAddr      	new_bssid,
178                          mlmeFrameInfo_t   *pFrameInfo,
179                          TI_UINT8          rxChannel,
180                          ERadioBand        band);
181
182TI_STATUS siteMgr_saveProbeRespBuffer(TI_HANDLE hSiteMgr, TMacAddr	*bssid, TI_UINT8 *pProbeRespBuffer, TI_UINT32 length);
183
184TI_STATUS siteMgr_saveBeaconBuffer(TI_HANDLE hSiteMgr, TMacAddr *bssid, TI_UINT8 *pBeaconBuffer, TI_UINT32 length);
185
186
187#ifdef REPORT_LOG
188void siteMgr_printPrimarySiteDesc(TI_HANDLE hSiteMgr );
189#endif
190
191#endif /* __SITE_MGR_API_H__ */
192