diff options
author | Andrew Lunn | 2019-04-28 19:37:12 +0200 |
---|---|---|
committer | David S. Miller | 2019-04-29 01:41:01 +0200 |
commit | 0b42f03363706609d621c31324fae5c1250f579f (patch) | |
tree | b4b66ab0f485b8d885446a55d450772eb22c7e08 /net/dsa/tag_ksz.c | |
parent | dsa: Move tagger name into its ops structure (diff) | |
download | kernel-qcow2-linux-0b42f03363706609d621c31324fae5c1250f579f.tar.gz kernel-qcow2-linux-0b42f03363706609d621c31324fae5c1250f579f.tar.xz kernel-qcow2-linux-0b42f03363706609d621c31324fae5c1250f579f.zip |
dsa: Add MODULE_ALIAS to taggers in preparation to become modules
When the tag drivers become modules, we will need to dynamically load
them based on what the switch drivers need. Add aliases to map between
the TAG protocol and the driver.
In order to do this, we need the tag protocol number as something
which the C pre-processor can stringinfy. Only the compiler knows the
value of an enum, CPP cannot use them. So add #defines.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa/tag_ksz.c')
-rw-r--r-- | net/dsa/tag_ksz.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/dsa/tag_ksz.c b/net/dsa/tag_ksz.c index 631094599514..9be0f5f12afb 100644 --- a/net/dsa/tag_ksz.c +++ b/net/dsa/tag_ksz.c @@ -140,6 +140,8 @@ const struct dsa_device_ops ksz9477_netdev_ops = { .overhead = KSZ9477_INGRESS_TAG_LEN, }; +MODULE_ALIAS_DSA_TAG_DRIVER(DSA_TAG_PROTO_KSZ9477); + #define KSZ9893_TAIL_TAG_OVERRIDE BIT(5) #define KSZ9893_TAIL_TAG_LOOKUP BIT(6) @@ -173,3 +175,5 @@ const struct dsa_device_ops ksz9893_netdev_ops = { .rcv = ksz9477_rcv, .overhead = KSZ_INGRESS_TAG_LEN, }; + +MODULE_ALIAS_DSA_TAG_DRIVER(DSA_TAG_PROTO_KSZ9893); |