blob: 034c688b564963f7262669ebb65d729d8a19a088 [file] [log] [blame]
From ae07baf1efdbd3705be90691b5ae606057b225b0 Mon Sep 17 00:00:00 2001
From: "neal.yen" <neal.yen@mediatek.com>
Date: Fri, 26 Jul 2024 15:05:19 +0800
Subject: [PATCH] 999-2742-drivers-net-dsa-mxl862xx
---
drivers/net/dsa/Kconfig | 2 ++
drivers/net/dsa/Makefile | 1 +
include/net/dsa.h | 4 ++++
net/dsa/Kconfig | 13 +++++++++++++
net/dsa/Makefile | 2 ++
6 files changed, 23 insertions(+)
diff --git a/drivers/net/dsa/Kconfig b/drivers/net/dsa/Kconfig
index a15dd0d..13ef0f0 100644
--- a/drivers/net/dsa/Kconfig
+++ b/drivers/net/dsa/Kconfig
@@ -54,6 +54,8 @@ source "drivers/net/dsa/microchip/Kconfig"
source "drivers/net/dsa/mv88e6xxx/Kconfig"
+source "drivers/net/dsa/mxl862xx/Kconfig"
+
source "drivers/net/dsa/sja1105/Kconfig"
config NET_DSA_QCA8K
diff --git a/drivers/net/dsa/Makefile b/drivers/net/dsa/Makefile
index c36e793..263c052 100644
--- a/drivers/net/dsa/Makefile
+++ b/drivers/net/dsa/Makefile
@@ -23,3 +23,4 @@ obj-y += b53/
obj-y += microchip/
obj-y += mv88e6xxx/
obj-y += sja1105/
+obj-y += mxl862xx/
diff --git a/include/net/dsa.h b/include/net/dsa.h
index 65cfa41..0c138e5 100644
--- a/include/net/dsa.h
+++ b/include/net/dsa.h
@@ -44,6 +44,8 @@ struct phylink_link_state;
#define DSA_TAG_PROTO_KSZ8795_VALUE 14
#define DSA_TAG_PROTO_RTL4_A_VALUE 17
#define DSA_TAG_PROTO_ARHT_VALUE 28
+#define DSA_TAG_PROTO_MXL862_VALUE 29
+#define DSA_TAG_PROTO_MXL862_8021Q_VALUE 30
enum dsa_tag_protocol {
DSA_TAG_PROTO_NONE = DSA_TAG_PROTO_NONE_VALUE,
@@ -63,6 +65,8 @@ enum dsa_tag_protocol {
DSA_TAG_PROTO_KSZ8795 = DSA_TAG_PROTO_KSZ8795_VALUE,
DSA_TAG_PROTO_RTL4_A = DSA_TAG_PROTO_RTL4_A_VALUE,
DSA_TAG_PROTO_ARHT = DSA_TAG_PROTO_ARHT_VALUE,
+ DSA_TAG_PROTO_MXL862 = DSA_TAG_PROTO_MXL862_VALUE,
+ DSA_TAG_PROTO_MXL862_8021Q = DSA_TAG_PROTO_MXL862_8021Q_VALUE,
};
struct packet_type;
diff --git a/net/dsa/Kconfig b/net/dsa/Kconfig
index 5da7a23..b0b9df1 100644
--- a/net/dsa/Kconfig
+++ b/net/dsa/Kconfig
@@ -86,6 +86,19 @@ config NET_DSA_TAG_KSZ
Say Y if you want to enable support for tagging frames for the
Microchip 8795/9477/9893 families of switches.
+config NET_DSA_TAG_MXL862
+ tristate "Tag driver for MxL862xx switches"
+ help
+ Say Y or M if you want to enable support for tagging frames for the
+ Maxlinear MxL862xx switches.
+
+config NET_DSA_TAG_MXL862_8021Q
+ tristate "Tag driver for MxL862xx switches, based on VLAN tags"
+ help
+ Say Y or M if you want to enable support for tagging frames for the
+ Maxlinear MxL862xx switches. This tagging variant is based on 4-byte wide VLAN
+ tags
+
config NET_DSA_TAG_RTL4_A
tristate "Tag driver for Realtek 4 byte protocol A tags"
help
diff --git a/net/dsa/Makefile b/net/dsa/Makefile
index b58ac0f..692b70f 100644
--- a/net/dsa/Makefile
+++ b/net/dsa/Makefile
@@ -17,3 +17,5 @@ obj-$(CONFIG_NET_DSA_TAG_QCA) += tag_qca.o
obj-$(CONFIG_NET_DSA_TAG_SJA1105) += tag_sja1105.o
obj-$(CONFIG_NET_DSA_TAG_TRAILER) += tag_trailer.o
obj-$(CONFIG_NET_DSA_TAG_AIROHA) += tag_arht.o
+obj-$(CONFIG_NET_DSA_TAG_MXL862) += tag_mxl862xx.o
+obj-$(CONFIG_NET_DSA_TAG_MXL862_8021Q) += tag_mxl862xx_8021q.o
--
2.18.0