diff options
Diffstat (limited to 'drivers/net/ehea/ehea_main.c')
-rw-r--r-- | drivers/net/ehea/ehea_main.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index 287a61918739..faae01dc1c4b 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c | |||
@@ -1766,16 +1766,20 @@ static int ehea_set_mac_addr(struct net_device *dev, void *sa) | |||
1766 | mutex_lock(&ehea_bcmc_regs.lock); | 1766 | mutex_lock(&ehea_bcmc_regs.lock); |
1767 | 1767 | ||
1768 | /* Deregister old MAC in pHYP */ | 1768 | /* Deregister old MAC in pHYP */ |
1769 | ret = ehea_broadcast_reg_helper(port, H_DEREG_BCMC); | 1769 | if (port->state == EHEA_PORT_UP) { |
1770 | if (ret) | 1770 | ret = ehea_broadcast_reg_helper(port, H_DEREG_BCMC); |
1771 | goto out_upregs; | 1771 | if (ret) |
1772 | goto out_upregs; | ||
1773 | } | ||
1772 | 1774 | ||
1773 | port->mac_addr = cb0->port_mac_addr << 16; | 1775 | port->mac_addr = cb0->port_mac_addr << 16; |
1774 | 1776 | ||
1775 | /* Register new MAC in pHYP */ | 1777 | /* Register new MAC in pHYP */ |
1776 | ret = ehea_broadcast_reg_helper(port, H_REG_BCMC); | 1778 | if (port->state == EHEA_PORT_UP) { |
1777 | if (ret) | 1779 | ret = ehea_broadcast_reg_helper(port, H_REG_BCMC); |
1778 | goto out_upregs; | 1780 | if (ret) |
1781 | goto out_upregs; | ||
1782 | } | ||
1779 | 1783 | ||
1780 | ret = 0; | 1784 | ret = 0; |
1781 | 1785 | ||