summaryrefslogtreecommitdiff
path: root/drivers/net/ipvlan/ipvlan_main.c
diff options
context:
space:
mode:
authorMahesh Bandewar <maheshb@google.com>2014-12-07 02:53:33 +0300
committerDavid S. Miller <davem@davemloft.net>2014-12-10 00:10:06 +0300
commit5933fea7aa7237ba52d67c069c39ad5c3ab7a036 (patch)
treed3e2a240606e79cc961337001297e8609ecc1220 /drivers/net/ipvlan/ipvlan_main.c
parent764e433b3c43d47e2d19e4bd32fec093421b9cff (diff)
downloadlinux-5933fea7aa7237ba52d67c069c39ad5c3ab7a036.tar.xz
ipvlan: move the device check function into netdevice.h
Move the port check [ipvlan_dev_master()] and device check [ipvlan_dev_slave()] functions to netdevice.h and rename them netif_is_ipvlan_port() and netif_is_ipvlan() resp. to be consistent with macvlan api naming. Signed-off-by: Mahesh Bandewar <maheshb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ipvlan/ipvlan_main.c')
-rw-r--r--drivers/net/ipvlan/ipvlan_main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/ipvlan/ipvlan_main.c b/drivers/net/ipvlan/ipvlan_main.c
index a66ff8197008..4f4099d5603d 100644
--- a/drivers/net/ipvlan/ipvlan_main.c
+++ b/drivers/net/ipvlan/ipvlan_main.c
@@ -446,11 +446,11 @@ static int ipvlan_link_new(struct net *src_net, struct net_device *dev,
if (!phy_dev)
return -ENODEV;
- if (ipvlan_dev_slave(phy_dev)) {
+ if (netif_is_ipvlan(phy_dev)) {
struct ipvl_dev *tmp = netdev_priv(phy_dev);
phy_dev = tmp->phy_dev;
- } else if (!ipvlan_dev_master(phy_dev)) {
+ } else if (!netif_is_ipvlan_port(phy_dev)) {
err = ipvlan_port_create(phy_dev);
if (err < 0)
return err;
@@ -560,7 +560,7 @@ static int ipvlan_device_event(struct notifier_block *unused,
struct ipvl_port *port;
LIST_HEAD(lst_kill);
- if (!ipvlan_dev_master(dev))
+ if (!netif_is_ipvlan_port(dev))
return NOTIFY_DONE;
port = ipvlan_port_get_rtnl(dev);
@@ -651,7 +651,7 @@ static int ipvlan_addr6_event(struct notifier_block *unused,
struct net_device *dev = (struct net_device *)if6->idev->dev;
struct ipvl_dev *ipvlan = netdev_priv(dev);
- if (!ipvlan_dev_slave(dev))
+ if (!netif_is_ipvlan(dev))
return NOTIFY_DONE;
if (!ipvlan || !ipvlan->port)
@@ -723,7 +723,7 @@ static int ipvlan_addr4_event(struct notifier_block *unused,
struct ipvl_dev *ipvlan = netdev_priv(dev);
struct in_addr ip4_addr;
- if (!ipvlan_dev_slave(dev))
+ if (!netif_is_ipvlan(dev))
return NOTIFY_DONE;
if (!ipvlan || !ipvlan->port)