aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-01-05 21:47:12 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-05 21:47:12 -0500
commite42e4ba07bc72c0eb7c7ab3bf9e5076db90d0f37 (patch)
treef3eec0c563da05c2f0de3463edd45735c9c2f3c7 /kernel
parent7a1fcd5f5130f173b5e824135735ec58f245563e (diff)
igb: fix anoying type mismatch warning on rx/tx queue sizing
When using "min()", the types of both sides should match. With the cpu mask changes, the type of num_online_cpus() will now depend on config options. Use "min_t()" with an explicit type instead. And make the rx/tx case look the same too, just for sanity. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions
30:05 -0500 PS3: gelic: Add wireless support for PS3' href='/cgit/cgit.cgi/litmus-rt.git/commit/drivers/net/ps3_gelic_wireless.h?id=09dde54c6a69d4f9ea1213923b93aeae7020f8b6'>09dde54c6a69
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
325
326





































































































































































                                                                            

                                                  










































































                                                                    
                               























                                                                   
                                     




















                                                         



































                                                                      
/*
 *  PS3 gelic network driver.
 *
 * Copyright (C) 2007 Sony Computer Entertainment Inc.
 * Copyright 2007 Sony Corporation
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation version 2.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
#ifndef _GELIC_WIRELESS_H
#define _GELIC_WIRELESS_H

#include <linux/wireless.h>
#include <net/iw_handler.h>


/* return value from  GELIC_LV1_GET_WLAN_EVENT netcontrol */
enum gelic_lv1_wl_event {
	GELIC_LV1_WL_EVENT_DEVICE_READY   = 0x01, /* Eurus ready */
	GELIC_LV1_WL_EVENT_SCAN_COMPLETED = 0x02, /* Scan has completed */
	GELIC_LV1_WL_EVENT_DEAUTH         = 0x04, /* Deauthed by the AP */
	GELIC_LV1_WL_EVENT_BEACON_LOST    = 0x08, /* Beacon lost detected */
	GELIC_LV1_WL_EVENT_CONNECTED      = 0x10, /* Connected to AP */
	GELIC_LV1_WL_EVENT_WPA_CONNECTED  = 0x20, /* WPA connection */
	GELIC_LV1_WL_EVENT_WPA_ERROR      = 0x40, /* MIC error */
};

/* arguments for GELIC_LV1_POST_WLAN_COMMAND netcontrol */
enum gelic_eurus_command {
	GELIC_EURUS_CMD_ASSOC		=  1, /* association start */
	GELIC_EURUS_CMD_DISASSOC	=  2, /* disassociate      */
	GELIC_EURUS_CMD_START_SCAN	=  3, /* scan start        */
	GELIC_EURUS_CMD_GET_SCAN	=  4, /* get scan result   */
	GELIC_EURUS_CMD_SET_COMMON_CFG	=  5, /* set common config */
	GELIC_EURUS_CMD_GET_COMMON_CFG	=  6, /* set common config */
	GELIC_EURUS_CMD_SET_WEP_CFG	=  7, /* set WEP config    */
	GELIC_EURUS_CMD_GET_WEP_CFG	=  8, /* get WEP config    */
	GELIC_EURUS_CMD_SET_WPA_CFG	=  9, /* set WPA config    */
	GELIC_EURUS_CMD_GET_WPA_CFG	= 10, /* get WPA config    */
	GELIC_EURUS_CMD_GET_RSSI_CFG	= 11, /* get RSSI info.    */
	GELIC_EURUS_CMD_MAX_INDEX
};

/* for GELIC_EURUS_CMD_COMMON_CFG */
enum gelic_eurus_bss_type {
	GELIC_EURUS_BSS_INFRA = 0,
	GELIC_EURUS_BSS_ADHOC = 1, /* not supported */
};

enum gelic_eurus_auth_method {
	GELIC_EURUS_AUTH_OPEN = 0, /* FIXME: WLAN_AUTH_OPEN */
	GELIC_EURUS_AUTH_SHARED = 1, /* not supported */
};

enum gelic_eurus_opmode {
	GELIC_EURUS_OPMODE_11BG = 0, /* 802.11b/g */
	GELIC_EURUS_OPMODE_11B = 1, /* 802.11b only */
	GELIC_EURUS_OPMODE_11G = 2, /* 802.11g only */
};

struct gelic_eurus_common_cfg {
	/* all fields are big endian */
	u16 scan_index;
	u16 bss_type;    /* infra or adhoc */
	u16 auth_method; /* shared key or open */
	u16 op_mode; /* B/G */
} __attribute__((packed));


/* for GELIC_EURUS_CMD_WEP_CFG */
enum gelic_eurus_wep_security {
	GELIC_EURUS_WEP_SEC_NONE	= 0,
	GELIC_EURUS_WEP_SEC_40BIT	= 1,
	GELIC_EURUS_WEP_SEC_104BIT	= 2,
};

struct gelic_eurus_wep_cfg {
	/* all fields are big endian */
	u16 security;
	u8 key[4][16];
} __attribute__((packed));

/* for GELIC_EURUS_CMD_WPA_CFG */
enum gelic_eurus_wpa_security {
	GELIC_EURUS_WPA_SEC_NONE		= 0x0000,
	/* group=TKIP, pairwise=TKIP */
	GELIC_EURUS_WPA_SEC_WPA_TKIP_TKIP	= 0x0001,
	/* group=AES, pairwise=AES */
	GELIC_EURUS_WPA_SEC_WPA_AES_AES		= 0x0002,
	/* group=TKIP, pairwise=TKIP */
	GELIC_EURUS_WPA_SEC_WPA2_TKIP_TKIP	= 0x0004,
	/* group=AES, pairwise=AES */
	GELIC_EURUS_WPA_SEC_WPA2_AES_AES	= 0x0008,
	/* group=TKIP, pairwise=AES */
	GELIC_EURUS_WPA_SEC_WPA_TKIP_AES	= 0x0010,
	/* group=TKIP, pairwise=AES */
	GELIC_EURUS_WPA_SEC_WPA2_TKIP_AES	= 0x0020,
};

enum gelic_eurus_wpa_psk_type {
	GELIC_EURUS_WPA_PSK_PASSPHRASE	= 0, /* passphrase string   */
	GELIC_EURUS_WPA_PSK_BIN		= 1, /* 32 bytes binary key */
};

#define GELIC_WL_EURUS_PSK_MAX_LEN	64
#define WPA_PSK_LEN			32 /* WPA spec says 256bit */

struct gelic_eurus_wpa_cfg {
	/* all fields are big endian */
	u16 security;
	u16 psk_type; /* psk key encoding type */
	u8 psk[GELIC_WL_EURUS_PSK_MAX_LEN]; /* psk key; hex or passphrase */
} __attribute__((packed));

/* for GELIC_EURUS_CMD_{START,GET}_SCAN */
enum gelic_eurus_scan_capability {
	GELIC_EURUS_SCAN_CAP_ADHOC	= 0x0000,
	GELIC_EURUS_SCAN_CAP_INFRA	= 0x0001,
	GELIC_EURUS_SCAN_CAP_MASK	= 0x0001,
};

enum gelic_eurus_scan_sec_type {
	GELIC_EURUS_SCAN_SEC_NONE	= 0x0000,
	GELIC_EURUS_SCAN_SEC_WEP	= 0x0100,
	GELIC_EURUS_SCAN_SEC_WPA	= 0x0200,
	GELIC_EURUS_SCAN_SEC_WPA2	= 0x0400,
	GELIC_EURUS_SCAN_SEC_MASK	= 0x0f00,
};

enum gelic_eurus_scan_sec_wep_type {
	GELIC_EURUS_SCAN_SEC_WEP_UNKNOWN	= 0x0000,
	GELIC_EURUS_SCAN_SEC_WEP_40		= 0x0001,
	GELIC_EURUS_SCAN_SEC_WEP_104		= 0x0002,
	GELIC_EURUS_SCAN_SEC_WEP_MASK		= 0x0003,
};

enum gelic_eurus_scan_sec_wpa_type {
	GELIC_EURUS_SCAN_SEC_WPA_UNKNOWN	= 0x0000,
	GELIC_EURUS_SCAN_SEC_WPA_TKIP		= 0x0001,
	GELIC_EURUS_SCAN_SEC_WPA_AES		= 0x0002,
	GELIC_EURUS_SCAN_SEC_WPA_MASK		= 0x0003,
};

/*
 * hw BSS information structure returned from GELIC_EURUS_CMD_GET_SCAN
 */
struct gelic_eurus_scan_info {
	/* all fields are big endian */
	__be16 size;
	__be16 rssi; /* percentage */
	__be16 channel; /* channel number */
	__be16 beacon_period; /* FIXME: in msec unit */
	__be16 capability;
	__be16 security;
	u8  bssid[8]; /* last ETH_ALEN are valid. bssid[0],[1] are unused */
	u8  essid[32]; /* IW_ESSID_MAX_SIZE */
	u8  rate[16]; /* first 12 are valid */
	u8  ext_rate[16]; /* first 16 are valid */