diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index dcfc541291ef878d23d3b1ddf0514fa4fb74eeeb..622106d8c055a796666f646ec039949ddda08e00 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c @@ -974,8 +974,19 @@ static int enic_set_mac_address_dynamic(struct net_device *netdev, void *p) static int enic_set_mac_address(struct net_device *netdev, void *p) { struct sockaddr *saddr = p; + char *addr = saddr->sa_data; + struct enic *enic = netdev_priv(netdev); + int err; + + err = enic_dev_del_station_addr(enic); + if (err) + return err; + + err = enic_set_mac_addr(netdev, addr); + if (err) + return err; - return enic_set_mac_addr(netdev, (char *)saddr->sa_data); + return enic_dev_add_station_addr(enic); } static int enic_dev_packet_filter(struct enic *enic, int directed,