rt2x00: Fix antenna configuration
Subsystems (3)
PATCH 9/32 rt2x00: Fix antenna configuration
From: Ivo van Doorn <[email protected]>
The handling of the antenna configuration was not completely correct. For all modules the double clearing of some bits can be reduced, and for rt2500pci and rt2500usb some registers were not corretly changed.
Signed-off-by Ivo van Doorn <[email protected]>
drivers/net/wireless/d80211/rt2x00/rt2400pci.c +9 -6
@@ -485,6 +485,9 @@ rt2400pci_config_antenna(struct rt2x00_prt2x00_bbp_read (rt2x00pci,4 , ®_rx);rt2x00_bbp_read (rt2x00pci,1 , ®_tx); +/* +* Clear current config antenna bits. +*/ reg_rx &= ~0x06 ; reg_tx &= ~0x03 ;
@@ -495,18 +498,18 @@ rt2400pci_config_antenna(struct rt2x00_p*/ if (antenna ==0 ) {/* Diversity. */ - reg_rx = (reg_rx &0xf9 ) |0x02 ; - reg_tx = (reg_tx &0xfc ) |0x01 ; + reg_rx |=0x02 ; + reg_tx |=0x01 ; }else if (antenna ==1 ) {/* RX: Antenna B */ - reg_rx = (reg_rx &0xf9 ) |0x04 ; + reg_rx |=0x04 ;/* TX: Antenna A */ - reg_tx = (reg_tx &0xfc ) |0x00 ; + reg_tx |=0x00 ; }else if (antenna ==2 ) {/* RX: Antenna A */ - reg_rx = (reg_rx &0xf9 ) |0x00 ; + reg_rx |=0x00 ;/* TX: Antenna B */ - reg_tx = (reg_tx &0xfc ) |0x02 ; + reg_tx |=0x02 ; }rt2x00_bbp_write (rt2x00pci,4 , reg_rx);
drivers/net/wireless/d80211/rt2x00/rt2500pci.c +37 -6
69 lines not on this page · raw message
drivers/net/wireless/d80211/rt2x00/rt2500usb.c +23 -21
71 lines not on this page · raw message