summaryrefslogtreecommitdiff
path: root/sys/dev/mii/mii.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1999-07-23 12:39:12 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1999-07-23 12:39:12 +0000
commit6e3bc9589afeebb2fef21dedbe55e5bdd022c83d (patch)
tree32468ab4da42eef68e9657a97da724a9c5862825 /sys/dev/mii/mii.c
parent7404d1b805572739854469252282a4bba4c9ac58 (diff)
do not print media information to dmesg; ifconfig shows it
Diffstat (limited to 'sys/dev/mii/mii.c')
-rw-r--r--sys/dev/mii/mii.c27
1 files changed, 6 insertions, 21 deletions
diff --git a/sys/dev/mii/mii.c b/sys/dev/mii/mii.c
index f814256f5e3..ba60852ba13 100644
--- a/sys/dev/mii/mii.c
+++ b/sys/dev/mii/mii.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mii.c,v 1.4 1999/02/04 23:00:57 jason Exp $ */
+/* $OpenBSD: mii.c,v 1.5 1999/07/23 12:39:11 deraadt Exp $ */
/* $NetBSD: mii.c,v 1.9 1998/11/05 04:08:02 thorpej Exp $ */
/*-
@@ -278,30 +278,19 @@ mii_add_media(mii, bmsr, instance)
struct mii_data *mii;
int bmsr, instance;
{
- const char *sep = "";
-
#define ADD(m, c) ifmedia_add(&mii->mii_media, (m), (c), NULL)
-#define PRINT(s) printf("%s%s", sep, s); sep = ", "
- if (bmsr & BMSR_10THDX) {
+ if (bmsr & BMSR_10THDX)
ADD(IFM_MAKEWORD(IFM_ETHER, IFM_10_T, 0, instance), 0);
- PRINT("10baseT");
- }
- if (bmsr & BMSR_10TFDX) {
+ if (bmsr & BMSR_10TFDX)
ADD(IFM_MAKEWORD(IFM_ETHER, IFM_10_T, IFM_FDX, instance),
BMCR_FDX);
- PRINT("10baseT-FDX");
- }
- if (bmsr & BMSR_100TXHDX) {
+ if (bmsr & BMSR_100TXHDX)
ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_TX, 0, instance),
BMCR_S100);
- PRINT("100baseTX");
- }
- if (bmsr & BMSR_100TXFDX) {
+ if (bmsr & BMSR_100TXFDX)
ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_TX, IFM_FDX, instance),
BMCR_S100|BMCR_FDX);
- PRINT("100baseTX-FDX");
- }
if (bmsr & BMSR_100T4) {
/*
* XXX How do you enable 100baseT4? I assume we set
@@ -311,13 +300,9 @@ mii_add_media(mii, bmsr, instance)
*/
ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_T4, 0, instance),
BMCR_S100);
- PRINT("100baseT4");
}
- if (bmsr & BMSR_ANEG) {
+ if (bmsr & BMSR_ANEG)
ADD(IFM_MAKEWORD(IFM_ETHER, IFM_AUTO, 0, instance),
BMCR_AUTOEN);
- PRINT("auto");
- }
#undef ADD
-#undef PRINT
}