aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2019-04-28 13:37:23 -0400
committerDavid S. Miller <davem@davemloft.net>2019-04-28 19:41:01 -0400
commit0b9f9dfbfab4e707ded0aff0d3cf619bc4035139 (patch)
treecf65418076d495e3b07bc30292ae6ac1dbf906b0
parent3aa475e197f44ae401502b61aa341d3e40aa045a (diff)
dsa: Allow tag drivers to be built as modules
Make the CONFIG symbols tristate and add help text. The broadcom and Microchip KSZ tag drivers support two different tagging protocols in one driver. Add a configuration option for the drivers, and then options to select the protocol. Create a submenu for the tagging drivers. Signed-off-by: Andrew Lunn <andrew@lunn.ch> v2: tab/space cleanup Help text wording NET_DSA_TAG_BRCM_COMMON and NET_DSA_TAG_KZS_COMMON hidden v3: More tabification Punctuation v4: trailler->trailer Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/dsa/Kconfig83
-rw-r--r--net/dsa/Makefile19
2 files changed, 73 insertions, 29 deletions
diff --git a/net/dsa/Kconfig b/net/dsa/Kconfig
index b695170795c2..1f48642089ea 100644
--- a/net/dsa/Kconfig
+++ b/net/dsa/Kconfig
@@ -4,7 +4,7 @@ config HAVE_NET_DSA
4 4
5# Drivers must select NET_DSA and the appropriate tagging format 5# Drivers must select NET_DSA and the appropriate tagging format
6 6
7config NET_DSA 7menuconfig NET_DSA
8 tristate "Distributed Switch Architecture" 8 tristate "Distributed Switch Architecture"
9 depends on HAVE_NET_DSA 9 depends on HAVE_NET_DSA
10 depends on BRIDGE || BRIDGE=n 10 depends on BRIDGE || BRIDGE=n
@@ -26,39 +26,84 @@ config NET_DSA_LEGACY
26 26
27 This feature is scheduled for removal in 4.17. 27 This feature is scheduled for removal in 4.17.
28 28
29# tagging formats 29config NET_DSA_TAG_BRCM_COMMON
30 tristate
31 default n
32
30config NET_DSA_TAG_BRCM 33config NET_DSA_TAG_BRCM
31 bool 34 tristate "Tag driver for Broadcom switches using in-frame headers"
35 select NET_DSA_TAG_BRCM_COMMON
36 help
37 Say Y if you want to enable support for tagging frames for the
38 Broadcom switches which place the tag after the MAC source address.
39
32 40
33config NET_DSA_TAG_BRCM_PREPEND 41config NET_DSA_TAG_BRCM_PREPEND
34 bool 42 tristate "Tag driver for Broadcom switches using prepended headers"
43 select NET_DSA_TAG_BRCM_COMMON
44 help
45 Say Y if you want to enable support for tagging frames for the
46 Broadcom switches which places the tag before the Ethernet header
47 (prepended).
48
49config NET_DSA_TAG_GSWIP
50 tristate "Tag driver for Lantiq / Intel GSWIP switches"
51 help
52 Say Y or M if you want to enable support for tagging frames for the
53 Lantiq / Intel GSWIP switches.
35 54
36config NET_DSA_TAG_DSA 55config NET_DSA_TAG_DSA
37 bool 56 tristate "Tag driver for Marvell switches using DSA headers"
57 help
58 Say Y or M if you want to enable support for tagging frames for the
59 Marvell switches which use DSA headers.
38 60
39config NET_DSA_TAG_EDSA 61config NET_DSA_TAG_EDSA
40 bool 62 tristate "Tag driver for Marvell switches using EtherType DSA headers"
63 help
64 Say Y or M if you want to enable support for tagging frames for the
65 Marvell switches which use EtherType DSA headers.
41 66
42config NET_DSA_TAG_GSWIP 67config NET_DSA_TAG_MTK
43 bool 68 tristate "Tag driver for Mediatek switches"
69 help
70 Say Y or M if you want to enable support for tagging frames for
71 Mediatek switches.
72
73config NET_DSA_TAG_KSZ_COMMON
74 tristate
75 default n
44 76
45config NET_DSA_TAG_KSZ 77config NET_DSA_TAG_KSZ
46 bool 78 tristate "Tag driver for Microchip 9893 family of switches"
79 select NET_DSA_TAG_KSZ_COMMON
80 help
81 Say Y if you want to enable support for tagging frames for the
82 Microchip 9893 family of switches.
47 83
48config NET_DSA_TAG_KSZ9477 84config NET_DSA_TAG_KSZ9477
49 bool 85 tristate "Tag driver for Microchip 9477 family of switches"
50 select NET_DSA_TAG_KSZ 86 select NET_DSA_TAG_KSZ_COMMON
87 help
88 Say Y if you want to enable support for tagging frames for the
89 Microchip 9477 family of switches.
51 90
52config NET_DSA_TAG_LAN9303 91config NET_DSA_TAG_QCA
53 bool 92 tristate "Tag driver for Qualcomm Atheros QCA8K switches"
93 help
94 Say Y or M if you want to enable support for tagging frames for
95 the Qualcomm Atheros QCA8K switches.
54 96
55config NET_DSA_TAG_MTK 97config NET_DSA_TAG_LAN9303
56 bool 98 tristate "Tag driver for SMSC/Microchip LAN9303 family of switches"
99 help
100 Say Y or M if you want to enable support for tagging frames for the
101 SMSC/Microchip LAN9303 family of switches.
57 102
58config NET_DSA_TAG_TRAILER 103config NET_DSA_TAG_TRAILER
59 bool 104 tristate "Tag driver for switches using a trailer tag"
60 105 help
61config NET_DSA_TAG_QCA 106 Say Y or M if you want to enable support for tagging frames at
62 bool 107 with a trailed. e.g. Marvell 88E6060.
63 108
64endif 109endif
diff --git a/net/dsa/Makefile b/net/dsa/Makefile
index 6e721f7a2947..717ac1618100 100644
--- a/net/dsa/Makefile
+++ b/net/dsa/Makefile
@@ -5,13 +5,12 @@ dsa_core-y += dsa.o dsa2.o master.o port.o slave.o switch.o
5dsa_core-$(CONFIG_NET_DSA_LEGACY) += legacy.o 5dsa_core-$(CONFIG_NET_DSA_LEGACY) += legacy.o
6 6
7# tagging formats 7# tagging formats
8dsa_core-$(CONFIG_NET_DSA_TAG_BRCM) += tag_brcm.o 8obj-$(CONFIG_NET_DSA_TAG_BRCM_COMMON) += tag_brcm.o
9dsa_core-$(CONFIG_NET_DSA_TAG_BRCM_PREPEND) += tag_brcm.o 9obj-$(CONFIG_NET_DSA_TAG_DSA) += tag_dsa.o
10dsa_core-$(CONFIG_NET_DSA_TAG_DSA) += tag_dsa.o 10obj-$(CONFIG_NET_DSA_TAG_EDSA) += tag_edsa.o
11dsa_core-$(CONFIG_NET_DSA_TAG_EDSA) += tag_edsa.o 11obj-$(CONFIG_NET_DSA_TAG_GSWIP) += tag_gswip.o
12dsa_core-$(CONFIG_NET_DSA_TAG_GSWIP) += tag_gswip.o 12obj-$(CONFIG_NET_DSA_TAG_KSZ_COMMON) += tag_ksz.o
13dsa_core-$(CONFIG_NET_DSA_TAG_KSZ) += tag_ksz.o 13obj-$(CONFIG_NET_DSA_TAG_LAN9303) += tag_lan9303.o
14dsa_core-$(CONFIG_NET_DSA_TAG_LAN9303) += tag_lan9303.o 14obj-$(CONFIG_NET_DSA_TAG_MTK) += tag_mtk.o
15dsa_core-$(CONFIG_NET_DSA_TAG_MTK) += tag_mtk.o 15obj-$(CONFIG_NET_DSA_TAG_QCA) += tag_qca.o
16dsa_core-$(CONFIG_NET_DSA_TAG_QCA) += tag_qca.o 16obj-$(CONFIG_NET_DSA_TAG_TRAILER) += tag_trailer.o
17dsa_core-$(CONFIG_NET_DSA_TAG_TRAILER) += tag_trailer.o