diff options
| author | Gleb Smirnoff <glebius@FreeBSD.org> | 2005-02-04 18:36:04 +0000 |
|---|---|---|
| committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2005-02-04 18:36:04 +0000 |
| commit | e5d73ca25293aa537c59d1f2104296a848842352 (patch) | |
| tree | f85ca0a9d8432c7fdfb22b711a9bdc250311c356 /sys/dev/em | |
| parent | b21154f6775aa8af33da33236386fe08f227d765 (diff) | |
Notes
Diffstat (limited to 'sys/dev/em')
| -rw-r--r-- | sys/dev/em/if_em.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/em/if_em.c b/sys/dev/em/if_em.c index 296c765df2c9..525074d2ba24 100644 --- a/sys/dev/em/if_em.c +++ b/sys/dev/em/if_em.c @@ -1654,6 +1654,8 @@ em_local_timer(void *arg) static void em_print_link_status(struct adapter * adapter) { + struct ifnet *ifp = &adapter->interface_data.ac_if; + if (E1000_READ_REG(&adapter->hw, STATUS) & E1000_STATUS_LU) { if (adapter->link_active == 0) { em_get_speed_and_duplex(&adapter->hw, @@ -1667,6 +1669,7 @@ em_print_link_status(struct adapter * adapter) "Full Duplex" : "Half Duplex")); adapter->link_active = 1; adapter->smartspeed = 0; + if_link_state_change(ifp, LINK_STATE_UP); } } else { if (adapter->link_active == 1) { @@ -1675,6 +1678,7 @@ em_print_link_status(struct adapter * adapter) if (bootverbose) printf("em%d: Link is Down\n", adapter->unit); adapter->link_active = 0; + if_link_state_change(ifp, LINK_STATE_DOWN); } } |
