mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
Reset autonegotation timer if media option is not IFM_AUTO.
Make mii_ticks advance, autonegiation is retried every mii_anegticks seconds.
This commit is contained in:
parent
55da31830a
commit
5f36bdfcc2
1 changed files with 5 additions and 1 deletions
|
|
@ -397,8 +397,10 @@ done:
|
|||
/*
|
||||
* Only used for autonegotiation.
|
||||
*/
|
||||
if (IFM_SUBTYPE(ife->ifm_media) != IFM_AUTO)
|
||||
if (IFM_SUBTYPE(ife->ifm_media) != IFM_AUTO) {
|
||||
sc->mii_ticks = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* check for link.
|
||||
|
|
@ -411,6 +413,8 @@ done:
|
|||
}
|
||||
|
||||
/* Announce link loss right after it happens. */
|
||||
if (sc->mii_ticks++ == 0)
|
||||
break;
|
||||
if (sc->mii_ticks <= sc->mii_anegticks)
|
||||
return (0);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue