Search Linux Wireless

[PATCH 2/2] b43: Add lpphy_clear_tx_power_offsets to improve TX Power handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch adds the lpphy_clear_tx_power_offsets to b43.

Signed-off-by: Thomas Ilnseher <illth@xxxxxx>

---
diff -uNr a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c
--- a/drivers/net/wireless/b43/phy_lp.c	2009-09-16 20:52:17.501318374 +0200
+++ b/drivers/net/wireless/b43/phy_lp.c	2009-09-16 20:53:36.593319452 +0200
@@ -1125,6 +1125,18 @@
 	dev->phy.lp->tssi_idx = (b43_phy_read(dev, B43_LPPHY_TX_PWR_CTL_STAT) & 0x7F00) >> 8;
 }
 
+static void lpphy_clear_tx_power_offsets(struct b43_wldev *dev)
+{
+	int i;
+	int id = 7;
+	if (dev->phy.rev < 2)
+		id = 10;
+	for (i = 0; i < 12; i++)
+		b43_lptab_write(dev, B43_LPTAB32(id, 0x40 + i), 0);
+	for (i = 0; i < 64; i++)
+		b43_lptab_write(dev, B43_LPTAB32(id, 0x80 + i), 0);
+}
+
 static void lpphy_set_tx_power_control(struct b43_wldev *dev,
 				       enum b43_lpphy_txpctl_mode mode)
 {
@@ -1139,7 +1151,7 @@
 
 	if (oldmode == B43_LPPHY_TXPCTL_HW) {
 		lpphy_update_tx_power_npt(dev);
-		//TODO Clear all TX Power offsets
+		lpphy_clear_tx_power_offsets(dev);
 	} else {
 		if (mode == B43_LPPHY_TXPCTL_HW) {
 			//TODO Recalculate target TX power

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux