aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2010-01-15 10:06:35 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-01-15 17:05:42 -0500
commitde7ed0c6245276eaa62523ffb36512d88bf1efb3 (patch)
tree8f8757e4402ee12b604a6a6181565cd0b068a58b
parentc4a92003b0d02367bb1be94867a79651897e91ed (diff)
b43: N-PHY: update TX calibration ladder
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/b43/phy_n.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c
index 3e587d73619e..d09a16f76007 100644
--- a/drivers/net/wireless/b43/phy_n.c
+++ b/drivers/net/wireless/b43/phy_n.c
@@ -1216,6 +1216,31 @@ static void b43_nphy_tx_cal_radio_setup(struct b43_wldev *dev)
1216 } 1216 }
1217} 1217}
1218 1218
1219/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/UpdateTxCalLadder */
1220static void b43_nphy_update_tx_cal_ladder(struct b43_wldev *dev, u16 core)
1221{
1222 struct b43_phy_n *nphy = dev->phy.n;
1223 int i;
1224 u16 scale, entry;
1225
1226 u16 tmp = nphy->txcal_bbmult;
1227 if (core == 0)
1228 tmp >>= 8;
1229 tmp &= 0xff;
1230
1231 for (i = 0; i < 18; i++) {
1232 scale = (ladder_lo[i].percent * tmp) / 100;
1233 entry = ((scale & 0xFF) << 8) | ladder_lo[i].g_env;
1234 /* TODO: Write an N PHY Table with ID 15, length 1,
1235 offset i, width 16, and data entry */
1236
1237 scale = (ladder_iq[i].percent * tmp) / 100;
1238 entry = ((scale & 0xFF) << 8) | ladder_iq[i].g_env;
1239 /* TODO: Write an N PHY Table with ID 15, length 1,
1240 offset i + 32, width 16, and data entry */
1241 }
1242}
1243
1219/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/GetTxGain */ 1244/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/GetTxGain */
1220static struct nphy_txgains b43_nphy_get_tx_gains(struct b43_wldev *dev) 1245static struct nphy_txgains b43_nphy_get_tx_gains(struct b43_wldev *dev)
1221{ 1246{