summaryrefslogtreecommitdiff
path: root/proto_vlan.h
blob: dc31cfac98e4c7185c7430ba9d48e7fa6283bc2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*
 * proto_vlan.h - VLAN proto helpers & declarations
 * Subject to the GPL, version 2.
 */

#ifndef PROTO_VLAN_H
#define PROTO_VLAN_H

#include <stdbool.h>
#include <inttypes.h>

static inline uint16_t vlan_tci2prio(uint16_t tci)
{
	return (tci & 0xe000) >> 13;
}

static inline uint16_t vlan_tci2cfi(uint16_t tci)
{
	return (tci & 0x1000) >> 12;
}

static inline uint16_t vlan_tci2vid(uint16_t tci)
{
	return tci & 0x0fff;
}

#endif
ss='ctrl'>
authorAxel Lin <axel.lin@ingics.com>2016-04-30 15:01:08 +0800
committerMark Brown <broonie@kernel.org>2016-05-02 16:25:13 +0100
commit46cb41534a1a1d1f75aae5eab0dd8c06a9461e6b (patch)
tree84a9443a36bd2118d327c27d4894b70f86885e7a /Documentation/.gitignore
parentf55532a0c0b8bb6148f4e07853b876ef73bc69ca (diff)
spi: Drop unnecessary dependencies on relaxed I/O accessors
The relaxed I/O accessors are available on all architectures now. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'Documentation/.gitignore')