if_ural.c (292165) | if_ural.c (293339) |
---|---|
1/* $FreeBSD: head/sys/dev/usb/wlan/if_ural.c 292165 2015-12-13 20:48:24Z avos $ */ | 1/* $FreeBSD: head/sys/dev/usb/wlan/if_ural.c 293339 2016-01-07 18:41:03Z avos $ */ |
2 3/*- 4 * Copyright (c) 2005, 2006 5 * Damien Bergamini <damien.bergamini@free.fr> 6 * 7 * Copyright (c) 2006, 2008 8 * Hans Petter Selasky <hselasky@FreeBSD.org> 9 * --- 6 unchanged lines hidden (view full) --- 16 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 17 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 18 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 19 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 20 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 21 */ 22 23#include <sys/cdefs.h> | 2 3/*- 4 * Copyright (c) 2005, 2006 5 * Damien Bergamini <damien.bergamini@free.fr> 6 * 7 * Copyright (c) 2006, 2008 8 * Hans Petter Selasky <hselasky@FreeBSD.org> 9 * --- 6 unchanged lines hidden (view full) --- 16 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 17 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 18 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 19 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 20 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 21 */ 22 23#include <sys/cdefs.h> |
24__FBSDID("$FreeBSD: head/sys/dev/usb/wlan/if_ural.c 292165 2015-12-13 20:48:24Z avos $"); | 24__FBSDID("$FreeBSD: head/sys/dev/usb/wlan/if_ural.c 293339 2016-01-07 18:41:03Z avos $"); |
25 26/*- 27 * Ralink Technology RT2500USB chipset driver 28 * http://www.ralinktech.com/ 29 */ 30 31#include <sys/param.h> 32#include <sys/sockio.h> --- 386 unchanged lines hidden (view full) --- 419} 420 421static int 422ural_attach(device_t self) 423{ 424 struct usb_attach_arg *uaa = device_get_ivars(self); 425 struct ural_softc *sc = device_get_softc(self); 426 struct ieee80211com *ic = &sc->sc_ic; | 25 26/*- 27 * Ralink Technology RT2500USB chipset driver 28 * http://www.ralinktech.com/ 29 */ 30 31#include <sys/param.h> 32#include <sys/sockio.h> --- 386 unchanged lines hidden (view full) --- 419} 420 421static int 422ural_attach(device_t self) 423{ 424 struct usb_attach_arg *uaa = device_get_ivars(self); 425 struct ural_softc *sc = device_get_softc(self); 426 struct ieee80211com *ic = &sc->sc_ic; |
427 uint8_t iface_index, bands; | 427 uint8_t bands[howmany(IEEE80211_MODE_MAX, 8)]; 428 uint8_t iface_index; |
428 int error; 429 430 device_set_usb_desc(self); 431 sc->sc_udev = uaa->device; 432 sc->sc_dev = self; 433 434 mtx_init(&sc->sc_mtx, device_get_nameunit(self), 435 MTX_NETWORK_LOCK, MTX_DEF); --- 32 unchanged lines hidden (view full) --- 468 | IEEE80211_C_HOSTAP /* HostAp mode supported */ 469 | IEEE80211_C_TXPMGT /* tx power management */ 470 | IEEE80211_C_SHPREAMBLE /* short preamble supported */ 471 | IEEE80211_C_SHSLOT /* short slot time supported */ 472 | IEEE80211_C_BGSCAN /* bg scanning supported */ 473 | IEEE80211_C_WPA /* 802.11i */ 474 ; 475 | 429 int error; 430 431 device_set_usb_desc(self); 432 sc->sc_udev = uaa->device; 433 sc->sc_dev = self; 434 435 mtx_init(&sc->sc_mtx, device_get_nameunit(self), 436 MTX_NETWORK_LOCK, MTX_DEF); --- 32 unchanged lines hidden (view full) --- 469 | IEEE80211_C_HOSTAP /* HostAp mode supported */ 470 | IEEE80211_C_TXPMGT /* tx power management */ 471 | IEEE80211_C_SHPREAMBLE /* short preamble supported */ 472 | IEEE80211_C_SHSLOT /* short slot time supported */ 473 | IEEE80211_C_BGSCAN /* bg scanning supported */ 474 | IEEE80211_C_WPA /* 802.11i */ 475 ; 476 |
476 bands = 0; 477 setbit(&bands, IEEE80211_MODE_11B); 478 setbit(&bands, IEEE80211_MODE_11G); | 477 memset(bands, 0, sizeof(bands)); 478 setbit(bands, IEEE80211_MODE_11B); 479 setbit(bands, IEEE80211_MODE_11G); |
479 if (sc->rf_rev == RAL_RF_5222) | 480 if (sc->rf_rev == RAL_RF_5222) |
480 setbit(&bands, IEEE80211_MODE_11A); 481 ieee80211_init_channels(ic, NULL, &bands); | 481 setbit(bands, IEEE80211_MODE_11A); 482 ieee80211_init_channels(ic, NULL, bands); |
482 483 ieee80211_ifattach(ic); 484 ic->ic_update_promisc = ural_update_promisc; 485 ic->ic_raw_xmit = ural_raw_xmit; 486 ic->ic_scan_start = ural_scan_start; 487 ic->ic_scan_end = ural_scan_end; 488 ic->ic_set_channel = ural_set_channel; 489 ic->ic_parent = ural_parent; --- 1729 unchanged lines hidden --- | 483 484 ieee80211_ifattach(ic); 485 ic->ic_update_promisc = ural_update_promisc; 486 ic->ic_raw_xmit = ural_raw_xmit; 487 ic->ic_scan_start = ural_scan_start; 488 ic->ic_scan_end = ural_scan_end; 489 ic->ic_set_channel = ural_set_channel; 490 ic->ic_parent = ural_parent; --- 1729 unchanged lines hidden --- |