summaryrefslogtreecommitdiffstats
path: root/include/net/bonding.h
diff options
context:
space:
mode:
authorMoni Shoua <monis@mellanox.com>2015-02-03 15:48:30 +0100
committerDavid S. Miller <davem@davemloft.net>2015-02-05 01:14:24 +0100
commit69a2338e05995b10225b2a131f7540d1305980e4 (patch)
treeb18f6fbe1d3188505bdf1aeffba4fd493febb36b /include/net/bonding.h
parentnet/core: Add event for a change in slave state (diff)
downloadlinux-69a2338e05995b10225b2a131f7540d1305980e4.tar.xz
linux-69a2338e05995b10225b2a131f7540d1305980e4.zip
net/bonding: Move slave state changes to a helper function
Move slave state changes to a helper function, this is a pre-step for adding functionality of dispatching an event when this helper is called. This commit doesn't add new functionality. Signed-off-by: Moni Shoua <monis@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/bonding.h')
-rw-r--r--include/net/bonding.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/bonding.h b/include/net/bonding.h
index 29f53eacac0a..d1367ec74933 100644
--- a/include/net/bonding.h
+++ b/include/net/bonding.h
@@ -490,6 +490,11 @@ static inline bool bond_is_slave_inactive(struct slave *slave)
return slave->inactive;
}
+static inline void bond_set_slave_link_state(struct slave *slave, int state)
+{
+ slave->link = state;
+}
+
static inline __be32 bond_confirm_addr(struct net_device *dev, __be32 dst, __be32 local)
{
struct in_device *in_dev;