From: frank.blaschka@de.ibm.com
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, linux-s390@vger.kernel.org
Subject: [patch 1/2] vlan: add neigh_setup
Date: Wed, 07 Jan 2009 13:15:51 +0100 [thread overview]
Message-ID: <20090107121659.385897000@de.ibm.com> (raw)
In-Reply-To: 20090107121550.878339000@de.ibm.com
[-- Attachment #1: vlan_neigh_setup.diff --]
[-- Type: text/plain, Size: 1652 bytes --]
From: Frank Blaschka <frank.blaschka@de.ibm.com>
In case the real device has a neigh_setup function, this
neigh_setup function should be used for the vlan device.
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
---
net/8021q/vlan_dev.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
Index: git_linus/net/8021q/vlan_dev.c
===================================================================
--- git_linus.orig/net/8021q/vlan_dev.c
+++ git_linus/net/8021q/vlan_dev.c
@@ -546,6 +546,18 @@ static int vlan_dev_ioctl(struct net_dev
return err;
}
+static int vlan_dev_neigh_setup(struct net_device *dev, struct neigh_parms *pa)
+{
+ struct net_device *real_dev = vlan_dev_info(dev)->real_dev;
+ const struct net_device_ops *ops = real_dev->netdev_ops;
+ int err = 0;
+
+ if (netif_device_present(real_dev) && ops->ndo_neigh_setup)
+ err = ops->ndo_neigh_setup(dev, pa);
+
+ return err;
+}
+
static void vlan_dev_change_rx_flags(struct net_device *dev, int change)
{
struct net_device *real_dev = vlan_dev_info(dev)->real_dev;
@@ -713,6 +725,7 @@ static const struct net_device_ops vlan_
.ndo_set_multicast_list = vlan_dev_set_rx_mode,
.ndo_change_rx_flags = vlan_dev_change_rx_flags,
.ndo_do_ioctl = vlan_dev_ioctl,
+ .ndo_neigh_setup = vlan_dev_neigh_setup,
};
static const struct net_device_ops vlan_netdev_accel_ops = {
@@ -728,6 +741,7 @@ static const struct net_device_ops vlan_
.ndo_set_multicast_list = vlan_dev_set_rx_mode,
.ndo_change_rx_flags = vlan_dev_change_rx_flags,
.ndo_do_ioctl = vlan_dev_ioctl,
+ .ndo_neigh_setup = vlan_dev_neigh_setup,
};
void vlan_setup(struct net_device *dev)
--
next prev parent reply other threads:[~2009-01-07 12:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-07 12:15 [patch 0/2] vlan, qeth: neigh_setup frank.blaschka
2009-01-07 12:15 ` frank.blaschka [this message]
2009-01-08 18:50 ` [patch 1/2] vlan: add neigh_setup David Miller
2009-01-07 12:15 ` [patch 2/2] qeth: convert to net_device_ops frank.blaschka
2009-01-08 18:50 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090107121659.385897000@de.ibm.com \
--to=frank.blaschka@de.ibm.com \
--cc=davem@davemloft.net \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).