diff options
Diffstat (limited to 'include/net/eee.h')
-rw-r--r-- | include/net/eee.h | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/include/net/eee.h b/include/net/eee.h index d353b79ae79f..cfab1b8bc46a 100644 --- a/include/net/eee.h +++ b/include/net/eee.h @@ -13,22 +13,19 @@ struct eee_config { static inline bool eeecfg_mac_can_tx_lpi(const struct eee_config *eeecfg) { /* eee_enabled is the master on/off */ - if (!eeecfg->eee_enabled || !eeecfg->tx_lpi_enabled) - return false; - - return true; + return eeecfg->eee_enabled && eeecfg->tx_lpi_enabled; } -static inline void eeecfg_to_eee(const struct eee_config *eeecfg, - struct ethtool_eee *eee) +static inline void eeecfg_to_eee(struct ethtool_keee *eee, + const struct eee_config *eeecfg) { eee->tx_lpi_timer = eeecfg->tx_lpi_timer; eee->tx_lpi_enabled = eeecfg->tx_lpi_enabled; eee->eee_enabled = eeecfg->eee_enabled; } -static inline void eee_to_eeecfg(const struct ethtool_eee *eee, - struct eee_config *eeecfg) +static inline void eee_to_eeecfg(struct eee_config *eeecfg, + const struct ethtool_keee *eee) { eeecfg->tx_lpi_timer = eee->tx_lpi_timer; eeecfg->tx_lpi_enabled = eee->tx_lpi_enabled; |