diff options
-rw-r--r-- | include/net/dsa.h | 1 | ||||
-rw-r--r-- | net/dsa/port.c | 16 |
2 files changed, 17 insertions, 0 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h index fa99fc5249e9..877f9b270cf6 100644 --- a/include/net/dsa.h +++ b/include/net/dsa.h @@ -1399,5 +1399,6 @@ static inline bool dsa_user_dev_check(const struct net_device *dev) netdev_tx_t dsa_enqueue_skb(struct sk_buff *skb, struct net_device *dev); void dsa_port_phylink_mac_change(struct dsa_switch *ds, int port, bool up); +bool dsa_supports_eee(struct dsa_switch *ds, int port); #endif diff --git a/net/dsa/port.c b/net/dsa/port.c index 25258b33e59e..9c77c80e8fe9 100644 --- a/net/dsa/port.c +++ b/net/dsa/port.c @@ -1589,6 +1589,22 @@ dsa_port_phylink_mac_select_pcs(struct phylink_config *config, return pcs; } +/* dsa_supports_eee - indicate that EEE is supported + * @ds: pointer to &struct dsa_switch + * @port: port index + * + * A default implementation for the .support_eee() DSA operations member, + * which drivers can use to indicate that they support EEE on all of their + * user ports. + * + * Returns: true + */ +bool dsa_supports_eee(struct dsa_switch *ds, int port) +{ + return true; +} +EXPORT_SYMBOL_GPL(dsa_supports_eee); + static void dsa_port_phylink_mac_config(struct phylink_config *config, unsigned int mode, const struct phylink_link_state *state) |