aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge/br_if.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2007-02-09 09:24:35 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2007-02-11 02:19:23 -0500
commit9d6f229fc45b6ac268020c0c8eff29e94bb34381 (patch)
treec8f514f2f13ea563256d97a2627aac9f89c57bf5 /net/bridge/br_if.c
parent8e87d14255acffeee36873de226dc25c11b5f46d (diff)
[NET] BRIDGE: Fix whitespace errors.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_if.c')
-rw-r--r--net/bridge/br_if.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
index 2b7c2c7dad48..f35c1a378d0f 100644
--- a/net/bridge/br_if.c
+++ b/net/bridge/br_if.c
@@ -47,7 +47,7 @@ static int port_cost(struct net_device *dev)
47 set_fs(KERNEL_DS); 47 set_fs(KERNEL_DS);
48 err = dev_ethtool(&ifr); 48 err = dev_ethtool(&ifr);
49 set_fs(old_fs); 49 set_fs(old_fs);
50 50
51 if (!err) { 51 if (!err) {
52 switch(ecmd.speed) { 52 switch(ecmd.speed) {
53 case SPEED_100: 53 case SPEED_100:
@@ -191,7 +191,7 @@ static void del_br(struct net_bridge *br)
191 del_timer_sync(&br->gc_timer); 191 del_timer_sync(&br->gc_timer);
192 192
193 br_sysfs_delbr(br->dev); 193 br_sysfs_delbr(br->dev);
194 unregister_netdevice(br->dev); 194 unregister_netdevice(br->dev);
195} 195}
196 196
197static struct net_device *new_bridge_dev(const char *name) 197static struct net_device *new_bridge_dev(const char *name)
@@ -201,7 +201,7 @@ static struct net_device *new_bridge_dev(const char *name)
201 201
202 dev = alloc_netdev(sizeof(struct net_bridge), name, 202 dev = alloc_netdev(sizeof(struct net_bridge), name,
203 br_dev_setup); 203 br_dev_setup);
204 204
205 if (!dev) 205 if (!dev)
206 return NULL; 206 return NULL;
207 207
@@ -258,12 +258,12 @@ static int find_portno(struct net_bridge *br)
258} 258}
259 259
260/* called with RTNL but without bridge lock */ 260/* called with RTNL but without bridge lock */
261static struct net_bridge_port *new_nbp(struct net_bridge *br, 261static struct net_bridge_port *new_nbp(struct net_bridge *br,
262 struct net_device *dev) 262 struct net_device *dev)
263{ 263{
264 int index; 264 int index;
265 struct net_bridge_port *p; 265 struct net_bridge_port *p;
266 266
267 index = find_portno(br); 267 index = find_portno(br);
268 if (index < 0) 268 if (index < 0)
269 return ERR_PTR(index); 269 return ERR_PTR(index);
@@ -276,7 +276,7 @@ static struct net_bridge_port *new_nbp(struct net_bridge *br,
276 dev_hold(dev); 276 dev_hold(dev);
277 p->dev = dev; 277 p->dev = dev;
278 p->path_cost = port_cost(dev); 278 p->path_cost = port_cost(dev);
279 p->priority = 0x8000 >> BR_PORT_BITS; 279 p->priority = 0x8000 >> BR_PORT_BITS;
280 p->port_no = index; 280 p->port_no = index;
281 br_init_port(p); 281 br_init_port(p);
282 p->state = BR_STATE_DISABLED; 282 p->state = BR_STATE_DISABLED;
@@ -298,7 +298,7 @@ int br_add_bridge(const char *name)
298 int ret; 298 int ret;
299 299
300 dev = new_bridge_dev(name); 300 dev = new_bridge_dev(name);
301 if (!dev) 301 if (!dev)
302 return -ENOMEM; 302 return -ENOMEM;
303 303
304 rtnl_lock(); 304 rtnl_lock();
@@ -329,7 +329,7 @@ int br_del_bridge(const char *name)
329 329
330 rtnl_lock(); 330 rtnl_lock();
331 dev = __dev_get_by_name(name); 331 dev = __dev_get_by_name(name);
332 if (dev == NULL) 332 if (dev == NULL)
333 ret = -ENXIO; /* Could not find device */ 333 ret = -ENXIO; /* Could not find device */
334 334
335 else if (!(dev->priv_flags & IFF_EBRIDGE)) { 335 else if (!(dev->priv_flags & IFF_EBRIDGE)) {
@@ -340,9 +340,9 @@ int br_del_bridge(const char *name)
340 else if (dev->flags & IFF_UP) { 340 else if (dev->flags & IFF_UP) {
341 /* Not shutdown yet. */ 341 /* Not shutdown yet. */
342 ret = -EBUSY; 342 ret = -EBUSY;
343 } 343 }
344 344
345 else 345 else
346 del_br(netdev_priv(dev)); 346 del_br(netdev_priv(dev));
347 347
348 rtnl_unlock(); 348 rtnl_unlock();
@@ -428,7 +428,7 @@ int br_add_if(struct net_bridge *br, struct net_device *dev)
428 if (err) 428 if (err)
429 goto err0; 429 goto err0;
430 430
431 err = br_fdb_insert(br, p, dev->dev_addr); 431 err = br_fdb_insert(br, p, dev->dev_addr);
432 if (err) 432 if (err)
433 goto err1; 433 goto err1;
434 434
@@ -464,8 +464,8 @@ err0:
464int br_del_if(struct net_bridge *br, struct net_device *dev) 464int br_del_if(struct net_bridge *br, struct net_device *dev)
465{ 465{
466 struct net_bridge_port *p = dev->br_port; 466 struct net_bridge_port *p = dev->br_port;
467 467
468 if (!p || p->br != br) 468 if (!p || p->br != br)
469 return -EINVAL; 469 return -EINVAL;
470 470
471 del_nbp(p); 471 del_nbp(p);