Deleted Added
full compact
if_ath.c (158366) if_ath.c (159180)
1/*-
2 * Copyright (c) 2002-2005 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-2005 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 158366 2006-05-08 20:11:09Z sam $");
38__FBSDID("$FreeBSD: head/sys/dev/ath/if_ath.c 159180 2006-06-02 19:59:33Z csjp $");
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

--- 2853 unchanged lines hidden (view full) ---

2900 }
2901 ifp->if_ierrors++;
2902 /*
2903 * When a tap is present pass error frames
2904 * that have been requested. By default we
2905 * pass decrypt+mic errors but others may be
2906 * interesting (e.g. crc).
2907 */
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

--- 2853 unchanged lines hidden (view full) ---

2900 }
2901 ifp->if_ierrors++;
2902 /*
2903 * When a tap is present pass error frames
2904 * that have been requested. By default we
2905 * pass decrypt+mic errors but others may be
2906 * interesting (e.g. crc).
2907 */
2908 if (sc->sc_drvbpf != NULL &&
2908 if (bpf_peers_present(sc->sc_drvbpf) &&
2909 (ds->ds_rxstat.rs_status & sc->sc_monpass)) {
2910 bus_dmamap_sync(sc->sc_dmat, bf->bf_dmamap,
2911 BUS_DMASYNC_POSTREAD);
2912 /* NB: bpf needs the mbuf length setup */
2913 len = ds->ds_rxstat.rs_datalen;
2914 m->m_pkthdr.len = m->m_len = len;
2915 (void) ath_rx_tap(sc, m, ds, tsf, nf);
2916 }

--- 14 unchanged lines hidden (view full) ---

2931 bf->bf_m = NULL;
2932
2933 m->m_pkthdr.rcvif = ifp;
2934 len = ds->ds_rxstat.rs_datalen;
2935 m->m_pkthdr.len = m->m_len = len;
2936
2937 sc->sc_stats.ast_ant_rx[ds->ds_rxstat.rs_antenna]++;
2938
2909 (ds->ds_rxstat.rs_status & sc->sc_monpass)) {
2910 bus_dmamap_sync(sc->sc_dmat, bf->bf_dmamap,
2911 BUS_DMASYNC_POSTREAD);
2912 /* NB: bpf needs the mbuf length setup */
2913 len = ds->ds_rxstat.rs_datalen;
2914 m->m_pkthdr.len = m->m_len = len;
2915 (void) ath_rx_tap(sc, m, ds, tsf, nf);
2916 }

--- 14 unchanged lines hidden (view full) ---

2931 bf->bf_m = NULL;
2932
2933 m->m_pkthdr.rcvif = ifp;
2934 len = ds->ds_rxstat.rs_datalen;
2935 m->m_pkthdr.len = m->m_len = len;
2936
2937 sc->sc_stats.ast_ant_rx[ds->ds_rxstat.rs_antenna]++;
2938
2939 if (sc->sc_drvbpf != NULL && !ath_rx_tap(sc, m, ds, tsf, nf)) {
2939 if (bpf_peers_present(sc->sc_drvbpf) &&
2940 !ath_rx_tap(sc, m, ds, tsf, nf)) {
2940 m_freem(m); /* XXX reclaim */
2941 goto rx_next;
2942 }
2943
2944 /*
2945 * From this point on we assume the frame is at least
2946 * as large as ieee80211_frame_min; verify that.
2947 */

--- 683 unchanged lines hidden (view full) ---

3631 ctsrate = 0;
3632
3633 if (IFF_DUMPPKTS(sc, ATH_DEBUG_XMIT))
3634 ieee80211_dump_pkt(mtod(m0, caddr_t), m0->m_len,
3635 sc->sc_hwmap[txrate].ieeerate, -1);
3636
3637 if (ic->ic_rawbpf)
3638 bpf_mtap(ic->ic_rawbpf, m0);
2941 m_freem(m); /* XXX reclaim */
2942 goto rx_next;
2943 }
2944
2945 /*
2946 * From this point on we assume the frame is at least
2947 * as large as ieee80211_frame_min; verify that.
2948 */

--- 683 unchanged lines hidden (view full) ---

3632 ctsrate = 0;
3633
3634 if (IFF_DUMPPKTS(sc, ATH_DEBUG_XMIT))
3635 ieee80211_dump_pkt(mtod(m0, caddr_t), m0->m_len,
3636 sc->sc_hwmap[txrate].ieeerate, -1);
3637
3638 if (ic->ic_rawbpf)
3639 bpf_mtap(ic->ic_rawbpf, m0);
3639 if (sc->sc_drvbpf) {
3640 if (bpf_peers_present(sc->sc_drvbpf)) {
3640 u_int64_t tsf = ath_hal_gettsf64(ah);
3641
3642 sc->sc_tx_th.wt_tsf = htole64(tsf);
3643 sc->sc_tx_th.wt_flags = sc->sc_hwmap[txrate].txflags;
3644 if (iswep)
3645 sc->sc_tx_th.wt_flags |= IEEE80211_RADIOTAP_F_WEP;
3646 sc->sc_tx_th.wt_rate = sc->sc_hwmap[txrate].ieeerate;
3647 sc->sc_tx_th.wt_txpower = ni->ni_txpower;

--- 1818 unchanged lines hidden ---
3641 u_int64_t tsf = ath_hal_gettsf64(ah);
3642
3643 sc->sc_tx_th.wt_tsf = htole64(tsf);
3644 sc->sc_tx_th.wt_flags = sc->sc_hwmap[txrate].txflags;
3645 if (iswep)
3646 sc->sc_tx_th.wt_flags |= IEEE80211_RADIOTAP_F_WEP;
3647 sc->sc_tx_th.wt_rate = sc->sc_hwmap[txrate].ieeerate;
3648 sc->sc_tx_th.wt_txpower = ni->ni_txpower;

--- 1818 unchanged lines hidden ---