diff options
author | Christian Marangi <ansuelsmth@gmail.com> | 2023-04-17 18:17:23 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-04-19 14:59:15 +0300 |
commit | 3e8b4d6277fd19d98c817576954dd6a4ff3caa2b (patch) | |
tree | 5f0dd62f573f0eb524e1cd6592ecae0fa2d9e9d4 /drivers/net/dsa/qca/qca8k-8xxx.c | |
parent | 158441884772a19e840429e210bfd1879094306b (diff) | |
download | linux-3e8b4d6277fd19d98c817576954dd6a4ff3caa2b.tar.xz |
net: dsa: qca8k: move qca8k_port_to_phy() to header
Move qca8k_port_to_phy() to qca8k header as it's useful for future
reference in Switch LEDs module since the same logic is applied to get
the right index of the switch port.
Make it inline as it's simple function that just decrease the port.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Michal Kubiak <michal.kubiak@intel.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/qca/qca8k-8xxx.c')
-rw-r--r-- | drivers/net/dsa/qca/qca8k-8xxx.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/drivers/net/dsa/qca/qca8k-8xxx.c b/drivers/net/dsa/qca/qca8k-8xxx.c index 62810903f1b3..20acbd0292f1 100644 --- a/drivers/net/dsa/qca/qca8k-8xxx.c +++ b/drivers/net/dsa/qca/qca8k-8xxx.c @@ -772,21 +772,6 @@ err_clear_skb: return ret; } -static u32 -qca8k_port_to_phy(int port) -{ - /* From Andrew Lunn: - * Port 0 has no internal phy. - * Port 1 has an internal PHY at MDIO address 0. - * Port 2 has an internal PHY at MDIO address 1. - * ... - * Port 5 has an internal PHY at MDIO address 4. - * Port 6 has no internal PHY. - */ - - return port - 1; -} - static int qca8k_mdio_busy_wait(struct mii_bus *bus, u32 reg, u32 mask) { |