diff options
author | Julian Wiedmann <jwi@linux.ibm.com> | 2019-01-31 04:48:10 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-01-31 12:26:31 -0500 |
commit | 913564fbc2df0b5061c79fc203f8ddb17b30b78b (patch) | |
tree | 96e026833943e31ed2f9308252c6121bd7bd11df /drivers/net/macvlan.c | |
parent | 630afc7734bac1229ef601b65769a898189e1b3d (diff) |
macvlan: use netif_is_macvlan_port()
Replace the macvlan_port_exists() macro with its twin from netdevice.h
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/macvlan.c')
-rw-r--r-- | drivers/net/macvlan.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c index cf22a79af66b..26e53832b095 100644 --- a/drivers/net/macvlan.c +++ b/drivers/net/macvlan.c | |||
@@ -119,8 +119,6 @@ static struct macvlan_port *macvlan_port_get_rtnl(const struct net_device *dev) | |||
119 | return rtnl_dereference(dev->rx_handler_data); | 119 | return rtnl_dereference(dev->rx_handler_data); |
120 | } | 120 | } |
121 | 121 | ||
122 | #define macvlan_port_exists(dev) (dev->priv_flags & IFF_MACVLAN_PORT) | ||
123 | |||
124 | static struct macvlan_dev *macvlan_hash_lookup(const struct macvlan_port *port, | 122 | static struct macvlan_dev *macvlan_hash_lookup(const struct macvlan_port *port, |
125 | const unsigned char *addr) | 123 | const unsigned char *addr) |
126 | { | 124 | { |
@@ -1378,7 +1376,7 @@ int macvlan_common_newlink(struct net *src_net, struct net_device *dev, | |||
1378 | if (!tb[IFLA_ADDRESS]) | 1376 | if (!tb[IFLA_ADDRESS]) |
1379 | eth_hw_addr_random(dev); | 1377 | eth_hw_addr_random(dev); |
1380 | 1378 | ||
1381 | if (!macvlan_port_exists(lowerdev)) { | 1379 | if (!netif_is_macvlan_port(lowerdev)) { |
1382 | err = macvlan_port_create(lowerdev); | 1380 | err = macvlan_port_create(lowerdev); |
1383 | if (err < 0) | 1381 | if (err < 0) |
1384 | return err; | 1382 | return err; |
@@ -1638,7 +1636,7 @@ static int macvlan_device_event(struct notifier_block *unused, | |||
1638 | struct macvlan_port *port; | 1636 | struct macvlan_port *port; |
1639 | LIST_HEAD(list_kill); | 1637 | LIST_HEAD(list_kill); |
1640 | 1638 | ||
1641 | if (!macvlan_port_exists(dev)) | 1639 | if (!netif_is_macvlan_port(dev)) |
1642 | return NOTIFY_DONE; | 1640 | return NOTIFY_DONE; |
1643 | 1641 | ||
1644 | port = macvlan_port_get_rtnl(dev); | 1642 | port = macvlan_port_get_rtnl(dev); |