aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/bnx2.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnx2.c')
-rw-r--r--drivers/net/ethernet/broadcom/bnx2.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c
index e838a3f74b69..d9980ad00b4b 100644
--- a/drivers/net/ethernet/broadcom/bnx2.c
+++ b/drivers/net/ethernet/broadcom/bnx2.c
@@ -5761,8 +5761,8 @@ bnx2_run_loopback(struct bnx2 *bp, int loopback_mode)
5761 if (!skb) 5761 if (!skb)
5762 return -ENOMEM; 5762 return -ENOMEM;
5763 packet = skb_put(skb, pkt_size); 5763 packet = skb_put(skb, pkt_size);
5764 memcpy(packet, bp->dev->dev_addr, 6); 5764 memcpy(packet, bp->dev->dev_addr, ETH_ALEN);
5765 memset(packet + 6, 0x0, 8); 5765 memset(packet + ETH_ALEN, 0x0, 8);
5766 for (i = 14; i < pkt_size; i++) 5766 for (i = 14; i < pkt_size; i++)
5767 packet[i] = (unsigned char) (i & 0xff); 5767 packet[i] = (unsigned char) (i & 0xff);
5768 5768
@@ -8413,7 +8413,6 @@ err_out_release:
8413 8413
8414err_out_disable: 8414err_out_disable:
8415 pci_disable_device(pdev); 8415 pci_disable_device(pdev);
8416 pci_set_drvdata(pdev, NULL);
8417 8416
8418err_out: 8417err_out:
8419 return rc; 8418 return rc;
@@ -8514,7 +8513,7 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
8514 8513
8515 pci_set_drvdata(pdev, dev); 8514 pci_set_drvdata(pdev, dev);
8516 8515
8517 memcpy(dev->dev_addr, bp->mac_addr, 6); 8516 memcpy(dev->dev_addr, bp->mac_addr, ETH_ALEN);
8518 8517
8519 dev->hw_features = NETIF_F_IP_CSUM | NETIF_F_SG | 8518 dev->hw_features = NETIF_F_IP_CSUM | NETIF_F_SG |
8520 NETIF_F_TSO | NETIF_F_TSO_ECN | 8519 NETIF_F_TSO | NETIF_F_TSO_ECN |
@@ -8546,7 +8545,6 @@ error:
8546 pci_iounmap(pdev, bp->regview); 8545 pci_iounmap(pdev, bp->regview);
8547 pci_release_regions(pdev); 8546 pci_release_regions(pdev);
8548 pci_disable_device(pdev); 8547 pci_disable_device(pdev);
8549 pci_set_drvdata(pdev, NULL);
8550err_free: 8548err_free:
8551 free_netdev(dev); 8549 free_netdev(dev);
8552 return rc; 8550 return rc;
@@ -8578,7 +8576,6 @@ bnx2_remove_one(struct pci_dev *pdev)
8578 8576
8579 pci_release_regions(pdev); 8577 pci_release_regions(pdev);
8580 pci_disable_device(pdev); 8578 pci_disable_device(pdev);
8581 pci_set_drvdata(pdev, NULL);
8582} 8579}
8583 8580
8584static int 8581static int