aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/staging/brcm80211/include/proto/bcmip.h56
-rw-r--r--drivers/staging/brcm80211/include/proto/vlan.h45
2 files changed, 0 insertions, 101 deletions
diff --git a/drivers/staging/brcm80211/include/proto/bcmip.h b/drivers/staging/brcm80211/include/proto/bcmip.h
deleted file mode 100644
index 1ac391a4052..00000000000
--- a/drivers/staging/brcm80211/include/proto/bcmip.h
+++ /dev/null
@@ -1,56 +0,0 @@
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 _bcmip_h_
18#define _bcmip_h_
19
20#include <packed_section_start.h>
21
22#define IP_VER_OFFSET 0x0
23#define IP_VER_MASK 0xf0
24#define IP_VER_SHIFT 4
25#define IP_VER_4 4
26#define IP_VER_6 6
27
28#define IP_VER(ip_body) \
29 ((((u8 *)(ip_body))[IP_VER_OFFSET] & IP_VER_MASK) >> IP_VER_SHIFT)
30
31#define IPV4_TOS_OFFSET 1
32
33#define IPV4_ADDR_LEN 4
34
35#define IPV4_TOS(ipv4_body) (((u8 *)(ipv4_body))[IPV4_TOS_OFFSET])
36
37#define IPV4_TOS_PREC_MASK 0xe0
38#define IPV4_TOS_PREC_SHIFT 5
39
40BWL_PRE_PACKED_STRUCT struct ipv4_addr {
41 u8 addr[IPV4_ADDR_LEN];
42} BWL_POST_PACKED_STRUCT;
43
44#define IPV6_TRAFFIC_CLASS(ipv6_body) \
45 (((((u8 *)(ipv6_body))[0] & 0x0f) << 4) | \
46 ((((u8 *)(ipv6_body))[1] & 0xf0) >> 4))
47
48#ifndef IP_TOS
49#define IP_TOS(ip_body) \
50 (IP_VER(ip_body) == IP_VER_4 ? IPV4_TOS(ip_body) : \
51 IP_VER(ip_body) == IP_VER_6 ? IPV6_TRAFFIC_CLASS(ip_body) : 0)
52#endif
53
54#include <packed_section_end.h>
55
56#endif /* _bcmip_h_ */
diff --git a/drivers/staging/brcm80211/include/proto/vlan.h b/drivers/staging/brcm80211/include/proto/vlan.h
deleted file mode 100644
index f8b4ce257e7..00000000000
--- a/drivers/staging/brcm80211/include/proto/vlan.h
+++ /dev/null
@@ -1,45 +0,0 @@
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 _vlan_h_
18#define _vlan_h_
19
20#include <packed_section_start.h>
21
22#define VLAN_VID_MASK 0xfff
23#define VLAN_CFI_SHIFT 12
24#define VLAN_PRI_SHIFT 13
25
26#define VLAN_PRI_MASK 7
27
28#define VLAN_TAG_LEN 4
29#define VLAN_TAG_OFFSET (2 * ETHER_ADDR_LEN)
30
31#define VLAN_TPID 0x8100
32
33struct ethervlan_header {
34 u8 ether_dhost[ETHER_ADDR_LEN];
35 u8 ether_shost[ETHER_ADDR_LEN];
36 u16 vlan_type;
37 u16 vlan_tag;
38 u16 ether_type;
39};
40
41#define ETHERVLAN_HDR_LEN (ETHER_HDR_LEN + VLAN_TAG_LEN)
42
43#include <packed_section_end.h>
44
45#endif /* _vlan_h_ */