summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2400pci.c
diff options
context:
space:
mode:
authorGertjan van Wingerde <gwingerde@gmail.com>2010-03-30 23:50:23 +0200
committerJohn W. Linville <linville@tuxdriver.com>2010-04-06 22:52:07 +0200
commit5731858d0047cad309d334c4cd6ccb6199bf28fe (patch)
tree7fd0c4738843b41a6490a57d20cfea6a6d76ff2a /drivers/net/wireless/rt2x00/rt2400pci.c
parentlibertas/sdio: 8686: set ECSI bit for 1-bit transfers (diff)
downloadlinux-5731858d0047cad309d334c4cd6ccb6199bf28fe.tar.xz
linux-5731858d0047cad309d334c4cd6ccb6199bf28fe.zip
rt2x00: Disable auto wakeup before waking up device.
In all drivers ensure that auto wakeup is disabled before waking up the device. This is needed to prevent connection stability issues and problems in waking up the device. Based upon a patch from Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Cc: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2400pci.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2400pci.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c
index c22b04042d5c..08a4789fc2d8 100644
--- a/drivers/net/wireless/rt2x00/rt2400pci.c
+++ b/drivers/net/wireless/rt2x00/rt2400pci.c
@@ -525,6 +525,10 @@ static void rt2400pci_config_ps(struct rt2x00_dev *rt2x00dev,
rt2x00_set_field32(&reg, CSR20_AUTOWAKE, 1);
rt2x00pci_register_write(rt2x00dev, CSR20, reg);
+ } else {
+ rt2x00pci_register_read(rt2x00dev, CSR20, &reg);
+ rt2x00_set_field32(&reg, CSR20_AUTOWAKE, 0);
+ rt2x00pci_register_write(rt2x00dev, CSR20, reg);
}
rt2x00dev->ops->lib->set_device_state(rt2x00dev, state);