• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 */
63 typedef 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 
77 typedef 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 
99 TI_HANDLE siteMgr_create(TI_HANDLE hOs);
100 
101 void      siteMgr_init (TStadHandlesList *pStadHandles);
102 
103 TI_STATUS siteMgr_SetDefaults (TI_HANDLE       hSiteMgr,
104                                siteMgrInitParams_t     *pSiteMgrInitParams);
105 
106 TI_STATUS siteMgr_unLoad(TI_HANDLE hSiteMgr);
107 
108 TI_STATUS siteMgr_setParam(TI_HANDLE        hSiteMgr,
109                         paramInfo_t     *pParam);
110 
111 TI_STATUS siteMgr_getParamWSC(TI_HANDLE hSiteMgr, TIWLN_SIMPLE_CONFIG_MODE *wscParam);
112 TI_STATUS siteMgr_getParam(TI_HANDLE        hSiteMgr,
113                         paramInfo_t     *pParam);
114 
115 TI_STATUS siteMgr_join(TI_HANDLE    hSiteMgr);
116 
117 TI_STATUS siteMgr_removeSelfSite(TI_HANDLE  hSiteMgr);
118 
119 TI_STATUS siteMgr_disSelectSite(TI_HANDLE   hSiteMgr);
120 
121 TI_STATUS systemConfig(siteMgr_t *pSiteMgr);
122 
123 TI_STATUS siteMgr_start(TI_HANDLE   hSiteMgr);
124 
125 TI_STATUS siteMgr_stop(TI_HANDLE    hSiteMgr);
126 
127 TI_STATUS siteMgr_resetSiteTable(TI_HANDLE  hSiteMgr, siteTablesParams_t*   pSiteTableParams);
128 
129 TI_STATUS siteMgr_updatePrimarySiteFailStatus(TI_HANDLE hSiteMgr,
130                                            TI_BOOL bRemoveSite);
131 
132 TI_BOOL siteMgr_isCurrentBand24(TI_HANDLE  hSiteMgr);
133 
134 TI_STATUS pbccAlgorithm(TI_HANDLE hSiteMgr);
135 
136 TI_STATUS siteMgr_assocReport(TI_HANDLE hSiteMgr, TI_UINT16 capabilities, TI_BOOL bCiscoAP);
137 
138 void siteMgr_setCurrentTable(TI_HANDLE hSiteMgr, ERadioBand radioBand);
139 
140 void siteMgr_updateRates(TI_HANDLE hSiteMgr, TI_BOOL dot11a, TI_BOOL updateToOS);
141 
142 void siteMgr_bandParamsConfig(TI_HANDLE hSiteMgr, TI_BOOL updateToOS);
143 
144 void siteMgr_ConfigRate(TI_HANDLE hSiteMgr);
145 
146 TI_STATUS siteMgr_getWMEParamsSite(TI_HANDLE hSiteMgr, dot11_ACParameters_t **pWME_ACParameters_t);
147 
148 TI_STATUS siteMgr_setWMEParamsSite(TI_HANDLE hSiteMgr,dot11_WME_PARAM_t *pDot11_WME_PARAM);
149 
150 void siteMgr_IsERP_Needed(TI_HANDLE hSiteMgr,TI_BOOL *useProtection,TI_BOOL *NonErpPresent,TI_BOOL *barkerPreambleType);
151 
152 TI_STATUS siteMgr_CopyToPrimarySite (TI_HANDLE hSiteMgr, TSiteEntry *pCandidate);
153 
154 TI_STATUS siteMgr_overwritePrimarySite(TI_HANDLE hSiteMgr, bssEntry_t *newAP, TI_BOOL requiredToStorePrevSite);
155 
156 void siteMgr_changeBandParams (TI_HANDLE hSiteMgr, ERadioBand radioBand);
157 
158 TI_BOOL siteMgr_SelectRateMatch (TI_HANDLE hSiteMgr, TSiteEntry *pCurrentSite);
159 
160 siteEntry_t *addSelfSite(TI_HANDLE hSiteMgr);
161 
162 TI_STATUS siteMgr_updateSite(TI_HANDLE			hSiteMgr,
163 						  TMacAddr		*bssid,
164 						  mlmeFrameInfo_t	*pFrameInfo,
165 						  TI_UINT8				rxChannel,
166                           ERadioBand       band,
167 						  TI_BOOL				measuring);
168 
169 TI_STATUS siteMgr_IbssMerge(TI_HANDLE       hSiteMgr,
170                           TMacAddr      	our_bssid,
171 						  TMacAddr      	new_bssid,
172                           mlmeFrameInfo_t   *pFrameInfo,
173                           TI_UINT8          rxChannel,
174                           ERadioBand        band);
175 
176 TI_STATUS siteMgr_saveProbeRespBuffer(TI_HANDLE hSiteMgr, TMacAddr	*bssid, TI_UINT8 *pProbeRespBuffer, TI_UINT32 length);
177 
178 TI_STATUS siteMgr_saveBeaconBuffer(TI_HANDLE hSiteMgr, TMacAddr *bssid, TI_UINT8 *pBeaconBuffer, TI_UINT32 length);
179 
180 void siteMgr_UpdatHtParams (TI_HANDLE hSiteMgr, siteEntry_t *pSite, mlmeFrameInfo_t *pFrameInfo);
181 
182 #ifdef REPORT_LOG
183 void siteMgr_printPrimarySiteDesc(TI_HANDLE hSiteMgr );
184 #endif
185 
186 #endif /* __SITE_MGR_API_H__ */
187