mirror of
				https://git.openwrt.org/openwrt/openwrt.git
				synced 2025-10-31 13:55:59 +00:00 
			
		
		
		
	Backport upstream patch for AN7583 Ethernet support. While at it also backport some additional fixes required to apply the AN7583 patches cleanly. Refresh all affected patch automatically (aside from the XSI patch that changed the implementation) Link: https://github.com/openwrt/openwrt/pull/20489 Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
		
			
				
	
	
		
			35 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
| From 331f8a8bea22aecf99437f3561453a85f40026de Mon Sep 17 00:00:00 2001
 | |
| From: Lorenzo Bianconi <lorenzo@kernel.org>
 | |
| Date: Mon, 13 Oct 2025 16:29:41 +0200
 | |
| Subject: [PATCH] net: airoha: Add missing stats to ethtool_eth_mac_stats
 | |
| 
 | |
| Add the following stats to ethtool ethtool_eth_mac_stats stats:
 | |
| - FramesTransmittedOK
 | |
| - OctetsTransmittedOK
 | |
| - FramesReceivedOK
 | |
| - OctetsReceivedOK
 | |
| 
 | |
| Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
 | |
| Reviewed-by: Andrew Lunn <andrew@lunn.ch>
 | |
| Link: https://patch.msgid.link/20251013-airoha-ethtool-improvements-v1-1-fdd1c6fc9be1@kernel.org
 | |
| Signed-off-by: Jakub Kicinski <kuba@kernel.org>
 | |
| ---
 | |
|  drivers/net/ethernet/airoha/airoha_eth.c | 4 ++++
 | |
|  1 file changed, 4 insertions(+)
 | |
| 
 | |
| --- a/drivers/net/ethernet/airoha/airoha_eth.c
 | |
| +++ b/drivers/net/ethernet/airoha/airoha_eth.c
 | |
| @@ -2027,8 +2027,12 @@ static void airoha_ethtool_get_mac_stats
 | |
|  	airoha_update_hw_stats(port);
 | |
|  	do {
 | |
|  		start = u64_stats_fetch_begin(&port->stats.syncp);
 | |
| +		stats->FramesTransmittedOK = port->stats.tx_ok_pkts;
 | |
| +		stats->OctetsTransmittedOK = port->stats.tx_ok_bytes;
 | |
|  		stats->MulticastFramesXmittedOK = port->stats.tx_multicast;
 | |
|  		stats->BroadcastFramesXmittedOK = port->stats.tx_broadcast;
 | |
| +		stats->FramesReceivedOK = port->stats.rx_ok_pkts;
 | |
| +		stats->OctetsReceivedOK = port->stats.rx_ok_bytes;
 | |
|  		stats->BroadcastFramesReceivedOK = port->stats.rx_broadcast;
 | |
|  	} while (u64_stats_fetch_retry(&port->stats.syncp, start));
 | |
|  }
 |