diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2010-01-21 19:53:15 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-01-22 16:11:39 -0500 |
commit | 45ca697e60eb5d3cac4530ae3a88f96c297efb09 (patch) | |
tree | 0c5062fd9bee6cc092bd68eedc6ce8361ba308c7 /drivers/net/wireless | |
parent | 10a798733e0f47923a1050231d8d39609c62be70 (diff) |
b43: N-PHY: add setting power amplifier filters
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/b43/phy_n.c | 41 | ||||
-rw-r--r-- | drivers/net/wireless/b43/tables_nphy.c | 24 | ||||
-rw-r--r-- | drivers/net/wireless/b43/tables_nphy.h | 1 |
3 files changed, 64 insertions, 2 deletions
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c index f5900f04ff5c..97a44e43d057 100644 --- a/drivers/net/wireless/b43/phy_n.c +++ b/drivers/net/wireless/b43/phy_n.c | |||
@@ -1628,6 +1628,43 @@ static void b43_nphy_update_tx_cal_ladder(struct b43_wldev *dev, u16 core) | |||
1628 | } | 1628 | } |
1629 | } | 1629 | } |
1630 | 1630 | ||
1631 | /* http://bcm-v4.sipsolutions.net/802.11/PHY/N/ExtPaSetTxDigiFilts */ | ||
1632 | static void b43_nphy_ext_pa_set_tx_dig_filters(struct b43_wldev *dev) | ||
1633 | { | ||
1634 | int i; | ||
1635 | for (i = 0; i < 15; i++) | ||
1636 | b43_phy_write(dev, B43_PHY_N(0x2C5 + i), | ||
1637 | tbl_tx_filter_coef_rev4[2][i]); | ||
1638 | } | ||
1639 | |||
1640 | /* http://bcm-v4.sipsolutions.net/802.11/PHY/N/IpaSetTxDigiFilts */ | ||
1641 | static void b43_nphy_int_pa_set_tx_dig_filters(struct b43_wldev *dev) | ||
1642 | { | ||
1643 | int i, j; | ||
1644 | /* B43_NPHY_TXF_20CO_S0A1, B43_NPHY_TXF_40CO_S0A1, unknown */ | ||
1645 | u16 offset[] = { 0x186, 0x195, 0x2C5 }; | ||
1646 | |||
1647 | for (i = 0; i < 3; i++) | ||
1648 | for (j = 0; j < 15; j++) | ||
1649 | b43_phy_write(dev, B43_PHY_N(offset[i] + j), | ||
1650 | tbl_tx_filter_coef_rev4[i][j]); | ||
1651 | |||
1652 | if (dev->phy.is_40mhz) { | ||
1653 | for (j = 0; j < 15; j++) | ||
1654 | b43_phy_write(dev, B43_PHY_N(offset[0] + j), | ||
1655 | tbl_tx_filter_coef_rev4[3][j]); | ||
1656 | } else if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) { | ||
1657 | for (j = 0; j < 15; j++) | ||
1658 | b43_phy_write(dev, B43_PHY_N(offset[0] + j), | ||
1659 | tbl_tx_filter_coef_rev4[5][j]); | ||
1660 | } | ||
1661 | |||
1662 | if (dev->phy.channel == 14) | ||
1663 | for (j = 0; j < 15; j++) | ||
1664 | b43_phy_write(dev, B43_PHY_N(offset[0] + j), | ||
1665 | tbl_tx_filter_coef_rev4[6][j]); | ||
1666 | } | ||
1667 | |||
1631 | /* http://bcm-v4.sipsolutions.net/802.11/PHY/N/GetTxGain */ | 1668 | /* http://bcm-v4.sipsolutions.net/802.11/PHY/N/GetTxGain */ |
1632 | static struct nphy_txgains b43_nphy_get_tx_gains(struct b43_wldev *dev) | 1669 | static struct nphy_txgains b43_nphy_get_tx_gains(struct b43_wldev *dev) |
1633 | { | 1670 | { |
@@ -2371,9 +2408,9 @@ int b43_phy_initn(struct b43_wldev *dev) | |||
2371 | b43_phy_set(dev, B43_NPHY_PAPD_EN1, 0x1); | 2408 | b43_phy_set(dev, B43_NPHY_PAPD_EN1, 0x1); |
2372 | b43_phy_maskset(dev, B43_NPHY_EPS_TABLE_ADJ1, 0x007F, | 2409 | b43_phy_maskset(dev, B43_NPHY_EPS_TABLE_ADJ1, 0x007F, |
2373 | nphy->papd_epsilon_offset[1] << 7); | 2410 | nphy->papd_epsilon_offset[1] << 7); |
2374 | /* TODO N PHY IPA Set TX Dig Filters */ | 2411 | b43_nphy_int_pa_set_tx_dig_filters(dev); |
2375 | } else if (phy->rev >= 5) { | 2412 | } else if (phy->rev >= 5) { |
2376 | /* TODO N PHY Ext PA Set TX Dig Filters */ | 2413 | b43_nphy_ext_pa_set_tx_dig_filters(dev); |
2377 | } | 2414 | } |
2378 | 2415 | ||
2379 | b43_nphy_workarounds(dev); | 2416 | b43_nphy_workarounds(dev); |
diff --git a/drivers/net/wireless/b43/tables_nphy.c b/drivers/net/wireless/b43/tables_nphy.c index dd9687d611d7..a00d509150f7 100644 --- a/drivers/net/wireless/b43/tables_nphy.c +++ b/drivers/net/wireless/b43/tables_nphy.c | |||
@@ -2883,6 +2883,30 @@ const u16 tbl_tx_iqlo_cal_cmds_fullcal_nphyrev3[] = { | |||
2883 | 0x9084, 0x9267, 0x9056, 0x9234 | 2883 | 0x9084, 0x9267, 0x9056, 0x9234 |
2884 | }; | 2884 | }; |
2885 | 2885 | ||
2886 | const s16 tbl_tx_filter_coef_rev4[7][15] = { | ||
2887 | { -377, 137, -407, 208, -1527, | ||
2888 | 956, 93, 186, 93, 230, | ||
2889 | -44, 230, 20, -191, 201 }, | ||
2890 | { -77, 20, -98, 49, -93, | ||
2891 | 60, 56, 111, 56, 26, | ||
2892 | -5, 26, 34, -32, 34 }, | ||
2893 | { -360, 164, -376, 164, -1533, | ||
2894 | 576, 308, -314, 308, 121, | ||
2895 | -73, 121, 91, 124, 91 }, | ||
2896 | { -295, 200, -363, 142, -1391, | ||
2897 | 826, 151, 301, 151, 151, | ||
2898 | 301, 151, 602, -752, 602 }, | ||
2899 | { -92, 58, -96, 49, -104, | ||
2900 | 44, 17, 35, 17, 12, | ||
2901 | 25, 12, 13, 27, 13 }, | ||
2902 | { -375, 136, -399, 209, -1479, | ||
2903 | 949, 130, 260, 130, 230, | ||
2904 | -44, 230, 201, -191, 201 }, | ||
2905 | { 0xed9, 0xc8, 0xe95, 0x8e, 0xa91, | ||
2906 | 0x33a, 0x97, 0x12d, 0x97, 0x97, | ||
2907 | 0x12d, 0x97, 0x25a, 0xd10, 0x25a } | ||
2908 | }; | ||
2909 | |||
2886 | /* addr0, addr1, bmask, shift */ | 2910 | /* addr0, addr1, bmask, shift */ |
2887 | const struct nphy_rf_control_override_rev2 tbl_rf_control_override_rev2[] = { | 2911 | const struct nphy_rf_control_override_rev2 tbl_rf_control_override_rev2[] = { |
2888 | { 0x78, 0x78, 0x0038, 3 }, /* for field == 0x0002 (fls == 2) */ | 2912 | { 0x78, 0x78, 0x0038, 3 }, /* for field == 0x0002 (fls == 2) */ |
diff --git a/drivers/net/wireless/b43/tables_nphy.h b/drivers/net/wireless/b43/tables_nphy.h index 5d38172a152d..9c1c6ecd3672 100644 --- a/drivers/net/wireless/b43/tables_nphy.h +++ b/drivers/net/wireless/b43/tables_nphy.h | |||
@@ -193,6 +193,7 @@ extern const u16 tbl_tx_iqlo_cal_cmds_recal_nphyrev3[]; | |||
193 | extern const u16 tbl_tx_iqlo_cal_cmds_recal[]; | 193 | extern const u16 tbl_tx_iqlo_cal_cmds_recal[]; |
194 | extern const u16 tbl_tx_iqlo_cal_cmds_fullcal[]; | 194 | extern const u16 tbl_tx_iqlo_cal_cmds_fullcal[]; |
195 | extern const u16 tbl_tx_iqlo_cal_cmds_fullcal_nphyrev3[]; | 195 | extern const u16 tbl_tx_iqlo_cal_cmds_fullcal_nphyrev3[]; |
196 | extern const s16 tbl_tx_filter_coef_rev4[7][15]; | ||
196 | 197 | ||
197 | extern const struct nphy_rf_control_override_rev2 | 198 | extern const struct nphy_rf_control_override_rev2 |
198 | tbl_rf_control_override_rev2[]; | 199 | tbl_rf_control_override_rev2[]; |