aboutsummaryrefslogtreecommitdiffstats
path: root/net/openvswitch/vport-internal_dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/openvswitch/vport-internal_dev.c')
-rw-r--r--net/openvswitch/vport-internal_dev.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/net/openvswitch/vport-internal_dev.c b/net/openvswitch/vport-internal_dev.c
index 0531de6c7a4a..40f8a2489c90 100644
--- a/net/openvswitch/vport-internal_dev.c
+++ b/net/openvswitch/vport-internal_dev.c
@@ -63,16 +63,6 @@ static struct rtnl_link_stats64 *internal_dev_get_stats(struct net_device *netde
63 return stats; 63 return stats;
64} 64}
65 65
66static int internal_dev_mac_addr(struct net_device *dev, void *p)
67{
68 struct sockaddr *addr = p;
69
70 if (!is_valid_ether_addr(addr->sa_data))
71 return -EADDRNOTAVAIL;
72 memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
73 return 0;
74}
75
76/* Called with rcu_read_lock_bh. */ 66/* Called with rcu_read_lock_bh. */
77static int internal_dev_xmit(struct sk_buff *skb, struct net_device *netdev) 67static int internal_dev_xmit(struct sk_buff *skb, struct net_device *netdev)
78{ 68{
@@ -126,7 +116,7 @@ static const struct net_device_ops internal_dev_netdev_ops = {
126 .ndo_open = internal_dev_open, 116 .ndo_open = internal_dev_open,
127 .ndo_stop = internal_dev_stop, 117 .ndo_stop = internal_dev_stop,
128 .ndo_start_xmit = internal_dev_xmit, 118 .ndo_start_xmit = internal_dev_xmit,
129 .ndo_set_mac_address = internal_dev_mac_addr, 119 .ndo_set_mac_address = eth_mac_addr,
130 .ndo_change_mtu = internal_dev_change_mtu, 120 .ndo_change_mtu = internal_dev_change_mtu,
131 .ndo_get_stats64 = internal_dev_get_stats, 121 .ndo_get_stats64 = internal_dev_get_stats,
132}; 122};
@@ -138,6 +128,7 @@ static void do_setup(struct net_device *netdev)
138 netdev->netdev_ops = &internal_dev_netdev_ops; 128 netdev->netdev_ops = &internal_dev_netdev_ops;
139 129
140 netdev->priv_flags &= ~IFF_TX_SKB_SHARING; 130 netdev->priv_flags &= ~IFF_TX_SKB_SHARING;
131 netdev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
141 netdev->destructor = internal_dev_destructor; 132 netdev->destructor = internal_dev_destructor;
142 SET_ETHTOOL_OPS(netdev, &internal_dev_ethtool_ops); 133 SET_ETHTOOL_OPS(netdev, &internal_dev_ethtool_ops);
143 netdev->tx_queue_len = 0; 134 netdev->tx_queue_len = 0;