From 1f068588efddf0175e954ffc07ec8478bddd52c7 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Fri, 18 Aug 2017 18:11:52 +0200 Subject: mediatek: update to latest kernel patchset from v4.13-rc Signed-off-by: Muciri Gatimu Signed-off-by: Shashidhar Lakkavalli Signed-off-by: John Crispin --- ...g_mtk-add-flow_dissect-callback-to-the-op.patch | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 target/linux/mediatek/patches-4.9/0040-net-next-tag_mtk-add-flow_dissect-callback-to-the-op.patch (limited to 'target/linux/mediatek/patches-4.9/0040-net-next-tag_mtk-add-flow_dissect-callback-to-the-op.patch') diff --git a/target/linux/mediatek/patches-4.9/0040-net-next-tag_mtk-add-flow_dissect-callback-to-the-op.patch b/target/linux/mediatek/patches-4.9/0040-net-next-tag_mtk-add-flow_dissect-callback-to-the-op.patch new file mode 100644 index 0000000000..da98a21380 --- /dev/null +++ b/target/linux/mediatek/patches-4.9/0040-net-next-tag_mtk-add-flow_dissect-callback-to-the-op.patch @@ -0,0 +1,39 @@ +From 9d6806e16e5ea68a49225da1ab065ef0b5d7704b Mon Sep 17 00:00:00 2001 +From: John Crispin +Date: Mon, 7 Aug 2017 16:55:56 +0200 +Subject: [PATCH 40/57] net-next: tag_mtk: add flow_dissect callback to the ops + struct + +The MT7530 inserts the 4 magic header in between the 802.3 address and +protocol field. The patch implements the callback that can be called by +the flow dissector to figure out the real protocol and offset of the +network header. With this patch applied we can properly parse the packet +and thus make hashing function properly. + +Signed-off-by: John Crispin +--- + net/dsa/tag_mtk.c | 14 ++++++++++++-- + 1 file changed, 12 insertions(+), 2 deletions(-) + +--- a/net/dsa/tag_mtk.c ++++ b/net/dsa/tag_mtk.c +@@ -111,7 +111,17 @@ out: + return 0; + } + ++static int mtk_tag_flow_dissect(const struct sk_buff *skb, __be16 *proto, ++ int *offset) ++{ ++ *offset = 4; ++ *proto = ((__be16 *)skb->data)[1]; ++ ++ return 0; ++} ++ + const struct dsa_device_ops mtk_netdev_ops = { +- .xmit = mtk_tag_xmit, +- .rcv = mtk_tag_rcv, ++ .xmit = mtk_tag_xmit, ++ .rcv = mtk_tag_rcv, ++ .flow_dissect = mtk_tag_flow_dissect, + }; -- cgit v1.2.3