aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2010-10-14 17:01:02 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-11-09 16:13:23 -0500
commit038aaa382eb0a8fd6a0bbae7abc1383b9b57c543 (patch)
tree655f8f741e78ad5a3c55d89fdf2a5da75ba92f9f
parentc8ddb2713c624f432fa5fe3c7ecffcdda46ea0d4 (diff)
b43: N-PHY: define channel table struct for rev3+ devices
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/b43/radio_2056.c51
-rw-r--r--drivers/net/wireless/b43/radio_2056.h40
2 files changed, 88 insertions, 3 deletions
diff --git a/drivers/net/wireless/b43/radio_2056.c b/drivers/net/wireless/b43/radio_2056.c
index d8563192ce5..f710c01f2cc 100644
--- a/drivers/net/wireless/b43/radio_2056.c
+++ b/drivers/net/wireless/b43/radio_2056.c
@@ -24,9 +24,60 @@
24#include "radio_2056.h" 24#include "radio_2056.h"
25#include "phy_common.h" 25#include "phy_common.h"
26 26
27#define RADIOREGS3(r00, r01, r02, r03, r04, r05, r06, r07, r08, r09, \
28 r10, r11, r12, r13, r14, r15, r16, r17, r18, r19, \
29 r20, r21, r22, r23, r24, r25, r26, r27, r28, r29, \
30 r30, r31, r32, r33, r34, r35, r36) \
31 .radio_syn_pll_vcocal1 = r00, \
32 .radio_syn_pll_vcocal2 = r01, \
33 .radio_syn_pll_refdiv = r02, \
34 .radio_syn_pll_mmd2 = r03, \
35 .radio_syn_pll_mmd1 = r04, \
36 .radio_syn_pll_loopfilter1 = r05, \
37 .radio_syn_pll_loopfilter2 = r06, \
38 .radio_syn_pll_loopfilter3 = r07, \
39 .radio_syn_pll_loopfilter4 = r08, \
40 .radio_syn_pll_loopfilter5 = r09, \
41 .radio_syn_reserved_addr27 = r10, \
42 .radio_syn_reserved_addr28 = r11, \
43 .radio_syn_reserved_addr29 = r12, \
44 .radio_syn_logen_vcobuf1 = r13, \
45 .radio_syn_logen_mixer2 = r14, \
46 .radio_syn_logen_buf3 = r15, \
47 .radio_syn_logen_buf4 = r16, \
48 .radio_rx0_lnaa_tune = r17, \
49 .radio_rx0_lnag_tune = r18, \
50 .radio_tx0_intpaa_boost_tune = r19, \
51 .radio_tx0_intpag_boost_tune = r20, \
52 .radio_tx0_pada_boost_tune = r21, \
53 .radio_tx0_padg_boost_tune = r22, \
54 .radio_tx0_pgaa_boost_tune = r23, \
55 .radio_tx0_pgag_boost_tune = r24, \
56 .radio_tx0_mixa_boost_tune = r25, \
57 .radio_tx0_mixg_boost_tune = r26, \
58 .radio_rx1_lnaa_tune = r27, \
59 .radio_rx1_lnag_tune = r28, \
60 .radio_tx1_intpaa_boost_tune = r29, \
61 .radio_tx1_intpag_boost_tune = r30, \
62 .radio_tx1_pada_boost_tune = r31, \
63 .radio_tx1_padg_boost_tune = r32, \
64 .radio_tx1_pgaa_boost_tune = r33, \
65 .radio_tx1_pgag_boost_tune = r34, \
66 .radio_tx1_mixa_boost_tune = r35, \
67 .radio_tx1_mixg_boost_tune = r36
68
69#define PHYREGS(r0, r1, r2, r3, r4, r5) \
70 .phy_regs.phy_bw1a = r0, \
71 .phy_regs.phy_bw2 = r1, \
72 .phy_regs.phy_bw3 = r2, \
73 .phy_regs.phy_bw4 = r3, \
74 .phy_regs.phy_bw5 = r4, \
75 .phy_regs.phy_bw6 = r5
76
27static const struct b43_nphy_channeltab_entry_rev3 b43_nphy_channeltab_rev3[] = { 77static const struct b43_nphy_channeltab_entry_rev3 b43_nphy_channeltab_rev3[] = {
28}; 78};
29 79
80/* TODO: add support for rev4+ devices by searching in rev4+ tables */
30const struct b43_nphy_channeltab_entry_rev3 * 81const struct b43_nphy_channeltab_entry_rev3 *
31b43_nphy_get_chantabent_rev3(struct b43_wldev *dev, u16 freq) 82b43_nphy_get_chantabent_rev3(struct b43_wldev *dev, u16 freq)
32{ 83{
diff --git a/drivers/net/wireless/b43/radio_2056.h b/drivers/net/wireless/b43/radio_2056.h
index fda6dafecb8..60341d7ae67 100644
--- a/drivers/net/wireless/b43/radio_2056.h
+++ b/drivers/net/wireless/b43/radio_2056.h
@@ -29,12 +29,46 @@
29#include "tables_nphy.h" 29#include "tables_nphy.h"
30 30
31struct b43_nphy_channeltab_entry_rev3 { 31struct b43_nphy_channeltab_entry_rev3 {
32 /* The channel number */
33 u8 channel;
34 /* The channel frequency in MHz */ 32 /* The channel frequency in MHz */
35 u16 freq; 33 u16 freq;
36 /* Radio register values on channelswitch */ 34 /* Radio register values on channelswitch */
37 /* TODO */ 35 u8 radio_syn_pll_vcocal1;
36 u8 radio_syn_pll_vcocal2;
37 u8 radio_syn_pll_refdiv;
38 u8 radio_syn_pll_mmd2;
39 u8 radio_syn_pll_mmd1;
40 u8 radio_syn_pll_loopfilter1;
41 u8 radio_syn_pll_loopfilter2;
42 u8 radio_syn_pll_loopfilter3;
43 u8 radio_syn_pll_loopfilter4;
44 u8 radio_syn_pll_loopfilter5;
45 u8 radio_syn_reserved_addr27;
46 u8 radio_syn_reserved_addr28;
47 u8 radio_syn_reserved_addr29;
48 u8 radio_syn_logen_vcobuf1;
49 u8 radio_syn_logen_mixer2;
50 u8 radio_syn_logen_buf3;
51 u8 radio_syn_logen_buf4;
52 u8 radio_rx0_lnaa_tune;
53 u8 radio_rx0_lnag_tune;
54 u8 radio_tx0_intpaa_boost_tune;
55 u8 radio_tx0_intpag_boost_tune;
56 u8 radio_tx0_pada_boost_tune;
57 u8 radio_tx0_padg_boost_tune;
58 u8 radio_tx0_pgaa_boost_tune;
59 u8 radio_tx0_pgag_boost_tune;
60 u8 radio_tx0_mixa_boost_tune;
61 u8 radio_tx0_mixg_boost_tune;
62 u8 radio_rx1_lnaa_tune;
63 u8 radio_rx1_lnag_tune;
64 u8 radio_tx1_intpaa_boost_tune;
65 u8 radio_tx1_intpag_boost_tune;
66 u8 radio_tx1_pada_boost_tune;
67 u8 radio_tx1_padg_boost_tune;
68 u8 radio_tx1_pgaa_boost_tune;
69 u8 radio_tx1_pgag_boost_tune;
70 u8 radio_tx1_mixa_boost_tune;
71 u8 radio_tx1_mixg_boost_tune;
38 /* PHY register values on channelswitch */ 72 /* PHY register values on channelswitch */
39 struct b43_phy_n_sfo_cfg phy_regs; 73 struct b43_phy_n_sfo_cfg phy_regs;
40}; 74};