summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authormycroft <mycroft@NetBSD.org>2004-08-05 22:57:32 +0000
committermycroft <mycroft@NetBSD.org>2004-08-05 22:57:32 +0000
commitddc97f59ca1fa59fd2fd3c3d7e090c650b8a2d84 (patch)
tree494bbdba48413ea568e3f55f3e39bfc2fa01fa83 /sys
parent166317357702b4a9c62f53f5fd5c9f00ee2853a3 (diff)
Put unadulterated dB values in the radiotap header, not the converted dBm
values.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ic/wi.c8
-rw-r--r--sys/dev/ic/wivar.h8
2 files changed, 7 insertions, 9 deletions
diff --git a/sys/dev/ic/wi.c b/sys/dev/ic/wi.c
index 9d808124151..cee5e874aec 100644
--- a/sys/dev/ic/wi.c
+++ b/sys/dev/ic/wi.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wi.c,v 1.182 2004/07/23 08:34:11 mycroft Exp $ */
+/* $NetBSD: wi.c,v 1.183 2004/08/05 22:57:32 mycroft Exp $ */
/*-
* Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -106,7 +106,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wi.c,v 1.182 2004/07/23 08:34:11 mycroft Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wi.c,v 1.183 2004/08/05 22:57:32 mycroft Exp $");
#define WI_HERMES_AUTOINC_WAR /* Work around data write autoinc bug. */
#define WI_HERMES_STATS_WAR /* Work around stats counter bug. */
@@ -1562,8 +1562,8 @@ wi_rx_intr(struct wi_softc *sc)
struct wi_rx_radiotap_header *tap = &sc->sc_rxtap;
tap->wr_rate = frmhdr.wi_rx_rate / 5;
- tap->wr_antsignal = WI_RSSI_TO_DBM(sc, frmhdr.wi_rx_signal);
- tap->wr_antnoise = WI_RSSI_TO_DBM(sc, frmhdr.wi_rx_silence);
+ tap->wr_antsignal = frmhdr.wi_rx_signal;
+ tap->wr_antnoise = frmhdr.wi_rx_silence;
tap->wr_chan_freq = htole16(ic->ic_bss->ni_chan->ic_freq);
tap->wr_chan_flags = htole16(ic->ic_bss->ni_chan->ic_flags);
diff --git a/sys/dev/ic/wivar.h b/sys/dev/ic/wivar.h
index 56e038ea079..c914caf2a04 100644
--- a/sys/dev/ic/wivar.h
+++ b/sys/dev/ic/wivar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: wivar.h,v 1.49 2004/07/22 21:56:58 mycroft Exp $ */
+/* $NetBSD: wivar.h,v 1.50 2004/08/05 22:57:32 mycroft Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -37,8 +37,8 @@
#define WI_RX_RADIOTAP_PRESENT ((1 << IEEE80211_RADIOTAP_FLAGS) | \
(1 << IEEE80211_RADIOTAP_RATE) | \
(1 << IEEE80211_RADIOTAP_CHANNEL) | \
- (1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL) | \
- (1 << IEEE80211_RADIOTAP_DBM_ANTNOISE))
+ (1 << IEEE80211_RADIOTAP_DB_ANTSIGNAL) | \
+ (1 << IEEE80211_RADIOTAP_DB_ANTNOISE))
struct wi_rx_radiotap_header {
struct ieee80211_radiotap_header wr_ihdr;
@@ -178,8 +178,6 @@ struct wi_node {
#define WI_LUCENT_DBM_OFFSET 149
-#define WI_RSSI_TO_DBM(sc, rssi) ((rssi) - (sc)->sc_dbm_offset)
-
#define WI_SCAN_INQWAIT 3 /* wait sec before inquire */
#define WI_SCAN_WAIT 5 /* maximum scan wait */