cm-kernel /drivers/net/wireless/tiwlan1251/CUDK/Inc/TI_AdapterSEC.h

Language C/C++ Header Lines 325
MD5 Hash 454eb04423da0ebaeb9322b1873d1028 Estimated Cost $1,090 (why?)
Repository git://github.com/CyanogenMod/cm-kernel.git View Raw File View Project SPDX
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
/*******************************************************************************
**+--------------------------------------------------------------------------+**
**|                                                                          |**
**| Copyright 1998-2008 Texas Instruments, Inc. - http://www.ti.com/         |**
**|                                                                          |**
**| Licensed under the Apache License, Version 2.0 (the "License");          |**
**| you may not use this file except in compliance with the License.         |**
**| You may obtain a copy of the License at                                  |**
**|                                                                          |**
**|     http://www.apache.org/licenses/LICENSE-2.0                           |**
**|                                                                          |**
**| Unless required by applicable law or agreed to in writing, software      |**
**| distributed under the License is distributed on an "AS IS" BASIS,        |**
**| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |**
**| See the License for the specific language governing permissions and      |**
**| limitations under the License.                                           |**
**|                                                                          |**
**+--------------------------------------------------------------------------+**
*******************************************************************************/

/*--------------------------------------------------------------------------*/
/* Module:		TI_AdapterSEC.h*/
/**/
/* Purpose:		*/
/**/
/*--------------------------------------------------------------------------*/

#ifndef TI_ADAPTER_SEC_H
#define TI_ADAPTER_SEC_H

#ifdef __cplusplus
extern "C" {
#endif
    
/******************************************************************************

    Name:	TI_SetAuthenticationMode
	Desc:	This function sets the system's authentication mode.
    Params:	hAdapter - The Adapter handle returned by TI_AdapterInit().
    uAuthMode - one of: os802_11AuthModeOpen,
                        os802_11AuthModeShared,
                        os802_11AuthModeAutoSwitch,
                        os802_11AuthModeWPA,
                        os802_11AuthModeWPAPSK,
                        os802_11AuthModeWPANone,
                        os802_11AuthModeWPA2,
                        os802_11AuthModeWPA2PSK,
    Return:	TI_RESULT_OK on success. Any other value indicates an error.
	
******************************************************************************/
tiINT32     TI_SetAuthenticationMode (TI_HANDLE  hAdapter, 
                                      OS_802_11_AUTHENTICATION_MODE  uAuthMode);

/******************************************************************************

    Name:	TI_GetAuthenticationMode
	Desc:	This function retrieves the 802.11 authentication mode.
    Params:	hAdapter - The Adapter handle returned by TI_AdapterInit().
    puAuthMode - one of: os802_11AuthModeOpen,
                         os802_11AuthModeShared,
                         os802_11AuthModeAutoSwitch,
                         os802_11AuthModeWPA,
                         os802_11AuthModeWPAPSK,
                         os802_11AuthModeWPANone,
                         os802_11AuthModeWPA2,
                         os802_11AuthModeWPA2PSK,
    Return:	TI_RESULT_OK on success. Any other value indicates an error.
	
******************************************************************************/
tiINT32     TI_GetAuthenticationMode (TI_HANDLE  hAdapter, 
                                      OS_802_11_AUTHENTICATION_MODE* puAutMode);


/******************************************************************************

    Name:	TI_SetCertificateParameters
	Desc:	This function is used for WPA or EXC Certificate configuration.
    Params:	hAdapter - The Adapter handle returned by TI_AdapterInit().
            pData - 
            bValidateServerCert - 
    Return:	TI_RESULT_OK on success. Any other value indicates an error.
	
******************************************************************************/
tiINT32     TI_SetCertificateParameters (TI_HANDLE  hAdapter, 
                                         tiVOID* pData, 
                                         tiBOOL bValidateServerCert );

/******************************************************************************

    Name:	TI_SetEAPType
    Desc:	This function sets the current EAP type in the Supplicant.
    Params:	hAdapter - The Adapter handle returned by TI_AdapterInit().
            uEAPType - Contains value of current EAP type from enumeration 
                       OS_802_11_EAP_TYPES:
                        OS_EAP_TYPE_NONE = -1,
                        OS_EAP_TYPE_MD5_CHALLENGE = 4,
                        OS_EAP_TYPE_GENERIC_TOKEN_CARD = 6,
                        OS_EAP_TYPE_TLS = 13,
                        OS_EAP_TYPE_LEAP = 17,
                        OS_EAP_TYPE_TTLS = 21,
                        OS_EAP_TYPE_PEAP = 25,
                        OS_EAP_TYPE_MS_CHAP_V2 = 26,
                        OS_EAP_TYPE_FAST = 43
    Return:	TI_RESULT_OK on success. Any other value indicates an error.
    Note:   Under Linux (ASD device): MD5_CHALLENGE, GENERIC_TOKEN_CARD, TTLS,
                                      PEAP and MS_CHAP_V2 are not supported.
    
******************************************************************************/
tiINT32     TI_SetEAPType               (TI_HANDLE  hAdapter,
                                         OS_802_11_EAP_TYPES  uEAPType );

/******************************************************************************

    Name:	TI_GetEAPType
    Desc:	This function retrieves the current EAP type.
    Params:	hAdapter - The Adapter handle returned by TI_AdapterInit().
            puEAPType - Pointer to a OS_802_11_EAP_TYPES value that contains
                        current EAP type
    Return:	TI_RESULT_OK on success. Any other value indicates an error.
	
******************************************************************************/
tiINT32     TI_GetEAPType               (TI_HANDLE  hAdapter, 
                                         OS_802_11_EAP_TYPES* puEAPType);

/******************************************************************************

    Name:	TI_SetEAPTypeDriver
    Desc:	This function sets the current EAP type in the driver.
    Params:	hAdapter - The Adapter handle returned by TI_AdapterInit().
            uEAPType - Contains value of current EAP type from enumeration 
                       OS_802_11_EAP_TYPES.
    Return:	TI_RESULT_OK on success. Any other value indicates an error.
    Note:   Under Linux (ASD device): MD5_CHALLENGE, GENERIC_TOKEN_CARD, TTLS,
                                      PEAP and MS_CHAP_V2 are not supported.
    
******************************************************************************/
tiINT32     TI_SetEAPTypeDriver         (TI_HANDLE  hAdapter, 
                                         OS_802_11_EAP_TYPES  uEAPType );


/******************************************************************************

    Name:	TI_SetEncryptionType
    Desc:	This function sets the Encryption type. This function sets both 
            the driver and the supplicant via an IOCTL.
    Params:	hAdapter - The Adapter handle returned by TI_AdapterInit().
            uEncryptType - Contains value of current encrypt type from enumeration 
                           OS_802_11_ENCRYPTION_TYPES:
                               OS_ENCRYPTION_TYPE_NONE = 0,
                               OS_ENCRYPTION_TYPE_WEP,
                               OS_ENCRYPTION_TYPE_TKIP,
                               OS_ENCRYPTION_TYPE_AES,
    Return:	TI_RESULT_OK on success. Any other value indicates an error.
	
******************************************************************************/
tiINT32     TI_SetEncryptionType        (TI_HANDLE  hAdapter, 
                                         OS_802_11_ENCRYPTION_TYPES  uEncryptType );

/******************************************************************************

    Name:	TI_GetEncryptionType
    Desc:	This function retrieves the current encryption type.
    Params:	hAdapter - The Adapter handle returned by TI_AdapterInit().
            puEncryptType - Pointer to a OS_802_11_EAP_TYPES value that contains 
                            current encrypt type
    Return:	TI_RESULT_OK on success. Any other value indicates an error.
	
******************************************************************************/
tiINT32     TI_GetEncryptionType        (TI_HANDLE  hAdapter, 
                                         OS_802_11_ENCRYPTION_TYPES* puEncryptType);

/******************************************************************************

    Name:	TI_SetCredentials
    Desc:	This function sets the User Name and Password in the supplicant.
    Params:	hAdapter - The Adapter handle returned by TI_AdapterInit().
            pszUserName - Pointer to a null-terminated string that contains the 
                          user name.
            pszPassword - Pointer to a null-terminated string that contains the 
                          password.
    Return:	TI_RESULT_OK on success. Any other value indicates an error.
	
******************************************************************************/
tiINT32     TI_SetCredentials           (TI_HANDLE  hAdapter, 
                                         tiCHAR* pszUserName, 
                                         tiCHAR* pszPassword );

/******************************************************************************

    Name:	TI_SetPSK
    Desc:	This function sets the PSK Password Phrase for WPA type encryption
            in the supplicant.
    Params:	hAdapter - The Adapter handle returned by TI_AdapterInit().
            pszPSK - Pointer to a null-terminated string that contains the PSK
                     password phrase
    Return:	TI_RESULT_OK on success. Any other value indicates an error.
	
******************************************************************************/
tiINT32     TI_SetPSK                   (TI_HANDLE  hAdapter, 
                                         tiCHAR* pszPSK );

/******************************************************************************

    Name:	TI_SetKeyType
    Desc:	This function sets the encryption key type, OS_KEY_TYPE_STATIC uses
            the regular 802.11 WEP, and OS_KEY_TYPE_DYNAMIC uses 802.1x (WPA)
            encryption.
    Params:	hAdapter - The Adapter handle returned by TI_AdapterInit().
            uKeyType - Define the security key type:
                        OS_KEY_TYPE_STATIC = 0,
                        OS_KEY_TYPE_DYNAMIC
    Return:	TI_RESULT_OK on success. Any other value indicates an error.
	
******************************************************************************/
tiINT32     TI_SetKeyType               (TI_HANDLE  hAdapter, 
                                         OS_802_11_KEY_TYPES uKeyType );
                                            

/******************************************************************************

    Name:	TI_AddWEPKey
    Desc:	This function enables you to add a new static WEP key and to 
            indicate whether the key is the default key. The function should
            be used only in static key mode.
    Params:	hAdapter - The Adapter handle returned by TI_AdapterInit().
            pWEP - A pointer to an OS_802_11_WEP structure:
                    Length      - specifies the length of the OS_802_11_WEP 
                                  structure in bytes.
                    KeyIndex    - specifies which key to add. KeyIndex can be 
                                  0 to 3. When the most significant bit is set
                                  to 1, the key is set as the default key.
                    KeyLength   - specifies the length of the KeyMaterial 
                                  character array in bytes.
                    KeyMaterial - specifies an array that identifies the WEP key.
                                  The length of this array is variable.
    Return:	TI_RESULT_OK on success. Any other value indicates an error.
	
******************************************************************************/
tiINT32     TI_AddWEPKey                (TI_HANDLE  hAdapter, 
                                         OS_802_11_WEP* pWEP    );

/******************************************************************************

    Name:	TI_RemoveWEPKey
    Desc:	This function removes a static WEP key.
    Params:	hAdapter - The Adapter handle returned by TI_AdapterInit().
            uKeyIndex - Contains the index of the key to remove.
    Return:	TI_RESULT_OK on success. Any other value indicates an error.
	
******************************************************************************/
tiINT32     TI_RemoveWEPKey             (TI_HANDLE  hAdapter, 
                                         tiUINT32   uKeyIndex   );
/******************************************************************************

    Name:	TI_GetDefaultWepKey
    Desc:	This function returns the default WEP key as it was previously set by TI_AddWEPKey function.
    Params:	hAdapter - The Adapter handle returned by TI_AdapterInit().
            puKeyIndex - Pointer to the index of the default WEP key.
    Return:	TI_RESULT_OK on success. Any other value indicates an error.
	
******************************************************************************/
tiINT32		TI_GetDefaultWepKey        (TI_HANDLE  hAdapter,
                                        tiUINT32* puKeyIndex );
 
/******************************************************************************

    Name:	TI_SetMixedMode
    Desc:	This function enables the station to connect to an AP with or without
            WEP. When disabled, only the configured security mode is possible.
    Params:	hAdapter - The Adapter handle returned by TI_AdapterInit().
            bStatus - FALSE for disable, TRUE for enable.
    Return:	TI_RESULT_OK on success. Any other value indicates an error.
	
******************************************************************************/
tiINT32     TI_SetMixedMode             (TI_HANDLE  hAdapter, 
                                         tiBOOL bStatus);

/******************************************************************************

    Name:	TI_GetMixedMode
    Desc:	This function checks if the station can connect to an AP with or 
            without WEP.
    Params:	hAdapter - The Adapter handle returned by TI_AdapterInit().
            pbStatus - FALSE indicates Mixed mode is disbaled, TRUE for enable.
    Return:	TI_RESULT_OK on success. Any other value indicates an error.
	
******************************************************************************/
tiINT32     TI_GetMixedMode             (TI_HANDLE  hAdapter, 
                                         tiBOOL* pbStatus);

/******************************************************************************

    Name:	TI_SetWpaOptions
    Desc:	This function sets WPA promotion options. The STA supports promotion
            of WPA2 authentication and AES encryption. Promotion means that if 
            the STA is configured to WPA , the STA connects to either WPA or 
            WPA2 according to the AP’s max support. This function sets both the 
            Driver and the Supplicant via an IOCTL.
    Params:	hAdapter - The Adapter handle returned by TI_AdapterInit().
            fWPAOptions - The required WPA options.
    Return:	TI_RESULT_OK on success. Any other value indicates an error.
    Notes:  Supports only the ENABLE_ALL option.
	
******************************************************************************/
tiINT32     TI_SetWpaOptions            (TI_HANDLE  hAdapter, 
                                         tiUINT32   fWPAOptions );

/******************************************************************************

    Name:	TI_GetWpaOptions
    Desc:	This function retrieves the WPA promotion options.
    Params:	hAdapter - The Adapter handle returned by TI_AdapterInit().
            fWPAOptions - Current WPA options
    Return:	TI_RESULT_OK on success. Any other value indicates an error.
	
******************************************************************************/
tiINT32     TI_GetWpaOptions            (TI_HANDLE  hAdapter, 
                                         tiUINT32 *fWPAOptions );
#ifdef __cplusplus
}
#endif


#endif /* TI_ADAPTER_SEC_H*/
Back to Top