diff options
| -rw-r--r-- | include/net/dsa.h | 1 | ||||
| -rw-r--r-- | net/dsa/dsa.c | 35 | ||||
| -rw-r--r-- | net/dsa/dsa_priv.h | 30 | ||||
| -rw-r--r-- | net/dsa/tag_brcm.c | 4 | ||||
| -rw-r--r-- | net/dsa/tag_dsa.c | 2 | ||||
| -rw-r--r-- | net/dsa/tag_edsa.c | 2 | ||||
| -rw-r--r-- | net/dsa/tag_gswip.c | 2 | ||||
| -rw-r--r-- | net/dsa/tag_ksz.c | 4 | ||||
| -rw-r--r-- | net/dsa/tag_lan9303.c | 2 | ||||
| -rw-r--r-- | net/dsa/tag_mtk.c | 2 | ||||
| -rw-r--r-- | net/dsa/tag_qca.c | 2 | ||||
| -rw-r--r-- | net/dsa/tag_trailer.c | 2 |
12 files changed, 11 insertions, 77 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h index 08ac05c014e3..b550f7bb5314 100644 --- a/include/net/dsa.h +++ b/include/net/dsa.h | |||
| @@ -56,7 +56,6 @@ enum dsa_tag_protocol { | |||
| 56 | DSA_TAG_PROTO_MTK = DSA_TAG_PROTO_MTK_VALUE, | 56 | DSA_TAG_PROTO_MTK = DSA_TAG_PROTO_MTK_VALUE, |
| 57 | DSA_TAG_PROTO_QCA = DSA_TAG_PROTO_QCA_VALUE, | 57 | DSA_TAG_PROTO_QCA = DSA_TAG_PROTO_QCA_VALUE, |
| 58 | DSA_TAG_PROTO_TRAILER = DSA_TAG_PROTO_TRAILER_VALUE, | 58 | DSA_TAG_PROTO_TRAILER = DSA_TAG_PROTO_TRAILER_VALUE, |
| 59 | DSA_TAG_LAST, /* MUST BE LAST */ | ||
| 60 | }; | 59 | }; |
| 61 | 60 | ||
| 62 | struct packet_type; | 61 | struct packet_type; |
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c index 67d21647c500..ba04c78633be 100644 --- a/net/dsa/dsa.c +++ b/net/dsa/dsa.c | |||
| @@ -46,41 +46,6 @@ static const struct dsa_device_ops none_ops = { | |||
| 46 | 46 | ||
| 47 | DSA_TAG_DRIVER(none_ops); | 47 | DSA_TAG_DRIVER(none_ops); |
| 48 | 48 | ||
| 49 | const struct dsa_device_ops *dsa_device_ops[DSA_TAG_LAST] = { | ||
| 50 | #ifdef CONFIG_NET_DSA_TAG_BRCM | ||
| 51 | [DSA_TAG_PROTO_BRCM] = &brcm_netdev_ops, | ||
| 52 | #endif | ||
| 53 | #ifdef CONFIG_NET_DSA_TAG_BRCM_PREPEND | ||
| 54 | [DSA_TAG_PROTO_BRCM_PREPEND] = &brcm_prepend_netdev_ops, | ||
| 55 | #endif | ||
| 56 | #ifdef CONFIG_NET_DSA_TAG_DSA | ||
| 57 | [DSA_TAG_PROTO_DSA] = &dsa_netdev_ops, | ||
| 58 | #endif | ||
| 59 | #ifdef CONFIG_NET_DSA_TAG_EDSA | ||
| 60 | [DSA_TAG_PROTO_EDSA] = &edsa_netdev_ops, | ||
| 61 | #endif | ||
| 62 | #ifdef CONFIG_NET_DSA_TAG_GSWIP | ||
| 63 | [DSA_TAG_PROTO_GSWIP] = &gswip_netdev_ops, | ||
| 64 | #endif | ||
| 65 | #ifdef CONFIG_NET_DSA_TAG_KSZ9477 | ||
| 66 | [DSA_TAG_PROTO_KSZ9477] = &ksz9477_netdev_ops, | ||
| 67 | [DSA_TAG_PROTO_KSZ9893] = &ksz9893_netdev_ops, | ||
| 68 | #endif | ||
| 69 | #ifdef CONFIG_NET_DSA_TAG_LAN9303 | ||
| 70 | [DSA_TAG_PROTO_LAN9303] = &lan9303_netdev_ops, | ||
| 71 | #endif | ||
| 72 | #ifdef CONFIG_NET_DSA_TAG_MTK | ||
| 73 | [DSA_TAG_PROTO_MTK] = &mtk_netdev_ops, | ||
| 74 | #endif | ||
| 75 | #ifdef CONFIG_NET_DSA_TAG_QCA | ||
| 76 | [DSA_TAG_PROTO_QCA] = &qca_netdev_ops, | ||
| 77 | #endif | ||
| 78 | #ifdef CONFIG_NET_DSA_TAG_TRAILER | ||
| 79 | [DSA_TAG_PROTO_TRAILER] = &trailer_netdev_ops, | ||
| 80 | #endif | ||
| 81 | [DSA_TAG_PROTO_NONE] = &none_ops, | ||
| 82 | }; | ||
| 83 | |||
| 84 | static void dsa_tag_driver_register(struct dsa_tag_driver *dsa_tag_driver, | 49 | static void dsa_tag_driver_register(struct dsa_tag_driver *dsa_tag_driver, |
| 85 | struct module *owner) | 50 | struct module *owner) |
| 86 | { | 51 | { |
diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h index ea482e88f7b8..e860512d673a 100644 --- a/net/dsa/dsa_priv.h +++ b/net/dsa/dsa_priv.h | |||
| @@ -202,34 +202,4 @@ dsa_slave_to_master(const struct net_device *dev) | |||
| 202 | /* switch.c */ | 202 | /* switch.c */ |
| 203 | int dsa_switch_register_notifier(struct dsa_switch *ds); | 203 | int dsa_switch_register_notifier(struct dsa_switch *ds); |
| 204 | void dsa_switch_unregister_notifier(struct dsa_switch *ds); | 204 | void dsa_switch_unregister_notifier(struct dsa_switch *ds); |
| 205 | |||
| 206 | /* tag_brcm.c */ | ||
| 207 | extern const struct dsa_device_ops brcm_netdev_ops; | ||
| 208 | extern const struct dsa_device_ops brcm_prepend_netdev_ops; | ||
| 209 | |||
| 210 | /* tag_dsa.c */ | ||
| 211 | extern const struct dsa_device_ops dsa_netdev_ops; | ||
| 212 | |||
| 213 | /* tag_edsa.c */ | ||
| 214 | extern const struct dsa_device_ops edsa_netdev_ops; | ||
| 215 | |||
| 216 | /* tag_gswip.c */ | ||
| 217 | extern const struct dsa_device_ops gswip_netdev_ops; | ||
| 218 | |||
| 219 | /* tag_ksz.c */ | ||
| 220 | extern const struct dsa_device_ops ksz9477_netdev_ops; | ||
| 221 | extern const struct dsa_device_ops ksz9893_netdev_ops; | ||
| 222 | |||
| 223 | /* tag_lan9303.c */ | ||
| 224 | extern const struct dsa_device_ops lan9303_netdev_ops; | ||
| 225 | |||
| 226 | /* tag_mtk.c */ | ||
| 227 | extern const struct dsa_device_ops mtk_netdev_ops; | ||
| 228 | |||
| 229 | /* tag_qca.c */ | ||
| 230 | extern const struct dsa_device_ops qca_netdev_ops; | ||
| 231 | |||
| 232 | /* tag_trailer.c */ | ||
| 233 | extern const struct dsa_device_ops trailer_netdev_ops; | ||
| 234 | |||
| 235 | #endif | 205 | #endif |
diff --git a/net/dsa/tag_brcm.c b/net/dsa/tag_brcm.c index 63c8c6645a05..9890097a85d9 100644 --- a/net/dsa/tag_brcm.c +++ b/net/dsa/tag_brcm.c | |||
| @@ -167,7 +167,7 @@ static struct sk_buff *brcm_tag_rcv(struct sk_buff *skb, struct net_device *dev, | |||
| 167 | return nskb; | 167 | return nskb; |
| 168 | } | 168 | } |
| 169 | 169 | ||
| 170 | const struct dsa_device_ops brcm_netdev_ops = { | 170 | static const struct dsa_device_ops brcm_netdev_ops = { |
| 171 | .name = "brcm", | 171 | .name = "brcm", |
| 172 | .proto = DSA_TAG_PROTO_BRCM, | 172 | .proto = DSA_TAG_PROTO_BRCM, |
| 173 | .xmit = brcm_tag_xmit, | 173 | .xmit = brcm_tag_xmit, |
| @@ -195,7 +195,7 @@ static struct sk_buff *brcm_tag_rcv_prepend(struct sk_buff *skb, | |||
| 195 | return brcm_tag_rcv_ll(skb, dev, pt, ETH_HLEN); | 195 | return brcm_tag_rcv_ll(skb, dev, pt, ETH_HLEN); |
| 196 | } | 196 | } |
| 197 | 197 | ||
| 198 | const struct dsa_device_ops brcm_prepend_netdev_ops = { | 198 | static const struct dsa_device_ops brcm_prepend_netdev_ops = { |
| 199 | .name = "brcm-prepend", | 199 | .name = "brcm-prepend", |
| 200 | .proto = DSA_TAG_PROTO_BRCM_PREPEND, | 200 | .proto = DSA_TAG_PROTO_BRCM_PREPEND, |
| 201 | .xmit = brcm_tag_xmit_prepend, | 201 | .xmit = brcm_tag_xmit_prepend, |
diff --git a/net/dsa/tag_dsa.c b/net/dsa/tag_dsa.c index 96b5147b6f3e..7ddec9794477 100644 --- a/net/dsa/tag_dsa.c +++ b/net/dsa/tag_dsa.c | |||
| @@ -150,7 +150,7 @@ static int dsa_tag_flow_dissect(const struct sk_buff *skb, __be16 *proto, | |||
| 150 | return 0; | 150 | return 0; |
| 151 | } | 151 | } |
| 152 | 152 | ||
| 153 | const struct dsa_device_ops dsa_netdev_ops = { | 153 | static const struct dsa_device_ops dsa_netdev_ops = { |
| 154 | .name = "dsa", | 154 | .name = "dsa", |
| 155 | .proto = DSA_TAG_PROTO_DSA, | 155 | .proto = DSA_TAG_PROTO_DSA, |
| 156 | .xmit = dsa_xmit, | 156 | .xmit = dsa_xmit, |
diff --git a/net/dsa/tag_edsa.c b/net/dsa/tag_edsa.c index 76bf3db4e9d4..e8eaa804ccb9 100644 --- a/net/dsa/tag_edsa.c +++ b/net/dsa/tag_edsa.c | |||
| @@ -169,7 +169,7 @@ static int edsa_tag_flow_dissect(const struct sk_buff *skb, __be16 *proto, | |||
| 169 | return 0; | 169 | return 0; |
| 170 | } | 170 | } |
| 171 | 171 | ||
| 172 | const struct dsa_device_ops edsa_netdev_ops = { | 172 | static const struct dsa_device_ops edsa_netdev_ops = { |
| 173 | .name = "edsa", | 173 | .name = "edsa", |
| 174 | .proto = DSA_TAG_PROTO_EDSA, | 174 | .proto = DSA_TAG_PROTO_EDSA, |
| 175 | .xmit = edsa_xmit, | 175 | .xmit = edsa_xmit, |
diff --git a/net/dsa/tag_gswip.c b/net/dsa/tag_gswip.c index ee5167180e79..b678160bbd66 100644 --- a/net/dsa/tag_gswip.c +++ b/net/dsa/tag_gswip.c | |||
| @@ -103,7 +103,7 @@ static struct sk_buff *gswip_tag_rcv(struct sk_buff *skb, | |||
| 103 | return skb; | 103 | return skb; |
| 104 | } | 104 | } |
| 105 | 105 | ||
| 106 | const struct dsa_device_ops gswip_netdev_ops = { | 106 | static const struct dsa_device_ops gswip_netdev_ops = { |
| 107 | .name = "gwsip", | 107 | .name = "gwsip", |
| 108 | .proto = DSA_TAG_PROTO_GSWIP, | 108 | .proto = DSA_TAG_PROTO_GSWIP, |
| 109 | .xmit = gswip_tag_xmit, | 109 | .xmit = gswip_tag_xmit, |
diff --git a/net/dsa/tag_ksz.c b/net/dsa/tag_ksz.c index 02689ac6f9da..b4872b87d4a6 100644 --- a/net/dsa/tag_ksz.c +++ b/net/dsa/tag_ksz.c | |||
| @@ -133,7 +133,7 @@ static struct sk_buff *ksz9477_rcv(struct sk_buff *skb, struct net_device *dev, | |||
| 133 | return ksz_common_rcv(skb, dev, port, len); | 133 | return ksz_common_rcv(skb, dev, port, len); |
| 134 | } | 134 | } |
| 135 | 135 | ||
| 136 | const struct dsa_device_ops ksz9477_netdev_ops = { | 136 | static const struct dsa_device_ops ksz9477_netdev_ops = { |
| 137 | .name = "ksz9477", | 137 | .name = "ksz9477", |
| 138 | .proto = DSA_TAG_PROTO_KSZ9477, | 138 | .proto = DSA_TAG_PROTO_KSZ9477, |
| 139 | .xmit = ksz9477_xmit, | 139 | .xmit = ksz9477_xmit, |
| @@ -171,7 +171,7 @@ static struct sk_buff *ksz9893_xmit(struct sk_buff *skb, | |||
| 171 | return nskb; | 171 | return nskb; |
| 172 | } | 172 | } |
| 173 | 173 | ||
| 174 | const struct dsa_device_ops ksz9893_netdev_ops = { | 174 | static const struct dsa_device_ops ksz9893_netdev_ops = { |
| 175 | .name = "ksz9893", | 175 | .name = "ksz9893", |
| 176 | .proto = DSA_TAG_PROTO_KSZ9893, | 176 | .proto = DSA_TAG_PROTO_KSZ9893, |
| 177 | .xmit = ksz9893_xmit, | 177 | .xmit = ksz9893_xmit, |
diff --git a/net/dsa/tag_lan9303.c b/net/dsa/tag_lan9303.c index 609a2405abd8..eb0e7a32e53d 100644 --- a/net/dsa/tag_lan9303.c +++ b/net/dsa/tag_lan9303.c | |||
| @@ -128,7 +128,7 @@ static struct sk_buff *lan9303_rcv(struct sk_buff *skb, struct net_device *dev, | |||
| 128 | return skb; | 128 | return skb; |
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | const struct dsa_device_ops lan9303_netdev_ops = { | 131 | static const struct dsa_device_ops lan9303_netdev_ops = { |
| 132 | .name = "lan9303", | 132 | .name = "lan9303", |
| 133 | .proto = DSA_TAG_PROTO_LAN9303, | 133 | .proto = DSA_TAG_PROTO_LAN9303, |
| 134 | .xmit = lan9303_xmit, | 134 | .xmit = lan9303_xmit, |
diff --git a/net/dsa/tag_mtk.c b/net/dsa/tag_mtk.c index a4d2dcdb7102..b5705cba8318 100644 --- a/net/dsa/tag_mtk.c +++ b/net/dsa/tag_mtk.c | |||
| @@ -98,7 +98,7 @@ static int mtk_tag_flow_dissect(const struct sk_buff *skb, __be16 *proto, | |||
| 98 | return 0; | 98 | return 0; |
| 99 | } | 99 | } |
| 100 | 100 | ||
| 101 | const struct dsa_device_ops mtk_netdev_ops = { | 101 | static const struct dsa_device_ops mtk_netdev_ops = { |
| 102 | .name = "mtk", | 102 | .name = "mtk", |
| 103 | .proto = DSA_TAG_PROTO_MTK, | 103 | .proto = DSA_TAG_PROTO_MTK, |
| 104 | .xmit = mtk_tag_xmit, | 104 | .xmit = mtk_tag_xmit, |
diff --git a/net/dsa/tag_qca.c b/net/dsa/tag_qca.c index 552ddfbbf5ec..c95885215525 100644 --- a/net/dsa/tag_qca.c +++ b/net/dsa/tag_qca.c | |||
| @@ -99,7 +99,7 @@ static int qca_tag_flow_dissect(const struct sk_buff *skb, __be16 *proto, | |||
| 99 | return 0; | 99 | return 0; |
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | const struct dsa_device_ops qca_netdev_ops = { | 102 | static const struct dsa_device_ops qca_netdev_ops = { |
| 103 | .name = "qca", | 103 | .name = "qca", |
| 104 | .proto = DSA_TAG_PROTO_QCA, | 104 | .proto = DSA_TAG_PROTO_QCA, |
| 105 | .xmit = qca_tag_xmit, | 105 | .xmit = qca_tag_xmit, |
diff --git a/net/dsa/tag_trailer.c b/net/dsa/tag_trailer.c index 807cc2dff052..4f8ab62f0208 100644 --- a/net/dsa/tag_trailer.c +++ b/net/dsa/tag_trailer.c | |||
| @@ -77,7 +77,7 @@ static struct sk_buff *trailer_rcv(struct sk_buff *skb, struct net_device *dev, | |||
| 77 | return skb; | 77 | return skb; |
| 78 | } | 78 | } |
| 79 | 79 | ||
| 80 | const struct dsa_device_ops trailer_netdev_ops = { | 80 | static const struct dsa_device_ops trailer_netdev_ops = { |
| 81 | .name = "trailer", | 81 | .name = "trailer", |
| 82 | .proto = DSA_TAG_PROTO_TRAILER, | 82 | .proto = DSA_TAG_PROTO_TRAILER, |
| 83 | .xmit = trailer_xmit, | 83 | .xmit = trailer_xmit, |
