aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2010-12-07 03:42:05 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-12-08 15:38:44 -0500
commitf00fe7f6d14ab7bbd4655f55eae71bbd73ef766d (patch)
tree163bce6561edf47dbb1586f57ceb1dab5a860e9f /drivers/net
parent857581bdf1a3b36bfd42609d6f5433bd83397127 (diff)
b43: N-PHY: reorder and optimize tables initialization
Order was changed in specs. For writing arrays we have designed bulk function which makes use of auto increment and do not write table address over and over. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/b43/tables_nphy.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/net/wireless/b43/tables_nphy.c b/drivers/net/wireless/b43/tables_nphy.c
index 46f0a7a77529..df61c1610e39 100644
--- a/drivers/net/wireless/b43/tables_nphy.c
+++ b/drivers/net/wireless/b43/tables_nphy.c
@@ -1811,9 +1811,7 @@ void b43_ntab_write_bulk(struct b43_wldev *dev, u32 offset,
1811} 1811}
1812 1812
1813#define ntab_upload(dev, offset, data) do { \ 1813#define ntab_upload(dev, offset, data) do { \
1814 unsigned int i; \ 1814 b43_ntab_write_bulk(dev, offset, offset##_SIZE, data); \
1815 for (i = 0; i < (offset##_SIZE); i++) \
1816 b43_ntab_write(dev, (offset) + i, (data)[i]); \
1817 } while (0) 1815 } while (0)
1818 1816
1819void b43_nphy_rev0_1_2_tables_init(struct b43_wldev *dev) 1817void b43_nphy_rev0_1_2_tables_init(struct b43_wldev *dev)
@@ -1825,18 +1823,18 @@ void b43_nphy_rev0_1_2_tables_init(struct b43_wldev *dev)
1825 ntab_upload(dev, B43_NTAB_TDTRN, b43_ntab_tdtrn); 1823 ntab_upload(dev, B43_NTAB_TDTRN, b43_ntab_tdtrn);
1826 ntab_upload(dev, B43_NTAB_INTLEVEL, b43_ntab_intlevel); 1824 ntab_upload(dev, B43_NTAB_INTLEVEL, b43_ntab_intlevel);
1827 ntab_upload(dev, B43_NTAB_PILOT, b43_ntab_pilot); 1825 ntab_upload(dev, B43_NTAB_PILOT, b43_ntab_pilot);
1828 ntab_upload(dev, B43_NTAB_PILOTLT, b43_ntab_pilotlt);
1829 ntab_upload(dev, B43_NTAB_TDI20A0, b43_ntab_tdi20a0); 1826 ntab_upload(dev, B43_NTAB_TDI20A0, b43_ntab_tdi20a0);
1830 ntab_upload(dev, B43_NTAB_TDI20A1, b43_ntab_tdi20a1); 1827 ntab_upload(dev, B43_NTAB_TDI20A1, b43_ntab_tdi20a1);
1831 ntab_upload(dev, B43_NTAB_TDI40A0, b43_ntab_tdi40a0); 1828 ntab_upload(dev, B43_NTAB_TDI40A0, b43_ntab_tdi40a0);
1832 ntab_upload(dev, B43_NTAB_TDI40A1, b43_ntab_tdi40a1); 1829 ntab_upload(dev, B43_NTAB_TDI40A1, b43_ntab_tdi40a1);
1833 ntab_upload(dev, B43_NTAB_BDI, b43_ntab_bdi);
1834 ntab_upload(dev, B43_NTAB_CHANEST, b43_ntab_channelest); 1830 ntab_upload(dev, B43_NTAB_CHANEST, b43_ntab_channelest);
1835 ntab_upload(dev, B43_NTAB_MCS, b43_ntab_mcs); 1831 ntab_upload(dev, B43_NTAB_MCS, b43_ntab_mcs);
1836
1837 /* Volatile tables */
1838 ntab_upload(dev, B43_NTAB_NOISEVAR10, b43_ntab_noisevar10); 1832 ntab_upload(dev, B43_NTAB_NOISEVAR10, b43_ntab_noisevar10);
1839 ntab_upload(dev, B43_NTAB_NOISEVAR11, b43_ntab_noisevar11); 1833 ntab_upload(dev, B43_NTAB_NOISEVAR11, b43_ntab_noisevar11);
1834
1835 /* Volatile tables */
1836 ntab_upload(dev, B43_NTAB_BDI, b43_ntab_bdi);
1837 ntab_upload(dev, B43_NTAB_PILOTLT, b43_ntab_pilotlt);
1840 ntab_upload(dev, B43_NTAB_C0_ESTPLT, b43_ntab_estimatepowerlt0); 1838 ntab_upload(dev, B43_NTAB_C0_ESTPLT, b43_ntab_estimatepowerlt0);
1841 ntab_upload(dev, B43_NTAB_C1_ESTPLT, b43_ntab_estimatepowerlt1); 1839 ntab_upload(dev, B43_NTAB_C1_ESTPLT, b43_ntab_estimatepowerlt1);
1842 ntab_upload(dev, B43_NTAB_C0_ADJPLT, b43_ntab_adjustpower0); 1840 ntab_upload(dev, B43_NTAB_C0_ADJPLT, b43_ntab_adjustpower0);