Commit bcf64aa3 authored by Paul Fertser's avatar Paul Fertser Committed by David S. Miller

b44: fix carrier detection on bind

For carrier detection to work properly when binding the driver with a cable
unplugged, netif_carrier_off() should be called after register_netdev(),
not before.
Signed-off-by: default avatarPaul Fertser <fercerpav@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b00916b1
...@@ -2170,8 +2170,6 @@ static int __devinit b44_init_one(struct ssb_device *sdev, ...@@ -2170,8 +2170,6 @@ static int __devinit b44_init_one(struct ssb_device *sdev,
dev->irq = sdev->irq; dev->irq = sdev->irq;
SET_ETHTOOL_OPS(dev, &b44_ethtool_ops); SET_ETHTOOL_OPS(dev, &b44_ethtool_ops);
netif_carrier_off(dev);
err = ssb_bus_powerup(sdev->bus, 0); err = ssb_bus_powerup(sdev->bus, 0);
if (err) { if (err) {
dev_err(sdev->dev, dev_err(sdev->dev,
...@@ -2213,6 +2211,8 @@ static int __devinit b44_init_one(struct ssb_device *sdev, ...@@ -2213,6 +2211,8 @@ static int __devinit b44_init_one(struct ssb_device *sdev,
goto err_out_powerdown; goto err_out_powerdown;
} }
netif_carrier_off(dev);
ssb_set_drvdata(sdev, dev); ssb_set_drvdata(sdev, dev);
/* Chip reset provides power to the b44 MAC & PCI cores, which /* Chip reset provides power to the b44 MAC & PCI cores, which
......
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