mirror of
https://gitlab.com/etherlab.org/ethercat.git
synced 2026-08-17 16:51:44 +08:00
Merge branch 'r8169_6.1x' into 'stable-1.6'
[r8169] Do not write invalid MAC onto NIC on removal See merge request etherlab.org/ethercat!195
This commit is contained in:
@@ -5093,7 +5093,9 @@ static void rtl_remove_one(struct pci_dev *pdev)
|
||||
rtl_release_firmware(tp);
|
||||
|
||||
/* restore original MAC address */
|
||||
rtl_rar_set(tp, tp->dev->perm_addr);
|
||||
if (is_valid_ether_addr(tp->dev->perm_addr)) {
|
||||
rtl_rar_set(tp, tp->dev->perm_addr);
|
||||
}
|
||||
}
|
||||
|
||||
static const struct net_device_ops rtl_netdev_ops = {
|
||||
|
||||
@@ -5071,7 +5071,9 @@ static void rtl_remove_one(struct pci_dev *pdev)
|
||||
rtl_release_firmware(tp);
|
||||
|
||||
/* restore original MAC address */
|
||||
rtl_rar_set(tp, tp->dev->perm_addr);
|
||||
if (is_valid_ether_addr(tp->dev->perm_addr)) {
|
||||
rtl_rar_set(tp, tp->dev->perm_addr);
|
||||
}
|
||||
}
|
||||
|
||||
static const struct net_device_ops rtl_netdev_ops = {
|
||||
|
||||
@@ -5064,7 +5064,9 @@ static void rtl_remove_one(struct pci_dev *pdev)
|
||||
rtl_release_firmware(tp);
|
||||
|
||||
/* restore original MAC address */
|
||||
rtl_rar_set(tp, tp->dev->perm_addr);
|
||||
if (is_valid_ether_addr(tp->dev->perm_addr)) {
|
||||
rtl_rar_set(tp, tp->dev->perm_addr);
|
||||
}
|
||||
}
|
||||
|
||||
static const struct net_device_ops rtl_netdev_ops = {
|
||||
|
||||
@@ -4942,7 +4942,9 @@ static void rtl_remove_one(struct pci_dev *pdev)
|
||||
rtl_release_firmware(tp);
|
||||
|
||||
/* restore original MAC address */
|
||||
rtl_rar_set(tp, tp->dev->perm_addr);
|
||||
if (is_valid_ether_addr(tp->dev->perm_addr)) {
|
||||
rtl_rar_set(tp, tp->dev->perm_addr);
|
||||
}
|
||||
}
|
||||
|
||||
static const struct net_device_ops rtl_netdev_ops = {
|
||||
|
||||
@@ -5168,8 +5168,9 @@ static void rtl_shutdown(struct pci_dev *pdev)
|
||||
rtnl_unlock();
|
||||
|
||||
/* Restore original MAC address */
|
||||
rtl_rar_set(tp, tp->dev->perm_addr);
|
||||
|
||||
if (is_valid_ether_addr(tp->dev->perm_addr)) {
|
||||
rtl_rar_set(tp, tp->dev->perm_addr);
|
||||
}
|
||||
if (system_state == SYSTEM_POWER_OFF && !tp->dash_enabled) {
|
||||
pci_wake_from_d3(pdev, tp->saved_wolopts);
|
||||
pci_set_power_state(pdev, PCI_D3hot);
|
||||
@@ -5202,7 +5203,9 @@ static void rtl_remove_one(struct pci_dev *pdev)
|
||||
rtl_release_firmware(tp);
|
||||
|
||||
/* restore original MAC address */
|
||||
rtl_rar_set(tp, tp->dev->perm_addr);
|
||||
if (is_valid_ether_addr(tp->dev->perm_addr)) {
|
||||
rtl_rar_set(tp, tp->dev->perm_addr);
|
||||
}
|
||||
}
|
||||
|
||||
static const struct net_device_ops rtl_netdev_ops = {
|
||||
|
||||
@@ -4984,7 +4984,9 @@ static void rtl_remove_one(struct pci_dev *pdev)
|
||||
rtl_release_firmware(tp);
|
||||
|
||||
/* restore original MAC address */
|
||||
rtl_rar_set(tp, tp->dev->perm_addr);
|
||||
if (is_valid_ether_addr(tp->dev->perm_addr)) {
|
||||
rtl_rar_set(tp, tp->dev->perm_addr);
|
||||
}
|
||||
}
|
||||
|
||||
static const struct net_device_ops rtl_netdev_ops = {
|
||||
|
||||
Reference in New Issue
Block a user