diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2019-02-19 10:17:10 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2019-02-19 10:17:10 +0000 |
commit | 2b561a692db10877dfeb769d4e3330b13a82a028 (patch) | |
tree | fabb4d1bd07e77ea7fffedc0971574296ae0eddd /sys/dev | |
parent | bcd81486bcdc5ea900399743c31b40458519e0fd (diff) |
Fix a cosmetic issue in athn(4)'s bpf(4) tap.
tcpdump -i athn0 -y IEEE802_11_RADIO was showing a SHORTPRE flag on most
frames because a PHY type check was missing from the bpf tap code path.
Short preamble only applies to 2, 5.5, and 11 MBit/s CCK frames.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ic/ar5008.c | 5 | ||||
-rw-r--r-- | sys/dev/ic/ar9003.c | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/ic/ar5008.c b/sys/dev/ic/ar5008.c index 4eb38555957..7cf96bf074b 100644 --- a/sys/dev/ic/ar5008.c +++ b/sys/dev/ic/ar5008.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ar5008.c,v 1.47 2019/02/01 16:15:07 stsp Exp $ */ +/* $OpenBSD: ar5008.c,v 1.48 2019/02/19 10:17:09 stsp Exp $ */ /*- * Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr> @@ -1397,7 +1397,8 @@ ar5008_tx(struct athn_softc *sc, struct mbuf *m, struct ieee80211_node *ni, tap->wt_chan_freq = htole16(ic->ic_bss->ni_chan->ic_freq); tap->wt_chan_flags = htole16(ic->ic_bss->ni_chan->ic_flags); tap->wt_hwqueue = qid; - if (ridx[0] != ATHN_RIDX_CCK1 && + if (athn_rates[ridx[0]].phy == IEEE80211_T_DS && + ridx[0] != ATHN_RIDX_CCK1 && (ic->ic_flags & IEEE80211_F_SHPREAMBLE)) tap->wt_flags |= IEEE80211_RADIOTAP_F_SHORTPRE; mb.m_data = (caddr_t)tap; diff --git a/sys/dev/ic/ar9003.c b/sys/dev/ic/ar9003.c index ba520b645d9..69ade5ade5a 100644 --- a/sys/dev/ic/ar9003.c +++ b/sys/dev/ic/ar9003.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ar9003.c,v 1.47 2019/02/01 16:15:07 stsp Exp $ */ +/* $OpenBSD: ar9003.c,v 1.48 2019/02/19 10:17:09 stsp Exp $ */ /*- * Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr> @@ -1486,7 +1486,8 @@ ar9003_tx(struct athn_softc *sc, struct mbuf *m, struct ieee80211_node *ni, tap->wt_chan_freq = htole16(ic->ic_bss->ni_chan->ic_freq); tap->wt_chan_flags = htole16(ic->ic_bss->ni_chan->ic_flags); tap->wt_hwqueue = qid; - if (ridx[0] != ATHN_RIDX_CCK1 && + if (athn_rates[ridx[0]].phy == IEEE80211_T_DS && + ridx[0] != ATHN_RIDX_CCK1 && (ic->ic_flags & IEEE80211_F_SHPREAMBLE)) tap->wt_flags |= IEEE80211_RADIOTAP_F_SHORTPRE; mb.m_data = (caddr_t)tap; |