b43: HT-PHY: store TX power state before disabling it
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
This commit is contained in:
parent
fc6ab1e0c0
commit
418e8b6805
1 changed files with 6 additions and 4 deletions
|
@ -497,15 +497,17 @@ static void b43_phy_ht_tx_power_ctl(struct b43_wldev *dev, bool enable)
|
||||||
static const u16 cmd_regs[3] = { B43_PHY_HT_TXPCTL_CMD_C1,
|
static const u16 cmd_regs[3] = { B43_PHY_HT_TXPCTL_CMD_C1,
|
||||||
B43_PHY_HT_TXPCTL_CMD_C2,
|
B43_PHY_HT_TXPCTL_CMD_C2,
|
||||||
B43_PHY_HT_TXPCTL_CMD_C3 };
|
B43_PHY_HT_TXPCTL_CMD_C3 };
|
||||||
|
static const u16 status_regs[3] = { B43_PHY_HT_TX_PCTL_STATUS_C1,
|
||||||
|
B43_PHY_HT_TX_PCTL_STATUS_C2,
|
||||||
|
B43_PHY_HT_TX_PCTL_STATUS_C3 };
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (!enable) {
|
if (!enable) {
|
||||||
if (b43_phy_read(dev, B43_PHY_HT_TXPCTL_CMD_C1) & en_bits) {
|
if (b43_phy_read(dev, B43_PHY_HT_TXPCTL_CMD_C1) & en_bits) {
|
||||||
/* We disable enabled TX pwr ctl, save it's state */
|
/* We disable enabled TX pwr ctl, save it's state */
|
||||||
/*
|
for (i = 0; i < 3; i++)
|
||||||
* TODO: find the registers. On N-PHY they were 0x1ed
|
phy_ht->tx_pwr_idx[i] =
|
||||||
* and 0x1ee, we need 3 such a registers for HT-PHY
|
b43_phy_read(dev, status_regs[i]);
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
b43_phy_mask(dev, B43_PHY_HT_TXPCTL_CMD_C1, ~en_bits);
|
b43_phy_mask(dev, B43_PHY_HT_TXPCTL_CMD_C1, ~en_bits);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue