qlcnic: fix default operating state of interface
authorAmit Kumar Salecha <amit.salecha@qlogic.com>
Wed, 22 Jun 2011 02:52:21 +0000 (02:52 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 24 Jun 2011 08:17:07 +0000 (01:17 -0700)
Currently interface shows status as RUNNING, even if there is no link.
To fix this, netif_carrier_off should be called qlcnic_open().

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/qlcnic/qlcnic_main.c

index a050746a51291a321eab41352f71bc991352f44d..5dcb853224c996a74f0cc80ea696fdabffc57262 100644 (file)
@@ -1485,8 +1485,6 @@ qlcnic_setup_netdev(struct qlcnic_adapter *adapter,
 
        netdev->irq = adapter->msix_entries[0].vector;
 
-       netif_carrier_off(netdev);
-
        err = register_netdev(netdev);
        if (err) {
                dev_err(&pdev->dev, "failed to register net device\n");
@@ -1816,6 +1814,8 @@ static int qlcnic_open(struct net_device *netdev)
        struct qlcnic_adapter *adapter = netdev_priv(netdev);
        int err;
 
+       netif_carrier_off(netdev);
+
        err = qlcnic_attach(adapter);
        if (err)
                return err;