Search Linux Wireless

[PATCH 19/21] rt2x00: Fix antenna initialization

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

 



From: Ivo van Doorn <IvDoorn@xxxxxxxxx>

Legacy driver indicates that BBP1_TX_ANTENNA must be set
to 0 for TXPATH values of 1 and 3. So the previous statement
that nothing should be done for TXPATH = 3, is false.

Furthermore, remove the false BBP3_RX_ANTENNA initialization
when TXPATH is 1 for PCI and SOC devices. This field will always
be overridden in the next switch statement, making this initialization
bogus. History of this line indicates it was there from the beginning,
and was once caught as typo. Instead of replacing the line with the
correct line, the correct line was added...

Signed-off-by: Ivo van Doorn <IvDoorn@xxxxxxxxx>
Acked-by: Helmut Schaa <helmut.schaa@xxxxxxxxxxxxxx>
---
 drivers/net/wireless/rt2x00/rt2800lib.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index 2d0a216..0cf7796 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -836,14 +836,12 @@ void rt2800_config_ant(struct rt2x00_dev *rt2x00dev, struct antenna_setup *ant)
 	switch ((int)ant->tx) {
 	case 1:
 		rt2x00_set_field8(&r1, BBP1_TX_ANTENNA, 0);
-		if (rt2x00_is_pci(rt2x00dev) || rt2x00_is_soc(rt2x00dev))
-			rt2x00_set_field8(&r3, BBP3_RX_ANTENNA, 0);
 		break;
 	case 2:
 		rt2x00_set_field8(&r1, BBP1_TX_ANTENNA, 2);
 		break;
 	case 3:
-		/* Do nothing */
+		rt2x00_set_field8(&r1, BBP1_TX_ANTENNA, 0);
 		break;
 	}
 
-- 
1.6.6.1

--
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