diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2013-03-16 18:47:29 -0400 |
---|---|---|
committer | Rafał Miłecki <zajec5@gmail.com> | 2013-04-23 06:27:55 -0400 |
commit | 9cfc17cbbf20af09ec4bd941338416bfb78d3a25 (patch) | |
tree | ae57d9223d4246a56d484b1523d20c3a1b17aa50 /drivers | |
parent | 9a0bc41e1c85d2be2f3e7e7772319d58afe28f1b (diff) |
b43: HT-PHY: finish calculating values for idle TSSI
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/b43/phy_ht.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/drivers/net/wireless/b43/phy_ht.c b/drivers/net/wireless/b43/phy_ht.c index 3d0bddb64b3d..fd9e249e95b8 100644 --- a/drivers/net/wireless/b43/phy_ht.c +++ b/drivers/net/wireless/b43/phy_ht.c | |||
@@ -529,9 +529,21 @@ static void b43_phy_ht_tx_power_ctl(struct b43_wldev *dev, bool enable) | |||
529 | static void b43_phy_ht_tx_power_ctl_idle_tssi(struct b43_wldev *dev) | 529 | static void b43_phy_ht_tx_power_ctl_idle_tssi(struct b43_wldev *dev) |
530 | { | 530 | { |
531 | struct b43_phy_ht *phy_ht = dev->phy.ht; | 531 | struct b43_phy_ht *phy_ht = dev->phy.ht; |
532 | static const u16 base[] = { 0x840, 0x860, 0x880 }; | ||
533 | u16 save_regs[3][3]; | ||
532 | s32 rssi_buf[6]; | 534 | s32 rssi_buf[6]; |
535 | int core; | ||
533 | 536 | ||
534 | /* TODO */ | 537 | for (core = 0; core < 3; core++) { |
538 | save_regs[core][1] = b43_phy_read(dev, base[core] + 6); | ||
539 | save_regs[core][2] = b43_phy_read(dev, base[core] + 7); | ||
540 | save_regs[core][0] = b43_phy_read(dev, base[core] + 0); | ||
541 | |||
542 | b43_phy_write(dev, base[core] + 6, 0); | ||
543 | b43_phy_mask(dev, base[core] + 7, ~0xF); /* 0xF? Or just 0x6? */ | ||
544 | b43_phy_set(dev, base[core] + 0, 0x0400); | ||
545 | b43_phy_set(dev, base[core] + 0, 0x1000); | ||
546 | } | ||
535 | 547 | ||
536 | b43_phy_ht_tx_tone(dev); | 548 | b43_phy_ht_tx_tone(dev); |
537 | udelay(20); | 549 | udelay(20); |
@@ -543,7 +555,11 @@ static void b43_phy_ht_tx_power_ctl_idle_tssi(struct b43_wldev *dev) | |||
543 | phy_ht->idle_tssi[1] = rssi_buf[2] & 0xff; | 555 | phy_ht->idle_tssi[1] = rssi_buf[2] & 0xff; |
544 | phy_ht->idle_tssi[2] = rssi_buf[4] & 0xff; | 556 | phy_ht->idle_tssi[2] = rssi_buf[4] & 0xff; |
545 | 557 | ||
546 | /* TODO */ | 558 | for (core = 0; core < 3; core++) { |
559 | b43_phy_write(dev, base[core] + 0, save_regs[core][0]); | ||
560 | b43_phy_write(dev, base[core] + 6, save_regs[core][1]); | ||
561 | b43_phy_write(dev, base[core] + 7, save_regs[core][2]); | ||
562 | } | ||
547 | } | 563 | } |
548 | 564 | ||
549 | static void b43_phy_ht_tx_power_ctl_setup(struct b43_wldev *dev) | 565 | static void b43_phy_ht_tx_power_ctl_setup(struct b43_wldev *dev) |