aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_3ad.h
diff options
context:
space:
mode:
authorHolger Eitzenberger <holger@eitzenberger.org>2008-12-17 22:07:38 -0500
committerDavid S. Miller <davem@davemloft.net>2008-12-17 22:07:38 -0500
commit1055c9aba3b6850245fe3bbb533d4747e7f904bf (patch)
tree083ad0cd7984031d5b82d459052c17065f617ace /drivers/net/bonding/bond_3ad.h
parentaa3128199dbe07b5be3382de590c59216f91d3e3 (diff)
bonding: introduce and use port_params structure
It generally helps to handle those values in various places, using it might make the code more readable and gives room for other improvements. The IEEE standard talks about them as "parameter values". Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding/bond_3ad.h')
-rw-r--r--drivers/net/bonding/bond_3ad.h25
1 files changed, 13 insertions, 12 deletions
diff --git a/drivers/net/bonding/bond_3ad.h b/drivers/net/bonding/bond_3ad.h
index a803fe05f63e..d5332cc6deea 100644
--- a/drivers/net/bonding/bond_3ad.h
+++ b/drivers/net/bonding/bond_3ad.h
@@ -199,6 +199,15 @@ typedef struct aggregator {
199 u16 num_of_ports; 199 u16 num_of_ports;
200} aggregator_t; 200} aggregator_t;
201 201
202struct port_params {
203 struct mac_addr system;
204 u16 system_priority;
205 u16 key;
206 u16 port_number;
207 u16 port_priority;
208 u16 port_state;
209};
210
202// port structure(43.4.6 in the 802.3ad standard) 211// port structure(43.4.6 in the 802.3ad standard)
203typedef struct port { 212typedef struct port {
204 u16 actor_port_number; 213 u16 actor_port_number;
@@ -211,18 +220,10 @@ typedef struct port {
211 u16 actor_oper_port_key; 220 u16 actor_oper_port_key;
212 u8 actor_admin_port_state; 221 u8 actor_admin_port_state;
213 u8 actor_oper_port_state; 222 u8 actor_oper_port_state;
214 struct mac_addr partner_admin_system; 223
215 struct mac_addr partner_oper_system; 224 struct port_params partner_admin;
216 u16 partner_admin_system_priority; 225 struct port_params partner_oper;
217 u16 partner_oper_system_priority; 226
218 u16 partner_admin_key;
219 u16 partner_oper_key;
220 u16 partner_admin_port_number;
221 u16 partner_oper_port_number;
222 u16 partner_admin_port_priority;
223 u16 partner_oper_port_priority;
224 u8 partner_admin_port_state;
225 u8 partner_oper_port_state;
226 u16 is_enabled; // BOOLEAN 227 u16 is_enabled; // BOOLEAN
227 // ****** PRIVATE PARAMETERS ****** 228 // ****** PRIVATE PARAMETERS ******
228 u16 sm_vars; // all state machines variables for this port 229 u16 sm_vars; // all state machines variables for this port