diff options
Diffstat (limited to 'drivers/net/macvlan.c')
-rw-r--r-- | drivers/net/macvlan.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c index cfb91570cddd..24ea994b6274 100644 --- a/drivers/net/macvlan.c +++ b/drivers/net/macvlan.c | |||
@@ -120,7 +120,7 @@ static int macvlan_broadcast_one(struct sk_buff *skb, | |||
120 | struct net_device *dev = vlan->dev; | 120 | struct net_device *dev = vlan->dev; |
121 | 121 | ||
122 | if (local) | 122 | if (local) |
123 | return vlan->forward(dev, skb); | 123 | return dev_forward_skb(dev, skb); |
124 | 124 | ||
125 | skb->dev = dev; | 125 | skb->dev = dev; |
126 | if (ether_addr_equal_64bits(eth->h_dest, dev->broadcast)) | 126 | if (ether_addr_equal_64bits(eth->h_dest, dev->broadcast)) |
@@ -128,7 +128,7 @@ static int macvlan_broadcast_one(struct sk_buff *skb, | |||
128 | else | 128 | else |
129 | skb->pkt_type = PACKET_MULTICAST; | 129 | skb->pkt_type = PACKET_MULTICAST; |
130 | 130 | ||
131 | return vlan->receive(skb); | 131 | return netif_rx(skb); |
132 | } | 132 | } |
133 | 133 | ||
134 | static u32 macvlan_hash_mix(const struct macvlan_dev *vlan) | 134 | static u32 macvlan_hash_mix(const struct macvlan_dev *vlan) |
@@ -251,7 +251,7 @@ static rx_handler_result_t macvlan_handle_frame(struct sk_buff **pskb) | |||
251 | skb->dev = dev; | 251 | skb->dev = dev; |
252 | skb->pkt_type = PACKET_HOST; | 252 | skb->pkt_type = PACKET_HOST; |
253 | 253 | ||
254 | ret = vlan->receive(skb); | 254 | ret = netif_rx(skb); |
255 | 255 | ||
256 | out: | 256 | out: |
257 | macvlan_count_rx(vlan, len, ret == NET_RX_SUCCESS, 0); | 257 | macvlan_count_rx(vlan, len, ret == NET_RX_SUCCESS, 0); |
@@ -803,10 +803,7 @@ static int macvlan_validate(struct nlattr *tb[], struct nlattr *data[]) | |||
803 | } | 803 | } |
804 | 804 | ||
805 | int macvlan_common_newlink(struct net *src_net, struct net_device *dev, | 805 | int macvlan_common_newlink(struct net *src_net, struct net_device *dev, |
806 | struct nlattr *tb[], struct nlattr *data[], | 806 | struct nlattr *tb[], struct nlattr *data[]) |
807 | int (*receive)(struct sk_buff *skb), | ||
808 | int (*forward)(struct net_device *dev, | ||
809 | struct sk_buff *skb)) | ||
810 | { | 807 | { |
811 | struct macvlan_dev *vlan = netdev_priv(dev); | 808 | struct macvlan_dev *vlan = netdev_priv(dev); |
812 | struct macvlan_port *port; | 809 | struct macvlan_port *port; |
@@ -848,8 +845,6 @@ int macvlan_common_newlink(struct net *src_net, struct net_device *dev, | |||
848 | vlan->lowerdev = lowerdev; | 845 | vlan->lowerdev = lowerdev; |
849 | vlan->dev = dev; | 846 | vlan->dev = dev; |
850 | vlan->port = port; | 847 | vlan->port = port; |
851 | vlan->receive = receive; | ||
852 | vlan->forward = forward; | ||
853 | vlan->set_features = MACVLAN_FEATURES; | 848 | vlan->set_features = MACVLAN_FEATURES; |
854 | 849 | ||
855 | vlan->mode = MACVLAN_MODE_VEPA; | 850 | vlan->mode = MACVLAN_MODE_VEPA; |
@@ -894,9 +889,7 @@ EXPORT_SYMBOL_GPL(macvlan_common_newlink); | |||
894 | static int macvlan_newlink(struct net *src_net, struct net_device *dev, | 889 | static int macvlan_newlink(struct net *src_net, struct net_device *dev, |
895 | struct nlattr *tb[], struct nlattr *data[]) | 890 | struct nlattr *tb[], struct nlattr *data[]) |
896 | { | 891 | { |
897 | return macvlan_common_newlink(src_net, dev, tb, data, | 892 | return macvlan_common_newlink(src_net, dev, tb, data); |
898 | netif_rx, | ||
899 | dev_forward_skb); | ||
900 | } | 893 | } |
901 | 894 | ||
902 | void macvlan_dellink(struct net_device *dev, struct list_head *head) | 895 | void macvlan_dellink(struct net_device *dev, struct list_head *head) |