diff options
Diffstat (limited to 'drivers/net/wireless/b43/tables_nphy.h')
-rw-r--r-- | drivers/net/wireless/b43/tables_nphy.h | 107 |
1 files changed, 53 insertions, 54 deletions
diff --git a/drivers/net/wireless/b43/tables_nphy.h b/drivers/net/wireless/b43/tables_nphy.h index 8fc1da9f8fe5..18569367ce43 100644 --- a/drivers/net/wireless/b43/tables_nphy.h +++ b/drivers/net/wireless/b43/tables_nphy.h | |||
@@ -3,7 +3,6 @@ | |||
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | 5 | ||
6 | |||
7 | struct b43_phy_n_sfo_cfg { | 6 | struct b43_phy_n_sfo_cfg { |
8 | u16 phy_bw1a; | 7 | u16 phy_bw1a; |
9 | u16 phy_bw2; | 8 | u16 phy_bw2; |
@@ -13,52 +12,6 @@ struct b43_phy_n_sfo_cfg { | |||
13 | u16 phy_bw6; | 12 | u16 phy_bw6; |
14 | }; | 13 | }; |
15 | 14 | ||
16 | struct b43_nphy_channeltab_entry_rev2 { | ||
17 | /* The channel number */ | ||
18 | u8 channel; | ||
19 | /* The channel frequency in MHz */ | ||
20 | u16 freq; | ||
21 | /* An unknown value */ | ||
22 | u16 unk2; | ||
23 | /* Radio register values on channelswitch */ | ||
24 | u8 radio_pll_ref; | ||
25 | u8 radio_rf_pllmod0; | ||
26 | u8 radio_rf_pllmod1; | ||
27 | u8 radio_vco_captail; | ||
28 | u8 radio_vco_cal1; | ||
29 | u8 radio_vco_cal2; | ||
30 | u8 radio_pll_lfc1; | ||
31 | u8 radio_pll_lfr1; | ||
32 | u8 radio_pll_lfc2; | ||
33 | u8 radio_lgbuf_cenbuf; | ||
34 | u8 radio_lgen_tune1; | ||
35 | u8 radio_lgen_tune2; | ||
36 | u8 radio_c1_lgbuf_atune; | ||
37 | u8 radio_c1_lgbuf_gtune; | ||
38 | u8 radio_c1_rx_rfr1; | ||
39 | u8 radio_c1_tx_pgapadtn; | ||
40 | u8 radio_c1_tx_mxbgtrim; | ||
41 | u8 radio_c2_lgbuf_atune; | ||
42 | u8 radio_c2_lgbuf_gtune; | ||
43 | u8 radio_c2_rx_rfr1; | ||
44 | u8 radio_c2_tx_pgapadtn; | ||
45 | u8 radio_c2_tx_mxbgtrim; | ||
46 | /* PHY register values on channelswitch */ | ||
47 | struct b43_phy_n_sfo_cfg phy_regs; | ||
48 | }; | ||
49 | |||
50 | struct b43_nphy_channeltab_entry_rev3 { | ||
51 | /* The channel number */ | ||
52 | u8 channel; | ||
53 | /* The channel frequency in MHz */ | ||
54 | u16 freq; | ||
55 | /* Radio register values on channelswitch */ | ||
56 | /* TODO */ | ||
57 | /* PHY register values on channelswitch */ | ||
58 | struct b43_phy_n_sfo_cfg phy_regs; | ||
59 | }; | ||
60 | |||
61 | |||
62 | struct b43_wldev; | 15 | struct b43_wldev; |
63 | 16 | ||
64 | struct nphy_txiqcal_ladder { | 17 | struct nphy_txiqcal_ladder { |
@@ -82,18 +35,37 @@ struct nphy_rf_control_override_rev3 { | |||
82 | u8 val_addr1; | 35 | u8 val_addr1; |
83 | }; | 36 | }; |
84 | 37 | ||
85 | /* Upload the default register value table. | 38 | struct nphy_gain_ctl_workaround_entry { |
86 | * If "ghz5" is true, we upload the 5Ghz table. Otherwise the 2.4Ghz | 39 | s8 lna1_gain[4]; |
87 | * table is uploaded. If "ignore_uploadflag" is true, we upload any value | 40 | s8 lna2_gain[4]; |
88 | * and ignore the "UPLOAD" flag. */ | 41 | u8 gain_db[10]; |
89 | void b2055_upload_inittab(struct b43_wldev *dev, | 42 | u8 gain_bits[10]; |
90 | bool ghz5, bool ignore_uploadflag); | ||
91 | 43 | ||
44 | u16 init_gain; | ||
45 | u16 rfseq_init[4]; | ||
92 | 46 | ||
93 | /* Get the NPHY Channel Switch Table entry for a channel number. | 47 | u16 cliphi_gain; |
48 | u16 clipmd_gain; | ||
49 | u16 cliplo_gain; | ||
50 | |||
51 | u16 crsmin; | ||
52 | u16 crsminl; | ||
53 | u16 crsminu; | ||
54 | |||
55 | u16 nbclip; | ||
56 | u16 wlclip; | ||
57 | }; | ||
58 | |||
59 | /* Get entry with workaround values for gain ctl. Does not return NULL. */ | ||
60 | struct nphy_gain_ctl_workaround_entry *b43_nphy_get_gain_ctl_workaround_ent( | ||
61 | struct b43_wldev *dev, bool ghz5, bool ext_lna); | ||
62 | |||
63 | /* Get the NPHY Channel Switch Table entry for a channel. | ||
94 | * Returns NULL on failure to find an entry. */ | 64 | * Returns NULL on failure to find an entry. */ |
95 | const struct b43_nphy_channeltab_entry_rev2 * | 65 | const struct b43_nphy_channeltab_entry_rev2 * |
96 | b43_nphy_get_chantabent_rev2(struct b43_wldev *dev, u8 channel); | 66 | b43_nphy_get_chantabent_rev2(struct b43_wldev *dev, u8 channel); |
67 | const struct b43_nphy_channeltab_entry_rev3 * | ||
68 | b43_nphy_get_chantabent_rev3(struct b43_wldev *dev, u16 freq); | ||
97 | 69 | ||
98 | 70 | ||
99 | /* The N-PHY tables. */ | 71 | /* The N-PHY tables. */ |
@@ -162,6 +134,33 @@ b43_nphy_get_chantabent_rev2(struct b43_wldev *dev, u8 channel); | |||
162 | #define B43_NTAB_C1_LOFEEDTH B43_NTAB16(0x1B, 0x1C0) /* Local Oscillator Feed Through Lookup Table Core 1 */ | 134 | #define B43_NTAB_C1_LOFEEDTH B43_NTAB16(0x1B, 0x1C0) /* Local Oscillator Feed Through Lookup Table Core 1 */ |
163 | #define B43_NTAB_C1_LOFEEDTH_SIZE 128 | 135 | #define B43_NTAB_C1_LOFEEDTH_SIZE 128 |
164 | 136 | ||
137 | /* Static N-PHY tables, PHY revision >= 3 */ | ||
138 | #define B43_NTAB_FRAMESTRUCT_R3 B43_NTAB32(10, 000) /* frame struct */ | ||
139 | #define B43_NTAB_PILOT_R3 B43_NTAB16(11, 000) /* pilot */ | ||
140 | #define B43_NTAB_TMAP_R3 B43_NTAB32(12, 000) /* TM AP */ | ||
141 | #define B43_NTAB_INTLEVEL_R3 B43_NTAB32(13, 000) /* INT LV */ | ||
142 | #define B43_NTAB_TDTRN_R3 B43_NTAB32(14, 000) /* TD TRN */ | ||
143 | #define B43_NTAB_NOISEVAR0_R3 B43_NTAB32(16, 000) /* noise variance 0 */ | ||
144 | #define B43_NTAB_NOISEVAR1_R3 B43_NTAB32(16, 128) /* noise variance 1 */ | ||
145 | #define B43_NTAB_MCS_R3 B43_NTAB16(18, 000) /* MCS */ | ||
146 | #define B43_NTAB_TDI20A0_R3 B43_NTAB32(19, 128) /* TDI 20/0 */ | ||
147 | #define B43_NTAB_TDI20A1_R3 B43_NTAB32(19, 256) /* TDI 20/1 */ | ||
148 | #define B43_NTAB_TDI40A0_R3 B43_NTAB32(19, 640) /* TDI 40/0 */ | ||
149 | #define B43_NTAB_TDI40A1_R3 B43_NTAB32(19, 768) /* TDI 40/1 */ | ||
150 | #define B43_NTAB_PILOTLT_R3 B43_NTAB32(20, 000) /* PLT lookup */ | ||
151 | #define B43_NTAB_CHANEST_R3 B43_NTAB32(22, 000) /* channel estimate */ | ||
152 | #define B43_NTAB_FRAMELT_R3 B43_NTAB8 (24, 000) /* frame lookup */ | ||
153 | #define B43_NTAB_C0_ESTPLT_R3 B43_NTAB8 (26, 000) /* estimated power lookup 0 */ | ||
154 | #define B43_NTAB_C1_ESTPLT_R3 B43_NTAB8 (27, 000) /* estimated power lookup 1 */ | ||
155 | #define B43_NTAB_C0_ADJPLT_R3 B43_NTAB8 (26, 064) /* adjusted power lookup 0 */ | ||
156 | #define B43_NTAB_C1_ADJPLT_R3 B43_NTAB8 (27, 064) /* adjusted power lookup 1 */ | ||
157 | #define B43_NTAB_C0_GAINCTL_R3 B43_NTAB32(26, 192) /* gain control lookup 0 */ | ||
158 | #define B43_NTAB_C1_GAINCTL_R3 B43_NTAB32(27, 192) /* gain control lookup 1 */ | ||
159 | #define B43_NTAB_C0_IQLT_R3 B43_NTAB32(26, 320) /* I/Q lookup 0 */ | ||
160 | #define B43_NTAB_C1_IQLT_R3 B43_NTAB32(27, 320) /* I/Q lookup 1 */ | ||
161 | #define B43_NTAB_C0_LOFEEDTH_R3 B43_NTAB16(26, 448) /* Local Oscillator Feed Through lookup 0 */ | ||
162 | #define B43_NTAB_C1_LOFEEDTH_R3 B43_NTAB16(27, 448) /* Local Oscillator Feed Through lookup 1 */ | ||
163 | |||
165 | #define B43_NTAB_TX_IQLO_CAL_LOFT_LADDER_40_SIZE 18 | 164 | #define B43_NTAB_TX_IQLO_CAL_LOFT_LADDER_40_SIZE 18 |
166 | #define B43_NTAB_TX_IQLO_CAL_LOFT_LADDER_20_SIZE 18 | 165 | #define B43_NTAB_TX_IQLO_CAL_LOFT_LADDER_20_SIZE 18 |
167 | #define B43_NTAB_TX_IQLO_CAL_IQIMB_LADDER_40_SIZE 18 | 166 | #define B43_NTAB_TX_IQLO_CAL_IQIMB_LADDER_40_SIZE 18 |