diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2012-07-25 18:19:00 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2012-07-25 18:19:00 +0000 |
commit | e6ef4c5f1d17348c8adee3ca77372619b95a0476 (patch) | |
tree | 235f149070f083af9bdf752122da4ff1b15a19b6 /sys/dev | |
parent | 403fad9af6c582ec603c0b3c35a00491184a2060 (diff) |
When reporting media state, be sure to set IFM_AVALID and IFM_ACTIVE in
ifm_status, for dhclient's sake. Current dhclient interface_status()
considers interfaces able to report media information but not returning
IFM_AVALID as down. Note that these interfaces usually have mii(4) or
have specific code reporting correct values; sparc le(4) is an exception.
Found the hard way by sebastia@; joint work with krw@, ok deraadt@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/sbus/if_le_ledma.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/sbus/if_le_ledma.c b/sys/dev/sbus/if_le_ledma.c index bbd6663e24f..a2cb145126f 100644 --- a/sys/dev/sbus/if_le_ledma.c +++ b/sys/dev/sbus/if_le_ledma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_le_ledma.c,v 1.14 2008/06/26 05:42:18 ray Exp $ */ +/* $OpenBSD: if_le_ledma.c,v 1.15 2012/07/25 18:18:59 miod Exp $ */ /* $NetBSD: if_le_ledma.c,v 1.14 2001/05/30 11:46:35 mrg Exp $ */ /*- @@ -206,6 +206,8 @@ lemediastatus(struct ifnet *ifp, struct ifmediareq *ifmr) /* * Notify the world which media we're currently using. */ + ifmr->ifm_status = IFM_AVALID | IFM_ACTIVE; + if (L64854_GCSR(dma) & E_TP_AUI) ifmr->ifm_active = IFM_ETHER|IFM_10_T; else |