Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: bcmasp: Fix network filter wake for asp-3.0

We need to apply the tx_chan_offset to the netfilter cfg channel or the
output channel will be incorrect for asp-3.0 and newer.

Fixes: e9f31435ee7d ("net: bcmasp: Add support for asp-v3.0")
Signed-off-by: Justin Chen <justin.chen@broadcom.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://patch.msgid.link/20260120192339.2031648-1-justin.chen@broadcom.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Justin Chen and committed by
Jakub Kicinski
bbb11b8d 5f9b3290

+4 -2
+3 -2
drivers/net/ethernet/broadcom/asp2/bcmasp.c
··· 156 156 ASP_RX_FILTER_NET_OFFSET_L4(32), 157 157 ASP_RX_FILTER_NET_OFFSET(nfilt->hw_index + 1)); 158 158 159 - rx_filter_core_wl(priv, ASP_RX_FILTER_NET_CFG_CH(nfilt->port + 8) | 159 + rx_filter_core_wl(priv, ASP_RX_FILTER_NET_CFG_CH(nfilt->ch) | 160 160 ASP_RX_FILTER_NET_CFG_EN | 161 161 ASP_RX_FILTER_NET_CFG_L2_EN | 162 162 ASP_RX_FILTER_NET_CFG_L3_EN | ··· 166 166 ASP_RX_FILTER_NET_CFG_UMC(nfilt->port), 167 167 ASP_RX_FILTER_NET_CFG(nfilt->hw_index)); 168 168 169 - rx_filter_core_wl(priv, ASP_RX_FILTER_NET_CFG_CH(nfilt->port + 8) | 169 + rx_filter_core_wl(priv, ASP_RX_FILTER_NET_CFG_CH(nfilt->ch) | 170 170 ASP_RX_FILTER_NET_CFG_EN | 171 171 ASP_RX_FILTER_NET_CFG_L2_EN | 172 172 ASP_RX_FILTER_NET_CFG_L3_EN | ··· 714 714 nfilter = &priv->net_filters[open_index]; 715 715 nfilter->claimed = true; 716 716 nfilter->port = intf->port; 717 + nfilter->ch = intf->channel + priv->tx_chan_offset; 717 718 nfilter->hw_index = open_index; 718 719 } 719 720
+1
drivers/net/ethernet/broadcom/asp2/bcmasp.h
··· 348 348 bool wake_filter; 349 349 350 350 int port; 351 + int ch; 351 352 unsigned int hw_index; 352 353 }; 353 354