Root/package/broadcom-wl/src/driver/proto/802.1d.h

1/*
2 * Copyright 2007, 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.
9 *
10 * Fundamental types and constants relating to 802.1D
11 *
12 */
13
14#ifndef _802_1_D_
15#define _802_1_D_
16
17/* 802.1D priority defines */
18#define PRIO_8021D_NONE 2 /* None = - */
19#define PRIO_8021D_BK 1 /* BK - Background */
20#define PRIO_8021D_BE 0 /* BE - Best-effort */
21#define PRIO_8021D_EE 3 /* EE - Excellent-effort */
22#define PRIO_8021D_CL 4 /* CL - Controlled Load */
23#define PRIO_8021D_VI 5 /* Vi - Video */
24#define PRIO_8021D_VO 6 /* Vo - Voice */
25#define PRIO_8021D_NC 7 /* NC - Network Control */
26#define MAXPRIO 7 /* 0-7 */
27#define NUMPRIO (MAXPRIO + 1)
28
29#define ALLPRIO -1 /* All prioirty */
30
31/* Converts prio to precedence since the numerical value of
32 * PRIO_8021D_BE and PRIO_8021D_NONE are swapped.
33 */
34#define PRIO2PREC(prio) \
35    (((prio) == PRIO_8021D_NONE || (prio) == PRIO_8021D_BE) ? ((prio^2)) : (prio))
36
37#endif /* _802_1_D__ */
38

Archive Download this file



interactive