diff options
author | Karel Kočí <cynerd@email.cz> | 2022-10-15 23:01:29 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2022-10-16 13:20:32 +0200 |
commit | 462a088c474832b19ff2730de1e6bea66d399c23 (patch) | |
tree | a512b3b451afde09a9cb06449bd7a3bdc5a8bdb4 /pkgs/patches-linux-5.15/766-04-net-dsa-tag_qca-move-define-to-include-linux-dsa.patch | |
parent | d5514ca4aeddc711639f46024528becfff7c2a70 (diff) | |
download | nixturris-462a088c474832b19ff2730de1e6bea66d399c23.tar.gz nixturris-462a088c474832b19ff2730de1e6bea66d399c23.tar.bz2 nixturris-462a088c474832b19ff2730de1e6bea66d399c23.zip |
Add Turris kernel (includes patches from OpenWrt)
Diffstat (limited to 'pkgs/patches-linux-5.15/766-04-net-dsa-tag_qca-move-define-to-include-linux-dsa.patch')
-rw-r--r-- | pkgs/patches-linux-5.15/766-04-net-dsa-tag_qca-move-define-to-include-linux-dsa.patch | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/pkgs/patches-linux-5.15/766-04-net-dsa-tag_qca-move-define-to-include-linux-dsa.patch b/pkgs/patches-linux-5.15/766-04-net-dsa-tag_qca-move-define-to-include-linux-dsa.patch new file mode 100644 index 0000000..c1e74ce --- /dev/null +++ b/pkgs/patches-linux-5.15/766-04-net-dsa-tag_qca-move-define-to-include-linux-dsa.patch @@ -0,0 +1,71 @@ +From 3ec762fb13c7e7273800b94c80db1c2cc37590d1 Mon Sep 17 00:00:00 2001 +From: Ansuel Smith <ansuelsmth@gmail.com> +Date: Wed, 2 Feb 2022 01:03:23 +0100 +Subject: [PATCH 04/16] net: dsa: tag_qca: move define to include linux/dsa + +Move tag_qca define to include dir linux/dsa as the qca8k require access +to the tagger define to support in-band mdio read/write using ethernet +packet. + +Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> +Reviewed-by: Vladimir Oltean <olteanv@gmail.com> +Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> +Signed-off-by: David S. Miller <davem@davemloft.net> +--- + include/linux/dsa/tag_qca.h | 21 +++++++++++++++++++++ + net/dsa/tag_qca.c | 16 +--------------- + 2 files changed, 22 insertions(+), 15 deletions(-) + create mode 100644 include/linux/dsa/tag_qca.h + +--- /dev/null ++++ b/include/linux/dsa/tag_qca.h +@@ -0,0 +1,21 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ ++ ++#ifndef __TAG_QCA_H ++#define __TAG_QCA_H ++ ++#define QCA_HDR_LEN 2 ++#define QCA_HDR_VERSION 0x2 ++ ++#define QCA_HDR_RECV_VERSION GENMASK(15, 14) ++#define QCA_HDR_RECV_PRIORITY GENMASK(13, 11) ++#define QCA_HDR_RECV_TYPE GENMASK(10, 6) ++#define QCA_HDR_RECV_FRAME_IS_TAGGED BIT(3) ++#define QCA_HDR_RECV_SOURCE_PORT GENMASK(2, 0) ++ ++#define QCA_HDR_XMIT_VERSION GENMASK(15, 14) ++#define QCA_HDR_XMIT_PRIORITY GENMASK(13, 11) ++#define QCA_HDR_XMIT_CONTROL GENMASK(10, 8) ++#define QCA_HDR_XMIT_FROM_CPU BIT(7) ++#define QCA_HDR_XMIT_DP_BIT GENMASK(6, 0) ++ ++#endif /* __TAG_QCA_H */ +--- a/net/dsa/tag_qca.c ++++ b/net/dsa/tag_qca.c +@@ -5,24 +5,10 @@ + + #include <linux/etherdevice.h> + #include <linux/bitfield.h> ++#include <linux/dsa/tag_qca.h> + + #include "dsa_priv.h" + +-#define QCA_HDR_LEN 2 +-#define QCA_HDR_VERSION 0x2 +- +-#define QCA_HDR_RECV_VERSION GENMASK(15, 14) +-#define QCA_HDR_RECV_PRIORITY GENMASK(13, 11) +-#define QCA_HDR_RECV_TYPE GENMASK(10, 6) +-#define QCA_HDR_RECV_FRAME_IS_TAGGED BIT(3) +-#define QCA_HDR_RECV_SOURCE_PORT GENMASK(2, 0) +- +-#define QCA_HDR_XMIT_VERSION GENMASK(15, 14) +-#define QCA_HDR_XMIT_PRIORITY GENMASK(13, 11) +-#define QCA_HDR_XMIT_CONTROL GENMASK(10, 8) +-#define QCA_HDR_XMIT_FROM_CPU BIT(7) +-#define QCA_HDR_XMIT_DP_BIT GENMASK(6, 0) +- + static struct sk_buff *qca_tag_xmit(struct sk_buff *skb, struct net_device *dev) + { + struct dsa_port *dp = dsa_slave_to_port(dev); |