Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic The RID for the RSSI->dBm adjustment is not suppo...
details: https://anonhg.NetBSD.org/src/rev/ca76e75e587e
branches: trunk
changeset: 540876:ca76e75e587e
user: dyoung <dyoung%NetBSD.org@localhost>
date: Fri Dec 27 07:54:35 2002 +0000
description:
The RID for the RSSI->dBm adjustment is not supported by Prism
station firmware version <= 1.1.1.
diffstat:
sys/dev/ic/wi.c | 22 +++++++++++++++++++---
sys/dev/ic/wivar.h | 3 ++-
2 files changed, 21 insertions(+), 4 deletions(-)
diffs (81 lines):
diff -r 27349c9e9fdc -r ca76e75e587e sys/dev/ic/wi.c
--- a/sys/dev/ic/wi.c Fri Dec 27 06:31:51 2002 +0000
+++ b/sys/dev/ic/wi.c Fri Dec 27 07:54:35 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wi.c,v 1.104 2002/11/18 15:10:22 dyoung Exp $ */
+/* $NetBSD: wi.c,v 1.105 2002/12/27 07:54:35 dyoung Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -70,7 +70,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wi.c,v 1.104 2002/11/18 15:10:22 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wi.c,v 1.105 2002/12/27 07:54:35 dyoung Exp $");
#define WI_HERMES_AUTOINC_WAR /* Work around data write autoinc bug. */
#define WI_HERMES_STATS_WAR /* Work around stats counter bug. */
@@ -256,7 +256,8 @@
sc->sc_dbm_adjust = 100; /* default */
- if (sc->sc_firmware_type == WI_INTERSIL &&
+ buflen = sizeof(val);
+ if ((sc->sc_flags & WI_FLAGS_HAS_DBMADJUST) &&
wi_read_rid(sc, WI_RID_DBM_ADJUST, &val, &buflen) == 0) {
sc->sc_dbm_adjust = le16toh(val);
}
@@ -297,6 +298,8 @@
sc->sc_flags |= WI_FLAGS_HAS_FRAGTHR;
sc->sc_flags |= WI_FLAGS_HAS_ROAMING;
sc->sc_flags |= WI_FLAGS_HAS_SYSSCALE;
+ if (sc->sc_sta_firmware_ver > 10101)
+ sc->sc_flags |= WI_FLAGS_HAS_DBMADJUST;
if (sc->sc_sta_firmware_ver >= 800) {
ic->ic_flags |= IEEE80211_F_HASHOSTAP;
ic->ic_flags |= IEEE80211_F_HASIBSS;
@@ -1443,6 +1446,16 @@
len = sizeof(u_int16_t);
break;
+ case WI_RID_DBM_ADJUST:
+ if (sc->sc_enabled && (sc->sc_flags & WI_FLAGS_HAS_DBMADJUST)) {
+ error = wi_read_rid(sc, wreq.wi_type, wreq.wi_val,
+ &len);
+ break;
+ }
+ wreq.wi_val[0] = htole16(sc->sc_dbm_adjust);
+ len = sizeof(u_int16_t);
+ break;
+
case WI_RID_ROAMING_MODE:
if (sc->sc_enabled && (sc->sc_flags & WI_FLAGS_HAS_ROAMING)) {
error = wi_read_rid(sc, wreq.wi_type, wreq.wi_val,
@@ -1548,6 +1561,9 @@
return error;
len = (wreq.wi_len - 1) * 2;
switch (wreq.wi_type) {
+ case WI_RID_DBM_ADJUST:
+ return ENODEV;
+
case WI_RID_NODENAME:
if (le16toh(wreq.wi_val[0]) * 2 > len ||
le16toh(wreq.wi_val[0]) > sizeof(sc->sc_nodename)) {
diff -r 27349c9e9fdc -r ca76e75e587e sys/dev/ic/wivar.h
--- a/sys/dev/ic/wivar.h Fri Dec 27 06:31:51 2002 +0000
+++ b/sys/dev/ic/wivar.h Fri Dec 27 07:54:35 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wivar.h,v 1.25 2002/11/18 15:10:22 dyoung Exp $ */
+/* $NetBSD: wivar.h,v 1.26 2002/12/27 07:54:36 dyoung Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -109,6 +109,7 @@
#define WI_FLAGS_HAS_SYSSCALE 0x0080
#define WI_FLAGS_BUG_AUTOINC 0x0100
#define WI_FLAGS_HAS_FRAGTHR 0x0200
+#define WI_FLAGS_HAS_DBMADJUST 0x0400
struct wi_card_ident {
u_int16_t card_id;
Home |
Main Index |
Thread Index |
Old Index