aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/function/u_ether.c
diff options
context:
space:
mode:
authorPetr Machata <petrm@mellanox.com>2018-12-13 11:54:30 +0000
committerDavid S. Miller <davem@davemloft.net>2018-12-13 18:41:38 -0800
commit3a37a9636cf3a1af2621a33f7eef8a2a3da81030 (patch)
tree39d632745b9834d8297856b8900b793ec43c45d7 /drivers/usb/gadget/function/u_ether.c
parentMerge tag 'mlx5e-updates-2018-12-11' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux (diff)
downloadlinux-dev-3a37a9636cf3a1af2621a33f7eef8a2a3da81030.tar.xz
linux-dev-3a37a9636cf3a1af2621a33f7eef8a2a3da81030.zip
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/usb/gadget/function/u_ether.c')
-rw-r--r--drivers/usb/gadget/function/u_ether.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/function/u_ether.c b/drivers/usb/gadget/function/u_ether.c
index 0f026d445e31..737bd77a575d 100644
--- a/drivers/usb/gadget/function/u_ether.c
+++ b/drivers/usb/gadget/function/u_ether.c
@@ -879,7 +879,7 @@ int gether_register_netdev(struct net_device *net)
sa.sa_family = net->type;
memcpy(sa.sa_data, dev->dev_mac, ETH_ALEN);
rtnl_lock();
- status = dev_set_mac_address(net, &sa);
+ status = dev_set_mac_address(net, &sa, NULL);
rtnl_unlock();
if (status)
pr_warn("cannot set self ethernet address: %d\n", status);