blob: 38e31d857e3e8bb1eb1c0875931cbd538ac0a379 [file] [log] [blame]
Rafał Miłecki5192bf52011-06-19 12:17:19 +02001/*
2
3 Broadcom B43 wireless driver
4 IEEE 802.11n 2059 radio device data tables
5
Rafał Miłecki108f4f32011-09-03 21:01:02 +02006 Copyright (c) 2011 Rafał Miłecki <zajec5@gmail.com>
7
Rafał Miłecki5192bf52011-06-19 12:17:19 +02008 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; see the file COPYING. If not, write to
20 the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
21 Boston, MA 02110-1301, USA.
22
23*/
24
25#include "b43.h"
26#include "radio_2059.h"
27
Rafał Miłeckifeb90632011-06-27 14:58:54 +020028#define RADIOREGS(r00, r01, r02, r03, r04, r05, r06, r07, r08, r09, \
29 r10, r11, r12, r13, r14, r15, r16, r17, r18, r19, \
Rafał Miłecki9a0bc412013-03-16 23:40:01 +010030 r20) \
Rafał Miłeckifeb90632011-06-27 14:58:54 +020031 .radio_syn16 = r00, \
32 .radio_syn17 = r01, \
33 .radio_syn22 = r02, \
34 .radio_syn25 = r03, \
35 .radio_syn27 = r04, \
36 .radio_syn28 = r05, \
37 .radio_syn29 = r06, \
38 .radio_syn2c = r07, \
39 .radio_syn2d = r08, \
40 .radio_syn37 = r09, \
41 .radio_syn41 = r10, \
42 .radio_syn43 = r11, \
43 .radio_syn47 = r12, \
Rafał Miłecki9a0bc412013-03-16 23:40:01 +010044 .radio_rxtx4a = r13, \
45 .radio_rxtx58 = r14, \
46 .radio_rxtx5a = r15, \
47 .radio_rxtx6a = r16, \
48 .radio_rxtx6d = r17, \
49 .radio_rxtx6e = r18, \
50 .radio_rxtx92 = r19, \
51 .radio_rxtx98 = r20
Rafał Miłeckifeb90632011-06-27 14:58:54 +020052
53#define PHYREGS(r0, r1, r2, r3, r4, r5) \
54 .phy_regs.bw1 = r0, \
55 .phy_regs.bw2 = r1, \
56 .phy_regs.bw3 = r2, \
57 .phy_regs.bw4 = r3, \
58 .phy_regs.bw5 = r4, \
59 .phy_regs.bw6 = r5
60
61static const struct b43_phy_ht_channeltab_e_radio2059 b43_phy_ht_channeltab_radio2059[] = {
62 { .freq = 2412,
63 RADIOREGS(0x48, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x6c,
64 0x09, 0x0f, 0x0a, 0x00, 0x0a, 0x00, 0x61, 0x03,
Rafał Miłeckifeb90632011-06-27 14:58:54 +020065 0x00, 0x00, 0x00, 0xf0, 0x00),
66 PHYREGS(0x03c9, 0x03c5, 0x03c1, 0x043a, 0x043f, 0x0443),
67 },
68 { .freq = 2417,
69 RADIOREGS(0x4b, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x71,
70 0x09, 0x0f, 0x0a, 0x00, 0x0a, 0x00, 0x61, 0x03,
Rafał Miłeckifeb90632011-06-27 14:58:54 +020071 0x00, 0x00, 0x00, 0xf0, 0x00),
72 PHYREGS(0x03cb, 0x03c7, 0x03c3, 0x0438, 0x043d, 0x0441),
73 },
74 { .freq = 2422,
75 RADIOREGS(0x4e, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x76,
76 0x09, 0x0f, 0x09, 0x00, 0x09, 0x00, 0x61, 0x03,
Rafał Miłeckifeb90632011-06-27 14:58:54 +020077 0x00, 0x00, 0x00, 0xf0, 0x00),
78 PHYREGS(0x03cd, 0x03c9, 0x03c5, 0x0436, 0x043a, 0x043f),
79 },
80 { .freq = 2427,
81 RADIOREGS(0x52, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x7b,
82 0x09, 0x0f, 0x09, 0x00, 0x09, 0x00, 0x61, 0x03,
Rafał Miłeckifeb90632011-06-27 14:58:54 +020083 0x00, 0x00, 0x00, 0xf0, 0x00),
84 PHYREGS(0x03cf, 0x03cb, 0x03c7, 0x0434, 0x0438, 0x043d),
85 },
86 { .freq = 2432,
87 RADIOREGS(0x55, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x80,
88 0x09, 0x0f, 0x08, 0x00, 0x08, 0x00, 0x61, 0x03,
Rafał Miłeckifeb90632011-06-27 14:58:54 +020089 0x00, 0x00, 0x00, 0xf0, 0x00),
90 PHYREGS(0x03d1, 0x03cd, 0x03c9, 0x0431, 0x0436, 0x043a),
91 },
92 { .freq = 2437,
93 RADIOREGS(0x58, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x85,
94 0x09, 0x0f, 0x08, 0x00, 0x08, 0x00, 0x61, 0x03,
Rafał Miłeckifeb90632011-06-27 14:58:54 +020095 0x00, 0x00, 0x00, 0xf0, 0x00),
96 PHYREGS(0x03d3, 0x03cf, 0x03cb, 0x042f, 0x0434, 0x0438),
97 },
98 { .freq = 2442,
99 RADIOREGS(0x5c, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x8a,
100 0x09, 0x0f, 0x07, 0x00, 0x07, 0x00, 0x61, 0x03,
Rafał Miłeckifeb90632011-06-27 14:58:54 +0200101 0x00, 0x00, 0x00, 0xf0, 0x00),
102 PHYREGS(0x03d5, 0x03d1, 0x03cd, 0x042d, 0x0431, 0x0436),
103 },
104 { .freq = 2447,
105 RADIOREGS(0x5f, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x8f,
106 0x09, 0x0f, 0x07, 0x00, 0x07, 0x00, 0x61, 0x03,
Rafał Miłeckifeb90632011-06-27 14:58:54 +0200107 0x00, 0x00, 0x00, 0xf0, 0x00),
108 PHYREGS(0x03d7, 0x03d3, 0x03cf, 0x042b, 0x042f, 0x0434),
109 },
110 { .freq = 2452,
111 RADIOREGS(0x62, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x94,
112 0x09, 0x0f, 0x07, 0x00, 0x07, 0x00, 0x61, 0x03,
Rafał Miłeckifeb90632011-06-27 14:58:54 +0200113 0x00, 0x00, 0x00, 0xf0, 0x00),
114 PHYREGS(0x03d9, 0x03d5, 0x03d1, 0x0429, 0x042d, 0x0431),
115 },
116 { .freq = 2457,
117 RADIOREGS(0x66, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x99,
118 0x09, 0x0f, 0x06, 0x00, 0x06, 0x00, 0x61, 0x03,
Rafał Miłeckifeb90632011-06-27 14:58:54 +0200119 0x00, 0x00, 0x00, 0xf0, 0x00),
120 PHYREGS(0x03db, 0x03d7, 0x03d3, 0x0427, 0x042b, 0x042f),
121 },
122 { .freq = 2462,
123 RADIOREGS(0x69, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x9e,
124 0x09, 0x0f, 0x06, 0x00, 0x06, 0x00, 0x61, 0x03,
Rafał Miłeckifeb90632011-06-27 14:58:54 +0200125 0x00, 0x00, 0x00, 0xf0, 0x00),
126 PHYREGS(0x03dd, 0x03d9, 0x03d5, 0x0424, 0x0429, 0x042d),
127 },
128 { .freq = 2467,
129 RADIOREGS(0x6c, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0xa3,
130 0x09, 0x0f, 0x05, 0x00, 0x05, 0x00, 0x61, 0x03,
Rafał Miłeckifeb90632011-06-27 14:58:54 +0200131 0x00, 0x00, 0x00, 0xf0, 0x00),
132 PHYREGS(0x03df, 0x03db, 0x03d7, 0x0422, 0x0427, 0x042b),
133 },
134 { .freq = 2472,
135 RADIOREGS(0x70, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0xa8,
136 0x09, 0x0f, 0x05, 0x00, 0x05, 0x00, 0x61, 0x03,
Rafał Miłeckifeb90632011-06-27 14:58:54 +0200137 0x00, 0x00, 0x00, 0xf0, 0x00),
138 PHYREGS(0x03e1, 0x03dd, 0x03d9, 0x0420, 0x0424, 0x0429),
139 },
140};
141
Rafał Miłecki5192bf52011-06-19 12:17:19 +0200142const struct b43_phy_ht_channeltab_e_radio2059
143*b43_phy_ht_get_channeltab_e_r2059(struct b43_wldev *dev, u16 freq)
144{
Rafał Miłecki49ac26f2011-07-17 10:30:33 +0200145 const struct b43_phy_ht_channeltab_e_radio2059 *e;
146 unsigned int i;
147
148 e = b43_phy_ht_channeltab_radio2059;
149 for (i = 0; i < ARRAY_SIZE(b43_phy_ht_channeltab_radio2059); i++, e++) {
150 if (e->freq == freq)
151 return e;
152 }
153
Rafał Miłecki5192bf52011-06-19 12:17:19 +0200154 return NULL;
155}