if_ath.c (127878) | if_ath.c (132986) |
---|---|
1/*- 2 * Copyright (c) 2002-2004 Sam Leffler, Errno Consulting 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 21 unchanged lines hidden (view full) --- 30 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 31 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 32 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 33 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 34 * THE POSSIBILITY OF SUCH DAMAGES. 35 */ 36 37#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2002-2004 Sam Leffler, Errno Consulting 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 21 unchanged lines hidden (view full) --- 30 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 31 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 32 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 33 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 34 * THE POSSIBILITY OF SUCH DAMAGES. 35 */ 36 37#include <sys/cdefs.h> |
38__FBSDID("$FreeBSD: head/sys/dev/ath/if_ath.c 127878 2004-04-05 04:42:42Z sam $"); | 38__FBSDID("$FreeBSD: head/sys/dev/ath/if_ath.c 132986 2004-08-01 23:58:04Z mlaier $"); |
39 40/* 41 * Driver for the Atheros Wireless LAN controller. 42 * 43 * This software is derived from work of Atsushi Onoe; his contribution 44 * is greatly appreciated. 45 */ 46 --- 252 unchanged lines hidden (view full) --- 299 } 300 301 ifp->if_softc = sc; 302 ifp->if_flags = IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST; 303 ifp->if_start = ath_start; 304 ifp->if_watchdog = ath_watchdog; 305 ifp->if_ioctl = ath_ioctl; 306 ifp->if_init = ath_init; | 39 40/* 41 * Driver for the Atheros Wireless LAN controller. 42 * 43 * This software is derived from work of Atsushi Onoe; his contribution 44 * is greatly appreciated. 45 */ 46 --- 252 unchanged lines hidden (view full) --- 299 } 300 301 ifp->if_softc = sc; 302 ifp->if_flags = IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST; 303 ifp->if_start = ath_start; 304 ifp->if_watchdog = ath_watchdog; 305 ifp->if_ioctl = ath_ioctl; 306 ifp->if_init = ath_init; |
307 ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; | 307 IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); 308 ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; 309 IFQ_SET_READY(&ifp->if_snd); |
308 309 ic->ic_softc = sc; 310 ic->ic_newassoc = ath_newassoc; 311 /* XXX not right but it's not used anywhere important */ 312 ic->ic_phytype = IEEE80211_T_OFDM; 313 ic->ic_opmode = IEEE80211_M_STA; 314 ic->ic_caps = IEEE80211_C_WEP /* wep supported */ 315 | IEEE80211_C_IBSS /* ibss, nee adhoc, mode */ --- 341 unchanged lines hidden (view full) --- 657 ifp->if_timer = 0; 658 if (!sc->sc_invalid) 659 ath_hal_intrset(ah, 0); 660 ath_draintxq(sc); 661 if (!sc->sc_invalid) 662 ath_stoprecv(sc); 663 else 664 sc->sc_rxlink = NULL; | 310 311 ic->ic_softc = sc; 312 ic->ic_newassoc = ath_newassoc; 313 /* XXX not right but it's not used anywhere important */ 314 ic->ic_phytype = IEEE80211_T_OFDM; 315 ic->ic_opmode = IEEE80211_M_STA; 316 ic->ic_caps = IEEE80211_C_WEP /* wep supported */ 317 | IEEE80211_C_IBSS /* ibss, nee adhoc, mode */ --- 341 unchanged lines hidden (view full) --- 659 ifp->if_timer = 0; 660 if (!sc->sc_invalid) 661 ath_hal_intrset(ah, 0); 662 ath_draintxq(sc); 663 if (!sc->sc_invalid) 664 ath_stoprecv(sc); 665 else 666 sc->sc_rxlink = NULL; |
665 IF_DRAIN(&ifp->if_snd); | 667 IFQ_DRV_PURGE(&ifp->if_snd); |
666 ath_beacon_free(sc); 667 ieee80211_new_state(ic, IEEE80211_S_INIT, -1); 668 if (!sc->sc_invalid) 669 ath_hal_setpower(ah, HAL_PM_FULL_SLEEP, 0); 670 } 671 ATH_UNLOCK(sc); 672} 673 --- 80 unchanged lines hidden (view full) --- 754 ("%s: ignore data packet, state %u\n", 755 __func__, ic->ic_state)); 756 sc->sc_stats.ast_tx_discard++; 757 ATH_TXBUF_LOCK(sc); 758 TAILQ_INSERT_TAIL(&sc->sc_txbuf, bf, bf_list); 759 ATH_TXBUF_UNLOCK(sc); 760 break; 761 } | 668 ath_beacon_free(sc); 669 ieee80211_new_state(ic, IEEE80211_S_INIT, -1); 670 if (!sc->sc_invalid) 671 ath_hal_setpower(ah, HAL_PM_FULL_SLEEP, 0); 672 } 673 ATH_UNLOCK(sc); 674} 675 --- 80 unchanged lines hidden (view full) --- 756 ("%s: ignore data packet, state %u\n", 757 __func__, ic->ic_state)); 758 sc->sc_stats.ast_tx_discard++; 759 ATH_TXBUF_LOCK(sc); 760 TAILQ_INSERT_TAIL(&sc->sc_txbuf, bf, bf_list); 761 ATH_TXBUF_UNLOCK(sc); 762 break; 763 } |
762 IF_DEQUEUE(&ifp->if_snd, m); | 764 IFQ_DRV_DEQUEUE(&ifp->if_snd, m); /* XXX: LOCK */ |
763 if (m == NULL) { 764 ATH_TXBUF_LOCK(sc); 765 TAILQ_INSERT_TAIL(&sc->sc_txbuf, bf, bf_list); 766 ATH_TXBUF_UNLOCK(sc); 767 break; 768 } 769 ifp->if_opackets++; 770 BPF_MTAP(ifp, m); --- 2141 unchanged lines hidden --- | 765 if (m == NULL) { 766 ATH_TXBUF_LOCK(sc); 767 TAILQ_INSERT_TAIL(&sc->sc_txbuf, bf, bf_list); 768 ATH_TXBUF_UNLOCK(sc); 769 break; 770 } 771 ifp->if_opackets++; 772 BPF_MTAP(ifp, m); --- 2141 unchanged lines hidden --- |