[rt2x00-users] [PATCH] rt2x00: Fix disconnect in power save mode regression.

Wolfgang Kufner wolfgang.kufner at gmail.com
Mon Jan 17 00:03:58 AEDT 2011


Commit 303c7d6abfd0430e39e84a43361492b4a8c890b6
"rt2x00: Fix MCU_SLEEP arguments" brings the second argument for
the MCU_SLEEP command in sync with the original rt2860sta 2.1.0.0
driver in staging. This driver does not support power save mode.

This causes a regression on a pci device rt: 2872,
rf: 0003, rev: 0200 in power save mode only. Data transmission
immediately drops to almost nothing, the device then disconnects.
If power saving is not disabled soon enough this deteriorates
further, showing first
phy0 -> rt2x00queue_flush_queue: Warning - Queue 0 failed to flush
and finally
phy0 -> rt2x00queue_write_tx_frame:
Error - Arrived at non-free entry in the non-full queue 0.
The only way to reconnect then is to reboot.

Fix this by setting this second argument back to its previous value.
It is still unknown what the values actually mean.

Signed-off-by: Wolfgang Kufner <wolfgang.kufner at gmail.com>
---
 drivers/net/wireless/rt2x00/rt2800pci.c |    2 +-
 drivers/net/wireless/rt2x00/rt2800usb.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c
index bfc2fc5..360d4da 100644
--- a/drivers/net/wireless/rt2x00/rt2800pci.c
+++ b/drivers/net/wireless/rt2x00/rt2800pci.c
@@ -491,7 +491,7 @@ static int rt2800pci_set_state(struct rt2x00_dev *rt2x00dev,
 	} else if (state == STATE_SLEEP) {
 		rt2800_register_write(rt2x00dev, H2M_MAILBOX_STATUS, 0xffffffff);
 		rt2800_register_write(rt2x00dev, H2M_MAILBOX_CID, 0xffffffff);
-		rt2800_mcu_request(rt2x00dev, MCU_SLEEP, 0x01, 0xff, 0x01);
+		rt2800_mcu_request(rt2x00dev, MCU_SLEEP, 0x01, 0, 0x01);
 	}
 
 	return 0;
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
index b97a4a5..7701921 100644
--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -223,7 +223,7 @@ static int rt2800usb_set_state(struct rt2x00_dev *rt2x00dev,
 	if (state == STATE_AWAKE)
 		rt2800_mcu_request(rt2x00dev, MCU_WAKEUP, 0xff, 0, 2);
 	else
-		rt2800_mcu_request(rt2x00dev, MCU_SLEEP, 0xff, 0xff, 2);
+		rt2800_mcu_request(rt2x00dev, MCU_SLEEP, 0xff, 0, 2);
 
 	return 0;
 }
-- 
1.7.2.3




More information about the users mailing list