aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/radio_2059.c
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2014-09-09 15:17:09 -0400
committerJohn W. Linville <linville@tuxdriver.com>2014-09-11 15:27:35 -0400
commitea422b2c33c7bf253c5e64c82cfb68363cf40d3f (patch)
treefee0f12cddeb1eab9812b847beba3fb13cd25a6e /drivers/net/wireless/b43/radio_2059.c
parent28f051f5540091417c5bc05ac2016480d697fd4b (diff)
b43: HT-PHY: Complete radio init (add missing entries)
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43/radio_2059.c')
-rw-r--r--drivers/net/wireless/b43/radio_2059.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/drivers/net/wireless/b43/radio_2059.c b/drivers/net/wireless/b43/radio_2059.c
index 38e31d857e3e..b2a53b233704 100644
--- a/drivers/net/wireless/b43/radio_2059.c
+++ b/drivers/net/wireless/b43/radio_2059.c
@@ -25,6 +25,13 @@
25#include "b43.h" 25#include "b43.h"
26#include "radio_2059.h" 26#include "radio_2059.h"
27 27
28/* Extracted from MMIO dump of 6.30.223.141 */
29static u16 r2059_phy_rev1_init[][2] = {
30 { 0x051, 0x70 }, { 0x05a, 0x03 }, { 0x079, 0x01 }, { 0x082, 0x70 },
31 { 0x083, 0x00 }, { 0x084, 0x70 }, { 0x09a, 0x7f }, { 0x0b6, 0x10 },
32 { 0x188, 0x05 },
33};
34
28#define RADIOREGS(r00, r01, r02, r03, r04, r05, r06, r07, r08, r09, \ 35#define RADIOREGS(r00, r01, r02, r03, r04, r05, r06, r07, r08, r09, \
29 r10, r11, r12, r13, r14, r15, r16, r17, r18, r19, \ 36 r10, r11, r12, r13, r14, r15, r16, r17, r18, r19, \
30 r20) \ 37 r20) \
@@ -139,6 +146,26 @@ static const struct b43_phy_ht_channeltab_e_radio2059 b43_phy_ht_channeltab_radi
139 }, 146 },
140}; 147};
141 148
149void r2059_upload_inittabs(struct b43_wldev *dev)
150{
151 struct b43_phy *phy = &dev->phy;
152 u16 *table = NULL;
153 u16 size, i;
154
155 switch (phy->rev) {
156 case 1:
157 table = r2059_phy_rev1_init[0];
158 size = ARRAY_SIZE(r2059_phy_rev1_init);
159 break;
160 default:
161 B43_WARN_ON(1);
162 return;
163 }
164
165 for (i = 0; i < size; i++, table += 2)
166 b43_radio_write(dev, R2059_ALL | table[0], table[1]);
167}
168
142const struct b43_phy_ht_channeltab_e_radio2059 169const struct b43_phy_ht_channeltab_e_radio2059
143*b43_phy_ht_get_channeltab_e_r2059(struct b43_wldev *dev, u16 freq) 170*b43_phy_ht_get_channeltab_e_r2059(struct b43_wldev *dev, u16 freq)
144{ 171{