summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2002-04-06 22:00:06 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2002-04-06 22:00:06 +0000
commitf4c0fc70f92588a38365e59df3873c48a04d4785 (patch)
tree8a90bc4b1fad3cb39865f6480ed4423b9b55ca96
parentdcdb02de2463143b14b8f74d6c53b536a87e1219 (diff)
Use new WI_NIC_* names for lucent cards instead of hard-coded hex values.
-rw-r--r--sbin/wicontrol/wicontrol.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/sbin/wicontrol/wicontrol.c b/sbin/wicontrol/wicontrol.c
index 0c4c674e4d0..3d221c809c6 100644
--- a/sbin/wicontrol/wicontrol.c
+++ b/sbin/wicontrol/wicontrol.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wicontrol.c,v 1.30 2002/04/02 06:01:43 millert Exp $ */
+/* $OpenBSD: wicontrol.c,v 1.31 2002/04/06 22:00:05 millert Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -69,7 +69,7 @@
static const char copyright[] = "@(#) Copyright (c) 1997, 1998, 1999\
Bill Paul. All rights reserved.";
static const char rcsid[] =
- "@(#) $OpenBSD: wicontrol.c,v 1.30 2002/04/02 06:01:43 millert Exp $";
+ "@(#) $OpenBSD: wicontrol.c,v 1.31 2002/04/06 22:00:05 millert Exp $";
#endif
void wi_getval(char *, struct wi_req *);
@@ -405,25 +405,27 @@ wi_printcardid(wreq, chip_id)
case WI_NIC_37300P:
chip_name = "PRISM 2.5 ISL37300P";
break;
- case 1:
+ case WI_NIC_LUCENT:
chip_name = "Lucent";
break;
- case 2:
+ case WI_NIC_SONY:
chip_name = "Sony";
break;
- case 5:
+ case WI_NIC_LUCENT_EM:
chip_name = "Lucent (embedded)";
break;
default:
- asprintf(&chip_name, "Unknown (%d)", chip_id);
- break;
+ if (chip_id & 0x8000)
+ chip_name = "Unknown PRISM II chip";
+ else
+ chip_name = "Unknown Lucent chip";
}
- if (chip_id <= 5)
- printf("[ %s, Firmware %d.%d variant %d ]", chip_name,
+ if (chip_id & 0x8000)
+ printf("[ %s, Firmware %d.%d.%d ]", chip_name,
letoh16(wreq->wi_val[2]), letoh16(wreq->wi_val[3]),
letoh16(wreq->wi_val[1]));
else
- printf("[ %s, Firmware %d.%d.%d ]", chip_name,
+ printf("[ %s, Firmware %d.%d variant %d ]", chip_name,
letoh16(wreq->wi_val[2]), letoh16(wreq->wi_val[3]),
letoh16(wreq->wi_val[1]));
}