diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2006-06-23 21:53:02 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2006-06-23 21:53:02 +0000 |
commit | 9dca7703cc8f5d769e9db3a3d67d32f60b5a1d6f (patch) | |
tree | 0e0872bffe2c579a80357d8c655452336ac8c6c4 /sys/dev/ic | |
parent | 21922ab8d0860ad9ed70dc951d3ad2b304597347 (diff) |
set the RSSI Max value in ath(4) and use the new RSSI radiotap header
instead of the old db signal header. also allow tcpdump and hostapd to
print the new RSSI radiotap header values current/max rssi.
ok damien@ jsg@
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/ar5xxx.h | 4 | ||||
-rw-r--r-- | sys/dev/ic/ath.c | 6 | ||||
-rw-r--r-- | sys/dev/ic/athvar.h | 7 |
3 files changed, 11 insertions, 6 deletions
diff --git a/sys/dev/ic/ar5xxx.h b/sys/dev/ic/ar5xxx.h index 65fff657792..5d89ac29423 100644 --- a/sys/dev/ic/ar5xxx.h +++ b/sys/dev/ic/ar5xxx.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ar5xxx.h,v 1.31 2006/06/05 15:21:43 reyk Exp $ */ +/* $OpenBSD: ar5xxx.h,v 1.32 2006/06/23 21:53:01 reyk Exp $ */ /* * Copyright (c) 2004, 2005 Reyk Floeter <reyk@openbsd.org> @@ -115,6 +115,8 @@ typedef int HAL_STATUS; #define HAL_OK 0 #define HAL_EINPROGRESS EINPROGRESS +#define AR5K_MAX_RSSI 64 + /* * TX queues */ diff --git a/sys/dev/ic/ath.c b/sys/dev/ic/ath.c index d6f8deae5a1..a631394a1e5 100644 --- a/sys/dev/ic/ath.c +++ b/sys/dev/ic/ath.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ath.c,v 1.51 2006/06/23 06:27:11 miod Exp $ */ +/* $OpenBSD: ath.c,v 1.52 2006/06/23 21:53:01 reyk Exp $ */ /* $NetBSD: ath.c,v 1.37 2004/08/18 21:59:39 dyoung Exp $ */ /*- @@ -379,6 +379,7 @@ ath_attach(u_int16_t devid, struct ath_softc *sc) ic->ic_newstate = ath_newstate; sc->sc_recv_mgmt = ic->ic_recv_mgmt; ic->ic_recv_mgmt = ath_recv_mgmt; + ic->ic_max_rssi = AR5K_MAX_RSSI; bcopy(etherbroadcastaddr, sc->sc_broadcast_addr, IEEE80211_ADDR_LEN); /* complete initialization */ @@ -2001,8 +2002,9 @@ ath_rx_proc(void *arg, int npending) sc->sc_rxtap.wr_rate = sc->sc_hwmap[ds->ds_rxstat.rs_rate] & IEEE80211_RATE_VAL; - sc->sc_rxtap.wr_antsignal = ds->ds_rxstat.rs_rssi; sc->sc_rxtap.wr_antenna = ds->ds_rxstat.rs_antenna; + sc->sc_rxtap.wr_rssi = ds->ds_rxstat.rs_rssi; + sc->sc_rxtap.wr_max_rssi = ic->ic_max_rssi; M_DUP_PKTHDR(&mb, m); mb.m_data = (caddr_t)&sc->sc_rxtap; diff --git a/sys/dev/ic/athvar.h b/sys/dev/ic/athvar.h index a6133f89f48..75fbb2fae81 100644 --- a/sys/dev/ic/athvar.h +++ b/sys/dev/ic/athvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: athvar.h,v 1.17 2005/10/20 21:44:42 jmc Exp $ */ +/* $OpenBSD: athvar.h,v 1.18 2006/06/23 21:53:01 reyk Exp $ */ /* $NetBSD: athvar.h,v 1.10 2004/08/10 01:03:53 dyoung Exp $ */ /*- @@ -131,7 +131,7 @@ struct ath_stats { (1 << IEEE80211_RADIOTAP_RATE) | \ (1 << IEEE80211_RADIOTAP_CHANNEL) | \ (1 << IEEE80211_RADIOTAP_ANTENNA) | \ - (1 << IEEE80211_RADIOTAP_DB_ANTSIGNAL) | \ + (1 << IEEE80211_RADIOTAP_RSSI) | \ 0) struct ath_rx_radiotap_header { @@ -141,7 +141,8 @@ struct ath_rx_radiotap_header { u_int16_t wr_chan_freq; u_int16_t wr_chan_flags; u_int8_t wr_antenna; - u_int8_t wr_antsignal; + u_int8_t wr_rssi; + u_int8_t wr_max_rssi; } __packed; #define ATH_TX_RADIOTAP_PRESENT ( \ |