diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2012-01-03 16:49:19 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-01-24 14:06:05 -0500 |
commit | 34c5cf205ec27e170b7061f43cf6390486be9a78 (patch) | |
tree | bddf18d44c7ac4b57eb6bd8955edf13bc3050833 /drivers/net/wireless/b43 | |
parent | 603431e9e2cb158817c8403e100bb495755a2395 (diff) |
b43: N-PHY: upload PAPD PGA gain delta table
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')
-rw-r--r-- | drivers/net/wireless/b43/phy_n.c | 11 | ||||
-rw-r--r-- | drivers/net/wireless/b43/tables_nphy.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/b43/tables_nphy.h | 2 |
3 files changed, 12 insertions, 6 deletions
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c index f1a856874a92..f6ac18139b10 100644 --- a/drivers/net/wireless/b43/phy_n.c +++ b/drivers/net/wireless/b43/phy_n.c | |||
@@ -2607,12 +2607,9 @@ static void b43_nphy_tx_gain_table_upload(struct b43_wldev *dev) | |||
2607 | struct b43_phy *phy = &dev->phy; | 2607 | struct b43_phy *phy = &dev->phy; |
2608 | 2608 | ||
2609 | const u32 *table = NULL; | 2609 | const u32 *table = NULL; |
2610 | #if 0 | ||
2611 | TODO: b43_ntab_papd_pga_gain_delta_ipa_2* | ||
2612 | u32 rfpwr_offset; | 2610 | u32 rfpwr_offset; |
2613 | u8 pga_gain; | 2611 | u8 pga_gain; |
2614 | int i; | 2612 | int i; |
2615 | #endif | ||
2616 | 2613 | ||
2617 | table = b43_nphy_get_tx_gain_table(dev); | 2614 | table = b43_nphy_get_tx_gain_table(dev); |
2618 | b43_ntab_write_bulk(dev, B43_NTAB32(26, 192), 128, table); | 2615 | b43_ntab_write_bulk(dev, B43_NTAB32(26, 192), 128, table); |
@@ -2621,19 +2618,21 @@ static void b43_nphy_tx_gain_table_upload(struct b43_wldev *dev) | |||
2621 | if (phy->rev >= 3) { | 2618 | if (phy->rev >= 3) { |
2622 | #if 0 | 2619 | #if 0 |
2623 | nphy->gmval = (table[0] >> 16) & 0x7000; | 2620 | nphy->gmval = (table[0] >> 16) & 0x7000; |
2621 | #endif | ||
2624 | 2622 | ||
2625 | for (i = 0; i < 128; i++) { | 2623 | for (i = 0; i < 128; i++) { |
2626 | pga_gain = (table[i] >> 24) & 0xF; | 2624 | pga_gain = (table[i] >> 24) & 0xF; |
2627 | if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) | 2625 | if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) |
2628 | rfpwr_offset = b43_ntab_papd_pga_gain_delta_ipa_2g[pga_gain]; | 2626 | rfpwr_offset = |
2627 | b43_ntab_papd_pga_gain_delta_ipa_2g[pga_gain]; | ||
2629 | else | 2628 | else |
2630 | rfpwr_offset = b43_ntab_papd_pga_gain_delta_ipa_5g[pga_gain]; | 2629 | rfpwr_offset = |
2630 | 0; /* FIXME */ | ||
2631 | b43_ntab_write(dev, B43_NTAB32(26, 576 + i), | 2631 | b43_ntab_write(dev, B43_NTAB32(26, 576 + i), |
2632 | rfpwr_offset); | 2632 | rfpwr_offset); |
2633 | b43_ntab_write(dev, B43_NTAB32(27, 576 + i), | 2633 | b43_ntab_write(dev, B43_NTAB32(27, 576 + i), |
2634 | rfpwr_offset); | 2634 | rfpwr_offset); |
2635 | } | 2635 | } |
2636 | #endif | ||
2637 | } | 2636 | } |
2638 | } | 2637 | } |
2639 | 2638 | ||
diff --git a/drivers/net/wireless/b43/tables_nphy.c b/drivers/net/wireless/b43/tables_nphy.c index 8d96454081ac..f0d8377429c6 100644 --- a/drivers/net/wireless/b43/tables_nphy.c +++ b/drivers/net/wireless/b43/tables_nphy.c | |||
@@ -2529,6 +2529,11 @@ static const u32 txpwrctrl_tx_gain_ipa_5g[] = { | |||
2529 | 0x70f70021, 0x70f70020, 0x70f70020, 0x70f7001f, | 2529 | 0x70f70021, 0x70f70020, 0x70f70020, 0x70f7001f, |
2530 | }; | 2530 | }; |
2531 | 2531 | ||
2532 | const s8 b43_ntab_papd_pga_gain_delta_ipa_2g[] = { | ||
2533 | -114, -108, -98, -91, -84, -78, -70, -62, | ||
2534 | -54, -46, -39, -31, -23, -15, -8, 0 | ||
2535 | }; | ||
2536 | |||
2532 | const u16 tbl_iqcal_gainparams[2][9][8] = { | 2537 | const u16 tbl_iqcal_gainparams[2][9][8] = { |
2533 | { | 2538 | { |
2534 | { 0x000, 0, 0, 2, 0x69, 0x69, 0x69, 0x69 }, | 2539 | { 0x000, 0, 0, 2, 0x69, 0x69, 0x69, 0x69 }, |
diff --git a/drivers/net/wireless/b43/tables_nphy.h b/drivers/net/wireless/b43/tables_nphy.h index 2a9d5f14af9c..f348953c0230 100644 --- a/drivers/net/wireless/b43/tables_nphy.h +++ b/drivers/net/wireless/b43/tables_nphy.h | |||
@@ -179,6 +179,8 @@ void b43_nphy_rev3plus_tables_init(struct b43_wldev *dev); | |||
179 | 179 | ||
180 | const u32 *b43_nphy_get_tx_gain_table(struct b43_wldev *dev); | 180 | const u32 *b43_nphy_get_tx_gain_table(struct b43_wldev *dev); |
181 | 181 | ||
182 | extern const s8 b43_ntab_papd_pga_gain_delta_ipa_2g[]; | ||
183 | |||
182 | extern const u16 tbl_iqcal_gainparams[2][9][8]; | 184 | extern const u16 tbl_iqcal_gainparams[2][9][8]; |
183 | extern const struct nphy_txiqcal_ladder ladder_lo[]; | 185 | extern const struct nphy_txiqcal_ladder ladder_lo[]; |
184 | extern const struct nphy_txiqcal_ladder ladder_iq[]; | 186 | extern const struct nphy_txiqcal_ladder ladder_iq[]; |