-/* $OpenBSD: ar5008.c,v 1.45 2017/07/17 14:25:29 stsp Exp $ */
+/* $OpenBSD: ar5008.c,v 1.46 2017/11/28 04:35:39 stsp Exp $ */
/*-
* Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr>
/* Send the frame to the 802.11 layer. */
rxi.rxi_flags = 0; /* XXX */
rxi.rxi_rssi = MS(ds->ds_status4, AR_RXS4_RSSI_COMBINED);
+ rxi.rxi_rssi += AR_DEFAULT_NOISE_FLOOR;
rxi.rxi_tstamp = ds->ds_status2;
ieee80211_input(ifp, m, ni, &rxi);
/* Restore noisefloor values to initial (max) values. */
for (i = 0; i < AR_MAX_CHAINS; i++)
- nf[i] = nf_ext[i] = -50 * 2;
+ nf[i] = nf_ext[i] = AR_DEFAULT_NOISE_FLOOR;
ar5008_write_noisefloor(sc, nf, nf_ext);
}
-/* $OpenBSD: athnreg.h,v 1.20 2017/05/19 11:42:48 stsp Exp $ */
+/* $OpenBSD: athnreg.h,v 1.21 2017/11/28 04:35:39 stsp Exp $ */
/*-
* Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr>
#define AR_CTL_2GHT40 7
#define AR_CTL_5GHT40 8
+#define AR_DEFAULT_NOISE_FLOOR (-95)
+
/*
* Macros to access registers.
*/