xref: /linux/include/linux/dsa/brcm.h (revision d0034a7a4ac7fae708146ac0059b9c47a1543f0d)
1 /* SPDX-License-Identifier: GPL-2.0-only
2  * Copyright (C) 2014 Broadcom Corporation
3  */
4 
5 /* Included by drivers/net/ethernet/broadcom/bcmsysport.c and
6  * net/dsa/tag_brcm.c
7  */
8 #ifndef _NET_DSA_BRCM_H
9 #define _NET_DSA_BRCM_H
10 
11 /* Broadcom tag specific helpers to insert and extract queue/port number */
12 #define BRCM_TAG_SET_PORT_QUEUE(p, q)	((p) << 8 | q)
13 #define BRCM_TAG_GET_PORT(v)		((v) >> 8)
14 #define BRCM_TAG_GET_QUEUE(v)		((v) & 0xff)
15 
16 #endif
17