| @@ -1,38 +1,38 @@ | | | @@ -1,38 +1,38 @@ |
1 | /* $NetBSD: if_iwn.c,v 1.56 2011/05/21 12:51:47 msaitoh Exp $ */ | | 1 | /* $NetBSD: if_iwn.c,v 1.57 2011/08/28 16:26:29 elric Exp $ */ |
2 | /* $OpenBSD: if_iwn.c,v 1.96 2010/05/13 09:25:03 damien Exp $ */ | | 2 | /* $OpenBSD: if_iwn.c,v 1.96 2010/05/13 09:25:03 damien Exp $ */ |
3 | | | 3 | |
4 | /*- | | 4 | /*- |
5 | * Copyright (c) 2007-2010 Damien Bergamini <damien.bergamini@free.fr> | | 5 | * Copyright (c) 2007-2010 Damien Bergamini <damien.bergamini@free.fr> |
6 | * | | 6 | * |
7 | * Permission to use, copy, modify, and distribute this software for any | | 7 | * Permission to use, copy, modify, and distribute this software for any |
8 | * purpose with or without fee is hereby granted, provided that the above | | 8 | * purpose with or without fee is hereby granted, provided that the above |
9 | * copyright notice and this permission notice appear in all copies. | | 9 | * copyright notice and this permission notice appear in all copies. |
10 | * | | 10 | * |
11 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | | 11 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
12 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | | 12 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
13 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | | 13 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
14 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | | 14 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
15 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | | 15 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
16 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | | 16 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
17 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | | 17 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
18 | */ | | 18 | */ |
19 | | | 19 | |
20 | /* | | 20 | /* |
21 | * Driver for Intel WiFi Link 4965 and 1000/5000/6000 Series 802.11 network | | 21 | * Driver for Intel WiFi Link 4965 and 1000/5000/6000 Series 802.11 network |
22 | * adapters. | | 22 | * adapters. |
23 | */ | | 23 | */ |
24 | #include <sys/cdefs.h> | | 24 | #include <sys/cdefs.h> |
25 | __KERNEL_RCSID(0, "$NetBSD: if_iwn.c,v 1.56 2011/05/21 12:51:47 msaitoh Exp $"); | | 25 | __KERNEL_RCSID(0, "$NetBSD: if_iwn.c,v 1.57 2011/08/28 16:26:29 elric Exp $"); |
26 | | | 26 | |
27 | #define IWN_USE_RBUF /* Use local storage for RX */ | | 27 | #define IWN_USE_RBUF /* Use local storage for RX */ |
28 | #undef IWN_HWCRYPTO /* XXX does not even compile yet */ | | 28 | #undef IWN_HWCRYPTO /* XXX does not even compile yet */ |
29 | | | 29 | |
30 | #include <sys/param.h> | | 30 | #include <sys/param.h> |
31 | #include <sys/sockio.h> | | 31 | #include <sys/sockio.h> |
32 | #include <sys/proc.h> | | 32 | #include <sys/proc.h> |
33 | #include <sys/mbuf.h> | | 33 | #include <sys/mbuf.h> |
34 | #include <sys/kernel.h> | | 34 | #include <sys/kernel.h> |
35 | #include <sys/socket.h> | | 35 | #include <sys/socket.h> |
36 | #include <sys/systm.h> | | 36 | #include <sys/systm.h> |
37 | #include <sys/malloc.h> | | 37 | #include <sys/malloc.h> |
38 | #include <sys/mutex.h> | | 38 | #include <sys/mutex.h> |
| @@ -295,27 +295,27 @@ static void iwn_free_rpool(struct iwn_so | | | @@ -295,27 +295,27 @@ static void iwn_free_rpool(struct iwn_so |
295 | | | 295 | |
296 | /* XXX needed by iwn_scan */ | | 296 | /* XXX needed by iwn_scan */ |
297 | static u_int8_t *ieee80211_add_ssid(u_int8_t *, const u_int8_t *, u_int); | | 297 | static u_int8_t *ieee80211_add_ssid(u_int8_t *, const u_int8_t *, u_int); |
298 | static u_int8_t *ieee80211_add_rates(u_int8_t *, | | 298 | static u_int8_t *ieee80211_add_rates(u_int8_t *, |
299 | const struct ieee80211_rateset *); | | 299 | const struct ieee80211_rateset *); |
300 | static u_int8_t *ieee80211_add_xrates(u_int8_t *, | | 300 | static u_int8_t *ieee80211_add_xrates(u_int8_t *, |
301 | const struct ieee80211_rateset *); | | 301 | const struct ieee80211_rateset *); |
302 | | | 302 | |
303 | static void iwn_fix_channel(struct ieee80211com *, struct mbuf *); | | 303 | static void iwn_fix_channel(struct ieee80211com *, struct mbuf *); |
304 | | | 304 | |
305 | #ifdef IWN_DEBUG | | 305 | #ifdef IWN_DEBUG |
306 | #define DPRINTF(x) do { if (iwn_debug > 0) printf x; } while (0) | | 306 | #define DPRINTF(x) do { if (iwn_debug > 0) printf x; } while (0) |
307 | #define DPRINTFN(n, x) do { if (iwn_debug >= (n)) printf x; } while (0) | | 307 | #define DPRINTFN(n, x) do { if (iwn_debug >= (n)) printf x; } while (0) |
308 | int iwn_debug = 0; | | 308 | int iwn_debug = 100; |
309 | #else | | 309 | #else |
310 | #define DPRINTF(x) | | 310 | #define DPRINTF(x) |
311 | #define DPRINTFN(n, x) | | 311 | #define DPRINTFN(n, x) |
312 | #endif | | 312 | #endif |
313 | | | 313 | |
314 | CFATTACH_DECL_NEW(iwn, sizeof(struct iwn_softc), iwn_match, iwn_attach, | | 314 | CFATTACH_DECL_NEW(iwn, sizeof(struct iwn_softc), iwn_match, iwn_attach, |
315 | iwn_detach, NULL); | | 315 | iwn_detach, NULL); |
316 | | | 316 | |
317 | static int | | 317 | static int |
318 | iwn_match(device_t parent, cfdata_t match __unused, void *aux) | | 318 | iwn_match(device_t parent, cfdata_t match __unused, void *aux) |
319 | { | | 319 | { |
320 | struct pci_attach_args *pa = aux; | | 320 | struct pci_attach_args *pa = aux; |
321 | size_t i; | | 321 | size_t i; |