aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/net/ethernet/microchip/lan743x_main.h
diff options
context:
space:
mode:
authorPavithra Sathyanarayanan <Pavithra.Sathyanarayanan@microchip.com>2023-01-17 19:46:13 +0530
committerPaolo Abeni <pabeni@redhat.com>2023-01-19 13:50:11 +0100
commite86c721090e38ebf09c591682ffd70185c8bffaf (patch)
tree3f1abd07d3eef0fbb9bb38e9bf55a0b3c166ced8 /drivers/net/ethernet/microchip/lan743x_main.h
parentnet: lan743x: remove unwanted interface select settings (diff)
downloadwireguard-linux-e86c721090e38ebf09c591682ffd70185c8bffaf.tar.xz
wireguard-linux-e86c721090e38ebf09c591682ffd70185c8bffaf.zip
net: lan743x: add generic implementation for phy interface selection
Add logic to read the Phy interface from MAC_CR register for LAN743x driver. Checks for the LAN7430/31 or pci11x1x devices and the adapter interface is updated accordingly. For LAN7431, adapter interface is set based on Bit 19 of MAC_CR register as MII or RGMII which removes the forced RGMII/GMII configurations in lan743x_phy_open(). Signed-off-by: Pavithra Sathyanarayanan <Pavithra.Sathyanarayanan@microchip.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers/net/ethernet/microchip/lan743x_main.h')
-rw-r--r--drivers/net/ethernet/microchip/lan743x_main.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/microchip/lan743x_main.h b/drivers/net/ethernet/microchip/lan743x_main.h
index 8438c3dbcf36..52609fc13ad9 100644
--- a/drivers/net/ethernet/microchip/lan743x_main.h
+++ b/drivers/net/ethernet/microchip/lan743x_main.h
@@ -1042,6 +1042,7 @@ struct lan743x_adapter {
#define LAN743X_ADAPTER_FLAG_OTP BIT(0)
u32 flags;
u32 hw_cfg;
+ phy_interface_t phy_interface;
};
#define LAN743X_COMPONENT_FLAG_RX(channel) BIT(20 + (channel))