diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2009-11-23 16:06:30 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-24 10:58:53 -0800 |
commit | eb50c0d67fe3c5513c717c2dee6d9771c51be703 (patch) | |
tree | 449f56f6c8fac242be9ac57663ad98128524b404 /drivers/net/sfc/net_driver.h | |
parent | e775fb93a880d218ce0b3fd405278dd78f86c405 (diff) |
sfc: Gather link state fields in struct efx_nic into new struct efx_link_state
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/net_driver.h')
-rw-r--r-- | drivers/net/sfc/net_driver.h | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/drivers/net/sfc/net_driver.h b/drivers/net/sfc/net_driver.h index 55d45a77a10..f2df32423c9 100644 --- a/drivers/net/sfc/net_driver.h +++ b/drivers/net/sfc/net_driver.h @@ -419,7 +419,7 @@ enum phy_type { PHY_TYPE_MAX /* Insert any new items before this */ }; -#define EFX_IS10G(efx) ((efx)->link_speed == 10000) +#define EFX_IS10G(efx) ((efx)->link_state.speed == 10000) enum nic_state { STATE_INIT = 0, @@ -468,6 +468,20 @@ enum efx_mac_type { }; /** + * struct efx_link_state - Current state of the link + * @up: Link is up + * @fd: Link is full-duplex + * @fc: Actual flow control flags + * @speed: Link speed (Mbps) + */ +struct efx_link_state { + bool up; + bool fd; + enum efx_fc_type fc; + unsigned int speed; +}; + +/** * struct efx_mac_operations - Efx MAC operations table * @reconfigure: Reconfigure MAC. Serialised by the mac_lock * @update_stats: Update statistics @@ -691,10 +705,7 @@ union efx_multicast_hash { * @mdio: PHY MDIO interface * @phy_mode: PHY operating mode. Serialised by @mac_lock. * @mac_up: MAC link state - * @link_up: Link status - * @link_fd: Link is full duplex - * @link_fc: Actualy flow control flags - * @link_speed: Link speed (Mbps) + * @link_state: Current state of the link * @n_link_state_changes: Number of times the link has changed state * @promiscuous: Promiscuous flag. Protected by netif_tx_lock. * @multicast_hash: Multicast hash table @@ -780,10 +791,7 @@ struct efx_nic { enum efx_phy_mode phy_mode; bool mac_up; - bool link_up; - bool link_fd; - enum efx_fc_type link_fc; - unsigned int link_speed; + struct efx_link_state link_state; unsigned int n_link_state_changes; bool promiscuous; |