Thread (6 messages) flat view 6 messages, 2 authors, 2025-07-09
STALE419d

[PATCH net-next 2/3] net: phy: qcom: qca808x: Support PHY counter

From: Luo Jie <hidden>
Date: 2025-07-08 16:08:59
Also in: linux-arm-msm, lkml
Subsystem: arm/qualcomm mailing list, ethernet phy library, networking drivers, the rest · Maintainers: Andrew Lunn, Heiner Kallweit, Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

Enable CRC checking for received and transmitted frames within the
config_init() function to support counter recording, and incorporate
PHY counter operations.

Signed-off-by: Luo Jie <redacted>
---
 drivers/net/phy/qcom/qca808x.c | 7 +++++++
 1 file changed, 7 insertions(+)
diff --git a/drivers/net/phy/qcom/qca808x.c b/drivers/net/phy/qcom/qca808x.c
index 71498c518f0f..06967ce54036 100644
--- a/drivers/net/phy/qcom/qca808x.c
+++ b/drivers/net/phy/qcom/qca808x.c
@@ -243,6 +243,10 @@ static int qca808x_config_init(struct phy_device *phydev)
 
 	qca808x_fill_possible_interfaces(phydev);
 
+	ret = qcom_phy_counter_crc_check_en(phydev);
+	if (ret)
+		return ret;
+
 	/* Configure adc threshold as 100mv for the link 10M */
 	return at803x_debug_reg_mask(phydev, QCA808X_PHY_DEBUG_ADC_THRESHOLD,
 				     QCA808X_ADC_THRESHOLD_MASK,
@@ -651,6 +655,9 @@ static struct phy_driver qca808x_driver[] = {
 	.led_hw_control_set	= qca808x_led_hw_control_set,
 	.led_hw_control_get	= qca808x_led_hw_control_get,
 	.led_polarity_set	= qca808x_led_polarity_set,
+	.get_sset_count		= qcom_phy_get_sset_count,
+	.get_strings		= qcom_phy_get_strings,
+	.get_stats		= qcom_phy_get_stats,
 }, };
 
 module_phy_driver(qca808x_driver);
-- 
2.34.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help