[PATCH net-next v2 04/10] net: ethernet: oa_tc6: Export the C45 access functions
From: Ciprian Regus via B4 Relay
Date: Tue May 26 2026 - 17:55:23 EST
From: Ciprian Regus <ciprian.regus@xxxxxxxxxx>
The C45 access functions can still be used by some Ethernet drivers
which set the OA_TC6_BROKEN_PHY flag. Export them.
Signed-off-by: Ciprian Regus <ciprian.regus@xxxxxxxxxx>
---
v2 changelog:
- New patch
---
drivers/net/ethernet/oa_tc6.c | 10 ++++++----
include/linux/oa_tc6.h | 4 ++++
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/oa_tc6.c b/drivers/net/ethernet/oa_tc6.c
index 7ae3639beadd..4a1fd9fd75ab 100644
--- a/drivers/net/ethernet/oa_tc6.c
+++ b/drivers/net/ethernet/oa_tc6.c
@@ -499,8 +499,8 @@ static int oa_tc6_get_phy_c45_mms(int devnum)
}
}
-static int oa_tc6_mdiobus_read_c45(struct mii_bus *bus, int addr, int devnum,
- int regnum)
+int oa_tc6_mdiobus_read_c45(struct mii_bus *bus, int addr, int devnum,
+ int regnum)
{
struct oa_tc6 *tc6 = bus->priv;
u32 regval;
@@ -516,9 +516,10 @@ static int oa_tc6_mdiobus_read_c45(struct mii_bus *bus, int addr, int devnum,
return regval;
}
+EXPORT_SYMBOL_GPL(oa_tc6_mdiobus_read_c45);
-static int oa_tc6_mdiobus_write_c45(struct mii_bus *bus, int addr, int devnum,
- int regnum, u16 val)
+int oa_tc6_mdiobus_write_c45(struct mii_bus *bus, int addr, int devnum,
+ int regnum, u16 val)
{
struct oa_tc6 *tc6 = bus->priv;
int ret;
@@ -529,6 +530,7 @@ static int oa_tc6_mdiobus_write_c45(struct mii_bus *bus, int addr, int devnum,
return oa_tc6_write_register(tc6, (ret << 16) | regnum, val);
}
+EXPORT_SYMBOL_GPL(oa_tc6_mdiobus_write_c45);
static int oa_tc6_mdiobus_register(struct oa_tc6 *tc6)
{
diff --git a/include/linux/oa_tc6.h b/include/linux/oa_tc6.h
index 6c38bf49e2a7..95e041d7d77b 100644
--- a/include/linux/oa_tc6.h
+++ b/include/linux/oa_tc6.h
@@ -32,3 +32,7 @@ int oa_tc6_read_registers(struct oa_tc6 *tc6, u32 address, u32 value[],
u8 length);
netdev_tx_t oa_tc6_start_xmit(struct oa_tc6 *tc6, struct sk_buff *skb);
int oa_tc6_zero_align_receive_frame_enable(struct oa_tc6 *tc6);
+int oa_tc6_mdiobus_read_c45(struct mii_bus *bus, int addr, int devnum,
+ int regnum);
+int oa_tc6_mdiobus_write_c45(struct mii_bus *bus, int addr, int devnum,
+ int regnum, u16 val);
--
2.43.0