Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
[pandora-kernel.git] / drivers / staging / brcm80211 / include / proto / 802.1d.h
1 /*
2  * Copyright (c) 2010 Broadcom Corporation
3  *
4  * Permission to use, copy, modify, and/or distribute this software for any
5  * purpose with or without fee is hereby granted, provided that the above
6  * copyright notice and this permission notice appear in all copies.
7  *
8  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
11  * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
13  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16
17 #ifndef _802_1_D_
18 #define _802_1_D_
19
20 #define PRIO_8021D_NONE         2
21 #define PRIO_8021D_BK           1
22 #define PRIO_8021D_BE           0
23 #define PRIO_8021D_EE           3
24 #define PRIO_8021D_CL           4
25 #define PRIO_8021D_VI           5
26 #define PRIO_8021D_VO           6
27 #define PRIO_8021D_NC           7
28 #define MAXPRIO                 7
29 #define NUMPRIO                 (MAXPRIO + 1)
30
31 #define ALLPRIO         -1
32
33 #define PRIO2PREC(prio) \
34         (((prio) == PRIO_8021D_NONE || (prio) == PRIO_8021D_BE) ? \
35         ((prio^2)) : (prio))
36
37 #endif                          /* _802_1_D_ */