mirror of
				https://git.openwrt.org/openwrt/openwrt.git
				synced 2025-10-31 16:15:54 +00:00 
			
		
		
		
	Refresh patches 6.12 for airoha and econet Fixes:122135b964("airoha: an7581: add support for kernel 6.12") Fixes:73d0f92460("kernel: Add new platform EcoNet MIPS") Signed-off-by: Leo Barsky <leobrsky@proton.me> Link: https://github.com/openwrt/openwrt/pull/20073 Signed-off-by: Robert Marko <robimarko@gmail.com>
		
			
				
	
	
		
			48 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			48 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
| From 03b1b69f0662c46f258a45e4a7d7837351c11692 Mon Sep 17 00:00:00 2001
 | |
| From: Lorenzo Bianconi <lorenzo@kernel.org>
 | |
| Date: Tue, 4 Mar 2025 15:21:10 +0100
 | |
| Subject: [PATCH 3/6] net: airoha: Introduce airoha_dev_change_mtu callback
 | |
| 
 | |
| Add airoha_dev_change_mtu callback to update the MTU of a running
 | |
| device.
 | |
| 
 | |
| Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
 | |
| Reviewed-by: Simon Horman <horms@kernel.org>
 | |
| Link: https://patch.msgid.link/20250304-airoha-eth-rx-sg-v1-3-283ebc61120e@kernel.org
 | |
| Signed-off-by: Jakub Kicinski <kuba@kernel.org>
 | |
| ---
 | |
|  drivers/net/ethernet/airoha/airoha_eth.c | 15 +++++++++++++++
 | |
|  1 file changed, 15 insertions(+)
 | |
| 
 | |
| --- a/drivers/net/ethernet/airoha/airoha_eth.c
 | |
| +++ b/drivers/net/ethernet/airoha/airoha_eth.c
 | |
| @@ -1705,6 +1705,20 @@ static void airoha_dev_get_stats64(struc
 | |
|  	} while (u64_stats_fetch_retry(&port->stats.syncp, start));
 | |
|  }
 | |
|  
 | |
| +static int airoha_dev_change_mtu(struct net_device *dev, int mtu)
 | |
| +{
 | |
| +	struct airoha_gdm_port *port = netdev_priv(dev);
 | |
| +	struct airoha_eth *eth = port->qdma->eth;
 | |
| +	u32 len = ETH_HLEN + mtu + ETH_FCS_LEN;
 | |
| +
 | |
| +	airoha_fe_rmw(eth, REG_GDM_LEN_CFG(port->id),
 | |
| +		      GDM_LONG_LEN_MASK,
 | |
| +		      FIELD_PREP(GDM_LONG_LEN_MASK, len));
 | |
| +	WRITE_ONCE(dev->mtu, mtu);
 | |
| +
 | |
| +	return 0;
 | |
| +}
 | |
| +
 | |
|  static u16 airoha_dev_select_queue(struct net_device *dev, struct sk_buff *skb,
 | |
|  				   struct net_device *sb_dev)
 | |
|  {
 | |
| @@ -2397,6 +2411,7 @@ static const struct net_device_ops airoh
 | |
|  	.ndo_init		= airoha_dev_init,
 | |
|  	.ndo_open		= airoha_dev_open,
 | |
|  	.ndo_stop		= airoha_dev_stop,
 | |
| +	.ndo_change_mtu		= airoha_dev_change_mtu,
 | |
|  	.ndo_select_queue	= airoha_dev_select_queue,
 | |
|  	.ndo_start_xmit		= airoha_dev_xmit,
 | |
|  	.ndo_get_stats64        = airoha_dev_get_stats64,
 |