1981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/*
2981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * roamingMngrApi.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 roamingMngrApi.h
35981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *  \brief Internal Roaming Manager API
36981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *
37981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *  \see roamingMngr.c
38981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt */
39981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt
40981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/****************************************************************************
41981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *                                                                          *
42981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *   MODULE:  Roaming Manager	    		                                *
43981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *   PURPOSE: Roaming Manager Module API                              		*
44981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *                                                                          *
45981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt ****************************************************************************/
46981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt
47981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt#ifndef _ROAMING_MNGR_API_H_
48981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt#define _ROAMING_MNGR_API_H_
49981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt
50981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/*#include "802_11Defs.h"*/
51981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt#include "osApi.h"
52981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt#include "paramOut.h"
53981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt#include "scanMngrApi.h"
54981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt#include "bssTypes.h"
55981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt#include "DrvMainModules.h"
56653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt#include "apConnApi.h"
57981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/*-----------*/
58981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/* Constants */
59981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/*-----------*/
60981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt
61653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt#define MAX_ROAMING_TRIGGERS  ROAMING_TRIGGER_LAST
62653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt
63653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt
64981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/*--------------*/
65981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/* Enumerations */
66981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/*--------------*/
67981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt
68653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt/* Roaming Trigger groups, according to Roaming Triggers */
69653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidttypedef enum
70653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt{
71653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    ROAMING_TRIGGER_BG_SCAN_GROUP 		= ROAMING_TRIGGER_NORMAL_QUALITY_FOR_BG_SCAN,
72653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    ROAMING_TRIGGER_LOW_QUALITY_GROUP 	= ROAMING_TRIGGER_MAX_TX_RETRIES,
73653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    ROAMING_TRIGGER_FAST_CONNECT_GROUP 	= ROAMING_TRIGGER_SWITCH_CHANNEL,
74653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    ROAMING_TRIGGER_FULL_CONNECT_GROUP 	= ROAMING_TRIGGER_SECURITY_ATTACK
75653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt} roamingMngr_connectTypeGroup_e;
76653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt
77653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt
78981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/*----------*/
79981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/* Typedefs */
80981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/*----------*/
81981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt
82653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt/* scan types */
83653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidttypedef enum
84653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt{
85653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt/*	0	*/	ROAMING_NO_SCAN,
86653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt/*	1	*/	ROAMING_PARTIAL_SCAN,
87653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt/*	2	*/	ROAMING_PARTIAL_SCAN_RETRY,
88653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt/*	3	*/	ROAMING_FULL_SCAN,
89653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt/*	4	*/	ROAMING_FULL_SCAN_RETRY
90653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt
91653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt} scan4RoamingType_e;
92653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt
93653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidttypedef struct
94653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt{
95653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    TI_UINT8   preAuthBSSList[MAX_SIZE_OF_BSS_TRACK_LIST];
96653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    TI_UINT8   numOfPreAuthBSS;
97653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    TI_UINT8   neighborBSSList[MAX_SIZE_OF_BSS_TRACK_LIST];
98653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    TI_UINT8   numOfNeighborBSS;
99653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    TI_UINT8   regularBSSList[MAX_SIZE_OF_BSS_TRACK_LIST];
100653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    TI_UINT8   numOfRegularBSS;
101653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt} listOfCandidateAps_t;
102653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt
103653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt
104653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidtstruct _roamingMngr_t
105653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt{
106653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    /*** Roaming manager parameters that can be configured externally ***/
107653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    roamingMngrConfig_t         	roamingMngrConfig;
108653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    roamingMngrThresholdsConfig_t   roamingMngrThresholdsConfig;
109653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    TI_UINT32                      	lowPassFilterRoamingAttemptInMsec;
110653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt
111653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    /*** Internal roaming parameters ***/
112653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    apConn_roamingTrigger_e     	roamingTrigger;				/* the roaming trigger type */
113653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    TI_UINT32*                      pCurrentState;				/* pointer to Roaming Generic SM current state */
114653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    TI_BOOL                        	maskRoamingEvents;			/* Indicate if a trigger is already in process, and therefore the
115653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt																	other triggers will be ignored */
116653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    TI_UINT32                      	lowQualityTriggerTimestamp;	/* TS to filter Too many low Quality roaming triggers */
117653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    scan4RoamingType_e          	scanType; 					/* the scan type performed for Roaming */
118653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    bssList_t                   	*pListOfAPs;				/* list of BSS received from Scan Manager */
119653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    TI_BOOL                        	neighborApsExist;			/* Indicating if Neighbor APs exist */
120653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    listOfCandidateAps_t        	listOfCandidateAps;			/* a list of the candiadte APs indexes in pListOfAPs according to
121653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt																	neighbor APs, pre-auth APs and other APs */
122653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    TI_UINT8                       	candidateApIndex;			/* The current candidate AP's index to Roam to */
123653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    TI_BOOL                        	handoverWasPerformed;		/* Indicates whether at least one handover was performed */
124653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    apConn_staCapabilities_t    	staCapabilities;
125653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    	/* The station capabilities for the current Connection */
126653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    TI_HANDLE          	            hRoamingSm;				    /* Roaming manager SM handle */
127653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    TI_INT8**                       RoamStateDescription;       /* Roaming states index-name keyValue */
128653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    TI_INT8**                       RoamEventDescription;       /* Roaming Events index-name keyValue */
129653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt
130653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt
131653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    /* Roaming manager handles to other objects */
132653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    TI_HANDLE                   	hReport;
133653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    TI_HANDLE                   	hOs;
134653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    TI_HANDLE                   	hScanMngr;
135653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    TI_HANDLE                   	hAPConnection;
136653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    TI_HANDLE                   	hTWD;
137653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    TI_HANDLE                   	hEvHandler;
138653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    TI_HANDLE                   	hCurrBss;
139653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt
140653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt#ifdef TI_DBG
141653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    /* Debug trace for Roaming statistics */
142653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    TI_UINT32                      roamingTriggerEvents[MAX_ROAMING_TRIGGERS];
143653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    TI_UINT32                      roamingHandoverEvents[MAX_ROAMING_TRIGGERS];
144653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    TI_UINT32                      roamingSuccesfulHandoverNum;
145653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    TI_UINT32                      roamingFailedHandoverNum;
146653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    TI_UINT32                      roamingTriggerTimestamp;
147653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    TI_UINT32                      roamingHandoverStartedTimestamp;
148653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    TI_UINT32                      roamingHandoverCompletedTimestamp;
149653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    TI_UINT32                      roamingAverageSuccHandoverDuration;
150653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    TI_UINT32                      roamingAverageRoamingDuration;
151653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt#endif
152653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt
153653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    TI_UINT8	                   RoamingOperationalMode; /* 0 - manual, 1 - auto*/
154653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt    TargetAp_t                     targetAP;               /* holds the AP to connect with in manual mode */
155653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt}; /* _roamingMngr_t */
156653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt
157653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt
158653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt
159653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidttypedef struct _roamingMngr_t   roamingMngr_t;
160653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt
161981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/*------------*/
162981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/* Structures */
163981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/*------------*/
164981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt
165981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/*---------------------------*/
166981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/* External data definitions */
167981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/*---------------------------*/
168981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt
169981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/*--------------------------------*/
170981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/* External functions definitions */
171981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/*--------------------------------*/
172981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt
173981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/*----------------------------*/
174981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/* Global Function prototypes */
175981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/*----------------------------*/
176981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt
177981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/**
178981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * \brief Create the Roaming Manager context
179981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *
180981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * \param  hOs	  	- OS handler
181981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * \return	A pointer to the roaming manager handler on success,
182981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * 			NULL on failure (unable to allocate memory or other system resource)
183981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *
184981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * \par Description
185981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * Creates the Roaming Manager context: \n
186981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * Allocate control block for preconfigured parameters and internal variables, create state-machine
187981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *
188981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * \sa	roamingMngr_unload
189981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt */
190981801b95b81e6d1c7a2085967406e86af0f08fcDmitry ShmidtTI_HANDLE roamingMngr_create(TI_HANDLE hOs);
191981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/**
192981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * \brief Configure the Roaming Manager module
193981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *
194981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * \param  pStadHandles	  	- The driver modules handles
195981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * \return void
196981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *
197981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * \par Description
198981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * Configure the Roaming Manager module to do the following:
199981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * - Initialize the Station broadcast key State Machine matrix
200981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * - Store handlers of other modules (report module, Scan Manager, AP connection, TWD)
201981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * - Initialize the roaming manager internal variables
202981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * - Configure the roaming manager state-machine
203981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *
204981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * \sa
205981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt */
206981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidtvoid roamingMngr_init (TStadHandlesList *pStadHandles);
207981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/**
208981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * \brief Unloads the Roaming Manager Module
209981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *
210981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * \param  hRoamingMngr - Roaming Manager handler
211981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * \return TI_OK on success or TI_NOK on failure
212981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *
213981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * \par Description
214981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * Unloads the components of the Roaming Manager module from memory:	\n
215981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * releases the allocation for the state-machine and internal variables
216981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *
217981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * \sa	roamingMngr_create
218981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt */
219653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt
220981801b95b81e6d1c7a2085967406e86af0f08fcDmitry ShmidtTI_STATUS roamingMngr_unload(TI_HANDLE hRoamingMngr);
221981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/**
222981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * \brief Get Roaming Manager parameters from the roamingMngr SM
223981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *
224981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * \param  hRoamingMngr - Roaming Manager handler
225981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * \param  pParam 		- Output Parameters
226981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * \return TI_OK on success or TI_NOK on failure
227981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *
228981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * \par Description
229981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *
230981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * \sa
231981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt */
232981801b95b81e6d1c7a2085967406e86af0f08fcDmitry ShmidtTI_STATUS roamingMngr_getParam(TI_HANDLE hRoamingMngr, paramInfo_t *pParam);
233981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/**
234981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * \brief Set Roaming Manager Module parameters to the roamingMngr SM
235981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *
236981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * \param  hRoamingMngr - Roaming Manager handler
237981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * \param  pParam 		- Input Parameters
238981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * \return TI_OK on success or TI_NOK on failure
239981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *
240981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * \par Description
241981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *
242981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * \sa
243981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt */
244981801b95b81e6d1c7a2085967406e86af0f08fcDmitry ShmidtTI_STATUS roamingMngr_setParam(TI_HANDLE hRoamingMngr, paramInfo_t *pParam);
245981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/**
246981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * \brief  Indicates Roaming Manager that an Immediate Scan was completed
247981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *			and provides it with the Scan result
248981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *
249981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * \param  hRoamingMngr  	- Handle to the roaming manager
250981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * \param  scanCmpltStatus	- Scan complete reason
251981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * \return TI_OK on success or TI_NOK on failure
252981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *
253981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * \par Description
254981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * This procedure is called when the Scan Manager completed Immediate Scan for Roaming.
255981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * It performs the following:
256981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * - Partial or Full scan
257981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * - Re-try Partial or Full scan if the previous scan failed
258981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * - Full scan if the previous partial scan didn't get any APs
259981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * - Fail event if all the Scans failed
260981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *
261981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * Algorithm description:
262981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * - If Scan Complete is OK:
263981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * -------------------------
264981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *		- If APs found:
265981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * 			- starts Selection
266981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *		- If NO APs found:
267981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * 			- If Previous Scan was Partial:
268981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *				- Perform Full Scan
269981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *			- If Previous Scan was Full:
270981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *				- Report Error
271981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *
272981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * - If Scan Complete is NOT OK:
273981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * -----------------------------
274981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * - Re-Try Scan
275981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *		- If APs found:
276981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * 			- starts Selection
277981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * 		- If NO APs found:
278981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *			- Re-Try Scan with current Scan Type (Partial/Full Scan Retry or No Scan)
279981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *
280981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * \sa
281981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt */
282981801b95b81e6d1c7a2085967406e86af0f08fcDmitry ShmidtTI_STATUS roamingMngr_immediateScanComplete(TI_HANDLE hRoamingMngr, scan_mngrResultStatus_e scanCmpltStatus);
283981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/**
284981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * \brief  Indicates that a new BSSID is added to the BSS table
285981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *
286981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * \param  hRoamingMngr  	- Handle to the roaming manager
287981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * \param  newBss_entry	  	- List of BSSIDs that have been found
288981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * \return TI_OK on success or TI_NOK on failure
289981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *
290981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * \par Description
291981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * Indicates that a new BSSID is added to the BSS table (Called by the Scan Manager when new BSSID was found).
292981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * This function triggers preauthentication to the new BSS.
293981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *
294981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * \sa
295981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt */
296981801b95b81e6d1c7a2085967406e86af0f08fcDmitry ShmidtTI_STATUS roamingMngr_updateNewBssList(TI_HANDLE hRoamingMngr, bssList_t *newBss_entry);
297981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt
298981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt
299653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt
300653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt/* All functions below added by Lior*/
301653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt
302653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry ShmidtTI_STATUS roamingMngr_setDefaults (TI_HANDLE hRoamingMngr, TRoamScanMngrInitParams *pInitParam);
303653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry ShmidtTI_STATUS roamingMngr_setBssLossThreshold (TI_HANDLE hRoamingMngr, TI_UINT32 uNumOfBeacons, TI_UINT16 uClientID);
304653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry ShmidtTI_STATUS roamingMngr_connect(TI_HANDLE hRoamingMngr, TargetAp_t* pTargetAp);
305653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry ShmidtTI_STATUS roamingMngr_startImmediateScan(TI_HANDLE hRoamingMngr, channelList_t *pChannelList);
306653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry ShmidtTI_STATUS roamingMngr_stopImmediateScan(TI_HANDLE hRoamingMngr);
307653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry ShmidtTI_STATUS roamingMngr_immediateScanByAppComplete(TI_HANDLE hRoamingMngr, scan_mngrResultStatus_e scanCmpltStatus);
308653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt
309653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry ShmidtTI_STATUS roamingMngr_smEvent(TI_UINT8 event, void* data);
310653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidtvoid roamingMngr_smStopWhileScanning(void *pData);
311653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidtvoid roamingMngr_smStop(void *pData);
312653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidtvoid roamingMngr_smUnexpected(void *pData);
313653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidtvoid roamingMngr_smNop(void *pData);
314653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt
315653850f71f9caaa41af19cadbab24bb5e655daf4Dmitry Shmidt
316981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt#endif /*  _ROAMING_MNGR_API_H_*/
317981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt
318