2010/1/18 Rafał Miłecki zaj...@gmail.com:
Signed-off-by: Rafał Miłecki zaj...@gmail.com
---
V2: updated to apply without fuzz
Actually, you do not need to do that - offset or fuzzy patches will
still be applied cleanly AFAIK, without any intervention.
(John, correct me if I'm wrong here...)
---
drivers/net/wireless/b43/phy_n.c | 58
++--
drivers/net/wireless/b43/tables_nphy.c | 40 ++
drivers/net/wireless/b43/tables_nphy.h | 2 +
3 files changed, 67 insertions(+), 33 deletions(-)
diff --git a/drivers/net/wireless/b43/phy_n.c
b/drivers/net/wireless/b43/phy_n.c
index 16f1f9b..6b200e5 100644
--- a/drivers/net/wireless/b43/phy_n.c
+++ b/drivers/net/wireless/b43/phy_n.c
@@ -1699,8 +1699,7 @@ static void b43_nphy_restore_cal(struct b43_wldev
*dev)
loft = nphy-cal_cache.txcal_coeffs_5G[5];
}
- /* TODO: Write an N PHY table with ID 15, length 4, offset 80,
- width 16, and data from table */
+ b43_ntab_write_bulk(dev, B43_NTAB16(15, 80), 4, table);
for (i = 0; i 4; i++) {
if (dev-phy.rev = 3)
@@ -1709,12 +1708,9 @@ static void b43_nphy_restore_cal(struct b43_wldev
*dev)
coef[i] = 0;
}
- /* TODO: Write an N PHY table with ID 15, length 4, offset 88,
- width 16, and data from coef */
- /* TODO: Write an N PHY table with ID 15, length 2, offset 85,
- width 16 and data from loft */
- /* TODO: Write an N PHY table with ID 15, length 2, offset 93,
- width 16 and data from loft */
+ b43_ntab_write_bulk(dev, B43_NTAB16(15, 88), 4, coef);
+ b43_ntab_write_bulk(dev, B43_NTAB16(15, 85), 2, loft);
+ b43_ntab_write_bulk(dev, B43_NTAB16(15, 93), 2, loft);
if (dev-phy.rev 2)
b43_nphy_tx_iq_workaround(dev);
@@ -1782,8 +1778,8 @@ static int b43_nphy_cal_tx_iq_lo(struct b43_wldev
*dev,
b43_nphy_iq_cal_gain_params(dev, i, target, params[i]);
gain[i] = params[i].cal_gain;
}
- /* TODO: Write an N PHY Table with ID 7, length 2, offset 0x110,
- width 16, and data pointer gain */
+
+ b43_ntab_write_bulk(dev, B43_NTAB16(7, 0x110), 2, gain);
b43_nphy_tx_cal_radio_setup(dev);
b43_nphy_tx_cal_phy_setup(dev);
@@ -1833,8 +1829,7 @@ static int b43_nphy_cal_tx_iq_lo(struct b43_wldev
*dev,
}
}
- /* TODO: Write an N PHY Table with ID 15, length from above,
- offset 64, width 16, and the data pointer from above
*/
+ b43_ntab_write_bulk(dev, B43_NTAB16(15, 64), length, table);
if (full) {
if (dev-phy.rev = 3)
@@ -1902,9 +1897,8 @@ static int b43_nphy_cal_tx_iq_lo(struct b43_wldev
*dev,
/* TODO: Read an N PHY Table with ID 15,
length table_length, offset 96, width 16,
and data pointer buffer */
- /* TODO: Write an N PHY Table with ID 15,
- length table_length, offset 64, width 16,
- and data pointer buffer */
+ b43_ntab_write_bulk(dev, B43_NTAB16(15, 64), length,
+ buffer);
if (type == 1 || type == 3 || type == 4)
buffer[0] = diq_start;
@@ -1916,8 +1910,7 @@ static int b43_nphy_cal_tx_iq_lo(struct b43_wldev
*dev,
last = (dev-phy.rev 3) ? 6 : 7;
if (!mphase || nphy-mphase_cal_phase_id == last) {
- /* TODO: Write an N PHY Table with ID 15, length 4,
- offset 96, width 16, and data pointer buffer
*/
+ b43_ntab_write_bulk(dev, B43_NTAB16(15, 96), 4,
buffer);
/* TODO: Read an N PHY Table with ID 15, length 4,
offset 80, width 16, and data pointer buffer
*/
if (dev-phy.rev 3) {
@@ -1926,14 +1919,14 @@ static int b43_nphy_cal_tx_iq_lo(struct b43_wldev
*dev,
buffer[2] = 0;
buffer[3] = 0;
}
- /* TODO: Write an N PHY Table with ID 15, length 4,
- offset 88, width 16, and data pointer buffer
*/
- /* TODO: Read an N PHY Table with ID 15, length 2,
- offset 101, width 16, and data pointer
buffer*/
- /* TODO: Write an N PHY Table with ID 15, length 2,
- offset 85, width 16, and data pointer buffer
*/
- /* TODO: Write an N PHY Table with ID 15, length 2,
-