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

Luo Jie posted 3 patches 3 months ago
There is a newer version of this series
[PATCH net-next 2/3] net: phy: qcom: qca808x: Support PHY counter
Posted by Luo Jie 3 months ago
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 <quic_luoj@quicinc.com>
---
 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