blob: 1eb3a7be06fd30fe0826c0918213377d3c4dbc1c [file] [log] [blame]
Christopher N. Hesseafec0fd2017-02-09 19:17:06 +01001/*
Davis Mosenkovs8b4ba0d2017-01-09 12:11:31 -08002 * Copyright (C) 2017-2018, The LineageOS Project
Christopher N. Hesseafec0fd2017-02-09 19:17:06 +01003 *
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,
Christopher N. Hesseafec0fd2017-02-09 19:17:06 +010027 SEMCO3RD,
28 SEMCO,
29 WISOL,
30 TYPE_MAX = WISOL
31};
32
33struct company_range {
34 int type;
35 char macaddrs[MAX_RANGE_ENTRIES][RANGE_ENTRY_LEN];
36};
37
38/*
39 * address mappings from http://hwaddress.com
40 */
41
42static const struct company_range murata_ranges = {
43 .type = MURATA,
44 .macaddrs = {
45 "00:0e:6d",
46 "00:13:e0",
47 "00:21:e8",
48 "00:26:e8",
49 "00:37:6d",
50 "00:60:57",
ivanmeler083245a2018-11-27 11:55:20 +010051 "00:9d:6b",
Christopher N. Hesseafec0fd2017-02-09 19:17:06 +010052 "00:ae:fa",
53 "04:46:65",
54 "10:5f:06",
55 "10:a5:d0",
56 "10:d5:42",
57 "14:7d:c5",
Vahempioe4835712018-06-29 19:17:40 +020058 "1c:70:22",
Christopher N. Hesseafec0fd2017-02-09 19:17:06 +010059 "1c:99:4c",
60 "20:02:af",
61 "40:f3:08",
ivanmeler5e6355b2018-06-28 02:22:17 -070062 "44:91:60",
Christopher N. Hesseafec0fd2017-02-09 19:17:06 +010063 "44:a7:cf",
64 "5c:da:d4",
65 "5c:f8:a1",
66 "60:21:c0",
67 "60:f1:89",
68 "78:4b:87",
69 "78:52:1a",
70 "88:30:8a",
Davis Mosenkovs2fa73d62018-01-28 15:49:52 -080071 "8c:45:00",
Christopher N. Hesseafec0fd2017-02-09 19:17:06 +010072 "90:b6:86",
73 "98:f1:70",
Davis Mosenkovs8b4ba0d2017-01-09 12:11:31 -080074 "a0:c9:a0",
Christopher N. Hesseafec0fd2017-02-09 19:17:06 +010075 "a0:cc:2b",
76 "a4:08:ea",
77 "b0:72:bf",
78 "b8:d7:af",
79 "c8:14:79",
ivanmeleracec2d12018-08-28 20:27:39 +020080 "cc:c0:79",
Christopher N. Hesseafec0fd2017-02-09 19:17:06 +010081 "d0:e4:4a",
82 "d8:c4:6a",
83 "dc:ef:ca",
84 "f0:27:65",
85 "fc:c2:de",
86 "fc:db:b3"
87 }
88};
89
90static const struct company_range semcosh_ranges = {
91 .type = SEMCOSH,
92 .macaddrs = {
93 "34:23:ba",
94 "38:aa:3c",
95 "5c:0a:5b",
ivanmeler083245a2018-11-27 11:55:20 +010096 "6c:c7:ec",
Christopher N. Hesseafec0fd2017-02-09 19:17:06 +010097 "88:32:9b",
98 "90:18:7c",
99 "cc:3a:61"
100 }
101};
102
103static const struct company_range semco3rd_ranges = {
104 .type = SEMCO3RD,
105 .macaddrs = {
ivanmeler5e6355b2018-06-28 02:22:17 -0700106 "04:d6:aa",
Christopher N. Hesseafec0fd2017-02-09 19:17:06 +0100107 "2c:0e:3d",
108 "54:88:0e",
109 "84:38:38",
110 "8c:f5:a3",
111 "ac:36:13",
112 "ac:5f:3e",
113 "b4:79:a7",
114 "c0:97:27",
115 "c0:bd:d1",
116 "c8:ba:94",
Martin Bouchet87945412017-02-15 01:26:29 -0300117 "d0:22:be",
Christopher N. Hesseafec0fd2017-02-09 19:17:06 +0100118 "d0:25:44",
119 "e8:50:8b",
120 "ec:1f:72",
121 "ec:9b:f3",
Christopher N. Hesseafec0fd2017-02-09 19:17:06 +0100122 "f4:09:d8",
123 "f8:04:2e"
124 }
125};
126
127static const struct company_range semco_ranges = {
128 .type = SEMCO,
129 .macaddrs = {
130 "4c:66:41",
131 "51:f6:6b",
Sean hoyte3800ac2017-02-14 17:32:01 +0000132 "cc:07:ab",
Christopher N. Hesseafec0fd2017-02-09 19:17:06 +0100133 "d8:c4:e9",
Paul Keithc51a0952018-08-01 21:41:08 +0200134 "ec:9b:f3",
135 "f0:25:b7"
Christopher N. Hesseafec0fd2017-02-09 19:17:06 +0100136 }
137};
138
139static const struct company_range wisol_ranges = {
140 .type = WISOL,
141 .macaddrs = {
142 "48:5a:3f",
143 "70:2c:1f"
144 }
145};
146
147static const struct company_range *all_ranges[TYPE_MAX] = {
148 &murata_ranges,
149 &semcosh_ranges,
150 &semco3rd_ranges,
151 &semco_ranges,
152 &wisol_ranges
153};
154
155#endif // MACADDR_MAPPINGS_H