mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
net: core: dev: Add extack argument to dev_change_flags()
In order to pass extack together with NETDEV_PRE_UP notifications, it's necessary to route the extack to __dev_open() from diverse (possibly indirect) callers. One prominent API through which the notification is invoked is dev_change_flags(). Therefore extend dev_change_flags() with and extra extack argument and update all users. Most of the calls end up just encoding NULL, but several sites (VLAN, ipvlan, VRF, rtnetlink) do have extack available. Since the function declaration line is changed anyway, name the other function arguments to placate checkpatch. Signed-off-by: Petr Machata <[email protected]> Acked-by: Jiri Pirko <[email protected]> Reviewed-by: Ido Schimmel <[email protected]> Reviewed-by: David Ahern <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
cf7686a012
commit
567c5e13be
15 changed files with 33 additions and 23 deletions
|
|
@ -1100,7 +1100,7 @@ int devinet_ioctl(struct net *net, unsigned int cmd, struct ifreq *ifr)
|
|||
inet_del_ifa(in_dev, ifap, 1);
|
||||
break;
|
||||
}
|
||||
ret = dev_change_flags(dev, ifr->ifr_flags);
|
||||
ret = dev_change_flags(dev, ifr->ifr_flags, NULL);
|
||||
break;
|
||||
|
||||
case SIOCSIFADDR: /* Set interface address (and family) */
|
||||
|
|
|
|||
|
|
@ -220,7 +220,7 @@ static int __init ic_open_devs(void)
|
|||
for_each_netdev(&init_net, dev) {
|
||||
if (!(dev->flags & IFF_LOOPBACK) && !netdev_uses_dsa(dev))
|
||||
continue;
|
||||
if (dev_change_flags(dev, dev->flags | IFF_UP) < 0)
|
||||
if (dev_change_flags(dev, dev->flags | IFF_UP, NULL) < 0)
|
||||
pr_err("IP-Config: Failed to open %s\n", dev->name);
|
||||
}
|
||||
|
||||
|
|
@ -238,7 +238,7 @@ static int __init ic_open_devs(void)
|
|||
if (ic_proto_enabled && !able)
|
||||
continue;
|
||||
oflags = dev->flags;
|
||||
if (dev_change_flags(dev, oflags | IFF_UP) < 0) {
|
||||
if (dev_change_flags(dev, oflags | IFF_UP, NULL) < 0) {
|
||||
pr_err("IP-Config: Failed to open %s\n",
|
||||
dev->name);
|
||||
continue;
|
||||
|
|
@ -315,7 +315,7 @@ static void __init ic_close_devs(void)
|
|||
dev = d->dev;
|
||||
if (d != ic_dev && !netdev_uses_dsa(dev)) {
|
||||
pr_debug("IP-Config: Downing %s\n", dev->name);
|
||||
dev_change_flags(dev, d->flags);
|
||||
dev_change_flags(dev, d->flags, NULL);
|
||||
}
|
||||
kfree(d);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue