Skip to content

Commit 7b01bb2

Browse files
Russell King (Oracle)harshimogalapalli
authored andcommitted
net: dsa: provide implementation of .support_eee()
commit 99379f5 upstream. Provide a trivial implementation for the .support_eee() method which switch drivers can use to simply indicate that they support EEE on all their user ports. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> Reviewed-by: Vladimir Oltean <olteanv@gmail.com> Link: https://patch.msgid.link/E1tL149-006cZJ-JJ@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> [ Harshit: Resolve contextual conflicts due to missing commit: 5397706 ("net: dsa: remove obsolete phylink dsa_switch operations") and commit: ecb595e ("net: dsa: remove dsa_port_phylink_mac_select_pcs()") in 6.12.y ] Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit cda6c5c095e1997e63ed805ed3191f3d2af806a0) Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
1 parent 29b4220 commit 7b01bb2

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

include/net/dsa.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1399,5 +1399,6 @@ static inline bool dsa_user_dev_check(const struct net_device *dev)
13991399

14001400
netdev_tx_t dsa_enqueue_skb(struct sk_buff *skb, struct net_device *dev);
14011401
void dsa_port_phylink_mac_change(struct dsa_switch *ds, int port, bool up);
1402+
bool dsa_supports_eee(struct dsa_switch *ds, int port);
14021403

14031404
#endif

net/dsa/port.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1589,6 +1589,22 @@ dsa_port_phylink_mac_select_pcs(struct phylink_config *config,
15891589
return pcs;
15901590
}
15911591

1592+
/* dsa_supports_eee - indicate that EEE is supported
1593+
* @ds: pointer to &struct dsa_switch
1594+
* @port: port index
1595+
*
1596+
* A default implementation for the .support_eee() DSA operations member,
1597+
* which drivers can use to indicate that they support EEE on all of their
1598+
* user ports.
1599+
*
1600+
* Returns: true
1601+
*/
1602+
bool dsa_supports_eee(struct dsa_switch *ds, int port)
1603+
{
1604+
return true;
1605+
}
1606+
EXPORT_SYMBOL_GPL(dsa_supports_eee);
1607+
15921608
static void dsa_port_phylink_mac_config(struct phylink_config *config,
15931609
unsigned int mode,
15941610
const struct phylink_link_state *state)

0 commit comments

Comments
 (0)