1 /*******************************************************************************
3 * Wireless device driver for Linux (wlags49).
5 * Copyright (c) 1998-2003 Agere Systems Inc.
9 * Initially developed by TriplePoint, Inc.
10 * http://www.triplepoint.com
12 *------------------------------------------------------------------------------
14 * Driver common header for info needed by driver source and user-space
15 * processes communicating with the driver.
17 *------------------------------------------------------------------------------
21 * This software is provided subject to the following terms and conditions,
22 * which you should read carefully before using the software. Using this
23 * software indicates your acceptance of these terms and conditions. If you do
24 * not agree with these terms and conditions, do not use the software.
26 * Copyright © 2003 Agere Systems Inc.
27 * All rights reserved.
29 * Redistribution and use in source or binary forms, with or without
30 * modifications, are permitted provided that the following conditions are met:
32 * . Redistributions of source code must retain the above copyright notice, this
33 * list of conditions and the following Disclaimer as comments in the code as
34 * well as in the documentation and/or other materials provided with the
37 * . Redistributions in binary form must reproduce the above copyright notice,
38 * this list of conditions and the following Disclaimer in the documentation
39 * and/or other materials provided with the distribution.
41 * . Neither the name of Agere Systems Inc. nor the names of the contributors
42 * may be used to endorse or promote products derived from this software
43 * without specific prior written permission.
47 * THIS SOFTWARE IS PROVIDED
\93AS IS
\94 AND ANY EXPRESS OR IMPLIED WARRANTIES,
48 * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
49 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY
50 * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
51 * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
52 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
53 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
54 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
55 * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
56 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
57 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
60 ******************************************************************************/
65 /*******************************************************************************
66 * VERSION CONTROL INFORMATION
67 *******************************************************************************
70 * $Date: 2004/07/19 08:16:15 $
72 * $Source: /usr/local/cvs/wl_lkm/include/wireless/wl_if.h,v $
74 ******************************************************************************/
79 #ifndef __WAVELAN2_IF_H__
80 #define __WAVELAN2_IF_H__
85 /*******************************************************************************
86 * constant definitions
87 ******************************************************************************/
88 #define MAX_LTV_BUF_SIZE (512 - (sizeof(hcf_16) * 2))
90 #define HCF_TALLIES_SIZE (sizeof(CFG_HERMES_TALLIES_STRCT) + \
93 #define HCF_MAX_MULTICAST 16
94 #define HCF_MAX_NAME_LEN 32
95 #define MAX_LINE_SIZE 256
96 #define HCF_NUM_IO_PORTS 0x80
97 #define TX_TIMEOUT ((800 * HZ) / 1000)
100 #define HCF_MIN_COMM_QUALITY 0
101 #define HCF_MAX_COMM_QUALITY 92
102 #define HCF_MIN_SIGNAL_LEVEL 47
103 #define HCF_MAX_SIGNAL_LEVEL 138
104 #define HCF_MIN_NOISE_LEVEL 47
105 #define HCF_MAX_NOISE_LEVEL 138
106 #define HCF_0DBM_OFFSET 149
108 /* For encryption (WEP) */
109 #define MIN_KEY_SIZE 5 // 40 bits RC4 - WEP
110 #define MAX_KEY_SIZE 13 // 104 bits
113 #define RADIO_CHANNELS 14
114 #define RADIO_SENSITIVITY_LEVELS 3
115 #define RADIO_TX_POWER_MWATT 32
116 #define RADIO_TX_POWER_DBM 15
118 #define MIN_RTS_BYTES 0
119 #define MAX_RTS_BYTES 2347
122 #define MEGABIT 1024*1024
124 #define HCF_FAILURE 0xFF
125 #define UIL_FAILURE 0xFF
126 #define CFG_UIL_CONNECT 0xA123 // Define differently?
127 #define CFG_UIL_CONNECT_ACK_CODE 0x5653435A // VSCZ
128 #define WVLAN2_UIL_CONNECTED (0x01L << 0)
129 #define WVLAN2_UIL_BUSY (0x01L << 1)
134 /*******************************************************************************
135 * driver ioctl interface
136 ******************************************************************************/
137 #define WVLAN2_IOCTL_UIL SIOCDEVPRIVATE
139 /* The UIL Interface used in conjunction with the WVLAN2_IOCTL_UIL code above
140 is defined in mdd.h. A quick reference of the UIL codes is listed below */
150 UIL_FUN_SEND_DIAG_MSG
155 #define SIOCSIWNETNAME SIOCDEVPRIVATE+1
156 #define SIOCGIWNETNAME SIOCDEVPRIVATE+2
157 #define SIOCSIWSTANAME SIOCDEVPRIVATE+3
158 #define SIOCGIWSTANAME SIOCDEVPRIVATE+4
159 #define SIOCSIWPORTTYPE SIOCDEVPRIVATE+5
160 #define SIOCGIWPORTTYPE SIOCDEVPRIVATE+6
162 /* IOCTL code for the RTS interface */
163 #define WL_IOCTL_RTS SIOCDEVPRIVATE+7
165 /* IOCTL subcodes for WL_IOCTL_RTS */
166 #define WL_IOCTL_RTS_READ 1
167 #define WL_IOCTL_RTS_WRITE 2
168 #define WL_IOCTL_RTS_BATCH_READ 3
169 #define WL_IOCTL_RTS_BATCH_WRITE 4
172 /*******************************************************************************
173 * STRUCTURE DEFINITIONS
174 ******************************************************************************/
178 __u8 name[HCF_MAX_NAME_LEN];
189 hcf_8 u8[MAX_LTV_BUF_SIZE / sizeof(hcf_8)];
190 hcf_16 u16[MAX_LTV_BUF_SIZE / sizeof(hcf_16)];
191 hcf_32 u32[MAX_LTV_BUF_SIZE / sizeof(hcf_32)];
201 char ifrn_name[IFNAMSIZ];
208 /* The data field in this structure is typically an LTV of some type. The
209 len field is the size of the buffer in bytes, as opposed to words (like
210 the L-field in the LTV */
220 char ifrn_name[IFNAMSIZ];
231 #endif // __WAVELAN2_IF_H__