• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * conn.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 conn.h
35  *  \brief connection module internal header file
36  *
37  *  \see conn.c
38  */
39 
40 /***************************************************************************/
41 /*																			*/
42 /*	  MODULE:	conn.h														*/
43 /*    PURPOSE:	connection module internal header file						*/
44 /*																			*/
45 /***************************************************************************/
46 #ifndef __CONN_H__
47 #define __CONN_H__
48 
49 #include "tidef.h"
50 #include "paramOut.h"
51 #include "fsm.h"
52 #include "802_11Defs.h"
53 #include "connApi.h"
54 #include "scrApi.h"
55 
56 typedef struct
57 {
58 	mgmtStatus_e			disAssocEventReason;		/* Disassoc reason to be used for upper layer	*/
59 	TI_UINT32					disAssocEventStatusCode;	/* Extra information for disConnEventReason		*/
60 } connSmContext_t;
61 
62 
63 /*
64  *	ibssRandomSsidGen - in IBSS, that flag indicates if the ibss must be randommaly changed.
65  *	TI_FALSE - do not generate random ibss.
66  *	TI_TRUE -	generate random ibss.
67  *	1.	at Start up that flag is TI_FALSE
68  *  2.	after Connection fail in connIbss or connSelf SM, set the flag to TI_TRUE in order to
69  *		generate a new random ibss.
70  */
71 
72 /* Connection handle */
73 typedef struct
74 {
75 	TI_UINT8				state;
76 	connSmContext_t			smContext;
77 	connectionType_e		currentConnType;
78 	TI_UINT32				timeout;
79 	TI_HANDLE               hConnTimer;         /* This timer is used both by IBSS and BSS */
80 	fsm_stateMachine_t		*ibss_pFsm;
81     fsm_stateMachine_t		*infra_pFsm;
82 	EConnType				connType;
83 	DisconnectType_e		disConnType;
84 	mgmtStatus_e			disConnReasonToAP;
85 	TI_BOOL					disConEraseKeys;
86     TI_UINT8                buf[40];            /* For dummy interrogate data (to flush cmdQueue) */
87 	conn_status_callback_t  pConnStatusCB;
88 	TI_HANDLE				connStatCbObj;
89 	TI_BOOL 				scrRequested[ SCR_RESOURCE_NUM_OF_RESOURCES ]; /* wether SCR was requested for the two resources */
90     TI_BOOL                 bScrAcquired[ SCR_RESOURCE_NUM_OF_RESOURCES ]; /* wether SCR was acquired for the two resources */
91 	TI_UINT32               ibssDisconnectCount;
92 
93     /* Other modules handles */
94 	TI_HANDLE				hSiteMgr;
95 	TI_HANDLE				hSmeSm;
96 	TI_HANDLE				hMlmeSm;
97 	TI_HANDLE				hRsn;
98 	TI_HANDLE				hReport;
99 	TI_HANDLE				hOs;
100 	TI_HANDLE				hRxData;
101 	TI_HANDLE 				hPwrMngr;
102 	TI_HANDLE				hCtrlData;
103 	TI_HANDLE 				hQosMngr;
104 	TI_HANDLE				hTWD;
105 	TI_HANDLE				hMeasurementMgr;
106 	TI_HANDLE				hScr;
107 	TI_HANDLE				hTrafficMonitor;
108 	TI_HANDLE				hXCCMngr;
109     TI_HANDLE               hScanCncn;
110 	TI_HANDLE				hCurrBss;
111 	TI_HANDLE				hSwitchChannel;
112 	TI_HANDLE				hEvHandler;
113 	TI_HANDLE				hHealthMonitor;
114 	TI_HANDLE				hTxMgmtQ;
115     TI_HANDLE               hRegulatoryDomain;
116     TI_HANDLE    			hSoftGemini;
117     TI_HANDLE	            hTxCtrl;
118     TI_HANDLE	            hTimer;
119 } conn_t;
120 
121 #endif /* __CONN_H__*/
122