From owner-p4-projects@FreeBSD.ORG Sat Nov 29 19:39:36 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 716F416A4F9; Sat, 29 Nov 2003 19:39:36 -0800 (PST) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E79ED16A4CF for ; Sat, 29 Nov 2003 19:39:35 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 643B844034 for ; Sat, 29 Nov 2003 19:39:07 -0800 (PST) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id hAU3d5XJ080486 for ; Sat, 29 Nov 2003 19:39:05 -0800 (PST) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id hAU3d5sq080483 for perforce@freebsd.org; Sat, 29 Nov 2003 19:39:05 -0800 (PST) (envelope-from sam@freebsd.org) Date: Sat, 29 Nov 2003 19:39:05 -0800 (PST) Message-Id: <200311300339.hAU3d5sq080483@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 43163 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Nov 2003 03:39:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=43163 Change 43163 by sam@sam_ebb on 2003/11/29 19:38:05 o add txpower and antenna to xmit-side radiotap data o move xmit-side tap to ath_tx_start so we have the state needed to fill out the new fields and to record the flags state (e.g. short preamble) Affected files ... .. //depot/projects/netperf/sys/dev/ath/if_ath.c#43 edit .. //depot/projects/netperf/sys/dev/ath/if_athioctl.h#8 edit Differences ... ==== //depot/projects/netperf/sys/dev/ath/if_ath.c#43 (text+ko) ==== @@ -773,16 +773,6 @@ } sc->sc_stats.ast_tx_mgmt++; } - if (ic->ic_rawbpf) - bpf_mtap(ic->ic_rawbpf, m); - - if (sc->sc_drvbpf) { - sc->sc_tx_th.wt_rate = - ni->ni_rates.rs_rates[ni->ni_txrate]; - bpf_mtap2(sc->sc_drvbpf, - &sc->sc_tx_th, sizeof(sc->sc_tx_th), m); - } - if (ath_tx_start(sc, ni, bf, m)) { bad: ATH_TXBUF_LOCK(sc); @@ -2039,6 +2029,22 @@ else antenna = an->an_rx_hist[an->an_rx_hist_next].arh_antenna; + if (ic->ic_rawbpf) + bpf_mtap(ic->ic_rawbpf, m0); + if (sc->sc_drvbpf) { + sc->sc_tx_th.wt_flags = 0; + if (shortPreamble) + sc->sc_tx_th.wt_flags |= IEEE80211_RADIOTAP_F_SHORTPRE; + if (iswep) + sc->sc_tx_th.wt_flags |= IEEE80211_RADIOTAP_F_WEP; + sc->sc_tx_th.wt_rate = ni->ni_rates.rs_rates[ni->ni_txrate]; + sc->sc_tx_th.wt_txpower = 60/2; /* XXX */ + sc->sc_tx_th.wt_antenna = antenna; + + bpf_mtap2(sc->sc_drvbpf, + &sc->sc_tx_th, sizeof(sc->sc_tx_th), m0); + } + /* * Formulate first tx descriptor with tx controls. */ ==== //depot/projects/netperf/sys/dev/ath/if_athioctl.h#8 (text+ko) ==== @@ -125,6 +125,7 @@ (1 << IEEE80211_RADIOTAP_FLAGS) | \ (1 << IEEE80211_RADIOTAP_RATE) | \ (1 << IEEE80211_RADIOTAP_CHANNEL) | \ + (1 << IEEE80211_RADIOTAP_ANTENNA) | \ 0) struct ath_tx_radiotap_header { @@ -133,6 +134,8 @@ u_int8_t wt_rate; u_int16_t wt_chan_freq; u_int16_t wt_chan_flags; + u_int8_t wt_txpower; + u_int8_t wt_antenna; }; #endif /* _DEV_ATH_ATHIOCTL_H */