Skip to content

Commit

Permalink
enic: Make firmware cognizant of the user set mac address
Browse files Browse the repository at this point in the history
Let the firmware know about the mac address set by the user using ndo_set_mac_address

Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Vasanthy Kolluri authored and David S. Miller committed Oct 21, 2010
1 parent 717258b commit c76fd32
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion drivers/net/enic/enic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c76fd32

Please sign in to comment.