| @@ -1,34 +1,34 @@ | | | @@ -1,34 +1,34 @@ |
1 | /* $NetBSD: if_wpi.c,v 1.50 2012/01/30 19:41:21 drochner Exp $ */ | | 1 | /* $NetBSD: if_wpi.c,v 1.50.2.1 2012/05/19 15:28:00 riz Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 2006, 2007 | | 4 | * Copyright (c) 2006, 2007 |
5 | * Damien Bergamini <damien.bergamini@free.fr> | | 5 | * 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 | #include <sys/cdefs.h> | | 20 | #include <sys/cdefs.h> |
21 | __KERNEL_RCSID(0, "$NetBSD: if_wpi.c,v 1.50 2012/01/30 19:41:21 drochner Exp $"); | | 21 | __KERNEL_RCSID(0, "$NetBSD: if_wpi.c,v 1.50.2.1 2012/05/19 15:28:00 riz Exp $"); |
22 | | | 22 | |
23 | /* | | 23 | /* |
24 | * Driver for Intel PRO/Wireless 3945ABG 802.11 network adapters. | | 24 | * Driver for Intel PRO/Wireless 3945ABG 802.11 network adapters. |
25 | */ | | 25 | */ |
26 | | | 26 | |
27 | | | 27 | |
28 | #include <sys/param.h> | | 28 | #include <sys/param.h> |
29 | #include <sys/sockio.h> | | 29 | #include <sys/sockio.h> |
30 | #include <sys/sysctl.h> | | 30 | #include <sys/sysctl.h> |
31 | #include <sys/mbuf.h> | | 31 | #include <sys/mbuf.h> |
32 | #include <sys/kernel.h> | | 32 | #include <sys/kernel.h> |
33 | #include <sys/socket.h> | | 33 | #include <sys/socket.h> |
34 | #include <sys/systm.h> | | 34 | #include <sys/systm.h> |
| @@ -300,27 +300,29 @@ wpi_attach(device_t parent __unused, dev | | | @@ -300,27 +300,29 @@ wpi_attach(device_t parent __unused, dev |
300 | | | 300 | |
301 | if (wpi_alloc_rx_ring(sc, &sc->rxq) != 0) { | | 301 | if (wpi_alloc_rx_ring(sc, &sc->rxq) != 0) { |
302 | aprint_error_dev(self, "could not allocate Rx ring\n"); | | 302 | aprint_error_dev(self, "could not allocate Rx ring\n"); |
303 | goto fail4; | | 303 | goto fail4; |
304 | } | | 304 | } |
305 | | | 305 | |
306 | ic->ic_ifp = ifp; | | 306 | ic->ic_ifp = ifp; |
307 | ic->ic_phytype = IEEE80211_T_OFDM; /* not only, but not used */ | | 307 | ic->ic_phytype = IEEE80211_T_OFDM; /* not only, but not used */ |
308 | ic->ic_opmode = IEEE80211_M_STA; /* default to BSS mode */ | | 308 | ic->ic_opmode = IEEE80211_M_STA; /* default to BSS mode */ |
309 | ic->ic_state = IEEE80211_S_INIT; | | 309 | ic->ic_state = IEEE80211_S_INIT; |
310 | | | 310 | |
311 | /* set device capabilities */ | | 311 | /* set device capabilities */ |
312 | ic->ic_caps = | | 312 | ic->ic_caps = |
| | | 313 | #ifdef netyet |
313 | IEEE80211_C_IBSS | /* IBSS mode support */ | | 314 | IEEE80211_C_IBSS | /* IBSS mode support */ |
| | | 315 | #endif |
314 | IEEE80211_C_WPA | /* 802.11i */ | | 316 | IEEE80211_C_WPA | /* 802.11i */ |
315 | IEEE80211_C_MONITOR | /* monitor mode supported */ | | 317 | IEEE80211_C_MONITOR | /* monitor mode supported */ |
316 | IEEE80211_C_TXPMGT | /* tx power management */ | | 318 | IEEE80211_C_TXPMGT | /* tx power management */ |
317 | IEEE80211_C_SHSLOT | /* short slot time supported */ | | 319 | IEEE80211_C_SHSLOT | /* short slot time supported */ |
318 | IEEE80211_C_SHPREAMBLE | /* short preamble supported */ | | 320 | IEEE80211_C_SHPREAMBLE | /* short preamble supported */ |
319 | IEEE80211_C_WME; /* 802.11e */ | | 321 | IEEE80211_C_WME; /* 802.11e */ |
320 | | | 322 | |
321 | /* read supported channels and MAC address from EEPROM */ | | 323 | /* read supported channels and MAC address from EEPROM */ |
322 | wpi_read_eeprom(sc); | | 324 | wpi_read_eeprom(sc); |
323 | | | 325 | |
324 | /* set supported .11a, .11b, .11g rates */ | | 326 | /* set supported .11a, .11b, .11g rates */ |
325 | ic->ic_sup_rates[IEEE80211_MODE_11A] = wpi_rateset_11a; | | 327 | ic->ic_sup_rates[IEEE80211_MODE_11A] = wpi_rateset_11a; |
326 | ic->ic_sup_rates[IEEE80211_MODE_11B] = wpi_rateset_11b; | | 328 | ic->ic_sup_rates[IEEE80211_MODE_11B] = wpi_rateset_11b; |