GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / linux / linux-2.6.36 / drivers / staging / wlags49_h2 / wl_enc.h
blobb4f54d81f311eede8b262a9d9077416fbd07ec63
1 /*******************************************************************************
2 * Agere Systems Inc.
3 * Wireless device driver for Linux (wlags49).
5 * Copyright (c) 1998-2003 Agere Systems Inc.
6 * All rights reserved.
7 * http://www.agere.com
9 * Initially developed by TriplePoint, Inc.
10 * http://www.triplepoint.com
12 *------------------------------------------------------------------------------
14 * Header for performing coding/decoding of the WEP keys.
16 *------------------------------------------------------------------------------
18 * SOFTWARE LICENSE
20 * This software is provided subject to the following terms and conditions,
21 * which you should read carefully before using the software. Using this
22 * software indicates your acceptance of these terms and conditions. If you do
23 * not agree with these terms and conditions, do not use the software.
25 * Copyright © 2003 Agere Systems Inc.
26 * All rights reserved.
28 * Redistribution and use in source or binary forms, with or without
29 * modifications, are permitted provided that the following conditions are met:
31 * . Redistributions of source code must retain the above copyright notice, this
32 * list of conditions and the following Disclaimer as comments in the code as
33 * well as in the documentation and/or other materials provided with the
34 * distribution.
36 * . Redistributions in binary form must reproduce the above copyright notice,
37 * this list of conditions and the following Disclaimer in the documentation
38 * and/or other materials provided with the distribution.
40 * . Neither the name of Agere Systems Inc. nor the names of the contributors
41 * may be used to endorse or promote products derived from this software
42 * without specific prior written permission.
44 * Disclaimer
46 * THIS SOFTWARE IS PROVIDED “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES,
47 * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
48 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY
49 * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
50 * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
51 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
52 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
53 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
54 * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
55 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
56 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
57 * DAMAGE.
59 ******************************************************************************/
61 #ifndef __WAVELAN2_ENCRYPTION_H__
62 #define __WAVELAN2_ENCRYPTION_H__
67 /*******************************************************************************
68 * constant definitions
69 ******************************************************************************/
70 #define CRYPT_CODE "57617665A5D6"
71 #define ENCRYPTION_LEN 102
72 #define ENCRYPTION_MAGIC 0x48576877L // HWhw
73 #define DEF_CRYPT_STR "G?TIUEA]d5MAdZV'eUb&&6.)'&:,'VF/(FR2)6^5*'*8*W6;+GB>,7NA-'ZD-X&G.H2J/8>M0(JP0XVS1HbV29.Y3):\\3YF_4IRb56"
75 #define DEFAULT_CRYPT_MAC "W\x01\x6B\x66\xA5\x5A"
76 #define CH_START '&'
77 #define MACADDRESS_STR_LEN 12
79 #define KEY_LEN 14
80 #define NUM_KEYS 4
82 #define KEY_LENGTH_NONE_ASCII 0
83 #define KEY_LENGTH_64_BIT_ASCII 5
84 #define KEY_LENGTH_128_BIT_ASCII 13
86 #define KEY_LENGTH_NONE_HEX ( KEY_LENGTH_NONE_ASCII * sizeof( unsigned short ))
87 #define KEY_LENGTH_64_BIT_HEX ( KEY_LENGTH_64_BIT_ASCII * sizeof( unsigned short ))
88 #define KEY_LENGTH_128_BIT_HEX ( KEY_LENGTH_128_BIT_ASCII * sizeof( unsigned short ))
93 /*******************************************************************************
94 * type definitions
95 ******************************************************************************/
96 typedef struct _encstct
98 hcf_32 dwMagic;
99 hcf_16 wTxKeyID;
100 hcf_16 wEnabled;
101 CFG_DEFAULT_KEYS_STRCT EncStr;
103 ENCSTRCT, *PENCSTRCT;
108 /*******************************************************************************
109 * function prrottypes
110 ******************************************************************************/
111 int wl_wep_code( char *szCrypt, char *szDest, void *Data, int nLen );
113 int wl_wep_decode( char *szCrypt, void *Dest, char *szData );
118 #endif // __WAVELAN2_ENCRYPTION_H__