From 71472ec12c61dd305ab4d11822af7ecc4f9717f9 Mon Sep 17 00:00:00 2001 From: Jiri Pirko Date: Tue, 10 Apr 2012 05:15:44 +0000 Subject: team: add user_linkup and user_linkup_enabled per-port option Allows userspace to setup linkup for ports. Default is to take linkup directly from ethtool state. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller --- include/linux/if_team.h | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) (limited to 'include') diff --git a/include/linux/if_team.h b/include/linux/if_team.h index 78c84fd9a170..5fd5ab171165 100644 --- a/include/linux/if_team.h +++ b/include/linux/if_team.h @@ -33,6 +33,24 @@ struct team_port { struct team *team; int index; + bool linkup; /* either state.linkup or user.linkup */ + + struct { + bool linkup; + u32 speed; + u8 duplex; + } state; + + /* Values set by userspace */ + struct { + bool linkup; + bool linkup_enabled; + } user; + + /* Custom gennetlink interface related flags */ + bool changed; + bool removed; + /* * A place for storing original values of the device before it * become a port. @@ -42,14 +60,6 @@ struct team_port { unsigned int mtu; } orig; - bool linkup; - u32 speed; - u8 duplex; - - /* Custom gennetlink interface related flags */ - bool changed; - bool removed; - struct rcu_head rcu; }; -- cgit