[PATCH net-next v5 2/9] net: stmmac: xgmac: add more feature parsing from hw cap
From: Jisheng Zhang
Date: Thu Aug 17 2023 - 13:10:31 EST
The XGMAC_HWFEAT_GMIISEL bit also indicates whether support 10/100Mbps
or not.
Signed-off-by: Jisheng Zhang <jszhang@xxxxxxxxxx>
Acked-by: Alexandre TORGUE <alexandre.torgue@xxxxxxxxxxx>
---
drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c
index 3aacf791efeb..1ef8fc132c2d 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c
@@ -410,6 +410,7 @@ static int dwxgmac2_get_hw_feature(void __iomem *ioaddr,
dma_cap->vlhash = (hw_cap & XGMAC_HWFEAT_VLHASH) >> 4;
dma_cap->half_duplex = (hw_cap & XGMAC_HWFEAT_HDSEL) >> 3;
dma_cap->mbps_1000 = (hw_cap & XGMAC_HWFEAT_GMIISEL) >> 1;
+ dma_cap->mbps_10_100 = (hw_cap & XGMAC_HWFEAT_GMIISEL) >> 1;
/* MAC HW feature 1 */
hw_cap = readl(ioaddr + XGMAC_HW_FEATURE1);
--
2.40.1