agrport_monitor: map IFM_NONE to IFM_NONE|IFM_ETHER and add a comment.

This commit is contained in:
yamt 2008-03-24 09:14:52 +00:00
parent 8df658c8ca
commit 9f194df082
1 changed files with 12 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_agrmonitor.c,v 1.3 2005/12/11 12:24:54 christos Exp $ */
/* $NetBSD: if_agrmonitor.c,v 1.4 2008/03/24 09:14:52 yamt Exp $ */
/*-
* Copyright (c)2005 YAMAMOTO Takashi,
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_agrmonitor.c,v 1.3 2005/12/11 12:24:54 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_agrmonitor.c,v 1.4 2008/03/24 09:14:52 yamt Exp $");
#include <sys/param.h>
#include <sys/callout.h>
@ -70,6 +70,16 @@ agrport_monitor(struct agr_port *port)
media = IFM_ETHER | IFM_NONE; /* XXX ether */
}
if (media == IFM_NONE) {
/*
* possible eg. when the phy is not configured.
*/
#if defined(DEBUG)
printf("%s: IFM_NONE\n", __func__);
#endif /* defined(DEBUG) */
media = IFM_ETHER | IFM_NONE; /* XXX ether */
}
if (port->port_media == media) {
return;
}