0bf9dea24f0a16a470c79b5915ac548d6f274a32
[openwrt/staging/xback.git] /
1 From: Lorenzo Bianconi <lorenzo@kernel.org>
2 Date: Tue, 12 Sep 2023 10:22:56 +0200
3 Subject: [PATCH] net: ethernet: mtk_eth_soc: rely on mtk_pse_port definitions
4 in mtk_flow_set_output_device
5
6 Similar to ethernet ports, rely on mtk_pse_port definitions for
7 pse wdma ports as well.
8
9 Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
10 Reviewed-by: Simon Horman <horms@kernel.org>
11 Link: https://lore.kernel.org/r/b86bdb717e963e3246c1dec5f736c810703cf056.1694506814.git.lorenzo@kernel.org
12 Signed-off-by: Paolo Abeni <pabeni@redhat.com>
13 ---
14
15 --- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
16 +++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
17 @@ -196,10 +196,10 @@ mtk_flow_set_output_device(struct mtk_et
18 if (mtk_is_netsys_v2_or_greater(eth)) {
19 switch (info.wdma_idx) {
20 case 0:
21 - pse_port = 8;
22 + pse_port = PSE_WDMA0_PORT;
23 break;
24 case 1:
25 - pse_port = 9;
26 + pse_port = PSE_WDMA1_PORT;
27 break;
28 default:
29 return -EINVAL;