Commit c76fd32d authored by Vasanthy Kolluri's avatar Vasanthy Kolluri Committed by David S. Miller

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: default avatarVasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: default avatarRoopa Prabhu <roprabhu@cisco.com>
Signed-off-by: default avatarDavid Wang <dwang2@cisco.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 717258ba
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment