if_ural.c (189275) | if_ural.c (190526) |
---|---|
1/* $FreeBSD: head/sys/dev/usb/wlan/if_ural.c 189275 2009-03-02 05:37:05Z thompsa $ */ | 1/* $FreeBSD: head/sys/dev/usb/wlan/if_ural.c 190526 2009-03-29 17:59:14Z sam $ */ |
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 189275 2009-03-02 05:37:05Z thompsa $"); | 24__FBSDID("$FreeBSD: head/sys/dev/usb/wlan/if_ural.c 190526 2009-03-29 17:59:14Z sam $"); |
25 26/*- 27 * Ralink Technology RT2500USB chipset driver 28 * http://www.ralinktech.com/ 29 */ 30 31#include "usbdevs.h" 32#include <dev/usb/usb.h> --- 447 unchanged lines hidden (view full) --- 480 ifp->if_ioctl = ural_ioctl; 481 ifp->if_start = ural_start; 482 IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); 483 ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; 484 IFQ_SET_READY(&ifp->if_snd); 485 486 ic->ic_ifp = ifp; 487 ic->ic_phytype = IEEE80211_T_OFDM; /* not only, but not used */ | 25 26/*- 27 * Ralink Technology RT2500USB chipset driver 28 * http://www.ralinktech.com/ 29 */ 30 31#include "usbdevs.h" 32#include <dev/usb/usb.h> --- 447 unchanged lines hidden (view full) --- 480 ifp->if_ioctl = ural_ioctl; 481 ifp->if_start = ural_start; 482 IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); 483 ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; 484 IFQ_SET_READY(&ifp->if_snd); 485 486 ic->ic_ifp = ifp; 487 ic->ic_phytype = IEEE80211_T_OFDM; /* not only, but not used */ |
488 IEEE80211_ADDR_COPY(ic->ic_myaddr, sc->sc_bssid); | |
489 490 /* set device capabilities */ 491 ic->ic_caps = 492 IEEE80211_C_STA /* station mode supported */ 493 | IEEE80211_C_IBSS /* IBSS mode supported */ 494 | IEEE80211_C_MONITOR /* monitor mode supported */ 495 | IEEE80211_C_HOSTAP /* HostAp mode supported */ 496 | IEEE80211_C_TXPMGT /* tx power management */ --- 5 unchanged lines hidden (view full) --- 502 503 bands = 0; 504 setbit(&bands, IEEE80211_MODE_11B); 505 setbit(&bands, IEEE80211_MODE_11G); 506 if (sc->rf_rev == RAL_RF_5222) 507 setbit(&bands, IEEE80211_MODE_11A); 508 ieee80211_init_channels(ic, NULL, &bands); 509 | 488 489 /* set device capabilities */ 490 ic->ic_caps = 491 IEEE80211_C_STA /* station mode supported */ 492 | IEEE80211_C_IBSS /* IBSS mode supported */ 493 | IEEE80211_C_MONITOR /* monitor mode supported */ 494 | IEEE80211_C_HOSTAP /* HostAp mode supported */ 495 | IEEE80211_C_TXPMGT /* tx power management */ --- 5 unchanged lines hidden (view full) --- 501 502 bands = 0; 503 setbit(&bands, IEEE80211_MODE_11B); 504 setbit(&bands, IEEE80211_MODE_11G); 505 if (sc->rf_rev == RAL_RF_5222) 506 setbit(&bands, IEEE80211_MODE_11A); 507 ieee80211_init_channels(ic, NULL, &bands); 508 |
510 ieee80211_ifattach(ic); | 509 ieee80211_ifattach(ic, sc->sc_bssid); |
511 ic->ic_update_promisc = ural_update_promisc; 512 ic->ic_newassoc = ural_newassoc; 513 ic->ic_raw_xmit = ural_raw_xmit; 514 ic->ic_node_alloc = ural_node_alloc; 515 ic->ic_scan_start = ural_scan_start; 516 ic->ic_scan_end = ural_scan_end; 517 ic->ic_set_channel = ural_set_channel; 518 --- 1692 unchanged lines hidden (view full) --- 2211 ural_set_chan(sc, ic->ic_curchan); 2212 2213 /* clear statistic registers (STA_CSR0 to STA_CSR10) */ 2214 ural_read_multi(sc, RAL_STA_CSR0, sc->sta, sizeof sc->sta); 2215 2216 ural_set_txantenna(sc, sc->tx_ant); 2217 ural_set_rxantenna(sc, sc->rx_ant); 2218 | 510 ic->ic_update_promisc = ural_update_promisc; 511 ic->ic_newassoc = ural_newassoc; 512 ic->ic_raw_xmit = ural_raw_xmit; 513 ic->ic_node_alloc = ural_node_alloc; 514 ic->ic_scan_start = ural_scan_start; 515 ic->ic_scan_end = ural_scan_end; 516 ic->ic_set_channel = ural_set_channel; 517 --- 1692 unchanged lines hidden (view full) --- 2210 ural_set_chan(sc, ic->ic_curchan); 2211 2212 /* clear statistic registers (STA_CSR0 to STA_CSR10) */ 2213 ural_read_multi(sc, RAL_STA_CSR0, sc->sta, sizeof sc->sta); 2214 2215 ural_set_txantenna(sc, sc->tx_ant); 2216 ural_set_rxantenna(sc, sc->rx_ant); 2217 |
2219 IEEE80211_ADDR_COPY(ic->ic_myaddr, IF_LLADDR(ifp)); 2220 ural_set_macaddr(sc, ic->ic_myaddr); | 2218 ural_set_macaddr(sc, IF_LLADDR(ifp)); |
2221 2222 /* 2223 * Allocate Tx and Rx xfer queues. 2224 */ 2225 ural_setup_tx_list(sc); 2226 2227 /* kick Rx */ 2228 tmp = RAL_DROP_PHY | RAL_DROP_CRC; --- 238 unchanged lines hidden --- | 2219 2220 /* 2221 * Allocate Tx and Rx xfer queues. 2222 */ 2223 ural_setup_tx_list(sc); 2224 2225 /* kick Rx */ 2226 tmp = RAL_DROP_PHY | RAL_DROP_CRC; --- 238 unchanged lines hidden --- |