if_rum.c (189275) | if_rum.c (190526) |
---|---|
1/* $FreeBSD: head/sys/dev/usb/wlan/if_rum.c 189275 2009-03-02 05:37:05Z thompsa $ */ | 1/* $FreeBSD: head/sys/dev/usb/wlan/if_rum.c 190526 2009-03-29 17:59:14Z sam $ */ |
2 3/*- 4 * Copyright (c) 2005-2007 Damien Bergamini <damien.bergamini@free.fr> 5 * Copyright (c) 2006 Niall O'Higgins <niallo@openbsd.org> 6 * Copyright (c) 2007-2008 Hans Petter Selasky <hselasky@FreeBSD.org> 7 * 8 * Permission to use, copy, modify, and distribute this software for any 9 * purpose with or without fee is hereby granted, provided that the above --- 4 unchanged lines hidden (view full) --- 14 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 15 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 16 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 17 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 18 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 19 */ 20 21#include <sys/cdefs.h> | 2 3/*- 4 * Copyright (c) 2005-2007 Damien Bergamini <damien.bergamini@free.fr> 5 * Copyright (c) 2006 Niall O'Higgins <niallo@openbsd.org> 6 * Copyright (c) 2007-2008 Hans Petter Selasky <hselasky@FreeBSD.org> 7 * 8 * Permission to use, copy, modify, and distribute this software for any 9 * purpose with or without fee is hereby granted, provided that the above --- 4 unchanged lines hidden (view full) --- 14 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 15 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 16 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 17 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 18 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 19 */ 20 21#include <sys/cdefs.h> |
22__FBSDID("$FreeBSD: head/sys/dev/usb/wlan/if_rum.c 189275 2009-03-02 05:37:05Z thompsa $"); | 22__FBSDID("$FreeBSD: head/sys/dev/usb/wlan/if_rum.c 190526 2009-03-29 17:59:14Z sam $"); |
23 24/*- 25 * Ralink Technology RT2501USB/RT2601USB chipset driver 26 * http://www.ralinktech.com.tw/ 27 */ 28 29#include "usbdevs.h" 30#include <dev/usb/usb.h> --- 458 unchanged lines hidden (view full) --- 489 ifp->if_ioctl = rum_ioctl; 490 ifp->if_start = rum_start; 491 IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); 492 ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; 493 IFQ_SET_READY(&ifp->if_snd); 494 495 ic->ic_ifp = ifp; 496 ic->ic_phytype = IEEE80211_T_OFDM; /* not only, but not used */ | 23 24/*- 25 * Ralink Technology RT2501USB/RT2601USB chipset driver 26 * http://www.ralinktech.com.tw/ 27 */ 28 29#include "usbdevs.h" 30#include <dev/usb/usb.h> --- 458 unchanged lines hidden (view full) --- 489 ifp->if_ioctl = rum_ioctl; 490 ifp->if_start = rum_start; 491 IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); 492 ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; 493 IFQ_SET_READY(&ifp->if_snd); 494 495 ic->ic_ifp = ifp; 496 ic->ic_phytype = IEEE80211_T_OFDM; /* not only, but not used */ |
497 IEEE80211_ADDR_COPY(ic->ic_myaddr, sc->sc_bssid); | |
498 499 /* set device capabilities */ 500 ic->ic_caps = 501 IEEE80211_C_STA /* station mode supported */ 502 | IEEE80211_C_IBSS /* IBSS mode supported */ 503 | IEEE80211_C_MONITOR /* monitor mode supported */ 504 | IEEE80211_C_HOSTAP /* HostAp mode supported */ 505 | IEEE80211_C_TXPMGT /* tx power management */ --- 5 unchanged lines hidden (view full) --- 511 512 bands = 0; 513 setbit(&bands, IEEE80211_MODE_11B); 514 setbit(&bands, IEEE80211_MODE_11G); 515 if (sc->rf_rev == RT2573_RF_5225 || sc->rf_rev == RT2573_RF_5226) 516 setbit(&bands, IEEE80211_MODE_11A); 517 ieee80211_init_channels(ic, NULL, &bands); 518 | 497 498 /* set device capabilities */ 499 ic->ic_caps = 500 IEEE80211_C_STA /* station mode supported */ 501 | IEEE80211_C_IBSS /* IBSS mode supported */ 502 | IEEE80211_C_MONITOR /* monitor mode supported */ 503 | IEEE80211_C_HOSTAP /* HostAp mode supported */ 504 | IEEE80211_C_TXPMGT /* tx power management */ --- 5 unchanged lines hidden (view full) --- 510 511 bands = 0; 512 setbit(&bands, IEEE80211_MODE_11B); 513 setbit(&bands, IEEE80211_MODE_11G); 514 if (sc->rf_rev == RT2573_RF_5225 || sc->rf_rev == RT2573_RF_5226) 515 setbit(&bands, IEEE80211_MODE_11A); 516 ieee80211_init_channels(ic, NULL, &bands); 517 |
519 ieee80211_ifattach(ic); | 518 ieee80211_ifattach(ic, sc->sc_bssid); |
520 ic->ic_update_promisc = rum_update_promisc; 521 ic->ic_newassoc = rum_newassoc; 522 ic->ic_raw_xmit = rum_raw_xmit; 523 ic->ic_node_alloc = rum_node_alloc; 524 ic->ic_scan_start = rum_scan_start; 525 ic->ic_scan_end = rum_scan_end; 526 ic->ic_set_channel = rum_set_channel; 527 --- 1531 unchanged lines hidden (view full) --- 2059 /* select default channel */ 2060 rum_select_band(sc, ic->ic_curchan); 2061 rum_select_antenna(sc); 2062 rum_set_chan(sc, ic->ic_curchan); 2063 2064 /* clear STA registers */ 2065 rum_read_multi(sc, RT2573_STA_CSR0, sc->sta, sizeof sc->sta); 2066 | 519 ic->ic_update_promisc = rum_update_promisc; 520 ic->ic_newassoc = rum_newassoc; 521 ic->ic_raw_xmit = rum_raw_xmit; 522 ic->ic_node_alloc = rum_node_alloc; 523 ic->ic_scan_start = rum_scan_start; 524 ic->ic_scan_end = rum_scan_end; 525 ic->ic_set_channel = rum_set_channel; 526 --- 1531 unchanged lines hidden (view full) --- 2058 /* select default channel */ 2059 rum_select_band(sc, ic->ic_curchan); 2060 rum_select_antenna(sc); 2061 rum_set_chan(sc, ic->ic_curchan); 2062 2063 /* clear STA registers */ 2064 rum_read_multi(sc, RT2573_STA_CSR0, sc->sta, sizeof sc->sta); 2065 |
2067 IEEE80211_ADDR_COPY(ic->ic_myaddr, IF_LLADDR(ifp)); 2068 rum_set_macaddr(sc, ic->ic_myaddr); | 2066 rum_set_macaddr(sc, IF_LLADDR(ifp)); |
2069 2070 /* initialize ASIC */ 2071 rum_write(sc, RT2573_MAC_CSR1, 4); 2072 2073 /* 2074 * Allocate Tx and Rx xfer queues. 2075 */ 2076 rum_setup_tx_list(sc); --- 465 unchanged lines hidden --- | 2067 2068 /* initialize ASIC */ 2069 rum_write(sc, RT2573_MAC_CSR1, 4); 2070 2071 /* 2072 * Allocate Tx and Rx xfer queues. 2073 */ 2074 rum_setup_tx_list(sc); --- 465 unchanged lines hidden --- |