[PATCH net-next v4 3/3] net: phy: dp83tg720: report inclusive RX packet totals
From: James Hilliard
Date: Fri Nov 13 2026 - 15:54:51 EST
The DP83TG720S-Q1 datasheet describes PKT_STAT_4 and PKT_STAT_5
(0x063c and 0x063d) as the total received packet count, including packets
with errors. The driver currently reports this count through rx_packets,
which is defined as successfully received packets.
Report the accumulated count through rx_packets_total instead. This
exposes it as RxFramesTotal rather than RxFrames in the ethtool phydev
statistics group, matching the hardware counter's semantics.
Fixes: 677d895af1cc ("net: phy: dp83tg720: add statistics support")
Link: https://www.ti.com/lit/ds/symlink/dp83tg720s-q1.pdf
Cc: <stable+noautosel@xxxxxxxxxx> # Requires the new PHY receive-total statistics API
Cc: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>
Signed-off-by: James Hilliard <james.hilliard1@xxxxxxxxx>
---
drivers/net/phy/dp83tg720.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/phy/dp83tg720.c b/drivers/net/phy/dp83tg720.c
index 807ff5525ecd..6c0c8c6007e6 100644
--- a/drivers/net/phy/dp83tg720.c
+++ b/drivers/net/phy/dp83tg720.c
@@ -309,7 +309,7 @@ static void dp83tg720_get_phy_stats(struct phy_device *phydev,
stats->tx_packets = priv->stats.tx_pkt_cnt;
stats->tx_errors = priv->stats.tx_err_pkt_cnt;
- stats->rx_packets = priv->stats.rx_pkt_cnt;
+ stats->rx_packets_total = priv->stats.rx_pkt_cnt;
stats->rx_errors = priv->stats.rx_err_pkt_cnt;
}
--
2.53.0