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>
		
			
				
	
	
		
			30 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
| From 63f283d36b1fb06b55ae609a1f679544f5f66057 Mon Sep 17 00:00:00 2001
 | |
| From: Lorenzo Bianconi <lorenzo@kernel.org>
 | |
| Date: Fri, 17 Oct 2025 11:06:21 +0200
 | |
| Subject: [PATCH 11/12] net: airoha: ppe: Do not use magic numbers in
 | |
|  airoha_ppe_foe_get_entry_locked()
 | |
| 
 | |
| Explicit the size of entries pointed by hwe pointer in
 | |
| airoha_ppe_foe_get_entry_locked routine
 | |
| 
 | |
| Reviewed-by: Simon Horman <horms@kernel.org>
 | |
| Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
 | |
| Link: https://patch.msgid.link/20251017-an7583-eth-support-v3-12-f28319666667@kernel.org
 | |
| Signed-off-by: Paolo Abeni <pabeni@redhat.com>
 | |
| ---
 | |
|  drivers/net/ethernet/airoha/airoha_ppe.c | 3 ++-
 | |
|  1 file changed, 2 insertions(+), 1 deletion(-)
 | |
| 
 | |
| --- a/drivers/net/ethernet/airoha/airoha_ppe.c
 | |
| +++ b/drivers/net/ethernet/airoha/airoha_ppe.c
 | |
| @@ -619,7 +619,8 @@ airoha_ppe_foe_get_entry_locked(struct a
 | |
|  					     REG_PPE_RAM_CTRL(ppe2)))
 | |
|  			return NULL;
 | |
|  
 | |
| -		for (i = 0; i < sizeof(struct airoha_foe_entry) / 4; i++)
 | |
| +		for (i = 0; i < sizeof(struct airoha_foe_entry) / sizeof(*hwe);
 | |
| +		     i++)
 | |
|  			hwe[i] = airoha_fe_rr(eth,
 | |
|  					      REG_PPE_RAM_ENTRY(ppe2, i));
 | |
|  	}
 |