diff options
author | Petr Machata <petrm@mellanox.com> | 2018-12-13 06:54:30 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-12-13 21:41:38 -0500 |
commit | 3a37a9636cf3a1af2621a33f7eef8a2a3da81030 (patch) | |
tree | 39d632745b9834d8297856b8900b793ec43c45d7 /drivers/net/macvlan.c | |
parent | 95302c394c3de19bdf24fff5e44a2bf935eadf74 (diff) |
net: dev: Add extack argument to dev_set_mac_address()
A follow-up patch will add a notifier type NETDEV_PRE_CHANGEADDR, which
allows vetoing of MAC address changes. One prominent path to that
notification is through dev_set_mac_address(). Therefore give this
function an extack argument, so that it can be packed together with the
notification. Thus a textual reason for rejection (or a warning) can be
communicated back to the user.
Signed-off-by: Petr Machata <petrm@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/macvlan.c')
-rw-r--r-- | drivers/net/macvlan.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c index 0da3d36b283b..fc726ce4c164 100644 --- a/drivers/net/macvlan.c +++ b/drivers/net/macvlan.c | |||
@@ -744,7 +744,7 @@ static int macvlan_set_mac_address(struct net_device *dev, void *p) | |||
744 | 744 | ||
745 | if (vlan->mode == MACVLAN_MODE_PASSTHRU) { | 745 | if (vlan->mode == MACVLAN_MODE_PASSTHRU) { |
746 | macvlan_set_addr_change(vlan->port); | 746 | macvlan_set_addr_change(vlan->port); |
747 | return dev_set_mac_address(vlan->lowerdev, addr); | 747 | return dev_set_mac_address(vlan->lowerdev, addr, NULL); |
748 | } | 748 | } |
749 | 749 | ||
750 | if (macvlan_addr_busy(vlan->port, addr->sa_data)) | 750 | if (macvlan_addr_busy(vlan->port, addr->sa_data)) |
@@ -1213,7 +1213,7 @@ static void macvlan_port_destroy(struct net_device *dev) | |||
1213 | 1213 | ||
1214 | sa.sa_family = port->dev->type; | 1214 | sa.sa_family = port->dev->type; |
1215 | memcpy(&sa.sa_data, port->perm_addr, port->dev->addr_len); | 1215 | memcpy(&sa.sa_data, port->perm_addr, port->dev->addr_len); |
1216 | dev_set_mac_address(port->dev, &sa); | 1216 | dev_set_mac_address(port->dev, &sa, NULL); |
1217 | } | 1217 | } |
1218 | 1218 | ||
1219 | kfree(port); | 1219 | kfree(port); |