[PATCH 2/2] net: atlantic: AQC113: Limit multicast filters to avaiable slots
From: Janne Grunau
Date: Mon Oct 26 2026 - 12:28:54 EST
Since commit 6c1ca112a6e4 ("net: atlantic: fix AQC113 HW init: ART,
L2 filter slot, MAC address") hw_atl2_hw_multicast_list_set() uses L2
filter slot above the firmware-assigned L2 filter slot for the MAC
address. The count is still limited by (HW_ATL2_MAC_MAX -
HW_ATL2_MAC_MIN) which could in setting out of bounds filter slots.
Limit the count instead against the firmware supplied `l2_filter_count`.
Fixes: 6c1ca112a6e4 ("net: atlantic: fix AQC113 HW init: ART, L2 filter slot, MAC address")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Janne Grunau <j@xxxxxxxxxx>
---
drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2.c b/drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2.c
index 82be3bb2e76d..41c653c14e5a 100644
--- a/drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2.c
+++ b/drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2.c
@@ -780,7 +780,7 @@ static int hw_atl2_hw_multicast_list_set(struct aq_hw_s *self,
struct aq_nic_cfg_s *cfg = self->aq_nic_cfg;
int err = 0;
- if (count > (HW_ATL2_MAC_MAX - HW_ATL2_MAC_MIN)) {
+ if (count > (priv->l2_filter_count - 1)) {
err = -EBADRQC;
goto err_exit;
}
--
2.56.0