if_ath_rx.c (251401) | if_ath_rx.c (251655) |
---|---|
1/*- 2 * Copyright (c) 2002-2009 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 --- 14 unchanged lines hidden (view full) --- 23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 25 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 * THE POSSIBILITY OF SUCH DAMAGES. 28 */ 29 30#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2002-2009 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 --- 14 unchanged lines hidden (view full) --- 23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 25 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 * THE POSSIBILITY OF SUCH DAMAGES. 28 */ 29 30#include <sys/cdefs.h> |
31__FBSDID("$FreeBSD: head/sys/dev/ath/if_ath_rx.c 251401 2013-06-05 00:45:19Z adrian $"); | 31__FBSDID("$FreeBSD: head/sys/dev/ath/if_ath_rx.c 251655 2013-06-12 14:52:57Z adrian $"); |
32 33/* 34 * Driver for the Atheros Wireless LAN controller. 35 * 36 * This software is derived from work of Atsushi Onoe; his contribution 37 * is greatly appreciated. 38 */ 39 --- 74 unchanged lines hidden (view full) --- 114#ifdef ATH_TX99_DIAG 115#include <dev/ath/ath_tx99/ath_tx99.h> 116#endif 117 118#ifdef ATH_DEBUG_ALQ 119#include <dev/ath/if_ath_alq.h> 120#endif 121 | 32 33/* 34 * Driver for the Atheros Wireless LAN controller. 35 * 36 * This software is derived from work of Atsushi Onoe; his contribution 37 * is greatly appreciated. 38 */ 39 --- 74 unchanged lines hidden (view full) --- 114#ifdef ATH_TX99_DIAG 115#include <dev/ath/ath_tx99/ath_tx99.h> 116#endif 117 118#ifdef ATH_DEBUG_ALQ 119#include <dev/ath/if_ath_alq.h> 120#endif 121 |
122#include <dev/ath/if_ath_lna_div.h> 123 |
|
122/* 123 * Calculate the receive filter according to the 124 * operating mode and state: 125 * 126 * o always accept unicast, broadcast, and multicast traffic 127 * o accept PHY error frames when hardware doesn't have MIB support 128 * to count and we need them for ANI (sta mode only until recently) 129 * and we are not scanning (ANI is disabled) --- 381 unchanged lines hidden (view full) --- 511 * The mbuf must be consumed by this routine - either passed up the 512 * net80211 stack, put on the holding queue, or freed. 513 */ 514int 515ath_rx_pkt(struct ath_softc *sc, struct ath_rx_status *rs, HAL_STATUS status, 516 uint64_t tsf, int nf, HAL_RX_QUEUE qtype, struct ath_buf *bf, 517 struct mbuf *m) 518{ | 124/* 125 * Calculate the receive filter according to the 126 * operating mode and state: 127 * 128 * o always accept unicast, broadcast, and multicast traffic 129 * o accept PHY error frames when hardware doesn't have MIB support 130 * to count and we need them for ANI (sta mode only until recently) 131 * and we are not scanning (ANI is disabled) --- 381 unchanged lines hidden (view full) --- 513 * The mbuf must be consumed by this routine - either passed up the 514 * net80211 stack, put on the holding queue, or freed. 515 */ 516int 517ath_rx_pkt(struct ath_softc *sc, struct ath_rx_status *rs, HAL_STATUS status, 518 uint64_t tsf, int nf, HAL_RX_QUEUE qtype, struct ath_buf *bf, 519 struct mbuf *m) 520{ |
519 struct ath_hal *ah = sc->sc_ah; | |
520 uint64_t rstamp; 521 int len, type; 522 struct ifnet *ifp = sc->sc_ifp; 523 struct ieee80211com *ic = ifp->if_l2com; 524 struct ieee80211_node *ni; 525 int is_good = 0; 526 struct ath_rx_edma *re = &sc->sc_rxedma[qtype]; 527 --- 310 unchanged lines hidden (view full) --- 838 */ 839 if (sc->sc_defant != rs->rs_antenna) { 840 if (++sc->sc_rxotherant >= 3) 841 ath_setdefantenna(sc, rs->rs_antenna); 842 } else 843 sc->sc_rxotherant = 0; 844 } 845 | 521 uint64_t rstamp; 522 int len, type; 523 struct ifnet *ifp = sc->sc_ifp; 524 struct ieee80211com *ic = ifp->if_l2com; 525 struct ieee80211_node *ni; 526 int is_good = 0; 527 struct ath_rx_edma *re = &sc->sc_rxedma[qtype]; 528 --- 310 unchanged lines hidden (view full) --- 839 */ 840 if (sc->sc_defant != rs->rs_antenna) { 841 if (++sc->sc_rxotherant >= 3) 842 ath_setdefantenna(sc, rs->rs_antenna); 843 } else 844 sc->sc_rxotherant = 0; 845 } 846 |
846 /* Newer school diversity - kite specific for now */ 847 /* XXX perhaps migrate the normal diversity code to this? */ 848 if ((ah)->ah_rxAntCombDiversity) 849 (*(ah)->ah_rxAntCombDiversity)(ah, rs, ticks, hz); | 847 /* Handle slow diversity if enabled */ 848 if (sc->sc_dolnadiv) { 849 ath_lna_rx_comb_scan(sc, rs, ticks, hz); 850 } |
850 851 if (sc->sc_softled) { 852 /* 853 * Blink for any data frame. Otherwise do a 854 * heartbeat-style blink when idle. The latter 855 * is mainly for station mode where we depend on 856 * periodic beacon frames to trigger the poll event. 857 */ --- 403 unchanged lines hidden --- | 851 852 if (sc->sc_softled) { 853 /* 854 * Blink for any data frame. Otherwise do a 855 * heartbeat-style blink when idle. The latter 856 * is mainly for station mode where we depend on 857 * periodic beacon frames to trigger the poll event. 858 */ --- 403 unchanged lines hidden --- |