Linux Audio

Check our new training course

Loading...
v3.1
  1/*
  2
  3  Broadcom B43 wireless driver
  4  IEEE 802.11n 2059 radio device data tables
  5
 
 
  6  This program is free software; you can redistribute it and/or modify
  7  it under the terms of the GNU General Public License as published by
  8  the Free Software Foundation; either version 2 of the License, or
  9  (at your option) any later version.
 10
 11  This program is distributed in the hope that it will be useful,
 12  but WITHOUT ANY WARRANTY; without even the implied warranty of
 13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 14  GNU General Public License for more details.
 15
 16  You should have received a copy of the GNU General Public License
 17  along with this program; see the file COPYING.  If not, write to
 18  the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
 19  Boston, MA 02110-1301, USA.
 20
 21*/
 22
 23#include "b43.h"
 24#include "radio_2059.h"
 25
 26#define RADIOREGS(r00, r01, r02, r03, r04, r05, r06, r07, r08, r09, \
 27		  r10, r11, r12, r13, r14, r15, r16, r17, r18, r19, \
 28		  r20, r21, r22, r23, r24, r25, r26, r27, r28) \
 29	.radio_syn16			= r00,	\
 30	.radio_syn17			= r01,	\
 31	.radio_syn22			= r02,	\
 32	.radio_syn25			= r03,	\
 33	.radio_syn27			= r04,	\
 34	.radio_syn28			= r05,	\
 35	.radio_syn29			= r06,	\
 36	.radio_syn2c			= r07,	\
 37	.radio_syn2d			= r08,	\
 38	.radio_syn37			= r09,	\
 39	.radio_syn41			= r10,	\
 40	.radio_syn43			= r11,	\
 41	.radio_syn47			= r12,	\
 42	.radio_syn4a			= r13,	\
 43	.radio_syn58			= r14,	\
 44	.radio_syn5a			= r15,	\
 45	.radio_syn6a			= r16,	\
 46	.radio_syn6d			= r17,	\
 47	.radio_syn6e			= r18,	\
 48	.radio_syn92			= r19,	\
 49	.radio_syn98			= r20,	\
 50	.radio_rxtx4a			= r21,	\
 51	.radio_rxtx58			= r22,	\
 52	.radio_rxtx5a			= r23,	\
 53	.radio_rxtx6a			= r24,	\
 54	.radio_rxtx6d			= r25,	\
 55	.radio_rxtx6e			= r26,	\
 56	.radio_rxtx92			= r27,	\
 57	.radio_rxtx98			= r28
 58
 59#define PHYREGS(r0, r1, r2, r3, r4, r5)	\
 60	.phy_regs.bw1	= r0,	\
 61	.phy_regs.bw2	= r1,	\
 62	.phy_regs.bw3	= r2,	\
 63	.phy_regs.bw4	= r3,	\
 64	.phy_regs.bw5	= r4,	\
 65	.phy_regs.bw6	= r5
 66
 67static const struct b43_phy_ht_channeltab_e_radio2059 b43_phy_ht_channeltab_radio2059[] = {
 68  {	.freq			= 2412,
 69	RADIOREGS(0x48, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x6c,
 70		  0x09, 0x0f, 0x0a, 0x00, 0x0a, 0x00, 0x61, 0x03,
 71		  0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
 72		  0x00, 0x00, 0x00, 0xf0, 0x00),
 73	PHYREGS(0x03c9, 0x03c5, 0x03c1, 0x043a, 0x043f, 0x0443),
 74  },
 75  {	.freq			= 2417,
 76	RADIOREGS(0x4b, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x71,
 77		  0x09, 0x0f, 0x0a, 0x00, 0x0a, 0x00, 0x61, 0x03,
 78		  0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
 79		  0x00, 0x00, 0x00, 0xf0, 0x00),
 80	PHYREGS(0x03cb, 0x03c7, 0x03c3, 0x0438, 0x043d, 0x0441),
 81  },
 82  {	.freq			= 2422,
 83	RADIOREGS(0x4e, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x76,
 84		  0x09, 0x0f, 0x09, 0x00, 0x09, 0x00, 0x61, 0x03,
 85		  0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
 86		  0x00, 0x00, 0x00, 0xf0, 0x00),
 87	PHYREGS(0x03cd, 0x03c9, 0x03c5, 0x0436, 0x043a, 0x043f),
 88  },
 89  {	.freq			= 2427,
 90	RADIOREGS(0x52, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x7b,
 91		  0x09, 0x0f, 0x09, 0x00, 0x09, 0x00, 0x61, 0x03,
 92		  0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
 93		  0x00, 0x00, 0x00, 0xf0, 0x00),
 94	PHYREGS(0x03cf, 0x03cb, 0x03c7, 0x0434, 0x0438, 0x043d),
 95  },
 96  {	.freq			= 2432,
 97	RADIOREGS(0x55, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x80,
 98		  0x09, 0x0f, 0x08, 0x00, 0x08, 0x00, 0x61, 0x03,
 99		  0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
100		  0x00, 0x00, 0x00, 0xf0, 0x00),
101	PHYREGS(0x03d1, 0x03cd, 0x03c9, 0x0431, 0x0436, 0x043a),
102  },
103  {	.freq			= 2437,
104	RADIOREGS(0x58, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x85,
105		  0x09, 0x0f, 0x08, 0x00, 0x08, 0x00, 0x61, 0x03,
106		  0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
107		  0x00, 0x00, 0x00, 0xf0, 0x00),
108	PHYREGS(0x03d3, 0x03cf, 0x03cb, 0x042f, 0x0434, 0x0438),
109  },
110  {	.freq			= 2442,
111	RADIOREGS(0x5c, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x8a,
112		  0x09, 0x0f, 0x07, 0x00, 0x07, 0x00, 0x61, 0x03,
113		  0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
114		  0x00, 0x00, 0x00, 0xf0, 0x00),
115	PHYREGS(0x03d5, 0x03d1, 0x03cd, 0x042d, 0x0431, 0x0436),
116  },
117  {	.freq			= 2447,
118	RADIOREGS(0x5f, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x8f,
119		  0x09, 0x0f, 0x07, 0x00, 0x07, 0x00, 0x61, 0x03,
120		  0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
121		  0x00, 0x00, 0x00, 0xf0, 0x00),
122	PHYREGS(0x03d7, 0x03d3, 0x03cf, 0x042b, 0x042f, 0x0434),
123  },
124  {	.freq			= 2452,
125	RADIOREGS(0x62, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x94,
126		  0x09, 0x0f, 0x07, 0x00, 0x07, 0x00, 0x61, 0x03,
127		  0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
128		  0x00, 0x00, 0x00, 0xf0, 0x00),
129	PHYREGS(0x03d9, 0x03d5, 0x03d1, 0x0429, 0x042d, 0x0431),
130  },
131  {	.freq			= 2457,
132	RADIOREGS(0x66, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x99,
133		  0x09, 0x0f, 0x06, 0x00, 0x06, 0x00, 0x61, 0x03,
134		  0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
135		  0x00, 0x00, 0x00, 0xf0, 0x00),
136	PHYREGS(0x03db, 0x03d7, 0x03d3, 0x0427, 0x042b, 0x042f),
137  },
138  {	.freq			= 2462,
139	RADIOREGS(0x69, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x9e,
140		  0x09, 0x0f, 0x06, 0x00, 0x06, 0x00, 0x61, 0x03,
141		  0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
142		  0x00, 0x00, 0x00, 0xf0, 0x00),
143	PHYREGS(0x03dd, 0x03d9, 0x03d5, 0x0424, 0x0429, 0x042d),
144  },
145  {	.freq			= 2467,
146	RADIOREGS(0x6c, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0xa3,
147		  0x09, 0x0f, 0x05, 0x00, 0x05, 0x00, 0x61, 0x03,
148		  0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
149		  0x00, 0x00, 0x00, 0xf0, 0x00),
150	PHYREGS(0x03df, 0x03db, 0x03d7, 0x0422, 0x0427, 0x042b),
151  },
152  {	.freq			= 2472,
153	RADIOREGS(0x70, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0xa8,
154		  0x09, 0x0f, 0x05, 0x00, 0x05, 0x00, 0x61, 0x03,
155		  0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
156		  0x00, 0x00, 0x00, 0xf0, 0x00),
157	PHYREGS(0x03e1, 0x03dd, 0x03d9, 0x0420, 0x0424, 0x0429),
158  },
159};
160
161const struct b43_phy_ht_channeltab_e_radio2059
162*b43_phy_ht_get_channeltab_e_r2059(struct b43_wldev *dev, u16 freq)
163{
164	const struct b43_phy_ht_channeltab_e_radio2059 *e;
165	unsigned int i;
166
167	e = b43_phy_ht_channeltab_radio2059;
168	for (i = 0; i < ARRAY_SIZE(b43_phy_ht_channeltab_radio2059); i++, e++) {
169		if (e->freq == freq)
170			return e;
171	}
172
173	return NULL;
174}
v3.5.6
  1/*
  2
  3  Broadcom B43 wireless driver
  4  IEEE 802.11n 2059 radio device data tables
  5
  6  Copyright (c) 2011 Rafał Miłecki <zajec5@gmail.com>
  7
  8  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
 28#define RADIOREGS(r00, r01, r02, r03, r04, r05, r06, r07, r08, r09, \
 29		  r10, r11, r12, r13, r14, r15, r16, r17, r18, r19, \
 30		  r20, r21, r22, r23, r24, r25, r26, r27, r28) \
 31	.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,	\
 44	.radio_syn4a			= r13,	\
 45	.radio_syn58			= r14,	\
 46	.radio_syn5a			= r15,	\
 47	.radio_syn6a			= r16,	\
 48	.radio_syn6d			= r17,	\
 49	.radio_syn6e			= r18,	\
 50	.radio_syn92			= r19,	\
 51	.radio_syn98			= r20,	\
 52	.radio_rxtx4a			= r21,	\
 53	.radio_rxtx58			= r22,	\
 54	.radio_rxtx5a			= r23,	\
 55	.radio_rxtx6a			= r24,	\
 56	.radio_rxtx6d			= r25,	\
 57	.radio_rxtx6e			= r26,	\
 58	.radio_rxtx92			= r27,	\
 59	.radio_rxtx98			= r28
 60
 61#define PHYREGS(r0, r1, r2, r3, r4, r5)	\
 62	.phy_regs.bw1	= r0,	\
 63	.phy_regs.bw2	= r1,	\
 64	.phy_regs.bw3	= r2,	\
 65	.phy_regs.bw4	= r3,	\
 66	.phy_regs.bw5	= r4,	\
 67	.phy_regs.bw6	= r5
 68
 69static const struct b43_phy_ht_channeltab_e_radio2059 b43_phy_ht_channeltab_radio2059[] = {
 70  {	.freq			= 2412,
 71	RADIOREGS(0x48, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x6c,
 72		  0x09, 0x0f, 0x0a, 0x00, 0x0a, 0x00, 0x61, 0x03,
 73		  0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
 74		  0x00, 0x00, 0x00, 0xf0, 0x00),
 75	PHYREGS(0x03c9, 0x03c5, 0x03c1, 0x043a, 0x043f, 0x0443),
 76  },
 77  {	.freq			= 2417,
 78	RADIOREGS(0x4b, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x71,
 79		  0x09, 0x0f, 0x0a, 0x00, 0x0a, 0x00, 0x61, 0x03,
 80		  0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
 81		  0x00, 0x00, 0x00, 0xf0, 0x00),
 82	PHYREGS(0x03cb, 0x03c7, 0x03c3, 0x0438, 0x043d, 0x0441),
 83  },
 84  {	.freq			= 2422,
 85	RADIOREGS(0x4e, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x76,
 86		  0x09, 0x0f, 0x09, 0x00, 0x09, 0x00, 0x61, 0x03,
 87		  0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
 88		  0x00, 0x00, 0x00, 0xf0, 0x00),
 89	PHYREGS(0x03cd, 0x03c9, 0x03c5, 0x0436, 0x043a, 0x043f),
 90  },
 91  {	.freq			= 2427,
 92	RADIOREGS(0x52, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x7b,
 93		  0x09, 0x0f, 0x09, 0x00, 0x09, 0x00, 0x61, 0x03,
 94		  0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
 95		  0x00, 0x00, 0x00, 0xf0, 0x00),
 96	PHYREGS(0x03cf, 0x03cb, 0x03c7, 0x0434, 0x0438, 0x043d),
 97  },
 98  {	.freq			= 2432,
 99	RADIOREGS(0x55, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x80,
100		  0x09, 0x0f, 0x08, 0x00, 0x08, 0x00, 0x61, 0x03,
101		  0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
102		  0x00, 0x00, 0x00, 0xf0, 0x00),
103	PHYREGS(0x03d1, 0x03cd, 0x03c9, 0x0431, 0x0436, 0x043a),
104  },
105  {	.freq			= 2437,
106	RADIOREGS(0x58, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x85,
107		  0x09, 0x0f, 0x08, 0x00, 0x08, 0x00, 0x61, 0x03,
108		  0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
109		  0x00, 0x00, 0x00, 0xf0, 0x00),
110	PHYREGS(0x03d3, 0x03cf, 0x03cb, 0x042f, 0x0434, 0x0438),
111  },
112  {	.freq			= 2442,
113	RADIOREGS(0x5c, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x8a,
114		  0x09, 0x0f, 0x07, 0x00, 0x07, 0x00, 0x61, 0x03,
115		  0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
116		  0x00, 0x00, 0x00, 0xf0, 0x00),
117	PHYREGS(0x03d5, 0x03d1, 0x03cd, 0x042d, 0x0431, 0x0436),
118  },
119  {	.freq			= 2447,
120	RADIOREGS(0x5f, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x8f,
121		  0x09, 0x0f, 0x07, 0x00, 0x07, 0x00, 0x61, 0x03,
122		  0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
123		  0x00, 0x00, 0x00, 0xf0, 0x00),
124	PHYREGS(0x03d7, 0x03d3, 0x03cf, 0x042b, 0x042f, 0x0434),
125  },
126  {	.freq			= 2452,
127	RADIOREGS(0x62, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x94,
128		  0x09, 0x0f, 0x07, 0x00, 0x07, 0x00, 0x61, 0x03,
129		  0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
130		  0x00, 0x00, 0x00, 0xf0, 0x00),
131	PHYREGS(0x03d9, 0x03d5, 0x03d1, 0x0429, 0x042d, 0x0431),
132  },
133  {	.freq			= 2457,
134	RADIOREGS(0x66, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x99,
135		  0x09, 0x0f, 0x06, 0x00, 0x06, 0x00, 0x61, 0x03,
136		  0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
137		  0x00, 0x00, 0x00, 0xf0, 0x00),
138	PHYREGS(0x03db, 0x03d7, 0x03d3, 0x0427, 0x042b, 0x042f),
139  },
140  {	.freq			= 2462,
141	RADIOREGS(0x69, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x9e,
142		  0x09, 0x0f, 0x06, 0x00, 0x06, 0x00, 0x61, 0x03,
143		  0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
144		  0x00, 0x00, 0x00, 0xf0, 0x00),
145	PHYREGS(0x03dd, 0x03d9, 0x03d5, 0x0424, 0x0429, 0x042d),
146  },
147  {	.freq			= 2467,
148	RADIOREGS(0x6c, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0xa3,
149		  0x09, 0x0f, 0x05, 0x00, 0x05, 0x00, 0x61, 0x03,
150		  0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
151		  0x00, 0x00, 0x00, 0xf0, 0x00),
152	PHYREGS(0x03df, 0x03db, 0x03d7, 0x0422, 0x0427, 0x042b),
153  },
154  {	.freq			= 2472,
155	RADIOREGS(0x70, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0xa8,
156		  0x09, 0x0f, 0x05, 0x00, 0x05, 0x00, 0x61, 0x03,
157		  0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x61, 0x03,
158		  0x00, 0x00, 0x00, 0xf0, 0x00),
159	PHYREGS(0x03e1, 0x03dd, 0x03d9, 0x0420, 0x0424, 0x0429),
160  },
161};
162
163const struct b43_phy_ht_channeltab_e_radio2059
164*b43_phy_ht_get_channeltab_e_r2059(struct b43_wldev *dev, u16 freq)
165{
166	const struct b43_phy_ht_channeltab_e_radio2059 *e;
167	unsigned int i;
168
169	e = b43_phy_ht_channeltab_radio2059;
170	for (i = 0; i < ARRAY_SIZE(b43_phy_ht_channeltab_radio2059); i++, e++) {
171		if (e->freq == freq)
172			return e;
173	}
174
175	return NULL;
176}