1 From 99379f587278c818777cb4778e2c79c6c1440c65 Mon Sep 17 00:00:00 2001
2 From: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
3 Date: Tue, 10 Dec 2024 14:18:21 +0000
4 Subject: [PATCH] net: dsa: provide implementation of .support_eee()
6 Provide a trivial implementation for the .support_eee() method which
7 switch drivers can use to simply indicate that they support EEE on
10 Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
11 Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
12 Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
13 Link: https://patch.msgid.link/E1tL149-006cZJ-JJ@rmk-PC.armlinux.org.uk
14 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
16 include/net/dsa.h | 1 +
17 net/dsa/port.c | 16 ++++++++++++++++
18 2 files changed, 17 insertions(+)
20 --- a/include/net/dsa.h
21 +++ b/include/net/dsa.h
22 @@ -1399,5 +1399,6 @@ static inline bool dsa_user_dev_check(co
24 netdev_tx_t dsa_enqueue_skb(struct sk_buff *skb, struct net_device *dev);
25 void dsa_port_phylink_mac_change(struct dsa_switch *ds, int port, bool up);
26 +bool dsa_supports_eee(struct dsa_switch *ds, int port);
31 @@ -1589,6 +1589,22 @@ dsa_port_phylink_mac_select_pcs(struct p
35 +/* dsa_supports_eee - indicate that EEE is supported
36 + * @ds: pointer to &struct dsa_switch
39 + * A default implementation for the .support_eee() DSA operations member,
40 + * which drivers can use to indicate that they support EEE on all of their
45 +bool dsa_supports_eee(struct dsa_switch *ds, int port)
49 +EXPORT_SYMBOL_GPL(dsa_supports_eee);
51 static void dsa_port_phylink_mac_config(struct phylink_config *config,
53 const struct phylink_link_state *state)