Staging: vt665x: Text janitor in prep for driver merge, part 2
[safe/jmp/linux-2.6] / drivers / staging / vt6655 / iowpa.h
1 /*
2  * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
3  * All rights reserved.
4  *
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.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with this program; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  *
19  * File: iowpa.h
20  *
21  * Purpose: Handles wpa supplicant ioctl interface
22  *
23  * Author: Lyndon Chen
24  *
25  * Date: May 8, 2002
26  *
27  */
28
29 #ifndef __IOWPA_H__
30 #define __IOWPA_H__
31
32
33 /*---------------------  Export Definitions -------------------------*/
34
35
36 #define WPA_IE_LEN 64
37
38
39 //WPA related
40 /*
41 typedef enum { WPA_ALG_NONE, WPA_ALG_WEP, WPA_ALG_TKIP, WPA_ALG_CCMP } wpa_alg;
42 typedef enum { CIPHER_NONE, CIPHER_WEP40, CIPHER_TKIP, CIPHER_CCMP,
43                CIPHER_WEP104 } wpa_cipher;
44 typedef enum { KEY_MGMT_802_1X, KEY_MGMT_PSK, KEY_MGMT_NONE,
45                KEY_MGMT_802_1X_NO_WPA, KEY_MGMT_WPA_NONE } wpa_key_mgmt;
46 */
47
48 enum {
49         VIAWGET_SET_WPA = 1,
50         VIAWGET_SET_KEY = 2,
51         VIAWGET_SET_SCAN = 3,
52         VIAWGET_GET_SCAN = 4,
53         VIAWGET_GET_SSID = 5,
54         VIAWGET_GET_BSSID = 6,
55         VIAWGET_SET_DROP_UNENCRYPT = 7,
56         VIAWGET_SET_DEAUTHENTICATE = 8,
57         VIAWGET_SET_ASSOCIATE = 9,
58         VIAWGET_SET_DISASSOCIATE= 10
59 };
60
61
62 enum {
63         VIAWGET_ASSOC_MSG = 1,
64         VIAWGET_DISASSOC_MSG = 2,
65         VIAWGET_PTK_MIC_MSG = 3,
66         VIAWGET_GTK_MIC_MSG = 4,
67         VIAWGET_CCKM_ROAM_MSG = 5,
68         VIAWGET_DEVICECLOSE_MSG = 6
69 };
70
71
72
73 #pragma pack(1)
74 typedef struct viawget_wpa_header {
75         u8 type;
76         u16 req_ie_len;
77         u16 resp_ie_len;
78 } viawget_wpa_header;
79
80
81
82 struct viawget_wpa_param {
83         u32 cmd;
84         u8 addr[6];
85         union {
86                 struct {
87                         u8 len;
88                         u8 data[0];
89                 } generic_elem;
90
91                 struct {
92                 u8 bssid[6];
93                         u8 ssid[32];
94                         u8 ssid_len;
95                 u8 *wpa_ie;
96                 u16 wpa_ie_len;
97                 int pairwise_suite;
98                 int group_suite;
99                 int key_mgmt_suite;
100                 int auth_alg;
101                 int mode;
102
103                 } wpa_associate;
104
105                 struct {
106                 int alg_name;
107                 u16 key_index;
108                 u16 set_tx;
109                 u8 *seq;
110                 u16 seq_len;
111                 u8 *key;
112                 u16 key_len;
113                 } wpa_key;
114
115                 struct {
116                         u8 ssid_len;
117                         u8 ssid[32];
118                 } scan_req;
119
120                 struct {
121                         u16 scan_count;
122                         u8 *buf;
123                 } scan_results;
124
125         } u;
126
127 };
128
129 #pragma pack(1)
130 struct viawget_scan_result {
131         u8 bssid[6];
132         u8 ssid[32];
133         u16 ssid_len;
134         u8 wpa_ie[WPA_IE_LEN];
135         u16 wpa_ie_len;
136         u8 rsn_ie[WPA_IE_LEN];
137         u16 rsn_ie_len;
138         int freq; // MHz
139         int caps; // e.g. privacy
140         int qual; // signal quality
141         int noise;
142         int level;
143         int maxrate;
144 };
145
146 //2006-1116-01,<Add> by NomadZhao
147 #pragma pack()
148 /*---------------------  Export Classes  ----------------------------*/
149
150 /*---------------------  Export Variables  --------------------------*/
151
152
153 /*---------------------  Export Types  ------------------------------*/
154
155
156 /*---------------------  Export Functions  --------------------------*/
157
158
159
160 #endif //__IOWPA_H__