Broadcom SDK and wireless driver: another attempt to update to ver. 5.10.147.0
[tomato.git] / release / src-rt / include / proto / 802.1d.h
blob6ba034ad599c2d955fb22114684e6ef44ef31e21
1 /*
2 * Copyright (C) 2009, Broadcom Corporation
3 * All Rights Reserved.
4 *
5 * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
6 * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
7 * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
8 * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
10 * Fundamental types and constants relating to 802.1D
12 * $Id: 802.1d.h,v 9.3 2007/04/10 21:33:06 Exp $
15 #ifndef _802_1_D_
16 #define _802_1_D_
18 /* 802.1D priority defines */
19 #define PRIO_8021D_NONE 2 /* None = - */
20 #define PRIO_8021D_BK 1 /* BK - Background */
21 #define PRIO_8021D_BE 0 /* BE - Best-effort */
22 #define PRIO_8021D_EE 3 /* EE - Excellent-effort */
23 #define PRIO_8021D_CL 4 /* CL - Controlled Load */
24 #define PRIO_8021D_VI 5 /* Vi - Video */
25 #define PRIO_8021D_VO 6 /* Vo - Voice */
26 #define PRIO_8021D_NC 7 /* NC - Network Control */
27 #define MAXPRIO 7 /* 0-7 */
28 #define NUMPRIO (MAXPRIO + 1)
30 #define ALLPRIO -1 /* All prioirty */
32 /* Converts prio to precedence since the numerical value of
33 * PRIO_8021D_BE and PRIO_8021D_NONE are swapped.
35 #define PRIO2PREC(prio) \
36 (((prio) == PRIO_8021D_NONE || (prio) == PRIO_8021D_BE) ? ((prio^2)) : (prio))
38 #endif /* _802_1_D__ */