From: Vasanthy Kolluri Date: Wed, 20 Oct 2010 10:17:04 +0000 (+0000) Subject: enic: Make firmware cognizant of the user set mac address X-Git-Tag: MMI-PSA29.97-13-9~21994^2~70 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c76fd32d0504c0450edb0e00890aa32e3ff1f73d;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git enic: Make firmware cognizant of the user set mac address Let the firmware know about the mac address set by the user using ndo_set_mac_address Signed-off-by: Vasanthy Kolluri Signed-off-by: Roopa Prabhu Signed-off-by: David Wang Signed-off-by: David S. Miller --- diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index dcfc541291ef..622106d8c055 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,