Fixed binary search: no more infinite loops when vendor is unknown.
[tangerine.git] / workbench / devs / networks / prism2 / wireless.h
blobdb5c7c79a8f1616e6801ea4ee51b2c0d74c33ef8
1 /*
3 Copyright (C) 2005,2006 Neil Cafferkey
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston,
18 MA 02111-1307, USA.
22 #ifndef WIRELESS_H
23 #define WIRELESS_H
26 #include <exec/types.h>
27 #include <devices/sana2.h>
28 #include <devices/sana2specialstats.h>
31 /* IEEE 802.11 definitions */
33 #define IEEE802_11_MAXIDLEN 32
34 #define IEEE802_11_WEP64LEN 5
35 #define IEEE802_11_WEP128LEN 13
36 #define IEEE802_11_WEPKEYCOUNT 4
38 #define IEEE802_11_FRM_CONTROL 0x00
39 #define IEEE802_11_FRM_DURATION 0x02
40 /*#define IEEE802_11_FRM_BODY 0x20*/
41 #define IEEE802_11_FRM_BODY 0x1e
43 #define IEEE802_11_FRM_CONTROLB_TYPE 2
44 #define IEEE802_11_FRM_CONTROLF_TYPE (0x3 << IEEE802_11_FRM_CONTROLB_TYPE)
46 #define IEEE802_11_FRMTYPE_DATA 2
49 /* Possible SANA 2 extensions */
51 #define S2DUPLEX_AUTO 0
52 #define S2DUPLEX_HALF 1
53 #define S2DUPLEX_FULL 2
55 #define S2ENC_NONE 0
56 #define S2ENC_WEP 1
57 #define S2ENC_WPA 2
59 #define S2PORT_AUTO 1 /* eg. device may look for an active link */
60 #define S2PORT_SAVED 2 /* eg. from ROM */
61 #define S2PORT_DEFAULT 2 /* eg. from ROM */
62 #define S2PORT_10BASE2 3
63 #define S2PORT_TP 4
64 #define S2PORT_MII 5
65 #define S2PORT_AUI 6
66 #define S2PORT_MANAGED 7
67 #define S2PORT_ADHOC 8
69 #define P2_GETSIGNALQUALITY 0x8000
71 struct Sana2SignalQuality
73 LONG SignalLevel; /* signal level in dBm */
74 LONG NoiseLevel; /* noise level in dBm */
78 /* Support for SetPrism2Defualts command */
80 struct WEPKey
82 UBYTE key[13];
83 UBYTE length;
86 #define P2OPT_SSID (TAG_USER + 0)
87 #define P2OPT_WEPKey (TAG_USER + 1)
88 #define P2OPT_Encryption (TAG_USER + 4)
89 #define P2OPT_PortType (TAG_USER + 5)
90 #define P2OPT_Channel (TAG_USER + 7)
93 #endif