]> err.no Git - linux-2.6/commitdiff
[PATCH] b44: replace B44_FLAG_INIT_COMPLETE with netif_running()
authorFrancois Romieu <romieu@fr.zoreil.com>
Tue, 8 Nov 2005 22:36:20 +0000 (23:36 +0100)
committerJeff Garzik <jgarzik@pobox.com>
Wed, 9 Nov 2005 06:02:41 +0000 (01:02 -0500)
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
drivers/net/b44.c
drivers/net/b44.h

index ecc2e32c38c1f55c92c0c2b7ff2159461f66d8ad..f1675dcf4d5cdb7ba382f7395be159be6e34c334 100644 (file)
@@ -1392,7 +1392,6 @@ static int b44_open(struct net_device *dev)
 
        b44_init_rings(bp);
        b44_init_hw(bp);
-       bp->flags |= B44_FLAG_INIT_COMPLETE;
 
        netif_carrier_off(dev);
        b44_check_phy(bp);
@@ -1456,7 +1455,6 @@ static int b44_close(struct net_device *dev)
 #endif
        b44_halt(bp);
        b44_free_rings(bp);
-       bp->flags &= ~B44_FLAG_INIT_COMPLETE;
        netif_carrier_off(bp->dev);
 
        spin_unlock_irq(&bp->lock);
@@ -1608,7 +1606,7 @@ static int b44_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
 {
        struct b44 *bp = netdev_priv(dev);
 
-       if (!(bp->flags & B44_FLAG_INIT_COMPLETE))
+       if (!netif_running(dev))
                return -EAGAIN;
        cmd->supported = (SUPPORTED_Autoneg);
        cmd->supported |= (SUPPORTED_100baseT_Half |
@@ -1646,7 +1644,7 @@ static int b44_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
 {
        struct b44 *bp = netdev_priv(dev);
 
-       if (!(bp->flags & B44_FLAG_INIT_COMPLETE))
+       if (!netif_running(dev))
                return -EAGAIN;
 
        /* We do not support gigabit. */
index 7afeaf608232b43fb871d1ff66791cf0e2348de7..b178662978f34915cd41c5ff0f1063163452d1fa 100644 (file)
@@ -420,7 +420,6 @@ struct b44 {
 
        u32                     dma_offset;
        u32                     flags;
-#define B44_FLAG_INIT_COMPLETE 0x00000001
 #define B44_FLAG_BUGGY_TXPTR   0x00000002
 #define B44_FLAG_REORDER_BUG   0x00000004
 #define B44_FLAG_PAUSE_AUTO    0x00008000