Commit 69ee28d0 authored by Tim Hockin's avatar Tim Hockin

drivers/net/mii.c: only call netif_carrier_{on,off} if there is a state change

parent ac37cc4a
......@@ -192,9 +192,12 @@ int mii_nway_restart (struct mii_if_info *mii)
void mii_check_link (struct mii_if_info *mii)
{
if (mii_link_ok(mii))
int cur_link = mii_link_ok(mii);
int prev_link = netif_carrier_ok(mii->dev);
if (cur_link && !prev_link)
netif_carrier_on(mii->dev);
else
else if (prev_link && !cur_link)
netif_carrier_off(mii->dev);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment