diff options
author | Holger Eitzenberger <holger@eitzenberger.org> | 2008-12-17 19:07:38 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-17 19:07:38 -0800 |
commit | 1055c9aba3b6850245fe3bbb533d4747e7f904bf (patch) | |
tree | 083ad0cd7984031d5b82d459052c17065f617ace /drivers/net/bonding/bond_3ad.h | |
parent | aa3128199dbe07b5be3382de590c59216f91d3e3 (diff) | |
download | linux-3.10-1055c9aba3b6850245fe3bbb533d4747e7f904bf.tar.gz linux-3.10-1055c9aba3b6850245fe3bbb533d4747e7f904bf.tar.bz2 linux-3.10-1055c9aba3b6850245fe3bbb533d4747e7f904bf.zip |
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.h | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/drivers/net/bonding/bond_3ad.h b/drivers/net/bonding/bond_3ad.h index a803fe05f63..d5332cc6dee 100644 --- a/drivers/net/bonding/bond_3ad.h +++ b/drivers/net/bonding/bond_3ad.h @@ -199,6 +199,15 @@ typedef struct aggregator { u16 num_of_ports; } aggregator_t; +struct port_params { + struct mac_addr system; + u16 system_priority; + u16 key; + u16 port_number; + u16 port_priority; + u16 port_state; +}; + // port structure(43.4.6 in the 802.3ad standard) typedef struct port { u16 actor_port_number; @@ -211,18 +220,10 @@ typedef struct port { u16 actor_oper_port_key; u8 actor_admin_port_state; u8 actor_oper_port_state; - struct mac_addr partner_admin_system; - struct mac_addr partner_oper_system; - u16 partner_admin_system_priority; - u16 partner_oper_system_priority; - u16 partner_admin_key; - u16 partner_oper_key; - u16 partner_admin_port_number; - u16 partner_oper_port_number; - u16 partner_admin_port_priority; - u16 partner_oper_port_priority; - u8 partner_admin_port_state; - u8 partner_oper_port_state; + + struct port_params partner_admin; + struct port_params partner_oper; + u16 is_enabled; // BOOLEAN // ****** PRIVATE PARAMETERS ****** u16 sm_vars; // all state machines variables for this port |