Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e25c4bb913e54d729631ba7eb50daf1d9aacbef6
Commit:     e25c4bb913e54d729631ba7eb50daf1d9aacbef6
Parent:     2d68de3efa62655d551092f5c787505735d561ad
Author:     Ivo van Doorn <[EMAIL PROTECTED]>
AuthorDate: Sat Oct 27 13:39:28 2007 +0200
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Jan 28 15:02:56 2008 -0800

    rt2x00: Disable RX when switching antenna
    
    Antenna switching will be ignored when RX is enabled
    during the switch. Make sure we disable the RX during
    the switch and don't forget to reenable it later.
    
    Signed-off-by: Ivo van Doorn <[EMAIL PROTECTED]>
    Signed-off-by: John W. Linville <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 drivers/net/wireless/rt2x00/rt2x00config.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2x00config.c 
b/drivers/net/wireless/rt2x00/rt2x00config.c
index b4fad74..9f0733b 100644
--- a/drivers/net/wireless/rt2x00/rt2x00config.c
+++ b/drivers/net/wireless/rt2x00/rt2x00config.c
@@ -103,6 +103,13 @@ void rt2x00lib_config_antenna(struct rt2x00_dev *rt2x00dev,
        libconf.ant.tx = tx;
 
        /*
+        * Antenna setup changes require the RX to be disabled,
+        * else the changes will be ignored by the device.
+        */
+       if (test_bit(DEVICE_ENABLED_RADIO, &rt2x00dev->flags))
+               rt2x00lib_toggle_rx(rt2x00dev, STATE_RADIO_RX_OFF);
+
+       /*
         * Write new antenna setup to device and reset the link tuner.
         * The latter is required since we need to recalibrate the
         * noise-sensitivity ratio for the new setup.
@@ -112,6 +119,9 @@ void rt2x00lib_config_antenna(struct rt2x00_dev *rt2x00dev,
 
        rt2x00dev->link.ant.active.rx = libconf.ant.rx;
        rt2x00dev->link.ant.active.tx = libconf.ant.tx;
+
+       if (test_bit(DEVICE_ENABLED_RADIO, &rt2x00dev->flags))
+               rt2x00lib_toggle_rx(rt2x00dev, STATE_RADIO_RX_ON);
 }
 
 void rt2x00lib_config(struct rt2x00_dev *rt2x00dev,
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to