Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 318915
b: refs/heads/master
c: 8b72ff6
h: refs/heads/master
i:
  318913: 83ed2cd
  318911: 36ce32c
v: v3
  • Loading branch information
Alan Cox authored and David S. Miller committed Jul 24, 2012
1 parent 8405092 commit a5f3a25
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 29 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c66b9b7d365444b433307ebb18734757cb668a02
refs/heads/master: 8b72ff6484fe303e01498b58621810a114f3cf09
51 changes: 23 additions & 28 deletions trunk/net/wanrouter/wanmain.c
Original file line number Diff line number Diff line change
Expand Up @@ -602,36 +602,31 @@ static int wanrouter_device_new_if(struct wan_device *wandev,
* successfully, add it to the interface list.
*/

if (dev->name == NULL) {
err = -EINVAL;
} else {
#ifdef WANDEBUG
printk(KERN_INFO "%s: registering interface %s...\n",
wanrouter_modname, dev->name);
#endif

#ifdef WANDEBUG
printk(KERN_INFO "%s: registering interface %s...\n",
wanrouter_modname, dev->name);
#endif

err = register_netdev(dev);
if (!err) {
struct net_device *slave = NULL;
unsigned long smp_flags=0;

lock_adapter_irq(&wandev->lock, &smp_flags);

if (wandev->dev == NULL) {
wandev->dev = dev;
} else {
for (slave=wandev->dev;
DEV_TO_SLAVE(slave);
slave = DEV_TO_SLAVE(slave))
DEV_TO_SLAVE(slave) = dev;
}
++wandev->ndev;

unlock_adapter_irq(&wandev->lock, &smp_flags);
err = 0; /* done !!! */
goto out;
err = register_netdev(dev);
if (!err) {
struct net_device *slave = NULL;
unsigned long smp_flags=0;

lock_adapter_irq(&wandev->lock, &smp_flags);

if (wandev->dev == NULL) {
wandev->dev = dev;
} else {
for (slave=wandev->dev;
DEV_TO_SLAVE(slave);
slave = DEV_TO_SLAVE(slave))
DEV_TO_SLAVE(slave) = dev;
}
++wandev->ndev;

unlock_adapter_irq(&wandev->lock, &smp_flags);
err = 0; /* done !!! */
goto out;
}
if (wandev->del_if)
wandev->del_if(wandev, dev);
Expand Down

0 comments on commit a5f3a25

Please sign in to comment.