aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/macvlan.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/macvlan.c')
-rw-r--r--drivers/net/macvlan.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index a22087ca968d..b7c81c874f7a 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -164,8 +164,8 @@ static int macvlan_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
164} 164}
165 165
166static int macvlan_hard_header(struct sk_buff *skb, struct net_device *dev, 166static int macvlan_hard_header(struct sk_buff *skb, struct net_device *dev,
167 unsigned short type, void *daddr, void *saddr, 167 unsigned short type, const void *daddr,
168 unsigned len) 168 const void *saddr, unsigned len)
169{ 169{
170 const struct macvlan_dev *vlan = netdev_priv(dev); 170 const struct macvlan_dev *vlan = netdev_priv(dev);
171 struct net_device *lowerdev = vlan->lowerdev; 171 struct net_device *lowerdev = vlan->lowerdev;
@@ -174,6 +174,15 @@ static int macvlan_hard_header(struct sk_buff *skb, struct net_device *dev,
174 saddr ? : dev->dev_addr, len); 174 saddr ? : dev->dev_addr, len);
175} 175}
176 176
177static const struct header_ops macvlan_hard_header_ops = {
178 .create = macvlan_hard_header,
179 .rebuild = eth_rebuild_header,
180 .parse = eth_header_parse,
181 .rebuild = eth_rebuild_header,
182 .cache = eth_header_cache,
183 .cache_update = eth_header_cache_update,
184};
185
177static int macvlan_open(struct net_device *dev) 186static int macvlan_open(struct net_device *dev)
178{ 187{
179 struct macvlan_dev *vlan = netdev_priv(dev); 188 struct macvlan_dev *vlan = netdev_priv(dev);
@@ -295,9 +304,9 @@ static void macvlan_setup(struct net_device *dev)
295 dev->change_mtu = macvlan_change_mtu; 304 dev->change_mtu = macvlan_change_mtu;
296 dev->change_rx_flags = macvlan_change_rx_flags; 305 dev->change_rx_flags = macvlan_change_rx_flags;
297 dev->set_multicast_list = macvlan_set_multicast_list; 306 dev->set_multicast_list = macvlan_set_multicast_list;
298 dev->hard_header = macvlan_hard_header;
299 dev->hard_start_xmit = macvlan_hard_start_xmit; 307 dev->hard_start_xmit = macvlan_hard_start_xmit;
300 dev->destructor = free_netdev; 308 dev->destructor = free_netdev;
309 dev->header_ops = &macvlan_hard_header_ops,
301 dev->ethtool_ops = &macvlan_ethtool_ops; 310 dev->ethtool_ops = &macvlan_ethtool_ops;
302 dev->tx_queue_len = 0; 311 dev->tx_queue_len = 0;
303} 312}