diff options
author | Vasanthy Kolluri <vkolluri@cisco.com> | 2010-10-20 06:17:04 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-21 04:26:47 -0400 |
commit | c76fd32d0504c0450edb0e00890aa32e3ff1f73d (patch) | |
tree | 97675516b7a04d9f3adff9c8281a20d47f7cc9ab /drivers/net/enic | |
parent | 717258ba4b3ecca9c7c0ef2b76d7aa5800242bad (diff) |
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 <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>
Diffstat (limited to 'drivers/net/enic')
-rw-r--r-- | drivers/net/enic/enic_main.c | 13 |
1 files changed, 12 insertions, 1 deletions
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) | |||
974 | static int enic_set_mac_address(struct net_device *netdev, void *p) | 974 | static int enic_set_mac_address(struct net_device *netdev, void *p) |
975 | { | 975 | { |
976 | struct sockaddr *saddr = p; | 976 | struct sockaddr *saddr = p; |
977 | char *addr = saddr->sa_data; | ||
978 | struct enic *enic = netdev_priv(netdev); | ||
979 | int err; | ||
980 | |||
981 | err = enic_dev_del_station_addr(enic); | ||
982 | if (err) | ||
983 | return err; | ||
984 | |||
985 | err = enic_set_mac_addr(netdev, addr); | ||
986 | if (err) | ||
987 | return err; | ||
977 | 988 | ||
978 | return enic_set_mac_addr(netdev, (char *)saddr->sa_data); | 989 | return enic_dev_add_station_addr(enic); |
979 | } | 990 | } |
980 | 991 | ||
981 | static int enic_dev_packet_filter(struct enic *enic, int directed, | 992 | static int enic_dev_packet_filter(struct enic *enic, int directed, |