aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/phy_n.c
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2010-01-17 18:21:35 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-01-19 16:47:46 -0500
commit9145834e84805f5efcca4706edfd641047af1d55 (patch)
tree3d06a690a42148d76200516484fa4eecf675f531 /drivers/net/wireless/b43/phy_n.c
parentc643a66ef5ccfd4d359327fb8afa9949f1abbfdd (diff)
b43: N-PHY: implement and add multi-dimensional table reading
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/phy_n.c')
-rw-r--r--drivers/net/wireless/b43/phy_n.c30
1 files changed, 11 insertions, 19 deletions
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c
index 7eac0ae2b15e..1359267a35ff 100644
--- a/drivers/net/wireless/b43/phy_n.c
+++ b/drivers/net/wireless/b43/phy_n.c
@@ -829,8 +829,7 @@ static void b43_nphy_tx_pwr_ctrl_coef_setup(struct b43_wldev *dev)
829 if (nphy->hang_avoid) 829 if (nphy->hang_avoid)
830 b43_nphy_stay_in_carrier_search(dev, true); 830 b43_nphy_stay_in_carrier_search(dev, true);
831 831
832 /* TODO: Read an N PHY Table with ID 15, length 7, offset 80, 832 b43_ntab_read_bulk(dev, B43_NTAB16(15, 80), 7, buffer);
833 width 16, and data pointer buffer */
834 833
835 for (i = 0; i < 2; i++) { 834 for (i = 0; i < 2; i++) {
836 tmp = ((buffer[i * 2] & 0x3FF) << 10) | 835 tmp = ((buffer[i * 2] & 0x3FF) << 10) |
@@ -1507,8 +1506,7 @@ static struct nphy_txgains b43_nphy_get_tx_gains(struct b43_wldev *dev)
1507 1506
1508 if (nphy->hang_avoid) 1507 if (nphy->hang_avoid)
1509 b43_nphy_stay_in_carrier_search(dev, true); 1508 b43_nphy_stay_in_carrier_search(dev, true);
1510 /* TODO: Read an N PHY Table with ID 7, length 2, 1509 b43_ntab_read_bulk(dev, B43_NTAB16(7, 0x110), 2, curr_gain);
1511 offset 0x110, width 16, and curr_gain */
1512 if (nphy->hang_avoid) 1510 if (nphy->hang_avoid)
1513 b43_nphy_stay_in_carrier_search(dev, false); 1511 b43_nphy_stay_in_carrier_search(dev, false);
1514 1512
@@ -1768,8 +1766,7 @@ static int b43_nphy_cal_tx_iq_lo(struct b43_wldev *dev,
1768 nphy->hang_avoid = 0; 1766 nphy->hang_avoid = 0;
1769 } 1767 }
1770 1768
1771 /* TODO: Read an N PHY Table with ID 7, length 2, offset 0x110, 1769 b43_ntab_read_bulk(dev, B43_NTAB16(7, 0x110), 2, save);
1772 width 16, and data pointer save */
1773 1770
1774 for (i = 0; i < 2; i++) { 1771 for (i = 0; i < 2; i++) {
1775 b43_nphy_iq_cal_gain_params(dev, i, target, &params[i]); 1772 b43_nphy_iq_cal_gain_params(dev, i, target, &params[i]);
@@ -1890,9 +1887,8 @@ static int b43_nphy_cal_tx_iq_lo(struct b43_wldev *dev,
1890 udelay(10); 1887 udelay(10);
1891 } 1888 }
1892 1889
1893 /* TODO: Read an N PHY Table with ID 15, 1890 b43_ntab_read_bulk(dev, B43_NTAB16(15, 96), length,
1894 length table_length, offset 96, width 16, 1891 buffer);
1895 and data pointer buffer */
1896 b43_ntab_write_bulk(dev, B43_NTAB16(15, 64), length, 1892 b43_ntab_write_bulk(dev, B43_NTAB16(15, 64), length,
1897 buffer); 1893 buffer);
1898 1894
@@ -1907,8 +1903,7 @@ static int b43_nphy_cal_tx_iq_lo(struct b43_wldev *dev,
1907 1903
1908 if (!mphase || nphy->mphase_cal_phase_id == last) { 1904 if (!mphase || nphy->mphase_cal_phase_id == last) {
1909 b43_ntab_write_bulk(dev, B43_NTAB16(15, 96), 4, buffer); 1905 b43_ntab_write_bulk(dev, B43_NTAB16(15, 96), 4, buffer);
1910 /* TODO: Read an N PHY Table with ID 15, length 4, 1906 b43_ntab_read_bulk(dev, B43_NTAB16(15, 80), 4, buffer);
1911 offset 80, width 16, and data pointer buffer */
1912 if (dev->phy.rev < 3) { 1907 if (dev->phy.rev < 3) {
1913 buffer[0] = 0; 1908 buffer[0] = 0;
1914 buffer[1] = 0; 1909 buffer[1] = 0;
@@ -1926,9 +1921,8 @@ static int b43_nphy_cal_tx_iq_lo(struct b43_wldev *dev,
1926 length = 11; 1921 length = 11;
1927 if (dev->phy.rev < 3) 1922 if (dev->phy.rev < 3)
1928 length -= 2; 1923 length -= 2;
1929 /* TODO: Read an N PHY Table with ID 15, length length, 1924 b43_ntab_read_bulk(dev, B43_NTAB16(15, 96), length,
1930 offset 96, width 16, and data pointer 1925 nphy->txiqlocal_bestc);
1931 nphy->txiqlocal_bestc */
1932 nphy->txiqlocal_coeffsvalid = true; 1926 nphy->txiqlocal_coeffsvalid = true;
1933 /* TODO: Set nphy->txiqlocal_chanspec to 1927 /* TODO: Set nphy->txiqlocal_chanspec to
1934 the current channel */ 1928 the current channel */
@@ -1936,9 +1930,8 @@ static int b43_nphy_cal_tx_iq_lo(struct b43_wldev *dev,
1936 length = 11; 1930 length = 11;
1937 if (dev->phy.rev < 3) 1931 if (dev->phy.rev < 3)
1938 length -= 2; 1932 length -= 2;
1939 /* TODO: Read an N PHY Table with ID 5, length length, 1933 b43_ntab_read_bulk(dev, B43_NTAB16(15, 96), length,
1940 offset 96, width 16, and data pointer 1934 nphy->mphase_txcal_bestcoeffs);
1941 nphy->mphase_txcal_bestcoeffs */
1942 } 1935 }
1943 1936
1944 b43_nphy_stop_playback(dev); 1937 b43_nphy_stop_playback(dev);
@@ -1990,8 +1983,7 @@ static int b43_nphy_rev2_cal_rx_iq(struct b43_wldev *dev,
1990 1983
1991 if (dev->phy.rev < 2) 1984 if (dev->phy.rev < 2)
1992 ;/* TODO: Call N PHY Reapply TX Cal Coeffs */ 1985 ;/* TODO: Call N PHY Reapply TX Cal Coeffs */
1993 /* TODO: Read an N PHY Table with ID 7, length 2, offset 0x110, 1986 b43_ntab_read_bulk(dev, B43_NTAB16(7, 0x110), 2, gain_save);
1994 width 16, and data gain_save */
1995 for (i = 0; i < 2; i++) { 1987 for (i = 0; i < 2; i++) {
1996 b43_nphy_iq_cal_gain_params(dev, i, target, &cal_params[i]); 1988 b43_nphy_iq_cal_gain_params(dev, i, target, &cal_params[i]);
1997 cal_gain[i] = cal_params[i].cal_gain; 1989 cal_gain[i] = cal_params[i].cal_gain;