diff options
Diffstat (limited to 'net/bridge/br_device.c')
-rw-r--r-- | net/bridge/br_device.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c index d9b72fde433c..f564ee99782d 100644 --- a/net/bridge/br_device.c +++ b/net/bridge/br_device.c | |||
@@ -21,10 +21,7 @@ | |||
21 | 21 | ||
22 | static struct net_device_stats *br_dev_get_stats(struct net_device *dev) | 22 | static struct net_device_stats *br_dev_get_stats(struct net_device *dev) |
23 | { | 23 | { |
24 | struct net_bridge *br; | 24 | struct net_bridge *br = netdev_priv(dev); |
25 | |||
26 | br = dev->priv; | ||
27 | |||
28 | return &br->statistics; | 25 | return &br->statistics; |
29 | } | 26 | } |
30 | 27 | ||
@@ -54,9 +51,11 @@ int br_dev_xmit(struct sk_buff *skb, struct net_device *dev) | |||
54 | 51 | ||
55 | static int br_dev_open(struct net_device *dev) | 52 | static int br_dev_open(struct net_device *dev) |
56 | { | 53 | { |
57 | netif_start_queue(dev); | 54 | struct net_bridge *br = netdev_priv(dev); |
58 | 55 | ||
59 | br_stp_enable_bridge(dev->priv); | 56 | br_features_recompute(br); |
57 | netif_start_queue(dev); | ||
58 | br_stp_enable_bridge(br); | ||
60 | 59 | ||
61 | return 0; | 60 | return 0; |
62 | } | 61 | } |
@@ -67,7 +66,7 @@ static void br_dev_set_multicast_list(struct net_device *dev) | |||
67 | 66 | ||
68 | static int br_dev_stop(struct net_device *dev) | 67 | static int br_dev_stop(struct net_device *dev) |
69 | { | 68 | { |
70 | br_stp_disable_bridge(dev->priv); | 69 | br_stp_disable_bridge(netdev_priv(dev)); |
71 | 70 | ||
72 | netif_stop_queue(dev); | 71 | netif_stop_queue(dev); |
73 | 72 | ||
@@ -76,7 +75,7 @@ static int br_dev_stop(struct net_device *dev) | |||
76 | 75 | ||
77 | static int br_change_mtu(struct net_device *dev, int new_mtu) | 76 | static int br_change_mtu(struct net_device *dev, int new_mtu) |
78 | { | 77 | { |
79 | if ((new_mtu < 68) || new_mtu > br_min_mtu(dev->priv)) | 78 | if (new_mtu < 68 || new_mtu > br_min_mtu(netdev_priv(dev))) |
80 | return -EINVAL; | 79 | return -EINVAL; |
81 | 80 | ||
82 | dev->mtu = new_mtu; | 81 | dev->mtu = new_mtu; |