1/*
2 * tiwlnif.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#ifndef __TIWLNIF_H__
35#define __TIWLNIF_H__
36
37#include "osDot11.h"
38#ifndef TIWLNAPI_EXPORTS
39#include "tidef.h"
40#endif
41#include "TWDriver.h"
42
43#include "STADExternalIf.h"
44
45typedef enum _TIWLN_DOT11_STATUS
46{
47    eDot11Idle           = 0,
48    eDot11Scaning        = 1,
49    eDot11Connecting     = 2,
50    eDot11Associated     = 3,
51    eDot11Disassociated  = 4,
52    eDot11RadioDisabled  = 5,
53  eDot11Error          = 1000
54} TIWLN_DOT11_STATUS;
55
56typedef enum _TIWLN_SECURITY_STATE  /* Values are compatible with 802.1x'S IMSTATE*/
57{
58    eSecurityStateHalted = 0,           /* Security state machine halted*/
59    eSecurityStateStarting,         /* state machine is starting*/
60    eSecurityStateInitializing,     /* state machine is initializing*/
61    eSecurityStateDisabled,         /* state machine is disabled*/
62    eSecurityStateNotAuthenticated, /* Not authenticated state*/
63    eSecurityStateAuthenticating,       /* Authentication request is sent*/
64    eSecurityStateAuthenticated     /* Authenticated state*/
65} TIWLN_SECURITY_STATE;
66
67typedef struct _TIWLN_STATISTICS
68{
69    /**/
70    /* config info*/
71    /**/
72    TI_UINT32                        dot11CurrentTxRate;
73    TI_UINT32                        dot11CurrentChannel;
74    TMacAddr                         currentMACAddress;
75    OS_802_11_SSID                   dot11DesiredSSID;
76    OS_802_11_NETWORK_MODE           dot11BSSType;
77    OS_802_11_AUTHENTICATION_MODE    AuthenticationMode;
78    TI_BOOL                          bShortPreambleUsed;
79    TI_UINT32                        RTSThreshold;
80    TI_UINT32                        FragmentationThreshold;
81    TI_BOOL                          bDefaultWEPKeyDefined;
82    OS_802_11_WEP_STATUS             WEPStatus;
83    TI_UINT32                        TxAntenna;
84    TI_UINT32                        RxAntenna;
85    TI_UINT32                        TxPowerDbm;
86    TI_UINT32                        PowerMode;
87    TI_INT32                         RxLevel;
88
89    /**/
90    /* status & AP info*/
91    /**/
92    TIWLN_DOT11_STATUS              dot11State;
93    OS_802_11_BSSID                 targetAP;
94
95    /**/
96    /* network layer statistics (except Tx statistics which are handled sparately)*/
97    /**/
98    TIWLN_COUNTERS                  tiCounters;
99
100    /**/
101    /* other statistics*/
102    /**/
103    TI_UINT32  dwSecuritySuit;           /* Security suit bitmask (see defines)*/
104    TI_UINT32  dwSecurityState;          /* 802.1x security protocol state*/
105    TI_UINT32  dwSecurityAuthStatus;     /* Security suit authentication status*/
106    TI_UINT32  dwFeatureSuit;            /* Additional features suit bitmask (see defines)*/
107
108}  TIWLN_STATISTICS;
109
110
111/* Statistics security suit bitmasks*/
112#define TIWLN_STAT_SECURITY_RESERVE_1   0x0001
113
114typedef struct _RADIO_RX_QUALITY
115{
116    TI_INT32             Snr;
117    TI_INT32             Rssi;
118}TIWLN_RADIO_RX_QUALITY;
119
120#define MAX_NUM_DATA_FILTERS                4
121
122#endif /* __TIWLNIF_H__*/
123