summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/phy_lp.c
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2010-01-25 19:00:00 +0100
committerJohn W. Linville <linville@tuxdriver.com>2010-01-25 16:39:03 -0500
commit6f98e62a9f1bdbd83d8d1be8c2ca6f58099846ef (patch)
treecdfabc6feccd4e01b56fbf44bdce3eea25e573f4 /drivers/net/wireless/b43/phy_lp.c
parent986504540306137dfc90a936f9f25086d15621c5 (diff)
downloadblackbird-op-linux-6f98e62a9f1bdbd83d8d1be8c2ca6f58099846ef.tar.gz
blackbird-op-linux-6f98e62a9f1bdbd83d8d1be8c2ca6f58099846ef.zip
b43: update cordic code to match current specs
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Tested-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43/phy_lp.c')
-rw-r--r--drivers/net/wireless/b43/phy_lp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c
index 453585073437..185219e0a552 100644
--- a/drivers/net/wireless/b43/phy_lp.c
+++ b/drivers/net/wireless/b43/phy_lp.c
@@ -1784,7 +1784,8 @@ static void lpphy_start_tx_tone(struct b43_wldev *dev, s32 freq, u16 max)
{
struct b43_phy_lp *lpphy = dev->phy.lp;
u16 buf[64];
- int i, samples = 0, angle = 0, rotation = (9 * freq) / 500;
+ int i, samples = 0, angle = 0;
+ int rotation = (((36 * freq) / 20) << 16) / 100;
struct b43_c32 sample;
lpphy->tx_tone_freq = freq;
@@ -1803,8 +1804,8 @@ static void lpphy_start_tx_tone(struct b43_wldev *dev, s32 freq, u16 max)
for (i = 0; i < samples; i++) {
sample = b43_cordic(angle);
angle += rotation;
- buf[i] = ((sample.i * max) & 0xFF) << 8;
- buf[i] |= (sample.q * max) & 0xFF;
+ buf[i] = CORDIC_CONVERT((sample.i * max) & 0xFF) << 8;
+ buf[i] |= CORDIC_CONVERT((sample.q * max) & 0xFF);
}
b43_lptab_write_bulk(dev, B43_LPTAB16(5, 0), samples, buf);
OpenPOWER on IntegriCloud