Skip to content

Commit acf942d

Browse files
Ryceancurrygregkh
authored andcommitted
net: bcmasp: Fix network filter wake for asp-3.0
commit bbb11b8 upstream. 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: e9f3143 ("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 1c0a49c commit acf942d

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

drivers/net/ethernet/broadcom/asp2/bcmasp.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ static void bcmasp_netfilt_hw_en_wake(struct bcmasp_priv *priv,
156156
ASP_RX_FILTER_NET_OFFSET_L4(32),
157157
ASP_RX_FILTER_NET_OFFSET(nfilt->hw_index + 1));
158158

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) |
160160
ASP_RX_FILTER_NET_CFG_EN |
161161
ASP_RX_FILTER_NET_CFG_L2_EN |
162162
ASP_RX_FILTER_NET_CFG_L3_EN |
@@ -166,7 +166,7 @@ static void bcmasp_netfilt_hw_en_wake(struct bcmasp_priv *priv,
166166
ASP_RX_FILTER_NET_CFG_UMC(nfilt->port),
167167
ASP_RX_FILTER_NET_CFG(nfilt->hw_index));
168168

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) |
170170
ASP_RX_FILTER_NET_CFG_EN |
171171
ASP_RX_FILTER_NET_CFG_L2_EN |
172172
ASP_RX_FILTER_NET_CFG_L3_EN |
@@ -714,6 +714,7 @@ struct bcmasp_net_filter *bcmasp_netfilt_get_init(struct bcmasp_intf *intf,
714714
nfilter = &priv->net_filters[open_index];
715715
nfilter->claimed = true;
716716
nfilter->port = intf->port;
717+
nfilter->ch = intf->channel + priv->tx_chan_offset;
717718
nfilter->hw_index = open_index;
718719
}
719720

drivers/net/ethernet/broadcom/asp2/bcmasp.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ struct bcmasp_net_filter {
348348
bool wake_filter;
349349

350350
int port;
351+
int ch;
351352
unsigned int hw_index;
352353
};
353354

0 commit comments

Comments
 (0)