netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: dsa: ksz: use common define for tag len
@ 2019-12-18 16:01 Michael Grzeschik
  2019-12-19 20:42 ` Andrew Lunn
  2019-12-21  5:07 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Michael Grzeschik @ 2019-12-18 16:01 UTC (permalink / raw)
  To: andrew; +Cc: netdev, davem, kernel

Remove special taglen define KSZ8795_INGRESS_TAG_LEN
and use generic KSZ_INGRESS_TAG_LEN instead.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
---
 net/dsa/tag_ksz.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/net/dsa/tag_ksz.c b/net/dsa/tag_ksz.c
index 3e63a9426633f..efdcbe2f29ae7 100644
--- a/net/dsa/tag_ksz.c
+++ b/net/dsa/tag_ksz.c
@@ -84,8 +84,6 @@ static struct sk_buff *ksz_common_rcv(struct sk_buff *skb,
  *	  (eg, 0x00=port1, 0x02=port3, 0x06=port7)
  */
 
-#define KSZ8795_INGRESS_TAG_LEN		1
-
 #define KSZ8795_TAIL_TAG_OVERRIDE	BIT(6)
 #define KSZ8795_TAIL_TAG_LOOKUP		BIT(7)
 
@@ -96,12 +94,12 @@ static struct sk_buff *ksz8795_xmit(struct sk_buff *skb, struct net_device *dev)
 	u8 *tag;
 	u8 *addr;
 
-	nskb = ksz_common_xmit(skb, dev, KSZ8795_INGRESS_TAG_LEN);
+	nskb = ksz_common_xmit(skb, dev, KSZ_INGRESS_TAG_LEN);
 	if (!nskb)
 		return NULL;
 
 	/* Tag encoding */
-	tag = skb_put(nskb, KSZ8795_INGRESS_TAG_LEN);
+	tag = skb_put(nskb, KSZ_INGRESS_TAG_LEN);
 	addr = skb_mac_header(nskb);
 
 	*tag = 1 << dp->index;
@@ -124,7 +122,7 @@ static const struct dsa_device_ops ksz8795_netdev_ops = {
 	.proto	= DSA_TAG_PROTO_KSZ8795,
 	.xmit	= ksz8795_xmit,
 	.rcv	= ksz8795_rcv,
-	.overhead = KSZ8795_INGRESS_TAG_LEN,
+	.overhead = KSZ_INGRESS_TAG_LEN,
 };
 
 DSA_TAG_DRIVER(ksz8795_netdev_ops);
-- 
2.24.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: dsa: ksz: use common define for tag len
  2019-12-18 16:01 [PATCH] net: dsa: ksz: use common define for tag len Michael Grzeschik
@ 2019-12-19 20:42 ` Andrew Lunn
  2019-12-21  5:07 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2019-12-19 20:42 UTC (permalink / raw)
  To: Michael Grzeschik; +Cc: netdev, davem, kernel

On Wed, Dec 18, 2019 at 05:01:39PM +0100, Michael Grzeschik wrote:
> Remove special taglen define KSZ8795_INGRESS_TAG_LEN
> and use generic KSZ_INGRESS_TAG_LEN instead.
> 
> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: dsa: ksz: use common define for tag len
  2019-12-18 16:01 [PATCH] net: dsa: ksz: use common define for tag len Michael Grzeschik
  2019-12-19 20:42 ` Andrew Lunn
@ 2019-12-21  5:07 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2019-12-21  5:07 UTC (permalink / raw)
  To: m.grzeschik; +Cc: andrew, netdev, kernel

From: Michael Grzeschik <m.grzeschik@pengutronix.de>
Date: Wed, 18 Dec 2019 17:01:39 +0100

> Remove special taglen define KSZ8795_INGRESS_TAG_LEN
> and use generic KSZ_INGRESS_TAG_LEN instead.
> 
> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>

Applied, thank you.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-12-21  5:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-18 16:01 [PATCH] net: dsa: ksz: use common define for tag len Michael Grzeschik
2019-12-19 20:42 ` Andrew Lunn
2019-12-21  5:07 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).