]> git.hungrycats.org Git - linux/commitdiff
eepro100 net driver link beat detection improvement.
authorJeff Garzik <jgarzik@rum.normnet.org>
Thu, 7 Feb 2002 03:51:29 +0000 (22:51 -0500)
committerJeff Garzik <jgarzik@rum.normnet.org>
Thu, 7 Feb 2002 03:51:29 +0000 (22:51 -0500)
Control interface running flag correctly, via netif_carrier_{on,off},
rather than manipulating the IFF_RUNNING bit directly from within
the driver (ug).
Contributors: Joerg Mayer, Stefans Rumpf

drivers/net/eepro100.c

index 9fa4c08e15dd94f1a55b4fb0010bd01b3067a97d..106343da1b9cebb7045b0b4e7c5a27e06f5767df 100644 (file)
@@ -1103,9 +1103,9 @@ static void speedo_timer(unsigned long data)
                        mdio_read(ioaddr, phy_num, 1);
                        /* If link beat has returned... */
                        if (mdio_read(ioaddr, phy_num, 1) & 0x0004)
-                               dev->flags |= IFF_RUNNING;
+                               netif_carrier_on(dev);
                        else
-                               dev->flags &= ~IFF_RUNNING;
+                               netif_carrier_off(dev);
                }
        }
        if (speedo_debug > 3) {