net: dsa: introduce dsa_phylink_to_port()
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Wed, 10 Apr 2024 19:42:38 +0000 (20:42 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 12 Apr 2024 03:01:14 +0000 (20:01 -0700)
commitdd0c9855b41310470086500c9963bbb64bb90dd0
treef4098e187a9818d6abe8d8977f9b4c5c12b7403c
parentf7ac8fbd3215e72824c08b53cd2ff272d42eb823
net: dsa: introduce dsa_phylink_to_port()

We convert from a phylink_config struct to a dsa_port struct in many
places, let's provide a helper for this.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Link: https://lore.kernel.org/r/E1rudqA-006K9B-85@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/dsa.h
net/dsa/port.c