]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net: bcmasp: Fix network filter wake for asp-3.0
authorJustin Chen <justin.chen@broadcom.com>
Tue, 20 Jan 2026 19:23:39 +0000 (11:23 -0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 22 Jan 2026 03:29:52 +0000 (19:29 -0800)
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>
drivers/net/ethernet/broadcom/asp2/bcmasp.c
drivers/net/ethernet/broadcom/asp2/bcmasp.h

index fd35f4b4dc50bb016605d6a6201a624122d63d19..014340f33345a0e1f475a64b56dec268e92c1ca5 100644 (file)
@@ -156,7 +156,7 @@ static void bcmasp_netfilt_hw_en_wake(struct bcmasp_priv *priv,
                          ASP_RX_FILTER_NET_OFFSET_L4(32),
                          ASP_RX_FILTER_NET_OFFSET(nfilt->hw_index + 1));
 
-       rx_filter_core_wl(priv, ASP_RX_FILTER_NET_CFG_CH(nfilt->port + 8) |
+       rx_filter_core_wl(priv, ASP_RX_FILTER_NET_CFG_CH(nfilt->ch) |
                          ASP_RX_FILTER_NET_CFG_EN |
                          ASP_RX_FILTER_NET_CFG_L2_EN |
                          ASP_RX_FILTER_NET_CFG_L3_EN |
@@ -166,7 +166,7 @@ static void bcmasp_netfilt_hw_en_wake(struct bcmasp_priv *priv,
                          ASP_RX_FILTER_NET_CFG_UMC(nfilt->port),
                          ASP_RX_FILTER_NET_CFG(nfilt->hw_index));
 
-       rx_filter_core_wl(priv, ASP_RX_FILTER_NET_CFG_CH(nfilt->port + 8) |
+       rx_filter_core_wl(priv, ASP_RX_FILTER_NET_CFG_CH(nfilt->ch) |
                          ASP_RX_FILTER_NET_CFG_EN |
                          ASP_RX_FILTER_NET_CFG_L2_EN |
                          ASP_RX_FILTER_NET_CFG_L3_EN |
@@ -714,6 +714,7 @@ struct bcmasp_net_filter *bcmasp_netfilt_get_init(struct bcmasp_intf *intf,
                nfilter = &priv->net_filters[open_index];
                nfilter->claimed = true;
                nfilter->port = intf->port;
+               nfilter->ch = intf->channel + priv->tx_chan_offset;
                nfilter->hw_index = open_index;
        }
 
index 74adfdb50e11d2828338d6dea6dfff6635f7379a..e238507be40afd211a3247a950402881c9fbc401 100644 (file)
@@ -348,6 +348,7 @@ struct bcmasp_net_filter {
        bool                            wake_filter;
 
        int                             port;
+       int                             ch;
        unsigned int                    hw_index;
 };