mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-04-01 12:04:08 +00:00
net: dsa: ksz: use common define for tag len
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> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
f80742b9c5
commit
4249c507f4
1 changed files with 3 additions and 5 deletions
|
@ -84,8 +84,6 @@ static struct sk_buff *ksz_common_rcv(struct sk_buff *skb,
|
||||||
* (eg, 0x00=port1, 0x02=port3, 0x06=port7)
|
* (eg, 0x00=port1, 0x02=port3, 0x06=port7)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define KSZ8795_INGRESS_TAG_LEN 1
|
|
||||||
|
|
||||||
#define KSZ8795_TAIL_TAG_OVERRIDE BIT(6)
|
#define KSZ8795_TAIL_TAG_OVERRIDE BIT(6)
|
||||||
#define KSZ8795_TAIL_TAG_LOOKUP BIT(7)
|
#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 *tag;
|
||||||
u8 *addr;
|
u8 *addr;
|
||||||
|
|
||||||
nskb = ksz_common_xmit(skb, dev, KSZ8795_INGRESS_TAG_LEN);
|
nskb = ksz_common_xmit(skb, dev, KSZ_INGRESS_TAG_LEN);
|
||||||
if (!nskb)
|
if (!nskb)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
/* Tag encoding */
|
/* Tag encoding */
|
||||||
tag = skb_put(nskb, KSZ8795_INGRESS_TAG_LEN);
|
tag = skb_put(nskb, KSZ_INGRESS_TAG_LEN);
|
||||||
addr = skb_mac_header(nskb);
|
addr = skb_mac_header(nskb);
|
||||||
|
|
||||||
*tag = 1 << dp->index;
|
*tag = 1 << dp->index;
|
||||||
|
@ -124,7 +122,7 @@ static const struct dsa_device_ops ksz8795_netdev_ops = {
|
||||||
.proto = DSA_TAG_PROTO_KSZ8795,
|
.proto = DSA_TAG_PROTO_KSZ8795,
|
||||||
.xmit = ksz8795_xmit,
|
.xmit = ksz8795_xmit,
|
||||||
.rcv = ksz8795_rcv,
|
.rcv = ksz8795_rcv,
|
||||||
.overhead = KSZ8795_INGRESS_TAG_LEN,
|
.overhead = KSZ_INGRESS_TAG_LEN,
|
||||||
};
|
};
|
||||||
|
|
||||||
DSA_TAG_DRIVER(ksz8795_netdev_ops);
|
DSA_TAG_DRIVER(ksz8795_netdev_ops);
|
||||||
|
|
Loading…
Add table
Reference in a new issue