Commit 9ad3b556 authored by Stanislaw Gruszka's avatar Stanislaw Gruszka Committed by Kalle Valo

rt2800: enable TX_PIN_CFG_LNA_PE_ bits per band

Do not enable TX_PIN_CFG_LNA_PE_A* bits for 2.4GHz band and
vice versa TX_PIN_CFG_LNA_PE_G* bits for 5GHz.
Signed-off-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 5991a2ec
...@@ -3893,18 +3893,24 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev, ...@@ -3893,18 +3893,24 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
switch (rt2x00dev->default_ant.rx_chain_num) { switch (rt2x00dev->default_ant.rx_chain_num) {
case 3: case 3:
/* Turn on tertiary LNAs */ /* Turn on tertiary LNAs */
rt2x00_set_field32(&tx_pin, TX_PIN_CFG_LNA_PE_A2_EN, 1); rt2x00_set_field32(&tx_pin, TX_PIN_CFG_LNA_PE_A2_EN,
rt2x00_set_field32(&tx_pin, TX_PIN_CFG_LNA_PE_G2_EN, 1); rf->channel > 14);
rt2x00_set_field32(&tx_pin, TX_PIN_CFG_LNA_PE_G2_EN,
rf->channel <= 14);
/* fall-through */ /* fall-through */
case 2: case 2:
/* Turn on secondary LNAs */ /* Turn on secondary LNAs */
rt2x00_set_field32(&tx_pin, TX_PIN_CFG_LNA_PE_A1_EN, 1); rt2x00_set_field32(&tx_pin, TX_PIN_CFG_LNA_PE_A1_EN,
rt2x00_set_field32(&tx_pin, TX_PIN_CFG_LNA_PE_G1_EN, 1); rf->channel > 14);
rt2x00_set_field32(&tx_pin, TX_PIN_CFG_LNA_PE_G1_EN,
rf->channel <= 14);
/* fall-through */ /* fall-through */
case 1: case 1:
/* Turn on primary LNAs */ /* Turn on primary LNAs */
rt2x00_set_field32(&tx_pin, TX_PIN_CFG_LNA_PE_A0_EN, 1); rt2x00_set_field32(&tx_pin, TX_PIN_CFG_LNA_PE_A0_EN,
rt2x00_set_field32(&tx_pin, TX_PIN_CFG_LNA_PE_G0_EN, 1); rf->channel > 14);
rt2x00_set_field32(&tx_pin, TX_PIN_CFG_LNA_PE_G0_EN,
rf->channel <= 14);
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment