aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorArvid Brodin <arvid.brodin@alten.se>2014-07-04 23:39:42 +0200
committerDavid S. Miller <davem@davemloft.net>2014-07-08 11:35:31 -0700
commit4c3477dca2fde1e3ab748387d736d40afe0df21d (patch)
tree0ee8a5453eb329ce6d43166a3adbc4de4ab21ca8 /net
parentnet/hsr: Implemented .ndo_fix_features (better device features handling). (diff)
downloadlinux-dev-4c3477dca2fde1e3ab748387d736d40afe0df21d.tar.xz
linux-dev-4c3477dca2fde1e3ab748387d736d40afe0df21d.zip
net/hsr: Added SET_NETDEV_DEVTYPE and features |= NETIF_F_NETNS_LOCAL to dev_setup.
Signed-off-by: Arvid Brodin <arvid.brodin@alten.se> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/hsr/hsr_device.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/net/hsr/hsr_device.c b/net/hsr/hsr_device.c
index c489aed98df4..c2ae54924a0f 100644
--- a/net/hsr/hsr_device.c
+++ b/net/hsr/hsr_device.c
@@ -501,15 +501,19 @@ static const struct net_device_ops hsr_device_ops = {
.ndo_fix_features = hsr_fix_features,
};
+static struct device_type hsr_type = {
+ .name = "hsr",
+};
void hsr_dev_setup(struct net_device *dev)
{
random_ether_addr(dev->dev_addr);
ether_setup(dev);
- dev->header_ops = &hsr_header_ops;
- dev->netdev_ops = &hsr_device_ops;
- dev->tx_queue_len = 0;
+ dev->header_ops = &hsr_header_ops;
+ dev->netdev_ops = &hsr_device_ops;
+ SET_NETDEV_DEVTYPE(dev, &hsr_type);
+ dev->tx_queue_len = 0;
dev->destructor = hsr_dev_destroy;
@@ -525,6 +529,10 @@ void hsr_dev_setup(struct net_device *dev)
* hsr_header_create() etc.
*/
dev->features |= NETIF_F_VLAN_CHALLENGED;
+ /* Not sure about this. Taken from bridge code. netdev_features.h says
+ * it means "Does not change network namespaces".
+ */
+ dev->features |= NETIF_F_NETNS_LOCAL;
}