Deleted Added
full compact
if_ath.c (123044) if_ath.c (123922)
1/*-
2 * Copyright (c) 2002, 2003 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, 2003 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 123044 2003-11-29 01:23:59Z sam $");
38__FBSDID("$FreeBSD: head/sys/dev/ath/if_ath.c 123922 2003-12-28 03:56:00Z sam $");
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

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

772 tstamp[1] = htole32(tsf >> 32);
773 }
774 sc->sc_stats.ast_tx_mgmt++;
775 }
776 if (ic->ic_rawbpf)
777 bpf_mtap(ic->ic_rawbpf, m);
778
779 if (sc->sc_drvbpf) {
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

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

772 tstamp[1] = htole32(tsf >> 32);
773 }
774 sc->sc_stats.ast_tx_mgmt++;
775 }
776 if (ic->ic_rawbpf)
777 bpf_mtap(ic->ic_rawbpf, m);
778
779 if (sc->sc_drvbpf) {
780 struct mbuf *mb;
781
782 MGETHDR(mb, M_DONTWAIT, m->m_type);
783 if (mb != NULL) {
784 sc->sc_tx_th.wt_rate =
785 ni->ni_rates.rs_rates[ni->ni_txrate];
786
787 mb->m_next = m;
788 mb->m_data = (caddr_t)&sc->sc_tx_th;
789 mb->m_len = sizeof(sc->sc_tx_th);
790 mb->m_pkthdr.len += mb->m_len;
791 bpf_mtap(sc->sc_drvbpf, mb);
792 m_free(mb);
793 }
780 sc->sc_tx_th.wt_rate =
781 ni->ni_rates.rs_rates[ni->ni_txrate];
782 bpf_mtap2(sc->sc_drvbpf,
783 &sc->sc_tx_th, sizeof(sc->sc_tx_th), m);
794 }
795
796 if (ath_tx_start(sc, ni, bf, m)) {
797 bad:
798 ATH_TXBUF_LOCK(sc);
799 TAILQ_INSERT_TAIL(&sc->sc_txbuf, bf, bf_list);
800 ATH_TXBUF_UNLOCK(sc);
801 ifp->if_oerrors++;

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

1706 BUS_DMASYNC_POSTREAD);
1707
1708 bus_dmamap_unload(sc->sc_dmat, bf->bf_dmamap);
1709 bf->bf_m = NULL;
1710 m->m_pkthdr.rcvif = ifp;
1711 m->m_pkthdr.len = m->m_len = len;
1712
1713 if (sc->sc_drvbpf) {
784 }
785
786 if (ath_tx_start(sc, ni, bf, m)) {
787 bad:
788 ATH_TXBUF_LOCK(sc);
789 TAILQ_INSERT_TAIL(&sc->sc_txbuf, bf, bf_list);
790 ATH_TXBUF_UNLOCK(sc);
791 ifp->if_oerrors++;

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

1696 BUS_DMASYNC_POSTREAD);
1697
1698 bus_dmamap_unload(sc->sc_dmat, bf->bf_dmamap);
1699 bf->bf_m = NULL;
1700 m->m_pkthdr.rcvif = ifp;
1701 m->m_pkthdr.len = m->m_len = len;
1702
1703 if (sc->sc_drvbpf) {
1714 struct mbuf *mb;
1704 sc->sc_rx_th.wr_rate =
1705 sc->sc_hwmap[ds->ds_rxstat.rs_rate];
1706 sc->sc_rx_th.wr_antsignal = ds->ds_rxstat.rs_rssi;
1707 sc->sc_rx_th.wr_antenna = ds->ds_rxstat.rs_antenna;
1708 /* XXX TSF */
1715
1709
1716 /* XXX pre-allocate space when setting up recv's */
1717 MGETHDR(mb, M_DONTWAIT, m->m_type);
1718 if (mb != NULL) {
1719 sc->sc_rx_th.wr_rate =
1720 sc->sc_hwmap[ds->ds_rxstat.rs_rate];
1721 sc->sc_rx_th.wr_antsignal =
1722 ds->ds_rxstat.rs_rssi;
1723 sc->sc_rx_th.wr_antenna =
1724 ds->ds_rxstat.rs_antenna;
1725 /* XXX TSF */
1726
1727 (void) m_dup_pkthdr(mb, m, M_DONTWAIT);
1728 mb->m_next = m;
1729 mb->m_data = (caddr_t)&sc->sc_rx_th;
1730 mb->m_len = sizeof(sc->sc_rx_th);
1731 mb->m_pkthdr.len += mb->m_len;
1732 bpf_mtap(sc->sc_drvbpf, mb);
1733 m_free(mb);
1734 }
1710 bpf_mtap2(sc->sc_drvbpf,
1711 &sc->sc_rx_th, sizeof(sc->sc_rx_th), m);
1735 }
1736
1737 m_adj(m, -IEEE80211_CRC_LEN);
1738 wh = mtod(m, struct ieee80211_frame *);
1739 if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
1740 /*
1741 * WEP is decrypted by hardware. Clear WEP bit
1742 * and trim WEP header for ieee80211_input().

--- 1119 unchanged lines hidden ---
1712 }
1713
1714 m_adj(m, -IEEE80211_CRC_LEN);
1715 wh = mtod(m, struct ieee80211_frame *);
1716 if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
1717 /*
1718 * WEP is decrypted by hardware. Clear WEP bit
1719 * and trim WEP header for ieee80211_input().

--- 1119 unchanged lines hidden ---