1981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/*
2981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt * conn.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 conn.h
35981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *  \brief connection module internal header file
36981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *
37981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *  \see conn.c
38981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt */
39981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt
40981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/***************************************************************************/
41981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/*																			*/
42981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/*	  MODULE:	conn.h														*/
43981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/*    PURPOSE:	connection module internal header file						*/
44981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/*																			*/
45981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/***************************************************************************/
46981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt#ifndef __CONN_H__
47981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt#define __CONN_H__
48981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt
49981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt#include "tidef.h"
50981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt#include "paramOut.h"
51981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt#include "fsm.h"
52981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt#include "802_11Defs.h"
53981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt#include "connApi.h"
54981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt#include "scrApi.h"
55981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt
56981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidttypedef struct
57981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt{
58981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt	mgmtStatus_e			disAssocEventReason;		/* Disassoc reason to be used for upper layer	*/
59981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt	TI_UINT32					disAssocEventStatusCode;	/* Extra information for disConnEventReason		*/
60981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt} connSmContext_t;
61981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt
62981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt
63981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/*
64981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *	ibssRandomSsidGen - in IBSS, that flag indicates if the ibss must be randommaly changed.
65981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *	TI_FALSE - do not generate random ibss.
66981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *	TI_TRUE -	generate random ibss.
67981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *	1.	at Start up that flag is TI_FALSE
68981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *  2.	after Connection fail in connIbss or connSelf SM, set the flag to TI_TRUE in order to
69981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt *		generate a new random ibss.
70981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt */
71981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt
72981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt/* Connection handle */
73981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidttypedef struct
74981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt{
75981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt	TI_UINT8				state;
76981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt	connSmContext_t			smContext;
77981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt	connectionType_e		currentConnType;
78981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt	TI_UINT32				timeout;
79981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt	TI_HANDLE               hConnTimer;         /* This timer is used both by IBSS and BSS */
80981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt	fsm_stateMachine_t		*ibss_pFsm;
81981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt    fsm_stateMachine_t		*infra_pFsm;
82981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt	EConnType				connType;
83981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt	DisconnectType_e		disConnType;
84981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt	mgmtStatus_e			disConnReasonToAP;
85981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt	TI_BOOL					disConEraseKeys;
86981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt    TI_UINT8                buf[40];            /* For dummy interrogate data (to flush cmdQueue) */
87981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt	conn_status_callback_t  pConnStatusCB;
88981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt	TI_HANDLE				connStatCbObj;
89981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt	TI_BOOL 				scrRequested[ SCR_RESOURCE_NUM_OF_RESOURCES ]; /* wether SCR was requested for the two resources */
90981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt    TI_BOOL                 bScrAcquired[ SCR_RESOURCE_NUM_OF_RESOURCES ]; /* wether SCR was acquired for the two resources */
91981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt	TI_UINT32               ibssDisconnectCount;
92981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt
93981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt    /* Other modules handles */
94981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt	TI_HANDLE				hSiteMgr;
95981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt	TI_HANDLE				hSmeSm;
96981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt	TI_HANDLE				hMlmeSm;
97981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt	TI_HANDLE				hRsn;
98981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt	TI_HANDLE				hReport;
99981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt	TI_HANDLE				hOs;
100981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt	TI_HANDLE				hRxData;
101981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt	TI_HANDLE 				hPwrMngr;
102981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt	TI_HANDLE				hCtrlData;
103981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt	TI_HANDLE 				hQosMngr;
104981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt	TI_HANDLE				hTWD;
105981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt	TI_HANDLE				hMeasurementMgr;
106981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt	TI_HANDLE				hScr;
107981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt	TI_HANDLE				hTrafficMonitor;
108981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt	TI_HANDLE				hXCCMngr;
109981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt    TI_HANDLE               hScanCncn;
110981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt	TI_HANDLE				hCurrBss;
111981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt	TI_HANDLE				hSwitchChannel;
112981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt	TI_HANDLE				hEvHandler;
113981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt	TI_HANDLE				hHealthMonitor;
114981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt	TI_HANDLE				hTxMgmtQ;
115981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt    TI_HANDLE               hRegulatoryDomain;
116981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt    TI_HANDLE    			hSoftGemini;
117981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt    TI_HANDLE	            hTxCtrl;
118981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt    TI_HANDLE	            hTimer;
119981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt} conn_t;
120981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt
121981801b95b81e6d1c7a2085967406e86af0f08fcDmitry Shmidt#endif /* __CONN_H__*/
122