Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 193615
b: refs/heads/master
c: 93d9b7d
h: refs/heads/master
i:
  193613: 5670d64
  193611: 57b884b
  193607: bd8bab5
  193599: 005a552
v: v3
  • Loading branch information
Jiri Pirko authored and David S. Miller committed Mar 19, 2010
1 parent 35821ab commit 4ab0fdd
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 15 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: 1e94d72feab025b8f7c55d07020602f82f3a97dd
refs/heads/master: 93d9b7d7a85cfb4e1711d5226eba73586dd4919f
6 changes: 4 additions & 2 deletions trunk/drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1480,14 +1480,16 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
bond_dev->name,
bond_dev->type, slave_dev->type);

netdev_bonding_change(bond_dev, NETDEV_BONDING_OLDTYPE);
netdev_bonding_change(bond_dev,
NETDEV_PRE_TYPE_CHANGE);

if (slave_dev->type != ARPHRD_ETHER)
bond_setup_by_slave(bond_dev, slave_dev);
else
ether_setup(bond_dev);

netdev_bonding_change(bond_dev, NETDEV_BONDING_NEWTYPE);
netdev_bonding_change(bond_dev,
NETDEV_POST_TYPE_CHANGE);
}
} else if (bond_dev->type != slave_dev->type) {
pr_err("%s ether type (%d) is different from other slaves (%d), can not enslave it.\n",
Expand Down
4 changes: 2 additions & 2 deletions trunk/include/linux/notifier.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ static inline int notifier_to_errno(int ret)
#define NETDEV_FEAT_CHANGE 0x000B
#define NETDEV_BONDING_FAILOVER 0x000C
#define NETDEV_PRE_UP 0x000D
#define NETDEV_BONDING_OLDTYPE 0x000E
#define NETDEV_BONDING_NEWTYPE 0x000F
#define NETDEV_PRE_TYPE_CHANGE 0x000E
#define NETDEV_POST_TYPE_CHANGE 0x000F
#define NETDEV_POST_INIT 0x0010
#define NETDEV_UNREGISTER_BATCH 0x0011

Expand Down
4 changes: 2 additions & 2 deletions trunk/net/ipv4/devinet.c
Original file line number Diff line number Diff line change
Expand Up @@ -1095,10 +1095,10 @@ static int inetdev_event(struct notifier_block *this, unsigned long event,
case NETDEV_DOWN:
ip_mc_down(in_dev);
break;
case NETDEV_BONDING_OLDTYPE:
case NETDEV_PRE_TYPE_CHANGE:
ip_mc_unmap(in_dev);
break;
case NETDEV_BONDING_NEWTYPE:
case NETDEV_POST_TYPE_CHANGE:
ip_mc_remap(in_dev);
break;
case NETDEV_CHANGEMTU:
Expand Down
16 changes: 8 additions & 8 deletions trunk/net/ipv6/addrconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ static DEFINE_SPINLOCK(addrconf_verify_lock);
static void addrconf_join_anycast(struct inet6_ifaddr *ifp);
static void addrconf_leave_anycast(struct inet6_ifaddr *ifp);

static void addrconf_bonding_change(struct net_device *dev,
unsigned long event);
static void addrconf_type_change(struct net_device *dev,
unsigned long event);
static int addrconf_ifdown(struct net_device *dev, int how);

static void addrconf_dad_start(struct inet6_ifaddr *ifp, u32 flags);
Expand Down Expand Up @@ -2584,9 +2584,9 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,
return notifier_from_errno(err);
}
break;
case NETDEV_BONDING_OLDTYPE:
case NETDEV_BONDING_NEWTYPE:
addrconf_bonding_change(dev, event);
case NETDEV_PRE_TYPE_CHANGE:
case NETDEV_POST_TYPE_CHANGE:
addrconf_type_change(dev, event);
break;
}

Expand All @@ -2601,16 +2601,16 @@ static struct notifier_block ipv6_dev_notf = {
.priority = 0
};

static void addrconf_bonding_change(struct net_device *dev, unsigned long event)
static void addrconf_type_change(struct net_device *dev, unsigned long event)
{
struct inet6_dev *idev;
ASSERT_RTNL();

idev = __in6_dev_get(dev);

if (event == NETDEV_BONDING_NEWTYPE)
if (event == NETDEV_POST_TYPE_CHANGE)
ipv6_mc_remap(idev);
else if (event == NETDEV_BONDING_OLDTYPE)
else if (event == NETDEV_PRE_TYPE_CHANGE)
ipv6_mc_unmap(idev);
}

Expand Down

0 comments on commit 4ab0fdd

Please sign in to comment.