Commit 4fcf9675 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller

[BRIDGE]: dev_xmit cleanup

The br_dev_xmit function was broken in two pieces (needlessly).
Put it back together.
Signed-off-by: default avatarStephen Hemminger <shemminger@osdl.org>
Signed-off-by: default avatarDavid S. Miller <davem@redhat.com>
parent 431ce3dd
......@@ -28,43 +28,29 @@ static struct net_device_stats *br_dev_get_stats(struct net_device *dev)
return &br->statistics;
}
static int __br_dev_xmit(struct sk_buff *skb, struct net_device *dev)
int br_dev_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct net_bridge *br;
unsigned char *dest;
struct net_bridge *br = netdev_priv(dev);
const unsigned char *dest = skb->data;
struct net_bridge_fdb_entry *dst;
br = dev->priv;
br->statistics.tx_packets++;
br->statistics.tx_bytes += skb->len;
dest = skb->mac.raw = skb->data;
skb->mac.raw = skb->data;
skb_pull(skb, ETH_HLEN);
if (dest[0] & 1) {
rcu_read_lock();
if (dest[0] & 1)
br_flood_deliver(br, skb, 0);
return 0;
}
if ((dst = br_fdb_get(br, dest)) != NULL) {
else if ((dst = br_fdb_get(br, dest)) != NULL) {
br_deliver(dst->dst, skb);
br_fdb_put(dst);
return 0;
}
} else
br_flood_deliver(br, skb, 0);
return 0;
}
int br_dev_xmit(struct sk_buff *skb, struct net_device *dev)
{
int ret;
rcu_read_lock();
ret = __br_dev_xmit(skb, dev);
rcu_read_unlock();
return ret;
return 0;
}
static int br_dev_open(struct net_device *dev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment