diff options
Diffstat (limited to 'net/bridge')
-rw-r--r-- | net/bridge/br_device.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c index ca04163635da..7893d641775b 100644 --- a/net/bridge/br_device.c +++ b/net/bridge/br_device.c | |||
@@ -88,11 +88,18 @@ out: | |||
88 | static int br_dev_init(struct net_device *dev) | 88 | static int br_dev_init(struct net_device *dev) |
89 | { | 89 | { |
90 | struct net_bridge *br = netdev_priv(dev); | 90 | struct net_bridge *br = netdev_priv(dev); |
91 | int i; | ||
91 | 92 | ||
92 | br->stats = alloc_percpu(struct br_cpu_netstats); | 93 | br->stats = alloc_percpu(struct br_cpu_netstats); |
93 | if (!br->stats) | 94 | if (!br->stats) |
94 | return -ENOMEM; | 95 | return -ENOMEM; |
95 | 96 | ||
97 | for_each_possible_cpu(i) { | ||
98 | struct br_cpu_netstats *br_dev_stats; | ||
99 | br_dev_stats = per_cpu_ptr(br->stats, i); | ||
100 | u64_stats_init(&br_dev_stats->syncp); | ||
101 | } | ||
102 | |||
96 | return 0; | 103 | return 0; |
97 | } | 104 | } |
98 | 105 | ||