I am reading RTL_ReakTek driver code for NIC driver r8169 and it does some phy registers writing/phy config register writing/ with functions like these
phy