blob: 56d3666cc4f746802ad0a641567c474c2802fb93 [file] [log] [blame]
Christopher N. Hesseafec0fd2017-02-09 19:17:06 +01001/*
2 * Copyright (C) 2017, The LineageOS Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef MACADDR_MAPPINGS_H
18#define MACADDR_MAPPINGS_H
19
20#define MAX_RANGE_ENTRIES 100
21#define RANGE_ENTRY_LEN 9
22
23enum Type {
24 NONE,
25 MURATA,
26 SEMCOSH,
27 SEMCOVE,
28 SEMCO3RD,
29 SEMCO,
30 WISOL,
31 TYPE_MAX = WISOL
32};
33
34struct company_range {
35 int type;
36 char macaddrs[MAX_RANGE_ENTRIES][RANGE_ENTRY_LEN];
37};
38
39/*
40 * address mappings from http://hwaddress.com
41 */
42
43static const struct company_range murata_ranges = {
44 .type = MURATA,
45 .macaddrs = {
46 "00:0e:6d",
47 "00:13:e0",
48 "00:21:e8",
49 "00:26:e8",
50 "00:37:6d",
51 "00:60:57",
52 "00:ae:fa",
53 "04:46:65",
54 "10:5f:06",
55 "10:a5:d0",
56 "10:d5:42",
57 "14:7d:c5",
58 "1c:99:4c",
59 "20:02:af",
60 "40:f3:08",
61 "44:a7:cf",
62 "5c:da:d4",
63 "5c:f8:a1",
64 "60:21:c0",
65 "60:f1:89",
66 "78:4b:87",
67 "78:52:1a",
68 "88:30:8a",
69 "90:b6:86",
70 "98:f1:70",
71 "a0:cc:2b",
72 "a4:08:ea",
73 "b0:72:bf",
74 "b8:d7:af",
75 "c8:14:79",
76 "d0:e4:4a",
77 "d8:c4:6a",
78 "dc:ef:ca",
79 "f0:27:65",
80 "fc:c2:de",
81 "fc:db:b3"
82 }
83};
84
85static const struct company_range semcosh_ranges = {
86 .type = SEMCOSH,
87 .macaddrs = {
88 "34:23:ba",
89 "38:aa:3c",
90 "5c:0a:5b",
91 "88:32:9b",
92 "90:18:7c",
93 "cc:3a:61"
94 }
95};
96
97static const struct company_range semco3rd_ranges = {
98 .type = SEMCO3RD,
99 .macaddrs = {
100 "2c:0e:3d",
101 "54:88:0e",
102 "84:38:38",
103 "8c:f5:a3",
104 "ac:36:13",
105 "ac:5f:3e",
106 "b4:79:a7",
107 "c0:97:27",
108 "c0:bd:d1",
109 "c8:ba:94",
110 "d0:25:44",
111 "e8:50:8b",
112 "ec:1f:72",
113 "ec:9b:f3",
114 "f0:25:b7",
115 "f4:09:d8",
116 "f8:04:2e"
117 }
118};
119
120static const struct company_range semco_ranges = {
121 .type = SEMCO,
122 .macaddrs = {
123 "4c:66:41",
124 "51:f6:6b",
125 "d8:c4:e9",
126 "ec:9b:f3"
127 }
128};
129
130static const struct company_range wisol_ranges = {
131 .type = WISOL,
132 .macaddrs = {
133 "48:5a:3f",
134 "70:2c:1f"
135 }
136};
137
138static const struct company_range *all_ranges[TYPE_MAX] = {
139 &murata_ranges,
140 &semcosh_ranges,
141 &semco3rd_ranges,
142 &semco_ranges,
143 &wisol_ranges
144};
145
146#endif // MACADDR_MAPPINGS_H