net: dsa: remove the struct packet_type argument from dsa_device_ops::rcv()
authorVladimir Oltean <vladimir.oltean@nxp.com>
Sat, 31 Jul 2021 14:14:32 +0000 (17:14 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 Aug 2021 14:13:15 +0000 (15:13 +0100)
No tagging driver uses this.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 files changed:
include/net/dsa.h
net/dsa/dsa.c
net/dsa/tag_ar9331.c
net/dsa/tag_brcm.c
net/dsa/tag_dsa.c
net/dsa/tag_gswip.c
net/dsa/tag_hellcreek.c
net/dsa/tag_ksz.c
net/dsa/tag_lan9303.c
net/dsa/tag_mtk.c
net/dsa/tag_ocelot.c
net/dsa/tag_ocelot_8021q.c
net/dsa/tag_qca.c
net/dsa/tag_rtl4_a.c
net/dsa/tag_sja1105.c
net/dsa/tag_trailer.c
net/dsa/tag_xrs700x.c

index 2af6ee2..7cc9507 100644 (file)
@@ -79,13 +79,11 @@ enum dsa_tag_protocol {
        DSA_TAG_PROTO_SJA1110           = DSA_TAG_PROTO_SJA1110_VALUE,
 };
 
-struct packet_type;
 struct dsa_switch;
 
 struct dsa_device_ops {
        struct sk_buff *(*xmit)(struct sk_buff *skb, struct net_device *dev);
-       struct sk_buff *(*rcv)(struct sk_buff *skb, struct net_device *dev,
-                              struct packet_type *pt);
+       struct sk_buff *(*rcv)(struct sk_buff *skb, struct net_device *dev);
        void (*flow_dissect)(const struct sk_buff *skb, __be16 *proto,
                             int *offset);
        unsigned int needed_headroom;
@@ -239,8 +237,7 @@ struct dsa_port {
 
        /* Copies for faster access in master receive hot path */
        struct dsa_switch_tree *dst;
-       struct sk_buff *(*rcv)(struct sk_buff *skb, struct net_device *dev,
-                              struct packet_type *pt);
+       struct sk_buff *(*rcv)(struct sk_buff *skb, struct net_device *dev);
 
        enum {
                DSA_PORT_TYPE_UNUSED = 0,
index 84cad1b..1dc45e4 100644 (file)
@@ -238,7 +238,7 @@ static int dsa_switch_rcv(struct sk_buff *skb, struct net_device *dev,
        if (!skb)
                return 0;
 
-       nskb = cpu_dp->rcv(skb, dev, pt);
+       nskb = cpu_dp->rcv(skb, dev);
        if (!nskb) {
                kfree_skb(skb);
                return 0;
index 0efae1a..8a02ac4 100644 (file)
@@ -44,8 +44,7 @@ static struct sk_buff *ar9331_tag_xmit(struct sk_buff *skb,
 }
 
 static struct sk_buff *ar9331_tag_rcv(struct sk_buff *skb,
-                                     struct net_device *ndev,
-                                     struct packet_type *pt)
+                                     struct net_device *ndev)
 {
        u8 ver, port;
        u16 hdr;
index a27f509..96e93b5 100644 (file)
@@ -136,7 +136,6 @@ static struct sk_buff *brcm_tag_xmit_ll(struct sk_buff *skb,
  */
 static struct sk_buff *brcm_tag_rcv_ll(struct sk_buff *skb,
                                       struct net_device *dev,
-                                      struct packet_type *pt,
                                       unsigned int offset)
 {
        int source_port;
@@ -182,13 +181,12 @@ static struct sk_buff *brcm_tag_xmit(struct sk_buff *skb,
 }
 
 
-static struct sk_buff *brcm_tag_rcv(struct sk_buff *skb, struct net_device *dev,
-                                   struct packet_type *pt)
+static struct sk_buff *brcm_tag_rcv(struct sk_buff *skb, struct net_device *dev)
 {
        struct sk_buff *nskb;
 
        /* skb->data points to the EtherType, the tag is right before it */
-       nskb = brcm_tag_rcv_ll(skb, dev, pt, 2);
+       nskb = brcm_tag_rcv_ll(skb, dev, 2);
        if (!nskb)
                return nskb;
 
@@ -251,8 +249,7 @@ static struct sk_buff *brcm_leg_tag_xmit(struct sk_buff *skb,
 }
 
 static struct sk_buff *brcm_leg_tag_rcv(struct sk_buff *skb,
-                                       struct net_device *dev,
-                                       struct packet_type *pt)
+                                       struct net_device *dev)
 {
        int source_port;
        u8 *brcm_tag;
@@ -302,11 +299,10 @@ static struct sk_buff *brcm_tag_xmit_prepend(struct sk_buff *skb,
 }
 
 static struct sk_buff *brcm_tag_rcv_prepend(struct sk_buff *skb,
-                                           struct net_device *dev,
-                                           struct packet_type *pt)
+                                           struct net_device *dev)
 {
        /* tag is prepended to the packet */
-       return brcm_tag_rcv_ll(skb, dev, pt, ETH_HLEN);
+       return brcm_tag_rcv_ll(skb, dev, ETH_HLEN);
 }
 
 static const struct dsa_device_ops brcm_prepend_netdev_ops = {
index 3607499..e32f816 100644 (file)
@@ -332,8 +332,7 @@ static struct sk_buff *dsa_xmit(struct sk_buff *skb, struct net_device *dev)
        return dsa_xmit_ll(skb, dev, 0);
 }
 
-static struct sk_buff *dsa_rcv(struct sk_buff *skb, struct net_device *dev,
-                              struct packet_type *pt)
+static struct sk_buff *dsa_rcv(struct sk_buff *skb, struct net_device *dev)
 {
        if (unlikely(!pskb_may_pull(skb, DSA_HLEN)))
                return NULL;
@@ -373,8 +372,7 @@ static struct sk_buff *edsa_xmit(struct sk_buff *skb, struct net_device *dev)
        return skb;
 }
 
-static struct sk_buff *edsa_rcv(struct sk_buff *skb, struct net_device *dev,
-                               struct packet_type *pt)
+static struct sk_buff *edsa_rcv(struct sk_buff *skb, struct net_device *dev)
 {
        if (unlikely(!pskb_may_pull(skb, EDSA_HLEN)))
                return NULL;
index 5985dab..df71409 100644 (file)
@@ -75,8 +75,7 @@ static struct sk_buff *gswip_tag_xmit(struct sk_buff *skb,
 }
 
 static struct sk_buff *gswip_tag_rcv(struct sk_buff *skb,
-                                    struct net_device *dev,
-                                    struct packet_type *pt)
+                                    struct net_device *dev)
 {
        int port;
        u8 *gswip_tag;
index c41208c..f64b805 100644 (file)
@@ -29,8 +29,7 @@ static struct sk_buff *hellcreek_xmit(struct sk_buff *skb,
 }
 
 static struct sk_buff *hellcreek_rcv(struct sk_buff *skb,
-                                    struct net_device *dev,
-                                    struct packet_type *pt)
+                                    struct net_device *dev)
 {
        /* Tag decoding */
        u8 *tag = skb_tail_pointer(skb) - HELLCREEK_TAG_LEN;
index 1c2dfa8..fa1d60d 100644 (file)
@@ -67,8 +67,7 @@ static struct sk_buff *ksz8795_xmit(struct sk_buff *skb, struct net_device *dev)
        return skb;
 }
 
-static struct sk_buff *ksz8795_rcv(struct sk_buff *skb, struct net_device *dev,
-                                 struct packet_type *pt)
+static struct sk_buff *ksz8795_rcv(struct sk_buff *skb, struct net_device *dev)
 {
        u8 *tag = skb_tail_pointer(skb) - KSZ_EGRESS_TAG_LEN;
 
@@ -134,8 +133,7 @@ static struct sk_buff *ksz9477_xmit(struct sk_buff *skb,
        return skb;
 }
 
-static struct sk_buff *ksz9477_rcv(struct sk_buff *skb, struct net_device *dev,
-                                  struct packet_type *pt)
+static struct sk_buff *ksz9477_rcv(struct sk_buff *skb, struct net_device *dev)
 {
        /* Tag decoding */
        u8 *tag = skb_tail_pointer(skb) - KSZ_EGRESS_TAG_LEN;
index cf7cf2f..58d3a0e 100644 (file)
@@ -74,8 +74,7 @@ static struct sk_buff *lan9303_xmit(struct sk_buff *skb, struct net_device *dev)
        return skb;
 }
 
-static struct sk_buff *lan9303_rcv(struct sk_buff *skb, struct net_device *dev,
-                                  struct packet_type *pt)
+static struct sk_buff *lan9303_rcv(struct sk_buff *skb, struct net_device *dev)
 {
        __be16 *lan9303_tag;
        u16 lan9303_tag1;
index 3fb80e4..bbf37c0 100644 (file)
@@ -61,8 +61,7 @@ static struct sk_buff *mtk_tag_xmit(struct sk_buff *skb,
        return skb;
 }
 
-static struct sk_buff *mtk_tag_rcv(struct sk_buff *skb, struct net_device *dev,
-                                  struct packet_type *pt)
+static struct sk_buff *mtk_tag_rcv(struct sk_buff *skb, struct net_device *dev)
 {
        u16 hdr;
        int port;
index 3252634..d37ab98 100644 (file)
@@ -55,8 +55,7 @@ static struct sk_buff *seville_xmit(struct sk_buff *skb,
 }
 
 static struct sk_buff *ocelot_rcv(struct sk_buff *skb,
-                                 struct net_device *netdev,
-                                 struct packet_type *pt)
+                                 struct net_device *netdev)
 {
        u64 src_port, qos_class;
        u64 vlan_tci, tag_type;
index c95de71..3038a25 100644 (file)
@@ -38,8 +38,7 @@ static struct sk_buff *ocelot_xmit(struct sk_buff *skb,
 }
 
 static struct sk_buff *ocelot_rcv(struct sk_buff *skb,
-                                 struct net_device *netdev,
-                                 struct packet_type *pt)
+                                 struct net_device *netdev)
 {
        int src_port, switch_id;
 
index 693bda0..6e31369 100644 (file)
@@ -48,8 +48,7 @@ static struct sk_buff *qca_tag_xmit(struct sk_buff *skb, struct net_device *dev)
        return skb;
 }
 
-static struct sk_buff *qca_tag_rcv(struct sk_buff *skb, struct net_device *dev,
-                                  struct packet_type *pt)
+static struct sk_buff *qca_tag_rcv(struct sk_buff *skb, struct net_device *dev)
 {
        u8 ver;
        u16  hdr;
index f6b63aa..aaddca3 100644 (file)
@@ -64,8 +64,7 @@ static struct sk_buff *rtl4a_tag_xmit(struct sk_buff *skb,
 }
 
 static struct sk_buff *rtl4a_tag_rcv(struct sk_buff *skb,
-                                    struct net_device *dev,
-                                    struct packet_type *pt)
+                                    struct net_device *dev)
 {
        u16 protport;
        __be16 *p;
index 664cb80..745c456 100644 (file)
@@ -391,8 +391,7 @@ static void sja1105_vlan_rcv(struct sk_buff *skb, int *source_port,
 }
 
 static struct sk_buff *sja1105_rcv(struct sk_buff *skb,
-                                  struct net_device *netdev,
-                                  struct packet_type *pt)
+                                  struct net_device *netdev)
 {
        int source_port = -1, switch_id = -1;
        struct sja1105_meta meta = {0};
@@ -546,8 +545,7 @@ static struct sk_buff *sja1110_rcv_inband_control_extension(struct sk_buff *skb,
 }
 
 static struct sk_buff *sja1110_rcv(struct sk_buff *skb,
-                                  struct net_device *netdev,
-                                  struct packet_type *pt)
+                                  struct net_device *netdev)
 {
        int source_port = -1, switch_id = -1;
        bool host_only = false;
index ba73804..5749ba8 100644 (file)
@@ -24,8 +24,7 @@ static struct sk_buff *trailer_xmit(struct sk_buff *skb, struct net_device *dev)
        return skb;
 }
 
-static struct sk_buff *trailer_rcv(struct sk_buff *skb, struct net_device *dev,
-                                  struct packet_type *pt)
+static struct sk_buff *trailer_rcv(struct sk_buff *skb, struct net_device *dev)
 {
        u8 *trailer;
        int source_port;
index da231c1..ff442b8 100644 (file)
@@ -25,8 +25,7 @@ static struct sk_buff *xrs700x_xmit(struct sk_buff *skb, struct net_device *dev)
        return skb;
 }
 
-static struct sk_buff *xrs700x_rcv(struct sk_buff *skb, struct net_device *dev,
-                                  struct packet_type *pt)
+static struct sk_buff *xrs700x_rcv(struct sk_buff *skb, struct net_device *dev)
 {
        int source_port;
        u8 *trailer;